@@ -706,9 +706,13 @@ module GFS_typedefs
706
706
logical :: do_GPsw_Glw ! < If set to true use rrtmgp for SW calculation, rrtmg for LW.
707
707
character (len= 128 ) :: active_gases_array(100 ) ! < character array for each trace gas name
708
708
logical :: use_LW_jacobian ! < If true, use Jacobian of LW to update radiation tendency.
709
+ logical :: damp_LW_fluxadj ! < If true, damp the LW flux adjustment using the Jacobian w/ height with logistic function
710
+ real (kind_phys) :: lfnc_k ! < Logistic function transition depth (Pa)
711
+ real (kind_phys) :: lfnc_p0 ! < Logistic function transition level (Pa)
709
712
logical :: doGP_lwscat ! < If true, include scattering in longwave cloud-optics, only compatible w/ GP cloud-optics
710
713
real (kind_phys) :: minGPpres ! < Minimum pressure allowed in RRTMGP.
711
714
real (kind_phys) :: minGPtemp ! < Minimum temperature allowed in RRTMGP.
715
+ real (kind_phys) :: maxGPtemp ! < Maximum temperature allowed in RRTMGP.
712
716
713
717
!- -- microphysical switch
714
718
integer :: ncld ! < choice of cloud scheme
@@ -785,6 +789,8 @@ module GFS_typedefs
785
789
logical :: lradar ! < flag for radar reflectivity
786
790
real (kind= kind_phys) :: nsradar_reset ! < seconds between resetting radar reflectivity calculation
787
791
real (kind= kind_phys) :: ttendlim ! < temperature tendency limiter per time step in K/s
792
+ logical :: ext_diag_thompson ! < flag for extended diagnostic output from Thompson
793
+ integer :: thompson_ext_ndiag3d= 37 ! < number of 3d arrays for extended diagnostic output from Thompson
788
794
789
795
!- -- GFDL microphysical paramters
790
796
logical :: lgfdlmprad ! < flag for GFDL mp scheme and radiation consistency
@@ -1698,6 +1704,9 @@ module GFS_typedefs
1698
1704
real (kind= kind_phys), pointer :: tau_tofd(:) = > null () !
1699
1705
!- --vay-2018 UGWP-diagnostics
1700
1706
1707
+ ! Extended output diagnostics for Thompson MP
1708
+ real (kind= kind_phys), pointer :: thompson_ext_diag3d (:,:,:) = > null () ! extended diagnostic 3d output arrays from Thompson MP
1709
+
1701
1710
! Auxiliary output arrays for debugging
1702
1711
real (kind= kind_phys), pointer :: aux2d(:,:) = > null () ! < auxiliary 2d arrays in output (for debugging)
1703
1712
real (kind= kind_phys), pointer :: aux3d(:,:,:)= > null () ! < auxiliary 2d arrays in output (for debugging)
@@ -1935,7 +1944,8 @@ module GFS_typedefs
1935
1944
real (kind= kind_phys), pointer :: rb_ice(:) = > null () ! <
1936
1945
real (kind= kind_phys), pointer :: rb_land(:) = > null () ! <
1937
1946
real (kind= kind_phys), pointer :: rb_water(:) = > null () ! <
1938
- logical :: reset ! <
1947
+ logical :: max_hourly_reset ! <
1948
+ logical :: ext_diag_thompson_reset ! <
1939
1949
real (kind= kind_phys), pointer :: rhc(:,:) = > null () ! <
1940
1950
real (kind= kind_phys), pointer :: rho1(:) = > null () ! <
1941
1951
real (kind= kind_phys), pointer :: runoff(:) = > null () ! <
@@ -3097,6 +3107,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
3097
3107
integer :: rrtmgp_nGauss_ang = 1 ! < Number of angles used in Gaussian quadrature
3098
3108
logical :: do_GPsw_Glw = .false.
3099
3109
logical :: use_LW_jacobian = .false. ! < Use Jacobian of LW to update LW radiation tendencies.
3110
+ logical :: damp_LW_fluxadj = .false. ! < Damp LW Jacobian flux adjustment with height.
3111
+ real (kind= kind_phys) :: lfnc_k = - 999 ! <
3112
+ real (kind= kind_phys) :: lfnc_p0 = - 999 ! <
3100
3113
logical :: doGP_lwscat = .false. ! < If true, include scattering in longwave cloud-optics, only compatible w/ GP cloud-optics
3101
3114
!- -- Z-C microphysical parameters
3102
3115
integer :: ncld = 1 ! < choice of cloud scheme
@@ -3150,6 +3163,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
3150
3163
logical :: lradar = .false. ! < flag for radar reflectivity
3151
3164
real (kind= kind_phys) :: nsradar_reset = - 999.0 ! < seconds between resetting radar reflectivity calculation, set to <0 for every time step
3152
3165
real (kind= kind_phys) :: ttendlim = - 999.0 ! < temperature tendency limiter, set to <0 to deactivate
3166
+ logical :: ext_diag_thompson = .false. ! < flag for extended diagnostic output from Thompson
3153
3167
3154
3168
!- -- GFDL microphysical parameters
3155
3169
logical :: lgfdlmprad = .false. ! < flag for GFDLMP radiation interaction
@@ -3487,7 +3501,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
3487
3501
sw_file_gas, sw_file_clouds, rrtmgp_nBandsSW, rrtmgp_nGptsSW,&
3488
3502
doG_cldoptics, doGP_cldoptics_PADE, doGP_cldoptics_LUT, &
3489
3503
rrtmgp_nrghice, rrtmgp_nGauss_ang, do_GPsw_Glw, &
3490
- use_LW_jacobian, doGP_lwscat, &
3504
+ use_LW_jacobian, doGP_lwscat, damp_LW_fluxadj, lfnc_k, &
3505
+ lfnc_p0, &
3491
3506
! IN CCN forcing
3492
3507
iccn, &
3493
3508
!- -- microphysical parameterizations
@@ -3499,7 +3514,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
3499
3514
mg_ncnst, mg_ninst, mg_ngnst, sed_supersat, do_sb_physics, &
3500
3515
mg_alf, mg_qcmin, mg_do_ice_gmao, mg_do_liq_liu, &
3501
3516
ltaerosol, lradar, nsradar_reset, lrefres, ttendlim, &
3502
- lgfdlmprad, &
3517
+ ext_diag_thompson, lgfdlmprad, &
3503
3518
!- -- max hourly
3504
3519
avg_max_length, &
3505
3520
!- -- land/surface model control
@@ -3845,6 +3860,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
3845
3860
Model% doGP_cldoptics_PADE = doGP_cldoptics_PADE
3846
3861
Model% doGP_cldoptics_LUT = doGP_cldoptics_LUT
3847
3862
Model% use_LW_jacobian = use_LW_jacobian
3863
+ Model% damp_LW_fluxadj = damp_LW_fluxadj
3864
+ Model% lfnc_k = lfnc_k
3865
+ Model% lfnc_p0 = lfnc_p0
3848
3866
Model% doGP_lwscat = doGP_lwscat
3849
3867
if (Model% do_RRTMGP) then
3850
3868
! RRTMGP incompatible with levr /= levs
@@ -3866,6 +3884,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
3866
3884
write (0 ,* ) " Logic error, RRTMGP spectral dimensions (bands/gpts) need to be provided."
3867
3885
stop
3868
3886
endif
3887
+ else
3888
+ if (Model% use_LW_jacobian) then
3889
+ write (0 ,* ) " Logic error, RRTMGP LW Jacobian adjustment cannot be used with RRTMG radiation."
3890
+ Model% use_LW_jacobian = .false.
3891
+ Model% damp_LW_fluxadj = .false.
3892
+ endif
3869
3893
endif
3870
3894
3871
3895
! The CCPP versions of the RRTMG lw/sw schemes are configured
@@ -3926,6 +3950,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
3926
3950
Model% lradar = lradar
3927
3951
Model% nsradar_reset = nsradar_reset
3928
3952
Model% ttendlim = ttendlim
3953
+ Model% ext_diag_thompson= ext_diag_thompson
3954
+
3929
3955
!- -- F-A MP parameters
3930
3956
Model% rhgrd = rhgrd
3931
3957
Model% spec_adv = spec_adv
@@ -4744,6 +4770,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
4744
4770
if (Model% me == Model% master) print * ,' Using Thompson double moment microphysics' , &
4745
4771
' ltaerosol = ' ,Model% ltaerosol, &
4746
4772
' ttendlim =' ,Model% ttendlim, &
4773
+ ' ext_diag_thompson =' ,Model% ext_diag_thompson, &
4747
4774
' effr_in =' ,Model% effr_in, &
4748
4775
' lradar =' ,Model% lradar, &
4749
4776
' nsradar_reset =' ,Model% nsradar_reset, &
@@ -5127,6 +5154,9 @@ subroutine control_print(Model)
5127
5154
print * , ' doGP_cldoptics_PADE: ' , Model% doGP_cldoptics_PADE
5128
5155
print * , ' doGP_cldoptics_LUT : ' , Model% doGP_cldoptics_LUT
5129
5156
print * , ' use_LW_jacobian : ' , Model% use_LW_jacobian
5157
+ print * , ' damp_LW_fluxadj : ' , Model% damp_LW_fluxadj
5158
+ print * , ' lfnc_k : ' , Model% lfnc_k
5159
+ print * , ' lfnc_p0 : ' , Model% lfnc_p0
5130
5160
print * , ' doGP_lwscat : ' , Model% doGP_lwscat
5131
5161
endif
5132
5162
print * , ' '
@@ -5150,6 +5180,7 @@ subroutine control_print(Model)
5150
5180
print * , ' nsradar_reset : ' , Model% nsradar_reset
5151
5181
print * , ' lrefres : ' , Model% lrefres
5152
5182
print * , ' ttendlim : ' , Model% ttendlim
5183
+ print * , ' ext_diag_thompson : ' , Model% ext_diag_thompson
5153
5184
print * , ' '
5154
5185
endif
5155
5186
if (Model% imp_physics == Model% imp_physics_mg) then
@@ -6028,6 +6059,12 @@ subroutine diag_create (Diag, IM, Model)
6028
6059
Diag% exch_m = clear_val
6029
6060
endif
6030
6061
6062
+ ! Extended diagnostics for Thompson MP
6063
+ if (Model% ext_diag_thompson) then
6064
+ allocate (Diag% thompson_ext_diag3d(IM,Model% levs,Model% thompson_ext_ndiag3d))
6065
+ Diag% thompson_ext_diag3d = clear_val
6066
+ endif
6067
+
6031
6068
! Auxiliary arrays in output for debugging
6032
6069
if (Model% naux2d> 0 ) then
6033
6070
allocate (Diag% aux2d(IM,Model% naux2d))
@@ -7391,7 +7428,10 @@ subroutine interstitial_phys_reset (Interstitial, Model)
7391
7428
end if
7392
7429
!
7393
7430
! Set flag for resetting maximum hourly output fields
7394
- Interstitial% reset = mod (Model% kdt-1 , nint (Model% avg_max_length/ Model% dtp)) == 0
7431
+ Interstitial% max_hourly_reset = mod (Model% kdt-1 , nint (Model% avg_max_length/ Model% dtp)) == 0
7432
+ ! Use same logic in UFS to reset Thompson extended diagnostics
7433
+ Interstitial% ext_diag_thompson_reset = Interstitial% max_hourly_reset
7434
+ !
7395
7435
! Set flag for resetting radar reflectivity calculation
7396
7436
if (Model% nsradar_reset< 0 ) then
7397
7437
Interstitial% radar_reset = .true.
@@ -7598,7 +7638,8 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
7598
7638
write (0 ,* ) ' sum(Interstitial%rb_ice ) = ' , sum (Interstitial% rb_ice )
7599
7639
write (0 ,* ) ' sum(Interstitial%rb_land ) = ' , sum (Interstitial% rb_land )
7600
7640
write (0 ,* ) ' sum(Interstitial%rb_water ) = ' , sum (Interstitial% rb_water )
7601
- write (0 ,* ) ' Interstitial%reset = ' , Interstitial% reset
7641
+ write (0 ,* ) ' Interstitial%max_hourly_reset = ' , Interstitial% max_hourly_reset
7642
+ write (0 ,* ) ' Interstitial%ext_diag_thompson_reset = ' , Interstitial% ext_diag_thompson_reset
7602
7643
write (0 ,* ) ' sum(Interstitial%rhc ) = ' , sum (Interstitial% rhc )
7603
7644
write (0 ,* ) ' sum(Interstitial%runoff ) = ' , sum (Interstitial% runoff )
7604
7645
write (0 ,* ) ' sum(Interstitial%save_q ) = ' , sum (Interstitial% save_q )
0 commit comments