Skip to content

Commit f5a6d1a

Browse files
authored
RRTMGP coupling to Thompson MP in ccpp-physics (NCAR#208)
* Updated physics. Added infrastructure to FV3 to handle new GP capabilities. Thompson MP, LW scattering, Use of LW-jacobian to update surface tendencies. * Some small changes to work with physics improvements to RRTMGP. * RRTMGP working with Thompson MP. * Updated .gitmodules. * Updated physics. New interstitials. * Synced with NCAR/master * Updated ccpp-physics * Updated physics submodule. * Cleanup * Update physics * Updated physics submodule pointer. * Updated physics submodule hash.
1 parent 3aad398 commit f5a6d1a

7 files changed

+189
-65
lines changed

ccpp/config/ccpp_prebuild_config.py

+2-12
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,10 @@
201201
'ccpp/physics/physics/rrtmgp_lw_cloud_sampling.F90',
202202
'ccpp/physics/physics/rrtmgp_sw_cloud_sampling.F90',
203203
'ccpp/physics/physics/GFS_cloud_diagnostics.F90',
204+
'ccpp/physics/physics/GFS_rrtmgp_thompsonmp_pre.F90',
204205
'ccpp/physics/physics/GFS_rrtmgp_gfdlmp_pre.F90',
205206
'ccpp/physics/physics/GFS_rrtmgp_zhaocarr_pre.F90',
207+
'ccpp/physics/physics/GFS_rrtmgp_cloud_overlap_pre.F90',
206208
'ccpp/physics/physics/GFS_rrtmgp_sw_post.F90'
207209
]
208210

@@ -297,12 +299,6 @@
297299
'rime_factor',
298300
],
299301
},
300-
'rrtmgp_lw_rte' : {
301-
'rrtmgp_lw_rte_run' : [
302-
'RRTMGP_jacobian_of_lw_flux_profile_upward',
303-
'RRTMGP_jacobian_of_lw_flux_profile_downward',
304-
],
305-
},
306302
'rrtmgp_sw_rte' : {
307303
'rrtmgp_sw_rte_run' : [
308304
'components_of_surface_downward_shortwave_fluxes',
@@ -319,12 +315,6 @@
319315
'tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step',
320316
],
321317
},
322-
'GFS_suite_interstitial_2' : {
323-
'GFS_suite_interstitial_2_run' : [
324-
'RRTMGP_jacobian_of_lw_flux_profile_upward',
325-
'RRTMGP_lw_flux_profile_upward_allsky',
326-
],
327-
},
328318
#'subroutine_name_1' : 'all',
329319
#'subroutine_name_2' : 'none',
330320
#'subroutine_name_2' : [ 'var1', 'var3'],

ccpp/suites/suite_FV3_GFS_v15p2_RRTMGP.xml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<scheme>GFS_suite_interstitial_rad_reset</scheme>
2121
<scheme>GFS_rrtmgp_pre</scheme>
2222
<scheme>GFS_rrtmgp_gfdlmp_pre</scheme>
23+
<scheme>GFS_rrtmgp_cloud_overlap_pre</scheme>
2324
<scheme>GFS_cloud_diagnostics</scheme>
2425
<scheme>GFS_rrtmgp_sw_pre</scheme>
2526
<scheme>rrtmgp_sw_gas_optics</scheme>

