Skip to content

Commit

Permalink
Add code changes in external_ic.F90 and fv_grid_tools.F90 for dev/jcs…
Browse files Browse the repository at this point in the history
…da, dycore PR NOAA-EMC#35

Co-authored-by: Dan Holdaway <dan.holdaway@nasa.govr>
  • Loading branch information
junwang-noaa and Dan Holdaway committed Nov 12, 2020
1 parent ebc59dd commit c070cb6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
11 changes: 4 additions & 7 deletions tools/external_ic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,11 @@ module external_ic_mod

real, parameter:: zvir = rvgas/rdgas - 1.
real(kind=R_GRID), parameter :: cnst_0p20=0.20d0
real :: deg2rad
character (len = 80) :: source ! This tells what the input source was for the data
real, parameter :: deg2rad = pi/180.
character (len = 80),public :: source ! This tells what the input source was for the data
character(len=27), parameter :: source_fv3gfs = 'FV3GFS GAUSSIAN NEMSIO FILE'
public get_external_ic, get_cubed_sphere_terrain
public get_external_ic, get_cubed_sphere_terrain
public remap_scalar, remap_dwinds

! version number of this module
! Include variable "version" to be written to log file.
Expand Down Expand Up @@ -997,8 +998,6 @@ subroutine get_ncep_ic( Atm, fv_domain, nq )
jsd = Atm%bd%jsd
jed = Atm%bd%jed

deg2rad = pi/180.

npz = Atm%npz
call get_number_tracers(MODEL_ATMOS, num_tracers=ntracers, num_prog=ntprog)
if(is_master()) write(*,*) 'ntracers = ', ntracers, 'ntprog = ',ntprog
Expand Down Expand Up @@ -1562,8 +1561,6 @@ subroutine get_ecmwf_ic( Atm, fv_domain )
jsd = Atm%bd%jsd
jed = Atm%bd%jed

deg2rad = pi/180.

npz = Atm%npz
call get_number_tracers(MODEL_ATMOS, num_tracers=ntracers, num_prog=ntprog)
if(is_master()) write(*,*) 'ntracers = ', ntracers, 'ntprog = ',ntprog
Expand Down
8 changes: 4 additions & 4 deletions tools/fv_grid_tools.F90
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ subroutine init_grid(Atm, grid_name, grid_file, npx, npy, npz, ndims, nregions,

if (Atm%neststruct%nested .or. ANY(Atm%neststruct%child_grids)) then
grid_global => Atm%grid_global
else if( trim(grid_file) .NE. 'INPUT/grid_spec.nc') then
else if( trim(grid_file) .EQ. 'Inline') then
allocate(grid_global(1-ng:npx +ng,1-ng:npy +ng,ndims,1:nregions))
endif

Expand Down Expand Up @@ -683,7 +683,7 @@ subroutine init_grid(Atm, grid_name, grid_file, npx, npy, npz, ndims, nregions,
! still need to set up
call setup_aligned_nest(Atm)
else
if(trim(grid_file) == 'INPUT/grid_spec.nc') then
if(trim(grid_file) .NE. 'Inline') then
call read_grid(Atm, grid_file, ndims, nregions, ng)
else
if (Atm%flagstruct%grid_type>=0) call gnomonic_grids(Atm%flagstruct%grid_type, npx-1, xs, ys)
Expand Down Expand Up @@ -1180,8 +1180,8 @@ subroutine init_grid(Atm, grid_name, grid_file, npx, npy, npz, ndims, nregions,
enddo

if (Atm%neststruct%nested .or. ANY(Atm%neststruct%child_grids)) then
nullify(grid_global)
else if( trim(grid_file) .NE. 'INPUT/grid_spec.nc') then
nullify(grid_global)
else if( trim(grid_file) .EQ. 'Inline') then
deallocate(grid_global)
endif

Expand Down

0 comments on commit c070cb6

Please sign in to comment.