Skip to content

Commit

Permalink
Use LW Jacobian in RRTMGP scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Jun 23, 2020
1 parent 00431ea commit 3d6af73
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 1 deletion.
12 changes: 12 additions & 0 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,12 @@
'components_of_surface_downward_shortwave_fluxes',
],
},
'rrtmgp_lw_rte' : {
'rrtmgp_lw_rte_run' : [
'RRTMGP_jacobian_of_lw_flux_profile_upward',
'RRTMGP_jacobian_of_lw_flux_profile_downward',
],
},
'GFS_rrtmgp_lw_post' : {
'GFS_rrtmgp_lw_post_run' : [
'tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels',
Expand All @@ -378,6 +384,12 @@
'components_of_surface_downward_shortwave_fluxes',
],
},
'GFS_suite_interstitial_2' : {
'GFS_suite_interstitial_2_run' : [
'RRTMGP_jacobian_of_lw_flux_profile_upward',
'RRTMGP_lw_flux_profile_upward_allsky',
],
},
'rrtmg_sw' : {
'rrtmg_sw_run' : [
'tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels',
Expand Down
10 changes: 10 additions & 0 deletions gfsphysics/GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ module GFS_typedefs
integer :: rrtmgp_nGauss_ang !< Number of angles used in Gaussian quadrature
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.
#endif
!--- microphysical switch
integer :: ncld !< choice of cloud scheme
Expand Down Expand Up @@ -1952,6 +1953,8 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: fluxswDOWN_allsky(:,:) => null() !< RRTMGP downward shortwave all-sky flux profile
real (kind=kind_phys), pointer :: fluxswUP_clrsky(:,:) => null() !< RRTMGP upward shortwave clr-sky flux profile
real (kind=kind_phys), pointer :: fluxswDOWN_clrsky(:,:) => null() !< RRTMGP downward shortwave clr-sky flux profile
real (kind=kind_phys), pointer :: fluxlwUP_jac(:,:) => null() !< RRTMGP upward Jacobian of longwave flux
real (kind=kind_phys), pointer :: fluxlwDOWN_jac(:,:) => null() !< RRTMGP downward Jacobian of longwave flux
real (kind=kind_phys), pointer :: sfc_emiss_byband(:,:) => null() !<
real (kind=kind_phys), pointer :: sec_diff_byband(:,:) => null() !<
real (kind=kind_phys), pointer :: sfc_alb_nir_dir(:,:) => null() !<
Expand Down Expand Up @@ -2883,6 +2886,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
integer :: rrtmgp_nrghice = 0 !< Number of ice-roughness categories
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.

#endif
!--- Z-C microphysical parameters
integer :: ncld = 1 !< choice of cloud scheme
Expand Down Expand Up @@ -3228,6 +3233,7 @@ 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, &
#endif
! IN CCN forcing
iccn, &
Expand Down Expand Up @@ -3491,6 +3497,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%doG_cldoptics = doG_cldoptics
Model%doGP_cldoptics_PADE = doGP_cldoptics_PADE
Model%doGP_cldoptics_LUT = doGP_cldoptics_LUT
Model%use_LW_jacobian = use_LW_jacobian
! RRTMGP incompatible with levr /= levs
if (Model%do_RRTMGP .and. Model%levr /= Model%levs) then
write(0,*) "Logic error, RRTMGP only works with levr = levs"
Expand Down Expand Up @@ -4622,6 +4629,7 @@ subroutine control_print(Model)
print *, ' doG_cldoptics : ', Model%doG_cldoptics
print *, ' doGP_cldoptics_PADE: ', Model%doGP_cldoptics_PADE
print *, ' doGP_cldoptics_LUT : ', Model%doGP_cldoptics_LUT
print *, ' use_LW_jacobian : ', Model%use_LW_jacobian
endif
#endif
print *, ' '
Expand Down Expand Up @@ -6112,6 +6120,8 @@ subroutine interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%fluxswDOWN_allsky (IM, Model%levs+1))
allocate (Interstitial%fluxswUP_clrsky (IM, Model%levs+1))
allocate (Interstitial%fluxswDOWN_clrsky (IM, Model%levs+1))
allocate (Interstitial%fluxlwDOWN_jac (IM, Model%levs+1))
allocate (Interstitial%fluxlwUP_jac (IM, Model%levs+1))
allocate (Interstitial%aerosolslw (IM, Model%levs, Model%rrtmgp_nBandsLW, NF_AELW))
allocate (Interstitial%aerosolssw (IM, Model%levs, Model%rrtmgp_nBandsSW, NF_AESW))
allocate (Interstitial%cld_frac (IM, Model%levs))
Expand Down
27 changes: 27 additions & 0 deletions gfsphysics/GFS_layer/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2351,6 +2351,12 @@
units = flag
dimensions = ()
type = logical
[use_LW_jacobian]
standard_name = flag_to_calc_RRTMGP_LW_jacobian
long_name = logical flag to control RRTMGP LW calculation
units = flag
dimensions = ()
type = logical
[rrtmgp_nrghice]
standard_name = number_of_rrtmgp_ice_roughness
long_name = number of ice-roughness categories in RRTMGP calculation (Model%rrtmgp_nrghice)
Expand Down Expand Up @@ -8550,6 +8556,27 @@
type = real
kind = kind_phys
optional = F
[sktp1r]
standard_name = surface_skin_temperature_at_previous_time_step
long_name = surface skin temperature at previous time step
units = K
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[fluxlwUP_jac]
standard_name = RRTMGP_jacobian_of_lw_flux_profile_upward
long_name = RRTMGP Jacobian upward longwave flux profile
units = W m-2 K-1
dimensions = (horizontal_dimension,vertical_dimension_plus_one)
type = real
kind = kind_phys
[fluxlwDOWN_jac]
standard_name = RRTMGP_jacobian_of_lw_flux_profile_downward
long_name = RRTMGP Jacobian downward of longwave flux profile
units = W m-2 K-1
dimensions = (horizontal_dimension,vertical_dimension_plus_one)
type = real
kind = kind_phys
[fluxlwUP_clrsky]
standard_name = RRTMGP_lw_flux_profile_upward_clrsky
long_name = RRTMGP upward longwave clr-sky flux profile
Expand Down

0 comments on commit 3d6af73

Please sign in to comment.