ccpp/suites/suite_FV3_GFS_v16beta_RRTMGP.xml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<scheme>GFS_suite_interstitial_rad_reset</scheme>
2121
<scheme>GFS_rrtmgp_pre</scheme>
2222
<scheme>GFS_rrtmgp_gfdlmp_pre</scheme>
23+
<scheme>GFS_rrtmgp_cloud_overlap_pre</scheme>
2324
<scheme>GFS_cloud_diagnostics</scheme>
2425
<scheme>GFS_rrtmgp_sw_pre</scheme>
2526
<scheme>rrtmgp_sw_gas_optics</scheme>
+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<suite name="FV3_GSD_v0_RRTMGP" version="1">
4+
<!-- <init></init> -->
5+
<group name="time_vary">
6+
<subcycle loop="1">
7+
<scheme>GFS_time_vary_pre</scheme>
8+
<scheme>GFS_rrtmgp_setup</scheme>
9+
<scheme>GFS_rad_time_vary</scheme>
10+
<scheme>GFS_phys_time_vary</scheme>
11+
</subcycle>
12+
</group>
13+
<group name="radiation">
14+
<subcycle loop="1">
15+
<scheme>GFS_suite_interstitial_rad_reset</scheme>
16+
<scheme>sgscloud_radpre</scheme>
17+
<scheme>GFS_rrtmgp_pre</scheme>
18+
<scheme>GFS_rrtmgp_thompsonmp_pre</scheme>
19+
<scheme>GFS_rrtmgp_cloud_overlap_pre</scheme>
20+
<scheme>GFS_cloud_diagnostics</scheme>
21+
<scheme>GFS_rrtmgp_sw_pre</scheme>
22+
<scheme>rrtmgp_sw_gas_optics</scheme>
23+
<scheme>rrtmgp_sw_aerosol_optics</scheme>
24+
<scheme>rrtmgp_sw_cloud_optics</scheme>
25+
<scheme>rrtmgp_sw_cloud_sampling</scheme>
26+
<scheme>rrtmgp_sw_rte</scheme>
27+
<scheme>GFS_rrtmgp_sw_post</scheme>
28+
<scheme>rrtmgp_lw_pre</scheme>
29+
<scheme>rrtmgp_lw_gas_optics</scheme>
30+
<scheme>rrtmgp_lw_aerosol_optics</scheme>
31+
<scheme>rrtmgp_lw_cloud_optics</scheme>
32+
<scheme>rrtmgp_lw_cloud_sampling</scheme>
33+
<scheme>rrtmgp_lw_rte</scheme>
34+
<scheme>sgscloud_radpost</scheme>
35+
<scheme>GFS_rrtmgp_lw_post</scheme>
36+
</subcycle>
37+
</group>
38+
<group name="physics">
39+
<subcycle loop="1">
40+
<scheme>GFS_suite_interstitial_phys_reset</scheme>
41+
<scheme>GFS_suite_stateout_reset</scheme>
42+
<scheme>get_prs_fv3</scheme>
43+
<scheme>GFS_suite_interstitial_1</scheme>
44+
<scheme>GFS_surface_generic_pre</scheme>
45+
<scheme>GFS_surface_composites_pre</scheme>
46+
<scheme>dcyc2t3</scheme>
47+
<scheme>GFS_surface_composites_inter</scheme>
48+
<scheme>GFS_suite_interstitial_2</scheme>
49+
</subcycle>
50+
<!-- Surface iteration loop -->
51+
<subcycle loop="2">
52+
<scheme>sfc_diff</scheme>
53+
<scheme>GFS_surface_loop_control_part1</scheme>
54+
<scheme>sfc_nst_pre</scheme>
55+
<scheme>sfc_nst</scheme>
56+
<scheme>sfc_nst_post</scheme>
57+
<scheme>lsm_ruc</scheme>
58+
<scheme>lsm_ruc_sfc_sice_pre</scheme>
59+
<scheme>sfc_sice</scheme>
60+
<scheme>lsm_ruc_sfc_sice_post</scheme>
61+
<scheme>GFS_surface_loop_control_part2</scheme>
62+
</subcycle>
63+
<!-- End of surface iteration loop -->
64+
<subcycle loop="1">
65+
<scheme>GFS_surface_composites_post</scheme>
66+
<scheme>sfc_diag</scheme>
67+
<scheme>sfc_diag_post</scheme>
68+
<scheme>GFS_surface_generic_post</scheme>
69+
<scheme>mynnedmf_wrapper</scheme>
70+
<scheme>GFS_GWD_generic_pre</scheme>
71+
<scheme>cires_ugwp</scheme>
72+
<scheme>cires_ugwp_post</scheme>
73+
<scheme>GFS_GWD_generic_post</scheme>
74+
<scheme>rayleigh_damp</scheme>
75+
<scheme>GFS_suite_stateout_update</scheme>
76+
<scheme>ozphys_2015</scheme>
77+
<scheme>h2ophys</scheme>
78+
<scheme>get_phi_fv3</scheme>
79+
<scheme>GFS_suite_interstitial_3</scheme>
80+
<scheme>GFS_DCNV_generic_pre</scheme>
81+
<scheme>cu_gf_driver_pre</scheme>
82+
<scheme>cu_gf_driver</scheme>
83+
<scheme>GFS_DCNV_generic_post</scheme>
84+
<scheme>GFS_SCNV_generic_pre</scheme>
85+
<scheme>GFS_SCNV_generic_post</scheme>
86+
<scheme>GFS_suite_interstitial_4</scheme>
87+
<scheme>cnvc90</scheme>
88+
<scheme>GFS_MP_generic_pre</scheme>
89+
<scheme>mp_thompson_pre</scheme>
90+
<scheme>mp_thompson</scheme>
91+
<scheme>mp_thompson_post</scheme>
92+
<scheme>GFS_MP_generic_post</scheme>
93+
<scheme>cu_gf_driver_post</scheme>
94+
<scheme>maximum_hourly_diagnostics</scheme>
95+
</subcycle>
96+
</group>
97+
<group name="stochastics">
98+
<subcycle loop="1">
99+
<scheme>GFS_stochastics</scheme>
100+
<scheme>phys_tend</scheme>
101+
</subcycle>
102+
</group>
103+
<!-- <finalize></finalize> -->
104+
</suite>

