@@ -437,7 +437,8 @@ module GFS_typedefs
437
437
! < difference of dnfxc & upfxc from GFS_radtend_type%sfcfsw
438
438
real (kind= kind_phys), pointer :: sfcdlw(:) = > null () ! < total sky sfc downward lw flux ( w/m**2 )
439
439
! < 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 )
441
442
!- -- incoming quantities
442
443
real (kind= kind_phys), pointer :: dusfcin_cpl(:) = > null () ! < aoi_fld%dusfcin(item,lan)
443
444
real (kind= kind_phys), pointer :: dvsfcin_cpl(:) = > null () ! < aoi_fld%dvsfcin(item,lan)
@@ -711,6 +712,7 @@ module GFS_typedefs
711
712
logical :: do_GPsw_Glw ! < If set to true use rrtmgp for SW calculation, rrtmg for LW.
712
713
character (len= 128 ) :: active_gases_array(100 ) ! < character array for each trace gas name
713
714
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
714
716
#endif
715
717
!- -- microphysical switch
716
718
integer :: ncld ! < choice of cloud scheme
@@ -2076,7 +2078,6 @@ module GFS_typedefs
2076
2078
! RRTMGP
2077
2079
integer :: ipsdlw0 ! <
2078
2080
integer :: ipsdsw0 ! <
2079
- real (kind= kind_phys), pointer :: sktp1r(:) = > null () ! <
2080
2081
real (kind= kind_phys), pointer :: p_lay(:,:) = > null () ! <
2081
2082
real (kind= kind_phys), pointer :: p_lev(:,:) = > null () ! <
2082
2083
real (kind= kind_phys), pointer :: t_lev(:,:) = > null () ! <
@@ -2128,10 +2129,10 @@ module GFS_typedefs
2128
2129
type (ty_gas_optics_rrtmgp) :: sw_gas_props ! < RRTMGP DDT
2129
2130
type (ty_cloud_optics) :: lw_cloud_props ! < RRTMGP DDT
2130
2131
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
2135
2136
type (ty_optical_props_1scl) :: lw_optical_props_clrsky ! < RRTMGP DDT
2136
2137
type (ty_optical_props_1scl) :: lw_optical_props_aerosol ! < RRTMGP DDT
2137
2138
type (ty_optical_props_2str) :: sw_optical_props_cloudsByBand ! < RRTMGP DDT
@@ -2708,10 +2709,14 @@ subroutine coupling_create (Coupling, IM, Model)
2708
2709
allocate (Coupling% sfcdsw (IM))
2709
2710
allocate (Coupling% sfcnsw (IM))
2710
2711
allocate (Coupling% sfcdlw (IM))
2712
+ allocate (Coupling% sfculw (IM))
2713
+ allocate (Coupling% sfculw_jac (IM))
2711
2714
2712
2715
Coupling% sfcdsw = clear_val
2713
2716
Coupling% sfcnsw = clear_val
2714
2717
Coupling% sfcdlw = clear_val
2718
+ Coupling% sfculw = clear_val
2719
+ Coupling% sfculw_jac = clear_val
2715
2720
2716
2721
if (Model% cplflx .or. Model% do_sppt .or. Model% cplchm .or. Model% ca_global) then
2717
2722
allocate (Coupling% rain_cpl (IM))
@@ -3078,25 +3083,26 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
3078
3083
logical :: swhtr = .true. ! < flag to output sw heating rate (Radtend%swhc)
3079
3084
! RRTMGP
3080
3085
#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.
3093
3098
logical :: doG_cldoptics = .false. ! < Use legacy RRTMG cloud-optics?
3094
3099
logical :: doGP_cldoptics_PADE = .false. ! < Use RRTMGP cloud-optics: PADE approximation?
3095
3100
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
3100
3106
#endif
3101
3107
!- -- Z-C microphysical parameters
3102
3108
integer :: ncld = 1 ! < choice of cloud scheme
@@ -3485,7 +3491,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
3485
3491
sw_file_gas, sw_file_clouds, rrtmgp_nBandsSW, rrtmgp_nGptsSW,&
3486
3492
doG_cldoptics, doGP_cldoptics_PADE, doGP_cldoptics_LUT, &
3487
3493
rrtmgp_nrghice, rrtmgp_nGauss_ang, do_GPsw_Glw, &
3488
- use_LW_jacobian, &
3494
+ use_LW_jacobian, doGP_lwscat, &
3489
3495
#endif
3490
3496
! IN CCN forcing
3491
3497
iccn, &
@@ -3865,11 +3871,17 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
3865
3871
Model% doGP_cldoptics_PADE = doGP_cldoptics_PADE
3866
3872
Model% doGP_cldoptics_LUT = doGP_cldoptics_LUT
3867
3873
Model% use_LW_jacobian = use_LW_jacobian
3874
+ Model% doGP_lwscat = doGP_lwscat
3868
3875
! RRTMGP incompatible with levr /= levs
3869
3876
if (Model% do_RRTMGP .and. Model% levr /= Model% levs) then
3870
3877
write (0 ,* ) " Logic error, RRTMGP only works with levr = levs"
3871
3878
stop
3872
3879
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
3873
3885
3874
3886
! The CCPP versions of the RRTMG lw/sw schemes are configured
3875
3887
! such that lw and sw heating rate are output, i.e. they rely
@@ -5081,6 +5093,7 @@ subroutine control_print(Model)
5081
5093
print * , ' doGP_cldoptics_PADE: ' , Model% doGP_cldoptics_PADE
5082
5094
print * , ' doGP_cldoptics_LUT : ' , Model% doGP_cldoptics_LUT
5083
5095
print * , ' use_LW_jacobian : ' , Model% use_LW_jacobian
5096
+ print * , ' doGP_lwscat : ' , Model% doGP_lwscat
5084
5097
endif
5085
5098
#endif
5086
5099
print * , ' '
@@ -6657,10 +6670,6 @@ subroutine interstitial_create (Interstitial, IM, Model)
6657
6670
allocate (Interstitial% zt1d (IM))
6658
6671
6659
6672
! 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 ))
6664
6673
if (Model% do_RRTMGP) then
6665
6674
allocate (Interstitial% tracer (IM, Model% levs,Model% ntrac))
6666
6675
allocate (Interstitial% tv_lay (IM, Model% levs))
@@ -6676,6 +6685,7 @@ subroutine interstitial_create (Interstitial, IM, Model)
6676
6685
allocate (Interstitial% precip_overlap_param (IM, Model% levs))
6677
6686
allocate (Interstitial% fluxlwDOWN_allsky (IM, Model% levs+1 ))
6678
6687
allocate (Interstitial% fluxlwUP_clrsky (IM, Model% levs+1 ))
6688
+ allocate (Interstitial% fluxlwUP_allsky (IM, Model% levs+1 ))
6679
6689
allocate (Interstitial% fluxlwDOWN_clrsky (IM, Model% levs+1 ))
6680
6690
allocate (Interstitial% fluxswUP_allsky (IM, Model% levs+1 ))
6681
6691
allocate (Interstitial% fluxswDOWN_allsky (IM, Model% levs+1 ))
@@ -7067,6 +7077,7 @@ subroutine interstitial_rad_reset (Interstitial, Model)
7067
7077
end if
7068
7078
7069
7079
if (Model% do_RRTMGP) then
7080
+ Interstitial% fluxlwUP_allsky = clear_val
7070
7081
Interstitial% tracer = clear_val
7071
7082
Interstitial% tv_lay = clear_val
7072
7083
Interstitial% relhum = clear_val
0 commit comments