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/dev PR#30 #368

Merged
merged 4 commits into from
Apr 5, 2023
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
2 changes: 1 addition & 1 deletion ccpp/physics_namelists/input_GFS_v16.nml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
lwhtr = .true.
n_var_lndp = 0
n_var_spp = 0
nsradar_reset = 3600
nsfullradar_diag = 3600
nst_anl = .true.
nstf_name = 2, 1, 0, 0, 0
oz_phys = .false.
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics_namelists/input_GFS_v16_RRTMGP.nml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
lwhtr = .true.
n_var_lndp = 0
n_var_spp = 0
nsradar_reset = 3600
nsfullradar_diag = 3600
nst_anl = .true.
nstf_name = 2, 1, 0, 0, 0
oz_phys = .false.
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics_namelists/input_GFS_v16_ps.nml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
lwhtr = .true.
n_var_lndp = 0
n_var_spp = 0
nsradar_reset = 3600
nsfullradar_diag = 3600
nst_anl = .true.
nstf_name = 2, 1, 0, 0, 0
oz_phys = .false.
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics_namelists/input_HRRR.nml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
lwhtr = .true.
n_var_lndp = 0
n_var_spp = 0
nsradar_reset = 3600
nsfullradar_diag = 3600
nst_anl = .true.
nstf_name = 2, 1, 0, 0, 0
oz_phys = .false.
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics_namelists/input_RRFS_v1alpha.nml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
lsoil_lsm = 4
ltaerosol = .true.
lwhtr = .true.
nsradar_reset = 3600
nsfullradar_diag = 3600
nst_anl = .true.
nstf_name = 2,1,0,0,0
oz_phys = .false.
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics_namelists/input_RRFS_v1beta.nml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
lwhtr = .true.
n_var_lndp = 0
n_var_spp = 0
nsradar_reset = 3600
nsfullradar_diag = 3600
nst_anl = .true.
nstf_name = 2, 1, 0, 0, 0
oz_phys = .false.
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics_namelists/input_RRFS_v1nssl.nml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
lsoil_lsm = 4
ltaerosol = .false.
lwhtr = .true.
nsradar_reset = 3600
nsfullradar_diag = 3600
nst_anl = .true.
nstf_name = 2,1,0,0,0
oz_phys = .false.
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics_namelists/input_RRFS_v1nssl_nohailnoccn.nml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
lsoil_lsm = 4
ltaerosol = .false.
lwhtr = .true.
nsradar_reset = 3600
nsfullradar_diag = 3600
nst_anl = .true.
nstf_name = 2,1,0,0,0
oz_phys = .false.
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics_namelists/input_WoFS_v0.nml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
lwhtr = .true.
n_var_lndp = 0
n_var_spp = 0
nsradar_reset = 3600
nsfullradar_diag = 3600
nssl_cccn = 600000000.0
nssl_ccn_on = .true.
nssl_hail_on = .true.
Expand Down
10 changes: 5 additions & 5 deletions scm/src/CCPP_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ module CCPP_typedefs
real (kind=kind_phys), pointer :: qss_ice(:) => null() !<
real (kind=kind_phys), pointer :: qss_land(:) => null() !<
real (kind=kind_phys), pointer :: qss_water(:) => null() !<
logical :: radar_reset !<
logical :: fullradar_diag !<
real (kind=kind_phys) :: raddt !<
real (kind=kind_phys), pointer :: rainmp(:) => null() !<
real (kind=kind_phys), pointer :: raincd(:) => null() !<
Expand Down Expand Up @@ -1405,11 +1405,11 @@ subroutine gfs_interstitial_phys_reset (Interstitial, Model)
! Use same logic in UFS to reset Thompson extended diagnostics
Interstitial%ext_diag_thompson_reset = Interstitial%max_hourly_reset
!
! Set flag for resetting radar reflectivity calculation
if (Model%nsradar_reset<0) then
Interstitial%radar_reset = .true.
! Frequency flag for computing the full radar reflectivity (water coated ice)
if (Model%nsfullradar_diag<0) then
Interstitial%fullradar_diag = .true.
else
Interstitial%radar_reset = mod(Model%kdt-1, nint(Model%nsradar_reset/Model%dtp)) == 0
Interstitial%fullradar_diag = (Model%kdt == 1 .or. mod(Model%kdt, nint(Model%nsfullradar_diag/Model%dtp)) == 0)
end if
!
end subroutine gfs_interstitial_phys_reset
Expand Down
6 changes: 3 additions & 3 deletions scm/src/CCPP_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -1699,9 +1699,9 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[radar_reset]
standard_name = flag_for_resetting_radar_reflectivity_calculation
long_name = flag for resetting radar reflectivity calculation
[fullradar_diag]
standard_name = do_full_radar_reflectivity
long_name = flag for computing full radar reflectivity
units = flag
dimensions = ()
type = logical
Expand Down
61 changes: 48 additions & 13 deletions scm/src/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: clw_surf_ice(:) => null() !< RUC LSM: moist cloud water mixing ratio at surface over ice
real (kind=kind_phys), pointer :: qwv_surf_land(:) => null() !< RUC LSM: water vapor mixing ratio at surface over land
real (kind=kind_phys), pointer :: qwv_surf_ice(:) => null() !< RUC LSM: water vapor mixing ratio at surface over ice
real (kind=kind_phys), pointer :: rhofr(:) => null() !< RUC LSM: density of frozen precipitation
real (kind=kind_phys), pointer :: tsnow_land(:) => null() !< RUC LSM: snow temperature at the bottom of the first snow layer over land
real (kind=kind_phys), pointer :: tsnow_ice(:) => null() !< RUC LSM: snow temperature at the bottom of the first snow layer over ice
real (kind=kind_phys), pointer :: snowfallac_land(:) => null() !< ruc lsm diagnostics over land
Expand Down Expand Up @@ -912,7 +911,7 @@ module GFS_typedefs
logical :: ltaerosol !< flag for aerosol version
logical :: mraerosol !< flag for merra2_aerosol_aware
logical :: lradar !< flag for radar reflectivity
real(kind=kind_phys) :: nsradar_reset !< seconds between resetting radar reflectivity calculation
real(kind=kind_phys) :: nsfullradar_diag!< seconds between resetting radar reflectivity calculation
real(kind=kind_phys) :: ttendlim !< temperature tendency limiter per time step in K/s
logical :: ext_diag_thompson !< flag for extended diagnostic output from Thompson
integer :: thompson_ext_ndiag3d=37 !< number of 3d arrays for extended diagnostic output from Thompson
Expand Down Expand Up @@ -946,6 +945,7 @@ module GFS_typedefs
integer :: lsnow_lsm !< maximum number of snow layers internal to land surface model
integer :: lsnow_lsm_lbound!< lower bound for snow arrays, depending on lsnow_lsm
integer :: lsnow_lsm_ubound!< upper bound for snow arrays, depending on lsnow_lsm
logical :: exticeden !< flag for calculating frozen precip ice density outside of the LSM
real(kind=kind_phys), pointer :: zs(:) => null() !< depth of soil levels for land surface model
real(kind=kind_phys), pointer :: dzs(:) => null() !< thickness of soil levels for land surface model
real(kind=kind_phys), pointer :: pores(:) => null() !< max soil moisture for a given soil type for land surface model
Expand Down Expand Up @@ -1751,6 +1751,14 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: toticeb(:) => null() !< accumulated ice precipitation in bucket (kg/m2)
real (kind=kind_phys), pointer :: totsnwb(:) => null() !< accumulated snow precipitation in bucket (kg/m2)
real (kind=kind_phys), pointer :: totgrpb(:) => null() !< accumulated graupel precipitation in bucket (kg/m2)
real (kind=kind_phys), pointer :: frzr (:) => null() !< accumulated surface freezing rain (m)
real (kind=kind_phys), pointer :: frzrb (:) => null() !< accumulated surface freezing rain in bucket (m)
real (kind=kind_phys), pointer :: frozr (:) => null() !< accumulated surface graupel (m)
real (kind=kind_phys), pointer :: frozrb (:) => null() !< accumulated surface graupel in bucket (m)
real (kind=kind_phys), pointer :: tsnowp (:) => null() !< accumulated surface snowfall (m)
real (kind=kind_phys), pointer :: tsnowpb(:) => null() !< accumulated surface snowfall in bucket (m)
real (kind=kind_phys), pointer :: rhonewsn1(:) => null() !< precipitation ice density outside RUC LSM (kg/m3)
real (kind=kind_phys), pointer :: rhosnf(:) => null() !< precipitation ice density inside RUC LSM (kg/m3)

