Skip to content

Commit 63c8fb6

Browse files
swrnealenusbaume
andauthored
Implement parcel_hscale as a namelist parameter in ZM deep convection scheme (#214)
Originator(s): swrneale Description (include issue title and the keyword ['closes', 'fixes', 'resolves'] and issue number): From issue [#203](#203) "Change the 'parcel_hscale' parameter in the ZM convection (zm_conv_intr.F90) to a namelist parameter" This PR is needed in parallel with ESCOMP/cam PR# [1266](ESCOMP/CAM#1266) List all namelist files that were added or changed: M schemes/zhang_mcfarlane/zm_conv_options_namelist.xml - Added new 'zmconv_parcel_hscale' namelist parameter for ZM scheme List all files eliminated and why: N/A List all files added and what they do: N/A List all existing files that have been modified, and describe the changes: (Helpful git command: `git diff --name-status development...<your_branch_name>`) M schemes/zhang_mcfarlane/zm_conv_options.F90 M schemes/zhang_mcfarlane/zm_conv_options.meta - Added new 'zmconv_parcel_hscale' namelist parameter for ZM scheme M schemes/zhang_mcfarlane/zm_convr.F90 M schemes/zhang_mcfarlane/zm_convr.meta - Replace hardcoded 'parcel_hscale' parameter with 'zmconv_parcel_hscale' namelist variable in core ZM scheme (zm_convr). List all automated tests that failed, as well as an explanation for why they weren't fixed: Is this an answer-changing PR? If so, is it a new physics package, algorithm change, tuning change, etc? No If yes to the above question, describe how this code was validated with the new/modified features: --------- Co-authored-by: Jesse Nusbaumer <[email protected]>
1 parent 299c279 commit 63c8fb6

File tree

5 files changed

+53
-42
lines changed

5 files changed

+53
-42
lines changed

schemes/zhang_mcfarlane/zm_conv_options.F90

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ subroutine zm_conv_options_init(masterproc, iulog, &
1313
zmconv_c0_lnd, zmconv_c0_ocn, zmconv_ke, zmconv_ke_lnd, &
1414
zmconv_momcu, zmconv_momcd, zmconv_num_cin, &
1515
no_deep_pbl_in, zmconv_tiedke_add, &
16-
zmconv_capelmt, zmconv_dmpdz, zmconv_parcel_pbl, zmconv_tau)
16+
zmconv_capelmt, zmconv_dmpdz, zmconv_parcel_pbl, &
17+
zmconv_parcel_hscale, zmconv_tau)
1718

1819
integer, intent(in) :: zmconv_num_cin ! Number of negative buoyancy regions that are allowed
1920
! before the convection top and CAPE calculations are completed.
@@ -28,6 +29,7 @@ subroutine zm_conv_options_init(masterproc, iulog, &
2829
real(kind_phys),intent(in) :: zmconv_capelmt
2930
real(kind_phys),intent(in) :: zmconv_dmpdz
3031
logical, intent(in) :: zmconv_parcel_pbl ! Should the parcel properties include PBL mixing?
32+
real(kind_phys),intent(in) :: zmconv_parcel_hscale ! Fraction of PBL depth used to set initial ZM parcel properties
3133
real(kind_phys),intent(in) :: zmconv_tau
3234
logical, intent(in) :: masterproc
3335
integer, intent(in) :: iulog
@@ -42,6 +44,7 @@ subroutine zm_conv_options_init(masterproc, iulog, &
4244
write(iulog,*) 'tuning parameters zm_conv_options_init: zm_dmpdz', zmconv_dmpdz
4345
write(iulog,*) 'tuning parameters zm_conv_options_init: zm_tiedke_add', zmconv_tiedke_add
4446
write(iulog,*) 'tuning parameters zm_conv_options_init: zm_parcel_pbl', zmconv_parcel_pbl
47+
write(iulog,*) 'tuning parameters zm_conv_options_init: zm_parcel_hscale', zmconv_parcel_hscale
4548
endif
4649

4750
end subroutine zm_conv_options_init

schemes/zhang_mcfarlane/zm_conv_options.meta

+6
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@
8989
type = logical
9090
dimensions = ()
9191
intent = in
92+
[ zmconv_parcel_hscale ]
93+
standard_name = fraction_of_pbl_depth_mixed_for_initial_zhang_mcfarlane_parcel_properties
94+
units = fraction
95+
type = real | kind = kind_phys
96+
dimensions = ()
97+
intent = in
9298
[ zmconv_tau ]
9399
standard_name = deep_convective_adjustment_timescale_for_zhang_mcfarlane_deep_convection_scheme
94100
units = s

schemes/zhang_mcfarlane/zm_conv_options_namelist.xml

+16
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,22 @@
177177
</values>
178178
</entry>
179179

180+
<entry id="zmconv_parcel_hscale">
181+
<category>conv</category>
182+
<group>zmconv_nl</group>
183+
<standard_name>fraction_of_pbl_depth_mixed_for_initial_zhang_mcfarlane_parcel_properties</standard_name>
184+
<units>fraction</units>
185+
<type>real</type>
186+
<kind>kind_phys</kind>
187+
<desc>
188+
The fraction of the boundary layer (PBL) depth,
189+
over which to mix the initial ZM convective parcel properties (fraction).
190+
</desc>
191+
<values>
192+
<value>0.5</value>
193+
</values>
194+
</entry>
195+
180196
<entry id="zmconv_tau">
181197
<category>conv</category>
182198
<group>zmconv_nl</group>

schemes/zhang_mcfarlane/zm_convr.F90

+21-41
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module zm_convr
4141
integer limcnv ! top interface level limit for convection
4242

4343
logical :: lparcel_pbl ! Switch to turn on mixing of parcel MSE air, and picking launch level to be the top of the PBL.
44-
44+
real(kind_phys) :: parcel_hscale
4545

4646
real(kind_phys) :: tiedke_add ! namelist configurable
4747
real(kind_phys) :: dmpdz_param ! namelist configurable
@@ -58,7 +58,7 @@ subroutine zm_convr_init(plev, plevp, cpair, epsilo, gravit, latvap, tmelt, rair
5858
pref_edge, zmconv_c0_lnd, zmconv_c0_ocn, zmconv_ke, zmconv_ke_lnd, &
5959
zmconv_momcu, zmconv_momcd, zmconv_num_cin, &
6060
no_deep_pbl_in, zmconv_tiedke_add, &
61-
zmconv_capelmt, zmconv_dmpdz, zmconv_parcel_pbl, zmconv_tau, &
61+
zmconv_capelmt, zmconv_dmpdz, zmconv_parcel_pbl, zmconv_parcel_hscale, zmconv_tau, &
6262
masterproc, iulog, errmsg, errflg)
6363

6464
integer, intent(in) :: plev
@@ -83,7 +83,8 @@ subroutine zm_convr_init(plev, plevp, cpair, epsilo, gravit, latvap, tmelt, rair
8383
real(kind_phys),intent(in) :: zmconv_tiedke_add
8484
real(kind_phys),intent(in) :: zmconv_capelmt
8585
real(kind_phys),intent(in) :: zmconv_dmpdz
86-
logical, intent(in) :: zmconv_parcel_pbl ! Should the parcel properties include PBL mixing?
86+
logical, intent(in) :: zmconv_parcel_pbl ! Should the parcel properties include PBL mixing?
87+
real(kind_phys),intent(in) :: zmconv_parcel_hscale ! Fraction of PBL over which to mix ZM parcel.
8788
real(kind_phys),intent(in) :: zmconv_tau
8889
logical, intent(in) :: masterproc
8990
integer, intent(in) :: iulog
@@ -118,38 +119,30 @@ subroutine zm_convr_init(plev, plevp, cpair, epsilo, gravit, latvap, tmelt, rair
118119
dmpdz_param = zmconv_dmpdz
119120
no_deep_pbl = no_deep_pbl_in
120121
lparcel_pbl = zmconv_parcel_pbl
122+
parcel_hscale = zmconv_parcel_hscale
121123

122124
tau = zmconv_tau
123125

124126
!
125127
! Limit deep convection to regions below 40 mb
126128
! Note this calculation is repeated in the shallow convection interface
127129
!
128-
limcnv = 0 ! null value to check against below
129-
if (pref_edge(1) >= 4.e3_kind_phys) then
130-
limcnv = 1
131-
else
132-
do k=1,plev
133-
if (pref_edge(k) < 4.e3_kind_phys .and. pref_edge(k+1) >= 4.e3_kind_phys) then
134-
limcnv = k
135-
exit
136-
end if
137-
end do
138-
if ( limcnv == 0 ) limcnv = plevp
139-
end if
140-
141-
if ( masterproc ) then
142-
write(iulog,*)'ZM_CONV_INIT: Deep convection will be capped at intfc ',limcnv, &
143-
' which is ',pref_edge(limcnv),' pascals'
144-
write(iulog,*) 'tuning parameters zm_convr_init: tau',tau
145-
write(iulog,*) 'tuning parameters zm_convr_init: c0_lnd',c0_lnd, ', c0_ocn', c0_ocn
146-
write(iulog,*) 'tuning parameters zm_convr_init: num_cin', num_cin
147-
write(iulog,*) 'tuning parameters zm_convr_init: ke',ke
148-
write(iulog,*) 'tuning parameters zm_convr_init: no_deep_pbl',no_deep_pbl
149-
write(iulog,*) 'tuning parameters zm_convr_init: zm_capelmt', capelmt
150-
write(iulog,*) 'tuning parameters zm_convr_init: zm_dmpdz', dmpdz_param
151-
write(iulog,*) 'tuning parameters zm_convr_init: zm_tiedke_add', tiedke_add
152-
write(iulog,*) 'tuning parameters zm_convr_init: zm_parcel_pbl', lparcel_pbl
130+
limcnv = 0 ! null value to check against below
131+
if (pref_edge(1) >= 4.e3_kind_phys) then
132+
limcnv = 1
133+
else
134+
do k=1,plev
135+
if (pref_edge(k) < 4.e3_kind_phys .and. pref_edge(k+1) >= 4.e3_kind_phys) then
136+
limcnv = k
137+
exit
138+
end if
139+
end do
140+
if ( limcnv == 0 ) limcnv = plevp
141+
end if
142+
143+
if ( masterproc ) then
144+
write(iulog,*)'ZM_CONV_INIT: Deep convection will be capped at intfc ',limcnv, &
145+
' which is ',pref_edge(limcnv),' pascals'
153146
endif
154147

155148
if (masterproc) write(iulog,*)'**** ZM: DILUTE Buoyancy Calculation ****'
@@ -934,12 +927,6 @@ subroutine buoyan_dilute( ncol ,pver , &
934927
real(kind_phys) rd
935928
real(kind_phys) rl
936929

937-
938-
! Scaling of PBL height to give parcel mixing length for lparcel_pbl=True
939-
940-
real(kind_phys), parameter :: parcel_hscale = 0.5_kind_phys
941-
942-
943930
!
944931
!-----------------------------------------------------------------------
945932
!
@@ -1386,13 +1373,6 @@ subroutine parcel_dilute (ncol, pver, cpliq, cpwv, rh2o, latice, msg, klaunch, p
13861373
rcall = 3
13871374
call ientropy (rcall,i,slcl,pl(i),qtlcl,tl(i),qslcl,tfguess,cpliq,cpwv,rh2o,lat(i), long(i), errmsg,errflg)
13881375

1389-
! write(iulog,*)' '
1390-
! write(iulog,*)' p',p(i,k+1),pl(i),p(i,lcl(i))
1391-
! write(iulog,*)' t',tmix(i,k+1),tl(i),tmix(i,lcl(i))
1392-
! write(iulog,*)' s',smix(i,k+1),slcl,smix(i,lcl(i))
1393-
! write(iulog,*)'qt',qtmix(i,k+1),qtlcl,qtmix(i,lcl(i))
1394-
! write(iulog,*)'qs',qsmix(i,k+1),qslcl,qsmix(i,lcl(i))
1395-
13961376
endif
13971377
!
13981378
end if ! k < klaunch

schemes/zhang_mcfarlane/zm_convr.meta

+6
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@
132132
type = logical
133133
dimensions = ()
134134
intent = in
135+
[ zmconv_parcel_hscale ]
136+
standard_name = fraction_of_pbl_depth_mixed_for_initial_zhang_mcfarlane_parcel_properties
137+
units = fraction
138+
type = real | kind = kind_phys
139+
dimensions = ()
140+
intent = in
135141
[ zmconv_tau ]
136142
standard_name = deep_convective_adjustment_timescale_for_zhang_mcfarlane_deep_convection_scheme
137143
units = s

0 commit comments

Comments
 (0)