Skip to content
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
38 changes: 35 additions & 3 deletions scm/src/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,8 @@ module GFS_typedefs
logical :: lrseeds !< flag to use host-provided random seeds
integer :: nrstreams !< number of random number streams in host-provided random seed array
logical :: lextop !< flag for using an extra top layer for radiation
real(kind_phys) :: xr_con !< Xu-Randall cloud fraction multiplicative constant
real(kind_phys) :: xr_exp !< Xu-Randall cloud fraction exponent constant

! RRTMGP
logical :: do_RRTMGP !< Use RRTMGP
Expand Down Expand Up @@ -3570,6 +3572,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, &
logical :: lrseeds = .false. !< flag to use host-provided random seeds
integer :: nrstreams = 2 !< number of random number streams in host-provided random seed array
logical :: lextop = .false. !< flag for using an extra top layer for radiation
real(kind_phys) :: xr_con = -999.0 !< Xu-Randall cloud fraction multiplicative constant
real(kind_phys) :: xr_exp = -999.0 !< Xu-Randall cloud fraction exponent constant
! RRTMGP
logical :: do_RRTMGP = .false. !< Use RRTMGP?
character(len=128) :: active_gases = '' !< Character list of active gases used in RRTMGP
Expand Down Expand Up @@ -4179,7 +4183,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, &
fhswr, fhlwr, levr, nfxr, iaerclm, iflip, isol, ico2, ialb, &
isot, iems, iaer, icliq_sw, iovr, ictm, isubc_sw, &
isubc_lw, lcrick, lcnorm, lwhtr, swhtr, &
nhfrad, idcor, dcorr_con, &
nhfrad, idcor, dcorr_con, xr_con, xr_exp, &
! --- RRTMGP
do_RRTMGP, active_gases, nGases, rrtmgp_root, &
lw_file_gas, lw_file_clouds, rrtmgp_nBandsLW, rrtmgp_nGptsLW,&
Expand Down Expand Up @@ -4823,7 +4827,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, &
Model%lrseeds = lrseeds
Model%nrstreams = nrstreams
Model%lextop = (ltp > 0)

! RRTMGP
Model%do_RRTMGP = do_RRTMGP
Model%rrtmgp_nrghice = rrtmgp_nrghice
Expand Down Expand Up @@ -6581,7 +6584,34 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, &
!--- BEGIN CODE FROM GLOOPB
!--- set up random number seed needed for RAS and old SAS and when cal_pre=.true.
! Model%imfdeepcnv < 0 when Model%ras = .true.


if (xr_con > 0.0 .and. xr_exp > 0.0) then !values have been read in from namelist, so set them to read values
Model%xr_con = xr_con
Model%xr_exp = xr_exp
else ! values have not been read in from namelist and should be set according to logic in radiation_clouds.f
if (Model%imp_physics == Model%imp_physics_zhao_carr .or. Model%imp_physics == Model%imp_physics_mg .or. Model%imp_physics == Model%imp_physics_fer_hires) then
if (.not. Model%lmfshal) then
!calls cloud_fraction_XuRandall()
Model%xr_con = 2000.0
Model%xr_exp = 0.25
else
!calls cloud_fraction_mass_flx_1()
Model%xr_con = 100.0
Model%xr_exp = 0.49
endif
else ! specifically used when progcld_thompson_wsm6 is called in radiation_clouds.f (see logic in that routine)
if (.not. Model%lmfshal) then
!calls cloud_fraction_XuRandall()
Model%xr_con = 2000.0
Model%xr_exp = 0.25
else
!calls cloud_fraction_mass_flx_2()
Model%xr_con = 2000.0
Model%xr_exp = 0.25
endif
endif
endif

if (Model%imfdeepcnv <= 0 .or. Model%cal_pre ) then
if (Model%random_clds) then
seed0 = Model%idate(1) + Model%idate(2) + Model%idate(3) + Model%idate(4)
Expand Down Expand Up @@ -6943,6 +6973,8 @@ subroutine control_print(Model)
print *, ' lrseeds : ', Model%lrseeds
print *, ' nrstreams : ', Model%nrstreams
print *, ' lextop : ', Model%lextop
print *, ' xr_con : ', Model%xr_con
print *, ' xr_exp : ', Model%xr_exp
if (Model%do_RRTMGP) then
print *, ' rrtmgp_nrghice : ', Model%rrtmgp_nrghice
print *, ' do_GPsw_Glw : ', Model%do_GPsw_Glw
Expand Down
14 changes: 14 additions & 0 deletions scm/src/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -4167,6 +4167,20 @@
units = flag
dimensions = ()
type = logical
[xr_con]
standard_name = multiplicative_tuning_parameter_for_Xu_Randall_cloud_fraction
long_name = multiplicative tuning parameter for Xu Randall cloud fraction
units = 1
dimensions = ()
type = real
kind = kind_phys
[xr_exp]
standard_name = exponent_tuning_parameter_for_Xu_Randall_cloud_fraction
long_name = exponent tuning parameter for Xu Randall cloud fraction
units = 1
dimensions = ()
type = real
kind = kind_phys
[active_gases]
standard_name = active_gases_used_by_RRTMGP
long_name = active gases used by RRTMGP
Expand Down
Loading