!--- MYNN variables
real (kind=kind_phys), pointer :: edmf_a (:,:) => null() !
Expand Down Expand Up @@ -2423,7 +2431,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate (Sfcprop%clw_surf_ice (IM))
allocate (Sfcprop%qwv_surf_land (IM))
allocate (Sfcprop%qwv_surf_ice (IM))
allocate (Sfcprop%rhofr (IM))
allocate (Sfcprop%tsnow_land (IM))
allocate (Sfcprop%tsnow_ice (IM))
allocate (Sfcprop%snowfallac_land (IM))
Expand All @@ -2439,7 +2446,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%qwv_surf_land = clear_val
Sfcprop%qwv_surf_ice = clear_val
Sfcprop%flag_frsoil = clear_val
Sfcprop%rhofr = clear_val
Sfcprop%tsnow_land = clear_val
Sfcprop%tsnow_ice = clear_val
Sfcprop%snowfallac_land = clear_val
Expand Down Expand Up @@ -3138,7 +3144,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
logical :: ltaerosol = .false. !< flag for aerosol version
logical :: mraerosol = .false. !< flag for merra2_aerosol_aware
logical :: lradar = .false. !< flag for radar reflectivity
real(kind=kind_phys) :: nsradar_reset = -999.0 !< seconds between resetting radar reflectivity calculation, set to <0 for every time step
real(kind=kind_phys) :: nsfullradar_diag = -999.0 !< seconds between resetting radar reflectivity calculation, set to <0 for every time step
real(kind=kind_phys) :: ttendlim = -999.0 !< temperature tendency limiter, set to <0 to deactivate
logical :: ext_diag_thompson = .false. !< flag for extended diagnostic output from Thompson
real(kind=kind_phys) :: dt_inner = -999.0 !< time step for the inner loop
Expand All @@ -3156,6 +3162,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
integer :: lsoil = 4 !< number of soil layers
integer :: lsoil_lsm = -1 !< number of soil layers internal to land surface model; -1 use lsoil
integer :: lsnow_lsm = 3 !< maximum number of snow layers internal to land surface model
logical :: exticeden = .false. !< Use variable precip ice density for NOAH LSM if true or original formulation
logical :: rdlai = .false. !< read LAI from input file (for RUC LSM or NOAH LSM WRFv4)
logical :: ua_phys = .false. !< flag for using University of Arizona? extension to NOAH LSM WRFv4
logical :: usemonalb = .true. !< flag to read surface diffused shortwave albedo from input file for NOAH LSM WRFv4
Expand Down Expand Up @@ -3551,7 +3558,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
mg_do_graupel, mg_do_hail, mg_nccons, mg_nicons, mg_ngcons, &
mg_ncnst, mg_ninst, mg_ngnst, sed_supersat, do_sb_physics, &
mg_alf, mg_qcmin, mg_do_ice_gmao, mg_do_liq_liu, &
ltaerosol, lradar, nsradar_reset, lrefres, ttendlim, &
ltaerosol, lradar, nsfullradar_diag, lrefres, ttendlim, &
ext_diag_thompson, dt_inner, lgfdlmprad, &
sedi_semi, decfl, &
nssl_cccn, nssl_alphah, nssl_alphahl, &
Expand All @@ -3561,7 +3568,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- land/surface model control
lsm, lsoil, lsoil_lsm, lsnow_lsm, kice, rdlai, &
nmtvr, ivegsrc, use_ufo, iopt_thcnd, ua_phys, usemonalb, &
aoasis, fasdas, &
aoasis, fasdas,exticeden, &
! Noah MP options
iopt_dveg,iopt_crs,iopt_btr,iopt_run,iopt_sfc, iopt_frz, &
iopt_inf, iopt_rad,iopt_alb,iopt_snf,iopt_tbot,iopt_stc, &
Expand Down Expand Up @@ -4157,7 +4164,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
stop
end if
Model%lradar = lradar
Model%nsradar_reset = nsradar_reset
Model%nsfullradar_diag = nsfullradar_diag
Model%ttendlim = ttendlim
Model%ext_diag_thompson= ext_diag_thompson
if (dt_inner>0) then
Expand Down Expand Up @@ -4265,7 +4272,15 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%ivegsrc = ivegsrc
Model%isot = isot
Model%use_ufo = use_ufo

