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

Add optional scaling to RRTMGP flux adjustment #319

Closed
22 changes: 21 additions & 1 deletion ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,13 @@ module GFS_typedefs
logical :: do_GPsw_Glw !< If set to true use rrtmgp for SW calculation, rrtmg for LW.
character(len=128) :: active_gases_array(100) !< character array for each trace gas name
logical :: use_LW_jacobian !< If true, use Jacobian of LW to update radiation tendency.
logical :: damp_LW_fluxadj !< If true, damp the LW flux adjustment using the Jacobian w/ height with logistic function
real(kind_phys) :: lfnc_k !< Logistic function transition depth (Pa)
real(kind_phys) :: lfnc_p0 !< Logistic function transition level (Pa)
logical :: doGP_lwscat !< If true, include scattering in longwave cloud-optics, only compatible w/ GP cloud-optics
real(kind_phys) :: minGPpres !< Minimum pressure allowed in RRTMGP.
real(kind_phys) :: minGPtemp !< Minimum temperature allowed in RRTMGP.
real(kind_phys) :: maxGPtemp !< Maximum temperature allowed in RRTMGP.

!--- microphysical switch
integer :: ncld !< choice of cloud scheme
Expand Down Expand Up @@ -3052,6 +3056,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
integer :: rrtmgp_nGauss_ang = 1 !< Number of angles used in Gaussian quadrature
logical :: do_GPsw_Glw = .false.
logical :: use_LW_jacobian = .false. !< Use Jacobian of LW to update LW radiation tendencies.
logical :: damp_LW_fluxadj = .false. !< Damp LW Jacobian flux adjustment with height.
real(kind=kind_phys) :: lfnc_k = -999 !<
real(kind=kind_phys) :: lfnc_p0 = -999 !<
logical :: doGP_lwscat = .false. !< If true, include scattering in longwave cloud-optics, only compatible w/ GP cloud-optics
!--- Z-C microphysical parameters
integer :: ncld = 1 !< choice of cloud scheme
Expand Down Expand Up @@ -3434,7 +3441,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
sw_file_gas, sw_file_clouds, rrtmgp_nBandsSW, rrtmgp_nGptsSW,&
doG_cldoptics, doGP_cldoptics_PADE, doGP_cldoptics_LUT, &
rrtmgp_nrghice, rrtmgp_nGauss_ang, do_GPsw_Glw, &
use_LW_jacobian, doGP_lwscat, &
use_LW_jacobian, doGP_lwscat, damp_LW_fluxadj, lfnc_k, &
lfnc_p0, &
! IN CCN forcing
iccn, &
!--- microphysical parameterizations
Expand Down Expand Up @@ -3790,6 +3798,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%doGP_cldoptics_PADE = doGP_cldoptics_PADE
Model%doGP_cldoptics_LUT = doGP_cldoptics_LUT
Model%use_LW_jacobian = use_LW_jacobian
Model%damp_LW_fluxadj = damp_LW_fluxadj
Model%lfnc_k = 1. / lfnc_k
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now this is pretty confusing ... why can't lfnc_k be defined such that Model%lfnc_k = lfnc_k? And would a default value of 1.0/-999.0=-0.001... still be correct (I assume unused if < 0?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're spot on. I just cleaned this up

Model%lfnc_p0 = lfnc_p0
Model%doGP_lwscat = doGP_lwscat
if (Model%do_RRTMGP) then
! RRTMGP incompatible with levr /= levs
Expand All @@ -3811,6 +3822,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
write(0,*) "Logic error, RRTMGP spectral dimensions (bands/gpts) need to be provided."
stop
endif
else
if (Model%use_LW_jacobian) then
write(0,*) "Logic error, RRTMGP LW Jacobian adjustment cannot be used with RRTMG radiation."
Model%use_LW_jacobian = .false.
Model%damp_LW_fluxadj = .false.
endif
endif

! The CCPP versions of the RRTMG lw/sw schemes are configured
Expand Down Expand Up @@ -4976,6 +4993,9 @@ subroutine control_print(Model)
print *, ' doGP_cldoptics_PADE: ', Model%doGP_cldoptics_PADE
print *, ' doGP_cldoptics_LUT : ', Model%doGP_cldoptics_LUT
print *, ' use_LW_jacobian : ', Model%use_LW_jacobian
print *, ' damp_LW_fluxadj : ', Model%damp_LW_fluxadj
print *, ' lfnc_k : ', Model%lfnc_k
print *, ' lfnc_p0 : ', Model%lfnc_p0
print *, ' doGP_lwscat : ', Model%doGP_lwscat
endif
print *, ' '
Expand Down
27 changes: 27 additions & 0 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2835,6 +2835,26 @@
units = flag
dimensions = ()
type = logical
[damp_LW_fluxadj]
standard_name = flag_to_damp_RRTMGP_LW_jacobian_flux_adjustment
long_name = logical flag to control RRTMGP LW calculation
units = flag
dimensions = ()
type = logical
[lfnc_k]
standard_name = transition_pressure_length_scale_for_flux_damping
long_name = depth of transition layer in logistic function for LW flux adjustment damping
units = Pa
dimensions = ()
type = real
kind = kind_phys
[lfnc_p0]
standard_name = transition_pressure_for_flux_damping
long_name = transition pressure for LW flux adjustment damping
units = Pa
dimensions = ()
type = real
kind = kind_phys
[doGP_lwscat]
standard_name = flag_to_include_longwave_scattering_in_cloud_optics
long_name = logical flag to control the addition of LW scattering in RRTMGP
Expand Down Expand Up @@ -2879,6 +2899,13 @@
dimensions = ()
type = real
kind = kind_phys
[maxGPtemp]
standard_name = maximum_temperature_in_RRTMGP
long_name = maximum temperature allowed in RRTMGP
units = K
dimensions = ()
type = real
kind = kind_phys
[ncld]
standard_name = number_of_hydrometeors
long_name = choice of cloud scheme / number of hydrometeors
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics
Submodule physics updated 2 files
+56 −30 physics/dcyc2.f
+26 −0 physics/dcyc2.meta