diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 31a5e3aef..a1203de10 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -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', @@ -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', diff --git a/ccpp/physics b/ccpp/physics index 499b3ddb6..0a5ab18b6 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 499b3ddb629e02d8d4956323f8901799baf003f0 +Subproject commit 0a5ab18b6d87145a6f2439d94fcff55e32760e48 diff --git a/gfsphysics/GFS_layer/GFS_typedefs.F90 b/gfsphysics/GFS_layer/GFS_typedefs.F90 index 2fb6f3bfd..ebf34b7d7 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -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 @@ -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() !< @@ -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 @@ -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, & @@ -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" @@ -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 *, ' ' @@ -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)) diff --git a/gfsphysics/GFS_layer/GFS_typedefs.meta b/gfsphysics/GFS_layer/GFS_typedefs.meta index 3c1422f33..3ab1c8e9b 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.meta +++ b/gfsphysics/GFS_layer/GFS_typedefs.meta @@ -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) @@ -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