Model%exticeden = exticeden
if (Model%exticeden .and. &
(Model%imp_physics /= Model%imp_physics_gfdl .and. Model%imp_physics /= Model%imp_physics_thompson .and. &
Model%imp_physics /= Model%imp_physics_nssl )) then
!see GFS_MP_generic_post.F90; exticeden is only compatible with GFDL,
!Thompson, or NSSL MP
print *,' Using exticeden = T is only valid when using GFDL, Thompson, or NSSL microphysics.'
stop
end if
! GFDL surface layer options
Model%lcurr_sf = lcurr_sf
Model%pert_cd = pert_cd
Expand All @@ -4286,7 +4301,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%iopt_inf = iopt_inf
Model%iopt_rad = iopt_rad
Model%iopt_alb = iopt_alb
Model%iopt_snf = iopt_snf
if (Model%lsm==Model%lsm_noahmp .and. Model%exticeden .and. iopt_snf == 4) then
Model%iopt_snf = 5
else
Model%iopt_snf = iopt_snf
end if
Model%iopt_tbot = iopt_tbot
Model%iopt_stc = iopt_stc
Model%iopt_trs = iopt_trs
Expand Down Expand Up @@ -5463,7 +5482,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
' decfl=',decfl, &
' effr_in =',Model%effr_in, &
' lradar =',Model%lradar, &
' nsradar_reset =',Model%nsradar_reset, &
' nsfullradar_diag =',Model%nsfullradar_diag, &
' num_p3d =',Model%num_p3d, &
' num_p2d =',Model%num_p2d

