Skip to content

Commit 0850e3c

Browse files
authored
Merge pull request #26 from Qiyu-Song/main
Modify default values and output hbuf init for WTG
2 parents 3d02f2d + 08a828b commit 0850e3c

File tree

4 files changed

+29
-10
lines changed

4 files changed

+29
-10
lines changed

hbuf_conditionals_init.f90

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ subroutine hbuf_conditionals_init(count,trcount)
2828
'Large-scale Omega induced by weak temperature gradient approx','Pa/s',0)
2929
call add_to_namelist(count,trcount,'WOBSREF', &
3030
'Reference Large-scale W Before Modifications by WTG/Scaling','m/s',0)
31+
call add_to_namelist(count,trcount,'T_WTG', &
32+
'Temperature before wtg forcing','K',0)
33+
call add_to_namelist(count,trcount,'QV_WTG', &
34+
'Water vapor before wtg forcing','g/kg',0)
35+
call add_to_namelist(count,trcount,'QC_WTG', &
36+
'Water condensate (qn+qp) before wtg forcing','g/kg',0)
37+
! the followings can be different from the above with doadvensnoise
38+
call add_to_namelist(count,trcount,'T_WTG_W', &
39+
'Temperature used in wtg calculation','K',0)
40+
call add_to_namelist(count,trcount,'QV_WTG_W', &
41+
'Water vapor used in wtg calculation','g/kg',0)
42+
call add_to_namelist(count,trcount,'QC_WTG_W', &
43+
'Water condensate (qn+qp) used in wtg calculation','g/kg',0)
3144
end if
3245

3346
if(dowtg_raymondzeng_QJRMS2005) then

params.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,10 @@ module params
224224
real :: hadscale_time = 0.
225225

226226
! Option for whether to advect 1d profile for wtg advection
227-
logical :: doadv3d = .false. ! this was true in the vanilla SAM
227+
logical :: doadv3d = .true. ! this was true in the vanilla SAM
228228

229229
! Options for which 1d profile to advect if advecting 1d
230-
logical :: doadvinic = .false. ! advect initial profile
230+
logical :: doadvinic = .true. ! advect initial profile
231231
logical :: docalcwtgbg = .false. ! even if not doadvbg, may still want to calculate the wtg bg
232232
logical :: doadvbg = .false. ! advect computed background (time-invariant)
233233
logical :: doadvensnoise = .false. ! works with dompiensemble, use the large-scale w from one ensemble member
@@ -240,8 +240,8 @@ module params
240240
logical :: dowtgtimestep = .false.
241241

242242
! Options for large-scale vertical advection of temperature/moisture, u/v wind
243-
logical :: dotqlsvadv = .false.
244-
logical :: douvlsvadv = .false.
243+
logical :: dotqlsvadv = .true.
244+
logical :: douvlsvadv = .true.
245245

246246
! Kuang-Lab Additions End Here
247247
!=====================================================

setparm.f90

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,12 @@ subroutine setparm
311311
write(*,*) '********************************************************'
312312
write(*,*) ' Unsupported setup in large-scale vertical advection'
313313
write(*,*) ' Please confirm subsidence 1d or 3d fields.'
314+
write(*,*) ' Setting both doadvinic and doadvbg to false.'
314315
write(*,*) '********************************************************'
315316
end if
316-
call task_abort()
317+
!call task_abort()
318+
doadvinic = .false.
319+
doadvbg = .false.
317320
end if
318321
else if (doadvinic.and.doadvbg) then
319322
if (masterproc) then

statistics.f90

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,6 @@ subroutine statistics()
224224
! Add bias outputs to statistics as per Blossey version of SAM
225225
call hbuf_put('TBIAS',tabs0-tg0,1.)
226226
call hbuf_put('QBIAS',factor_xy*(qvz+qcz)-qg0,1.e3)
227-
! Add profiles before forcing
228-
call hbuf_put('T_WTG',t_wtg,1.)
229-
call hbuf_put('QV_WTG',q_wtg,1.e3)
230-
call hbuf_put('T_WTG_W', t_wtg_calcw,1.)
231-
call hbuf_put('QV_WTG_W', q_wtg_calcw,1.e3)
232227

233228
!-------------------------------------------------------------
234229
! Fluxes:
@@ -1235,6 +1230,14 @@ subroutine statistics()
12351230
call hbuf_put('WWTG',w_wtg,1.)
12361231
call hbuf_put('OWTG',o_wtg,1.)
12371232
call hbuf_put('WOBSREF',wsub_ref,1.)
1233+
! Add profiles before forcing
1234+
call hbuf_put('T_WTG',t_wtg,1.)
1235+
call hbuf_put('QV_WTG',q_wtg,1.e3)
1236+
call hbuf_put('QC_WTG',qcond_wtg,1.e3)
1237+
! Add profiles for calculating wtg, can be different with doadvensnoise
1238+
call hbuf_put('T_WTG_W', t_wtg_calcw,1.)
1239+
call hbuf_put('QV_WTG_W', q_wtg_calcw,1.e3)
1240+
call hbuf_put('QC_WTG_W', qcond_wtg_calcw,1.e3)
12381241
end if
12391242

12401243
if(dowtg_raymondzeng_QJRMS2005) then

0 commit comments

Comments
 (0)