@@ -32,6 +32,7 @@ module convect_shallow
3232 convect_shallow_use_shfrc !
3333
3434 ! The following namelist variable controls which shallow convection package is used.
35+ ! 'Hack' = Hack shallow convection (default)
3536 ! 'UW' = UW shallow convection by Sungsu Park and Christopher S. Bretherton
3637 ! 'off' = No shallow convection
3738
@@ -133,6 +134,7 @@ subroutine convect_shallow_init(pref_edge, pbuf2d)
133134
134135 use cam_history, only : addfld, horiz_only, add_default
135136 use ppgrid, only : pcols, pver
137+ use hk_conv, only : mfinti
136138 use uwshcu, only : init_uwshcu
137139 use physconst, only : rair, gravit, latvap, rhoh2o, zvir, &
138140 cappa, latice, mwdry, mwh2o
@@ -194,6 +196,14 @@ subroutine convect_shallow_init(pref_edge, pbuf2d)
194196 ' Cloud ice tendency - shallow convection' )
195197 call addfld( ' CMFDQR' , (/ ' lev' / ) , ' A' , ' kg/kg/s' , &
196198 ' Q tendency - shallow convection rainout' )
199+ call addfld( ' EVAPTCM' , (/ ' lev' / ) , ' A' , ' K/s' , &
200+ ' T tendency - Evaporation/snow prod from Hack convection' )
201+ call addfld( ' FZSNTCM' , (/ ' lev' / ) , ' A' , ' K/s' , &
202+ ' T tendency - Rain to snow conversion from Hack convection' )
203+ call addfld( ' EVSNTCM' , (/ ' lev' / ) , ' A' , ' K/s' , &
204+ ' T tendency - Snow to rain prod from Hack convection' )
205+ call addfld( ' EVAPQCM' , (/ ' lev' / ) , ' A' , ' kg/kg/s' , &
206+ ' Q tendency - Evaporation from Hack convection' )
197207 call addfld( ' QC' , (/ ' lev' / ) , ' A' , ' kg/kg/s' , &
198208 ' Q tendency - shallow convection LW export' )
199209 call addfld( ' PRECSH' , horiz_only, ' A' , ' m/s' , &
@@ -219,6 +229,17 @@ subroutine convect_shallow_init(pref_edge, pbuf2d)
219229
220230 call addfld( ' FREQSH' , horiz_only , ' A' , ' fraction' , &
221231 ' Fractional occurance of shallow convection' )
232+
233+ call addfld( ' HKFLXPRC' , (/ ' ilev' / ), ' A' , ' kg/m2/s' , &
234+ ' Flux of precipitation from HK convection' )
235+ call addfld( ' HKFLXSNW' , (/ ' ilev' / ), ' A' , ' kg/m2/s' , &
236+ ' Flux of snow from HK convection' )
237+ call addfld( ' HKNTPRPD' , (/ ' lev' / ) , ' A' , ' kg/kg/s' , &
238+ ' Net precipitation production from HK convection' )
239+ call addfld( ' HKNTSNPD' , (/ ' lev' / ) , ' A' , ' kg/kg/s' , &
240+ ' Net snow production from HK convection' )
241+ call addfld( ' HKEIHEAT' , (/ ' lev' / ) , ' A' , ' W/kg' , &
242+ ' Heating by ice and evaporation in HK convection' )
222243
223244 call addfld (' ICWMRSH' , (/ ' lev' / ), ' A' , ' kg/kg' , &
224245 ' Shallow Convection in-cloud water mixing ratio ' )
@@ -258,6 +279,32 @@ subroutine convect_shallow_init(pref_edge, pbuf2d)
258279 if ( masterproc ) write (iulog,* ) ' convect_shallow_init: shallow convection OFF'
259280 continue
260281
282+ case (' Hack' ) ! Hack scheme
283+
284+ qpert_idx = pbuf_get_index(' qpert' )
285+
286+ if ( masterproc ) write (iulog,* ) ' convect_shallow_init: Hack shallow convection'
287+ ! Limit shallow convection to regions below 40 mb
288+ ! Note this calculation is repeated in the deep convection interface
289+ if ( pref_edge(1 ) >= 4.e3_r8 ) then
290+ limcnv = 1
291+ else
292+ do k = 1 , plev
293+ if ( pref_edge(k) < 4.e3_r8 .and. pref_edge(k+1 ) >= 4.e3_r8 ) then
294+ limcnv = k
295+ goto 10
296+ end if
297+ end do
298+ limcnv = plevp
299+ end if
300+ 10 continue
301+
302+ if ( masterproc ) then
303+ write (iulog,* ) ' MFINTI: Convection will be capped at intfc ' , limcnv, ' which is ' , pref_edge(limcnv), ' pascals'
304+ end if
305+
306+ call mfinti( rair, cpair, gravit, latvap, rhoh2o, limcnv) ! Get args from inti.F90
307+
261308 case (' UW' ) ! Park and Bretherton shallow convection scheme
262309
263310 if ( masterproc ) write (iulog,* ) ' convect_shallow_init: UW shallow convection scheme (McCaa)'
@@ -366,6 +413,7 @@ subroutine convect_shallow_tend( ztodt , cmfmc , cmfmc2 , &
366413 use camsrfexch, only : cam_in_t
367414
368415 use constituents, only : pcnst, cnst_get_ind, cnst_get_type_byind
416+ use hk_conv, only : cmfmca
369417 use uwshcu, only : compute_uwshcu_inv
370418
371419 use time_manager, only : get_nstep, is_first_step
@@ -560,6 +608,22 @@ subroutine convect_shallow_tend( ztodt , cmfmc , cmfmc2 , &
560608 flxprec(:ncol,:) = 0._r8
561609 flxsnow(:ncol,:) = 0._r8
562610
611+ case (' Hack' ) ! Hack scheme
612+
613+ lq(:) = .TRUE.
614+ call physics_ptend_init( ptend_loc, state% psetcols, ' cmfmca' , ls= .true. , lq= lq ) ! Initialize local ptend type
615+
616+ call pbuf_get_field(pbuf, qpert_idx, qpert)
617+ qpert(:ncol,2 :pcnst) = 0._r8
618+
619+ call cmfmca( lchnk , ncol , &
620+ nstep , ztodt , state% pmid , state% pdel , &
621+ state% rpdel , state% zm , tpert , qpert , state% phis , &
622+ pblh , state% t , state% q , ptend_loc% s , ptend_loc% q , &
623+ cmfmc2 , rprdsh , cmfsl , cmflq , precc , &
624+ qc2 , cnt2 , cnb2 , icwmr , rliq2 , &
625+ state% pmiddry, state% pdeldry, state% rpdeldry )
626+
563627 case (' UW' ) ! UW shallow convection scheme
564628
565629 ! -------------------------------------- !
@@ -819,6 +883,74 @@ subroutine convect_shallow_tend( ztodt , cmfmc , cmfmc2 , &
819883 ! NOT perform below 'zm_conv_evap'. !
820884 ! ------------------------------------------------------------------------ !
821885
886+ if ( shallow_scheme .eq. ' Hack' ) then
887+
888+ ! ------------------------------------------------------------------------------- !
889+ ! Determine the phase of the precipitation produced and add latent heat of fusion !
890+ ! Evaporate some of the precip directly into the environment (Sundqvist) !
891+ ! Allow this to use the updated state1 and a fresh ptend_loc type !
892+ ! Heating and specific humidity tendencies produced !
893+ ! ------------------------------------------------------------------------------- !
894+
895+ ! --------------------------------- !
896+ ! initialize ptend for next process !
897+ ! --------------------------------- !
898+
899+ lq(1 ) = .TRUE.
900+ lq(2 :) = .FALSE.
901+ call physics_ptend_init(ptend_loc, state1% psetcols, ' shallow_hack' , ls= .true. , lq= lq)
902+
903+ call pbuf_get_field(pbuf, sh_flxprc_idx, flxprec )
904+ call pbuf_get_field(pbuf, sh_flxsnw_idx, flxsnow )
905+ call pbuf_get_field(pbuf, sh_cldliq_idx, sh_cldliq )
906+ call pbuf_get_field(pbuf, sh_cldice_idx, sh_cldice )
907+
908+ sprd = 0._r8
909+
910+ ! ! clouds have no water... :)
911+ sh_cldliq(:ncol,:) = 0._r8
912+ sh_cldice(:ncol,:) = 0._r8
913+
914+ call zm_conv_evap( state1% ncol, state1% lchnk, &
915+ state1% t, state1% pmid, state1% pdel, state1% q(:pcols,:pver,1 ), &
916+ ptend_loc% s, tend_s_snwprd, tend_s_snwevmlt, &
917+ ptend_loc% q(:pcols,:pver,1 ), &
918+ rprdsh, cld, ztodt, &
919+ precc, snow, ntprprd, ntsnprd , flxprec, flxsnow, sprd, .true. )
920+
921+ ! ------------------------------------------ !
922+ ! record history variables from zm_conv_evap !
923+ ! ------------------------------------------ !
924+
925+ evapcsh(:ncol,:pver) = ptend_loc% q(:ncol,:pver,1 )
926+
927+ ftem(:ncol,:pver) = ptend_loc% s(:ncol,:pver) / cpair
928+ call outfld( ' EVAPTCM ' , ftem , pcols, lchnk )
929+ ftem(:ncol,:pver) = tend_s_snwprd(:ncol,:pver) / cpair
930+ call outfld( ' FZSNTCM ' , ftem , pcols, lchnk )
931+ ftem(:ncol,:pver) = tend_s_snwevmlt(:ncol,:pver) / cpair
932+ call outfld( ' EVSNTCM ' , ftem , pcols, lchnk )
933+ call outfld( ' EVAPQCM ' , ptend_loc% q(1 ,1 ,1 ) , pcols, lchnk )
934+ call outfld( ' PRECSH ' , precc , pcols, lchnk )
935+ call outfld( ' HKFLXPRC' , flxprec , pcols, lchnk )
936+ call outfld( ' HKFLXSNW' , flxsnow , pcols, lchnk )
937+ call outfld( ' HKNTPRPD' , ntprprd , pcols, lchnk )
938+ call outfld( ' HKNTSNPD' , ntsnprd , pcols, lchnk )
939+ call outfld( ' HKEIHEAT' , ptend_loc% s , pcols, lchnk )
940+
941+ ! ---------------------------------------------------------------- !
942+ ! Add tendency from this process to tend from other processes here !
943+ ! ---------------------------------------------------------------- !
944+
945+ call physics_ptend_sum( ptend_loc, ptend_all, ncol )
946+ call physics_ptend_dealloc(ptend_loc)
947+
948+ ! -------------------------------------------- !
949+ ! Do not perform evaporation process for UW-Cu !
950+ ! -------------------------------------------- !
951+
952+ end if
953+
822954 ! ------------------------------------------------------------- !
823955 ! Update name of parameterization tendencies to send to tphysbc !
824956 ! ------------------------------------------------------------- !
0 commit comments