Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ufs-release/public-v2: cherry-pick add GFSv16 dzmin change and changes for Dev/jcsda #63

Merged
merged 1 commit into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions model/nh_utils.F90
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ module nh_utils_mod
public sim3p0_solver, rim_2d
public Riem_Solver_c

real, parameter:: dz_min = 2.
real, parameter:: dz_min = 6.
real, parameter:: r3 = 1./3.

CONTAINS
Expand Down Expand Up @@ -198,14 +198,14 @@ subroutine update_dz_c(is, ie, js, je, km, ng, dt, dp0, zs, area, ut, vt, gz, ws
! Enforce monotonicity of height to prevent blowup
!$OMP parallel do default(none) shared(is1,ie1,js1,je1,ws,zs,gz,rdt,km)
do j=js1, je1
do i=is1, ie1
ws(i,j) = ( zs(i,j) - gz(i,j,km+1) ) * rdt
enddo
do k=km, 1, -1
do k=2, km+1
do i=is1, ie1
gz(i,j,k) = max( gz(i,j,k), gz(i,j,k+1) + dz_min )
gz(i,j,k) = min( gz(i,j,k), gz(i,j,k-1) - dz_min )
enddo
enddo
do i=is1, ie1
ws(i,j) = ( zs(i,j) - gz(i,j,km+1) ) * rdt
enddo
enddo

end subroutine update_dz_c
Expand Down Expand Up @@ -312,15 +312,15 @@ subroutine update_dz_d(ndif, damp, hord, is, ie, js, je, km, ng, npx, npy, area,

!$OMP parallel do default(none) shared(is,ie,js,je,km,ws,zs,zh,rdt)
do j=js, je
do i=is,ie
ws(i,j) = ( zs(i,j) - zh(i,j,km+1) ) * rdt
enddo
do k=km, 1, -1
do k=2, km+1
do i=is, ie
! Enforce monotonicity of height to prevent blowup
zh(i,j,k) = max( zh(i,j,k), zh(i,j,k+1) + dz_min )
zh(i,j,k) = min( zh(i,j,k), zh(i,j,k-1) - dz_min )
enddo
enddo
do i=is,ie
ws(i,j) = ( zs(i,j) - zh(i,j,km+1) ) * rdt
enddo
enddo

end subroutine update_dz_d
Expand Down
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 @@ -999,8 +1000,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 @@ -1564,8 +1563,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