gfsphysics/GFS_layer/GFS_typedefs.F90

+38-27
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,8 @@ module GFS_typedefs
437437
!< difference of dnfxc & upfxc from GFS_radtend_type%sfcfsw
438438
real (kind=kind_phys), pointer :: sfcdlw(:) => null() !< total sky sfc downward lw flux ( w/m**2 )
439439
!< GFS_radtend_type%sfclsw%dnfxc
440-
440+
real (kind=kind_phys), pointer :: sfculw(:) => null() !< total sky sfc upward lw flux ( w/m**2 )
441+
real (kind=kind_phys), pointer :: sfculw_jac(:) => null() !< Jacobian of total sky sfc upward lw flux ( w/m**2/K )
441442
!--- incoming quantities
442443
real (kind=kind_phys), pointer :: dusfcin_cpl(:) => null() !< aoi_fld%dusfcin(item,lan)
443444
real (kind=kind_phys), pointer :: dvsfcin_cpl(:) => null() !< aoi_fld%dvsfcin(item,lan)
@@ -711,6 +712,7 @@ module GFS_typedefs
711712
logical :: do_GPsw_Glw !< If set to true use rrtmgp for SW calculation, rrtmg for LW.
712713
character(len=128) :: active_gases_array(100) !< character array for each trace gas name
713714
logical :: use_LW_jacobian !< If true, use Jacobian of LW to update radiation tendency.
715+
logical :: doGP_lwscat !< If true, include scattering in longwave cloud-optics, only compatible w/ GP cloud-optics
714716
#endif
715717
!--- microphysical switch
716718
integer :: ncld !< choice of cloud scheme
@@ -2076,7 +2078,6 @@ module GFS_typedefs
20762078
! RRTMGP
20772079
integer :: ipsdlw0 !<
20782080
integer :: ipsdsw0 !<
2079-
real (kind=kind_phys), pointer :: sktp1r(:) => null() !<
20802081
real (kind=kind_phys), pointer :: p_lay(:,:) => null() !<
20812082
real (kind=kind_phys), pointer :: p_lev(:,:) => null() !<
20822083
real (kind=kind_phys), pointer :: t_lev(:,:) => null() !<
@@ -2128,10 +2129,10 @@ module GFS_typedefs
21282129
type(ty_gas_optics_rrtmgp) :: sw_gas_props !< RRTMGP DDT
21292130
type(ty_cloud_optics) :: lw_cloud_props !< RRTMGP DDT
21302131
type(ty_cloud_optics) :: sw_cloud_props !< RRTMGP DDT
2131-
type(ty_optical_props_1scl) :: lw_optical_props_cloudsByBand !< RRTMGP DDT
2132-
type(ty_optical_props_1scl) :: lw_optical_props_clouds !< RRTMGP DDT
2133-
type(ty_optical_props_1scl) :: lw_optical_props_precipByBand !< RRTMGP DDT
2134-
type(ty_optical_props_1scl) :: lw_optical_props_precip !< RRTMGP DDT
2132+
type(ty_optical_props_2str) :: lw_optical_props_cloudsByBand !< RRTMGP DDT
2133+
type(ty_optical_props_2str) :: lw_optical_props_clouds !< RRTMGP DDT
2134+
type(ty_optical_props_2str) :: lw_optical_props_precipByBand !< RRTMGP DDT
2135+
type(ty_optical_props_2str) :: lw_optical_props_precip !< RRTMGP DDT
21352136
type(ty_optical_props_1scl) :: lw_optical_props_clrsky !< RRTMGP DDT
21362137
type(ty_optical_props_1scl) :: lw_optical_props_aerosol !< RRTMGP DDT
21372138
type(ty_optical_props_2str) :: sw_optical_props_cloudsByBand !< RRTMGP DDT
@@ -2708,10 +2709,14 @@ subroutine coupling_create (Coupling, IM, Model)
27082709
allocate (Coupling%sfcdsw (IM))
27092710
allocate (Coupling%sfcnsw (IM))
27102711
allocate (Coupling%sfcdlw (IM))
2712+
allocate (Coupling%sfculw (IM))
2713+
allocate (Coupling%sfculw_jac (IM))
27112714