Expand Down Expand Up @@ -5977,7 +5996,7 @@ subroutine control_print(Model)
print *, ' ltaerosol : ', Model%ltaerosol
print *, ' mraerosol : ', Model%mraerosol
print *, ' lradar : ', Model%lradar
print *, ' nsradar_reset : ', Model%nsradar_reset
print *, ' nsfullradar_diag : ', Model%nsfullradar_diag
print *, ' lrefres : ', Model%lrefres
print *, ' ttendlim : ', Model%ttendlim
print *, ' ext_diag_thompson : ', Model%ext_diag_thompson
Expand Down Expand Up @@ -7001,6 +7020,14 @@ subroutine diag_create (Diag, IM, Model)
allocate (Diag%epi (IM))
allocate (Diag%smcwlt2 (IM))
allocate (Diag%smcref2 (IM))
allocate (Diag%rhonewsn1 (IM))
allocate (Diag%rhosnf (IM))
allocate (Diag%frzr (IM))
allocate (Diag%frzrb (IM))
allocate (Diag%frozr (IM))
allocate (Diag%frozrb (IM))
allocate (Diag%tsnowp (IM))
allocate (Diag%tsnowpb (IM))
if (.not. Model%lsm == Model%lsm_ruc) then
allocate (Diag%wet1 (IM))
end if
Expand Down Expand Up @@ -7336,6 +7363,9 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%toticeb = zero
Diag%totsnwb = zero
Diag%totgrpb = zero
Diag%frzrb = zero
Diag%frozrb = zero
Diag%tsnowpb = zero

!--- MYNN variables:
if (Model%do_mynnedmf) then
Expand Down Expand Up @@ -7456,7 +7486,9 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%t02min = 999.
Diag%rh02max = -999.
Diag%rh02min = 999.
Diag%pratemax = 0.
Diag%pratemax = 0.
Diag%rhonewsn1 = 200.
Diag%rhosnf = -1.e3
set_totprcp = .false.
if (present(linit) ) set_totprcp = linit
if (present(iauwindow_center) ) set_totprcp = iauwindow_center
Expand All @@ -7466,6 +7498,9 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%totice = zero
Diag%totsnw = zero
Diag%totgrp = zero
Diag%frzr = zero
Diag%frozr = zero
Diag%tsnowp = zero
endif

end subroutine diag_phys_zero
Expand Down
Loading