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

Bringing in updates from Gitlab #61

Merged
merged 1 commit into from
Jan 10, 2025
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
28 changes: 14 additions & 14 deletions FV3GFS/FV3GFS_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ module FV3GFS_io_mod
!--- GFDL FMS restart containers
character(len=32), allocatable, dimension(:) :: oro_name2, sfc_name2, sfc_name3
real(kind=kind_phys), allocatable, target, dimension(:,:,:) :: oro_var2, sfc_var2, phy_var2
real(kind=kind_phys), allocatable, target, dimension(:,:) :: ifsSST
real(kind=kind_phys), allocatable, target, dimension(:,:,:) :: ifsSST
real(kind=kind_phys), allocatable, target, dimension(:,:,:,:) :: sfc_var3, phy_var3
!--- Noah MP restart containers
real(kind=kind_phys), allocatable, target, dimension(:,:,:,:) :: sfc_var3sn,sfc_var3eq,sfc_var3zn
Expand Down Expand Up @@ -529,10 +529,6 @@ subroutine register_sfc_prop_restart_vars(Model, nx, ny, nvar_s2m, action)
nvar_s3mp = 0 !mp 3D
endif

if (Model%use_ifs_ini_sst) then
allocate(ifsSST(nx,ny))
endif

if (.not. allocated(sfc_name2)) then
!--- allocate the various containers needed for restarts
allocate(sfc_name2(nvar_s2m+nvar_s2o+nvar_s2mp))
Expand Down Expand Up @@ -767,14 +763,6 @@ subroutine register_sfc_prop_restart_vars(Model, nx, ny, nvar_s2m, action)

endif ! end of if (read)

!--- register IFS SST
if (Model%use_ifs_ini_sst) then
var2_p => ifsSST
opt = .false.
call register_restart_field(ifsSST_restart, 'sst', var2_p, dim_names_2d, is_optional=opt)
nullify(var2_p)
endif

!--- register the 2D fields
do num = 1,nvar_s2m
var2_p => sfc_var2(:,:,num)
Expand Down Expand Up @@ -866,6 +854,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, enforce_
logical :: opt
character(len=8) :: dim_names_2d(3)
real(kind=kind_phys), pointer, dimension(:,:) :: var2_p => NULL()
real(kind=kind_phys), pointer, dimension(:,:,:) :: var3_p => NULL()

character(len=64) :: fname
!--- local variables for sncovr calculation
Expand Down Expand Up @@ -1014,9 +1003,20 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, enforce_
endif

if (Model%use_ifs_ini_sst) then
allocate(ifsSST(nx,ny,1))
!--- Open the restart file and associate it with the ifsSST_restart fileobject
fname='INPUT/'//trim(fn_ifsSST)
if (open_file(ifsSST_restart, fname, "read", fv_domain, is_restart=.true., dont_add_res_to_filename=.true.)) then
call register_axis(ifsSST_restart, "lat", "y")
call register_axis(ifsSST_restart, "lon", "x")
call register_axis(ifsSST_restart, "time", dimension_length=1)
dim_names_2d(1) = "lat"
dim_names_2d(2) = "lon"
dim_names_2d(3) = "time"
var3_p => ifsSST
opt = .false.
call register_restart_field(ifsSST_restart, 'sst', var3_p, dim_names_2d, is_optional=opt)
nullify(var3_p)
!--- read the IFS SST restart/data
call mpp_error(NOTE,'reading ifs SST data from INPUT/ifsSST_data.tile*.nc')
call read_restart(ifsSST_restart, ignore_checksum=enforce_rst_cksum)
Expand Down Expand Up @@ -1048,7 +1048,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, enforce_
! ------------
Sfcprop(nb)%slmsk(ix) = sfc_var2(i,j,1) !--- slmsk
if (Model%use_ifs_ini_sst) then
Sfcprop(nb)%tsfco(ix) = ifsSST(i,j) !--- tsfc (sst in ifsSST file)
Sfcprop(nb)%tsfco(ix) = ifsSST(i,j,1) !--- tsfc (sst in ifsSST file)
else
Sfcprop(nb)%tsfco(ix) = sfc_var2(i,j,2) !--- tsfc (tsea in sfc file)
endif
Expand Down
4 changes: 2 additions & 2 deletions GFS_layer/GFS_physics_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,8 @@ subroutine GFS_physics_driver &
!GFDL garea(i) = tem1 * tem2
tem1 = Grid%dx(i)
tem2 = Grid%dx(i)
garea(i) = Grid%area(i)
dlength(i) = sqrt( tem1*tem1+tem2*tem2 )
garea(i) = Grid%area(i)*(Model%scale_awareness_factor**2.)
dlength(i) = sqrt( tem1*tem1+tem2*tem2 )*Model%scale_awareness_factor
cldf(i) = Model%cgwf(1)*work1(i) + Model%cgwf(2)*work2(i)
wcbmax(i) = Model%cs_parm(1)*work1(i) + Model%cs_parm(2)*work2(i)
enddo
Expand Down
7 changes: 7 additions & 0 deletions GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ module GFS_typedefs
integer :: sfcpress_id !< valid for GFS only for get_prs/phi
logical :: gen_coord_hybrid!< for Henry's gen coord
logical :: sfc_override !< use idealized surface conditions
real(kind=kind_phys) :: scale_awareness_factor !< Scale adjustment factor for physics parameterizations to ensure consistency
!< across varying grid resolutions, optimized for 13 km reference resolution.

!--- set some grid extent parameters
integer :: isc !< starting i-index for this MPI-domain
Expand Down Expand Up @@ -2232,6 +2234,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
integer :: thermodyn_id = 1 !< valid for GFS only for get_prs/phi
integer :: sfcpress_id = 1 !< valid for GFS only for get_prs/phi
logical :: sfc_override = .false. !< use idealized surface conditions
real(kind=kind_phys) :: scale_awareness_factor = 1. !< Scale adjustment factor for physics parameterizations to ensure consistency
!< across varying grid resolutions, optimized for 13 km reference resolution.

!--- coupling parameters
logical :: cplflx = .false. !< default no cplflx collection
Expand Down Expand Up @@ -2575,6 +2579,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- general parameters
fhzero, ldiag3d, lssav, fhcyc, lgocart, fhgoc3d, &
thermodyn_id, sfcpress_id, sfc_override, &
scale_awareness_factor, &
!--- coupling parameters
cplflx, cplwav, lsidea, &
!--- radiation parameters
Expand Down Expand Up @@ -2692,6 +2697,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%sfcpress_id = sfcpress_id
Model%gen_coord_hybrid = gen_coord_hybrid
Model%sfc_override = sfc_override
Model%scale_awareness_factor = scale_awareness_factor

!--- set some grid extent parameters
Model%tile_num = tile_num
Expand Down Expand Up @@ -3402,6 +3408,7 @@ subroutine control_print(Model)
print *, ' gen_coord_hybrid : ', Model%gen_coord_hybrid
print *, ' sfc_override : ', Model%sfc_override
print *, ' override_surface_radiative_fluxes: ', Model%override_surface_radiative_fluxes
print *, ' scale_awareness_factor: ', Model%scale_awareness_factor
print *, ' '
print *, 'grid extent parameters'
print *, ' isc : ', Model%isc
Expand Down