27122715
Coupling%sfcdsw = clear_val
27132716
Coupling%sfcnsw = clear_val
27142717
Coupling%sfcdlw = clear_val
2718+
Coupling%sfculw = clear_val
2719+
Coupling%sfculw_jac = clear_val
27152720

27162721
if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm .or. Model%ca_global) then
27172722
allocate (Coupling%rain_cpl (IM))
@@ -3078,25 +3083,26 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
30783083
logical :: swhtr = .true. !< flag to output sw heating rate (Radtend%swhc)
30793084
! RRTMGP
30803085
#ifdef CCPP
3081-
logical :: do_RRTMGP = .false. !< Use RRTMGP?
3082-
character(len=128) :: active_gases = '' !< Character list of active gases used in RRTMGP
3083-
integer :: nGases = 0 !< Number of active gases
3084-
character(len=128) :: rrtmgp_root = '' !< Directory of rte+rrtmgp source code
3085-
character(len=128) :: lw_file_gas = '' !< RRTMGP K-distribution file, coefficients to compute optics for gaseous atmosphere
3086-
character(len=128) :: lw_file_clouds = '' !< RRTMGP file containing coefficients used to compute clouds optical properties
3087-
integer :: rrtmgp_nBandsLW = 16 !< Number of RRTMGP LW bands.
3088-
integer :: rrtmgp_nGptsLW = 256 !< Number of RRTMGP LW spectral points.
3089-
character(len=128) :: sw_file_gas = '' !< RRTMGP K-distribution file, coefficients to compute optics for gaseous atmosphere
3090-
character(len=128) :: sw_file_clouds = '' !< RRTMGP file containing coefficients used to compute clouds optical properties
3091-
integer :: rrtmgp_nBandsSW = 14 !< Number of RRTMGP SW bands.
3092-
integer :: rrtmgp_nGptsSW = 224 !< Number of RRTMGP SW spectral points.
3086+
logical :: do_RRTMGP = .false. !< Use RRTMGP?
3087+
character(len=128) :: active_gases = '' !< Character list of active gases used in RRTMGP
3088+
integer :: nGases = 0 !< Number of active gases
3089+
character(len=128) :: rrtmgp_root = '' !< Directory of rte+rrtmgp source code
3090+
character(len=128) :: lw_file_gas = '' !< RRTMGP K-distribution file, coefficients to compute optics for gaseous atmosphere
3091+
character(len=128) :: lw_file_clouds = '' !< RRTMGP file containing coefficients used to compute clouds optical properties
3092+
integer :: rrtmgp_nBandsLW = 16 !< Number of RRTMGP LW bands.
3093+
integer :: rrtmgp_nGptsLW = 256 !< Number of RRTMGP LW spectral points.
3094+
character(len=128) :: sw_file_gas = '' !< RRTMGP K-distribution file, coefficients to compute optics for gaseous atmosphere
3095+
character(len=128) :: sw_file_clouds = '' !< RRTMGP file containing coefficients used to compute clouds optical properties
3096+
integer :: rrtmgp_nBandsSW = 14 !< Number of RRTMGP SW bands.
3097+
integer :: rrtmgp_nGptsSW = 224 !< Number of RRTMGP SW spectral points.
30933098
logical :: doG_cldoptics = .false. !< Use legacy RRTMG cloud-optics?
30943099
logical :: doGP_cldoptics_PADE = .false. !< Use RRTMGP cloud-optics: PADE approximation?
30953100
logical :: doGP_cldoptics_LUT = .false. !< Use RRTMGP cloud-optics: LUTs?
3096-
integer :: rrtmgp_nrghice = 0 !< Number of ice-roughness categories
3097-
integer :: rrtmgp_nGauss_ang=1 !< Number of angles used in Gaussian quadrature
3098-
logical :: do_GPsw_Glw = .false.
3099-
logical :: use_LW_jacobian = .false. !< Use Jacobian of LW to update LW radiation tendencies.
3101+
integer :: rrtmgp_nrghice = 0 !< Number of ice-roughness categories
3102+
integer :: rrtmgp_nGauss_ang = 1 !< Number of angles used in Gaussian quadrature
3103+
logical :: do_GPsw_Glw = .false.
3104+
logical :: use_LW_jacobian = .false. !< Use Jacobian of LW to update LW radiation tendencies.
3105+
logical :: doGP_lwscat = .false. !< If true, include scattering in longwave cloud-optics, only compatible w/ GP cloud-optics
31003106
#endif
31013107
!--- Z-C microphysical parameters
31023108
integer :: ncld = 1 !< choice of cloud scheme
@@ -3485,7 +3491,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
34853491
sw_file_gas, sw_file_clouds, rrtmgp_nBandsSW, rrtmgp_nGptsSW,&
34863492
doG_cldoptics, doGP_cldoptics_PADE, doGP_cldoptics_LUT, &
34873493
rrtmgp_nrghice, rrtmgp_nGauss_ang, do_GPsw_Glw, &
3488-
use_LW_jacobian, &
3494+
use_LW_jacobian, doGP_lwscat, &
34893495
#endif
34903496
! IN CCN forcing
34913497
iccn, &
@@ -3865,11 +3871,17 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
38653871
Model%doGP_cldoptics_PADE = doGP_cldoptics_PADE
38663872
Model%doGP_cldoptics_LUT = doGP_cldoptics_LUT
38673873
Model%use_LW_jacobian = use_LW_jacobian
3874+
Model%doGP_lwscat = doGP_lwscat
38683875
! RRTMGP incompatible with levr /= levs
38693876
if (Model%do_RRTMGP .and. Model%levr /= Model%levs) then
38703877
write(0,*) "Logic error, RRTMGP only works with levr = levs"
38713878
stop
38723879
end if
3880+
! RRTMGP LW scattering calculation not supported w/ RRTMG cloud-optics
3881+
if (Model%doGP_lwscat .and. Model%doG_cldoptics) then
3882+
write(0,*) "Logic error, RRTMGP Longwave cloud-scattering not supported with RRTMG cloud-optics."
3883+
stop
3884+
end if
38733885

38743886
! The CCPP versions of the RRTMG lw/sw schemes are configured
38753887
! such that lw and sw heating rate are output, i.e. they rely
@@ -5081,6 +5093,7 @@ subroutine control_print(Model)
50815093
print *, ' doGP_cldoptics_PADE: ', Model%doGP_cldoptics_PADE
50825094
print *, ' doGP_cldoptics_LUT : ', Model%doGP_cldoptics_LUT
50835095
print *, ' use_LW_jacobian : ', Model%use_LW_jacobian
5096+
print *, ' doGP_lwscat : ', Model%doGP_lwscat
50845097
endif
50855098
#endif
50865099
print *, ' '
@@ -6657,10 +6670,6 @@ subroutine interstitial_create (Interstitial, IM, Model)
66576670
allocate (Interstitial%zt1d (IM))
66586671

66596672
! RRTMGP
6660-
allocate (Interstitial%fluxlwDOWN_jac (IM, Model%levs+1))
6661-
allocate (Interstitial%fluxlwUP_jac (IM, Model%levs+1))
6662-
allocate (Interstitial%sktp1r (IM))
6663-
allocate (Interstitial%fluxlwUP_allsky (IM, Model%levs+1))
66646673
if (Model%do_RRTMGP) then
66656674
allocate (Interstitial%tracer (IM, Model%levs,Model%ntrac))
66666675
allocate (Interstitial%tv_lay (IM, Model%levs))
@@ -6676,6 +6685,7 @@ subroutine interstitial_create (Interstitial, IM, Model)
66766685
allocate (Interstitial%precip_overlap_param (IM, Model%levs))
66776686
allocate (Interstitial%fluxlwDOWN_allsky (IM, Model%levs+1))
66786687
allocate (Interstitial%fluxlwUP_clrsky (IM, Model%levs+1))
6688+
allocate (Interstitial%fluxlwUP_allsky (IM, Model%levs+1))
66796689
allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1))
66806690
allocate (Interstitial%fluxswUP_allsky (IM, Model%levs+1))
66816691
allocate (Interstitial%fluxswDOWN_allsky (IM, Model%levs+1))
@@ -7067,6 +7077,7 @@ subroutine interstitial_rad_reset (Interstitial, Model)
70677077
end if
70687078

70697079
if (Model%do_RRTMGP) then
7080+
Interstitial%fluxlwUP_allsky = clear_val
70707081
Interstitial%tracer = clear_val
70717082
Interstitial%tv_lay = clear_val
70727083
Interstitial%relhum = clear_val

0 commit comments

Comments
 (0)