Skip to content

Commit 77bcfb1

Browse files
authored
Merge pull request #903 from lisa-bengtsson/prog_closure
Add prognostic cumulus closure description in saSAS
2 parents f13ed4e + 2d2f1a6 commit 77bcfb1

19 files changed

+878
-64
lines changed

physics/GFS_DCNV_generic_post.F90

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, &
1515
index_of_temperature, index_of_x_wind, index_of_y_wind, ntqv, gq0, save_q, &
1616
cnvw, cnvc, cnvw_phy_f3d, cnvc_phy_f3d, flag_for_dcnv_generic_tend, &
1717
ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl, &
18-
ntgnc, nthl, nthnc, nthv, ntgv, ntrac,clw, &
18+
ntgnc, nthl, nthnc, nthv, ntgv, ntsigma, ntrac,clw, &
1919
satmedmf, trans_trac, errmsg, errflg)
2020

2121

@@ -45,7 +45,7 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, &
4545
integer, intent(in) :: dtidx(:,:), index_of_process_dcnv, index_of_temperature, &
4646
index_of_x_wind, index_of_y_wind, ntqv
4747
integer, intent(in) :: ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl, &
48-
ntgnc, nthl, nthnc, nthv, ntgv, ntrac
48+
ntgnc, nthl, nthnc, nthv, ntgv, ntsigma, ntrac
4949
real(kind=kind_phys), dimension(:,:,:), intent(in) :: clw
5050

5151

@@ -112,7 +112,7 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, &
112112
n /= ntrw .and. n /= ntsw .and. n /= ntrnc .and. &
113113
n /= ntsnc .and. n /= ntgl .and. n /= ntgnc .and. &
114114
n /= nthl .and. n /= nthnc .and. n /= nthv .and. &
115-
n /= ntgv ) then
115+
n /= ntgv .and. n /= ntsigma) then
116116
tracers = tracers + 1
117117
idtend = dtidx(100+n,index_of_process_dcnv)
118118
if(idtend>0) then

physics/GFS_DCNV_generic_post.meta

+7
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,13 @@
356356
dimensions = ()
357357
type = logical
358358
intent = in
359+
[ntsigma]
360+
standard_name = index_of_updraft_area_fraction_in_tracer_concentration_array
361+
long_name = tracer index of updraft_area_fraction
362+
units = index
363+
dimensions = ()
364+
type = integer
365+
intent = in
359366
[ntcw]
360367
standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array
361368
long_name = tracer index for cloud condensate (or liquid water)

physics/GFS_DCNV_generic_pre.F90

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, do_cnvgwd, cplc
1313
gu0, gv0, gt0, gq0, nsamftrac, ntqv, &
1414
save_u, save_v, save_t, save_q, clw, &
1515
ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl, &
16-
ntgnc, nthl, nthnc, nthv, ntgv, &
16+
ntgnc, nthl, nthnc, nthv, ntgv,ntsigma, &
1717
cscnv, satmedmf, trans_trac, ras, ntrac, &
1818
dtidx, index_of_process_dcnv, errmsg, errflg)
1919

@@ -22,7 +22,7 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, do_cnvgwd, cplc
2222
implicit none
2323

2424
integer, intent(in) :: im, levs, nsamftrac, ntqv, index_of_process_dcnv, dtidx(:,:), &
25-
ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntrac,ntgnc,nthl,nthnc,nthv,ntgv
25+
ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntrac,ntgnc,nthl,nthnc,nthv,ntgv,ntsigma
2626
logical, intent(in) :: ldiag3d, qdiag3d, do_cnvgwd, cplchm
2727
real(kind=kind_phys), dimension(:,:), intent(in) :: gu0
2828
real(kind=kind_phys), dimension(:,:), intent(in) :: gv0
@@ -68,7 +68,7 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, do_cnvgwd, cplc
6868
n /= ntrw .and. n /= ntsw .and. n /= ntrnc .and. &
6969
n /= ntsnc .and. n /= ntgl .and. n /= ntgnc .and. &
7070
n /= nthl .and. n /= nthnc .and. n /= nthv .and. &
71-
n /= ntgv ) then
71+
n /= ntgv .and. n/= ntsigma) then
7272
tracers = tracers + 1
7373
if(dtidx(100+n,index_of_process_dcnv)>0) then
7474
save_q(:,:,n) = clw(:,:,tracers)
@@ -87,4 +87,4 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, do_cnvgwd, cplc
8787

8888
end subroutine GFS_DCNV_generic_pre_run
8989

90-
end module GFS_DCNV_generic_pre
90+
end module GFS_DCNV_generic_pre

physics/GFS_DCNV_generic_pre.meta

+7
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,13 @@
169169
dimensions = ()
170170
type = logical
171171
intent = in
172+
[ntsigma]
173+
standard_name = index_of_updraft_area_fraction_in_tracer_concentration_array
174+
long_name = tracer index of updraft_area_fraction
175+
units = index
176+
dimensions = ()
177+
type = integer
178+
intent = in
172179
[ntcw]
173180
standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array
174181
long_name = tracer index for cloud condensate (or liquid water)

physics/GFS_MP_generic_post.F90

+23-5
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ module GFS_MP_generic_post
2020
!> @{
2121
subroutine GFS_MP_generic_post_run( &
2222
im, levs, kdt, nrcm, nncl, ntcw, ntrac, imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_nssl, &
23-
imp_physics_mg, imp_physics_fer_hires, cal_pre, cplflx, cplchm, con_g, rainmin, dtf, frain, rainc, &
23+
imp_physics_mg, imp_physics_fer_hires, cal_pre, cplflx, cplchm, progsigma, con_g, rainmin, dtf, frain, rainc, &
2424
rain1, rann, xlat, xlon, gt0, gq0, prsl, prsi, phii, tsfc, ice, snow, graupel, save_t, save_q, rain0, ice0, snow0,&
2525
graupel0, del, rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, srflag, sr, cnvprcp, totprcp, totice, &
2626
totsnw, totgrp, cnvprcpb, totprcpb, toticeb, totsnwb, totgrpb, rain_cpl, rainc_cpl, snow_cpl, pwat, &
2727
drain_cpl, dsnow_cpl, lsm, lsm_ruc, lsm_noahmp, raincprv, rainncprv, iceprv, snowprv, &
2828
graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, dfi_radar_max_intervals, &
29-
dtend, dtidx, index_of_temperature, index_of_process_mp,ldiag3d, qdiag3d, lssav, num_dfi_radar, fh_dfi_radar, &
30-
index_of_process_dfi_radar, ix_dfi_radar, dfi_radar_tten, radar_tten_limits, fhour, errmsg, errflg)
29+
dtend, dtidx, index_of_temperature, index_of_process_mp,ldiag3d, qdiag3d,dqdt_qmicro, lssav, num_dfi_radar, &
30+
fh_dfi_radar,index_of_process_dfi_radar, ix_dfi_radar, dfi_radar_tten, radar_tten_limits, fhour, prevsq, &
31+
errmsg, errflg)
3132
!
3233
use machine, only: kind_phys
3334
use calpreciptype_mod, only: calpreciptype
@@ -36,7 +37,7 @@ subroutine GFS_MP_generic_post_run(
3637
integer, intent(in) :: im, levs, kdt, nrcm, nncl, ntcw, ntrac, num_dfi_radar, index_of_process_dfi_radar
3738
integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires
3839
integer, intent(in) :: imp_physics_nssl
39-
logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm
40+
logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm, progsigma
4041
integer, intent(in) :: index_of_temperature,index_of_process_mp
4142

4243
integer :: dfi_radar_max_intervals
@@ -80,7 +81,8 @@ subroutine GFS_MP_generic_post_run(
8081
real(kind=kind_phys), dimension(:), intent(inout) :: diceprv
8182
real(kind=kind_phys), dimension(:), intent(inout) :: dsnowprv
8283
real(kind=kind_phys), dimension(:), intent(inout) :: dgraupelprv
83-
84+
real(kind=kind_phys), dimension(:,:), intent(inout) :: dqdt_qmicro
85+
real(kind=kind_phys), dimension(:,:), intent(inout) :: prevsq
8486
real(kind=kind_phys), intent(in) :: dtp
8587

8688
! CCPP error handling
@@ -352,6 +354,15 @@ subroutine GFS_MP_generic_post_run(
352354
endif if_tendency_diagnostics
353355
endif if_save_fields
354356

357+
!If prognostic updraft area fraction is used in saSAS
358+
if(progsigma)then
359+
do k=1,levs
360+
do i=1,im
361+
dqdt_qmicro(i,k)=(gq0(i,k,1)-save_q(i,k,1))/dtp
362+
enddo
363+
enddo
364+
endif
365+
355366
if (cplflx .or. cplchm) then
356367
do i = 1, im
357368
dsnow_cpl(i)= max(zero, rain(i) * srflag(i))
@@ -387,6 +398,13 @@ subroutine GFS_MP_generic_post_run(
387398
pwat(i) = pwat(i) * onebg
388399
enddo
389400

401+
if(progsigma)then
402+
do k = 1, levs
403+
do i=1, im
404+
prevsq(i,k) = gq0(i,k,1)
405+
enddo
406+
enddo
407+
endif
390408

391409
end subroutine GFS_MP_generic_post_run
392410
!> @}

physics/GFS_MP_generic_post.meta

+23
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@
128128
dimensions = ()
129129
type = logical
130130
intent = in
131+
[progsigma]
132+
standard_name = do_prognostic_updraft_area_fraction
133+
long_name = flag for prognostic sigma in cumulus scheme
134+
units = flag
135+
dimensions = ()
136+
type = logical
137+
intent = in
131138
[con_g]
132139
standard_name = gravitational_acceleration
133140
long_name = gravitational acceleration
@@ -724,6 +731,22 @@
724731
dimensions = ()
725732
type = logical
726733
intent = in
734+
[dqdt_qmicro]
735+
standard_name = instantaneous_tendency_of_specific_humidity_due_to_microphysics
736+
long_name = moisture tendency due to microphysics
737+
units = kg kg-1 s-1
738+
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
739+
type = real
740+
kind = kind_phys
741+
intent = inout
742+
[prevsq]
743+
standard_name = specific_humidity_on_previous_timestep
744+
long_name = specific_humidity_on_previous_timestep
745+
units = kg kg-1
746+
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
747+
type = real
748+
kind = kind_phys
749+
intent = inout
727750
[lssav]
728751
standard_name = flag_for_diagnostics
729752
long_name = logical flag for storing diagnostics

physics/GFS_SCNV_generic_post.F90

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, &
1414
rainc, cnvprcp, cnvprcpb, cnvw_phy_f3d, cnvc_phy_f3d, &
1515
dtend, dtidx, index_of_temperature, index_of_x_wind, index_of_y_wind, &
1616
index_of_process_scnv, ntqv, flag_for_scnv_generic_tend, &
17-
ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntgnc, &
17+
ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntgnc,ntsigma, &
1818
imfshalcnv, imfshalcnv_sas, imfshalcnv_samf, ntrac, &
1919
cscnv, satmedmf, trans_trac, ras, errmsg, errflg)
2020

@@ -23,7 +23,7 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, &
2323
implicit none
2424

2525
integer, intent(in) :: im, levs, nn, ntqv, nsamftrac
26-
integer, intent(in) :: ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntgnc,ntrac
26+
integer, intent(in) :: ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntgnc,ntsigma,ntrac
2727
logical, intent(in) :: lssav, ldiag3d, qdiag3d, flag_for_scnv_generic_tend
2828
real(kind=kind_phys), intent(in) :: frain
2929
real(kind=kind_phys), dimension(:,:), intent(in) :: gu0, gv0, gt0
@@ -103,7 +103,7 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, &
103103
do n=2,ntrac
104104
if ( n /= ntcw .and. n /= ntiw .and. n /= ntclamt .and. &
105105
n /= ntrw .and. n /= ntsw .and. n /= ntrnc .and. &
106-
n /= ntsnc .and. n /= ntgl .and. n /= ntgnc) then
106+
n /= ntsnc .and. n /= ntgl .and. n /= ntgnc .and. n /= ntsigma) then
107107
tracers = tracers + 1
108108
idtend = dtidx(100+n,index_of_process_scnv)
109109
if(idtend>0) then

physics/GFS_SCNV_generic_post.meta

+7
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,13 @@
335335
dimensions = ()
336336
type = logical
337337
intent = in
338+
[ntsigma]
339+
standard_name = index_of_updraft_area_fraction_in_tracer_concentration_array
340+
long_name = tracer index of updraft_area_fraction
341+
units = index
342+
dimensions = ()
343+
type = integer
344+
intent = in
338345
[ntcw]
339346
standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array
340347
long_name = tracer index for cloud condensate (or liquid water)

physics/GFS_SCNV_generic_pre.F90

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ module GFS_SCNV_generic_pre
1111
subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gu0, gv0, gt0, gq0, &
1212
save_u, save_v, save_t, save_q, ntqv, nsamftrac, flag_for_scnv_generic_tend, &
1313
dtidx, index_of_process_scnv, ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntgnc, &
14-
cscnv, satmedmf, trans_trac, ras, ntrac, clw, errmsg, errflg)
14+
ntsigma, cscnv, satmedmf, trans_trac, ras, ntrac, clw, errmsg, errflg)
1515

1616
use machine, only: kind_phys
1717

1818
implicit none
1919

2020
integer, intent(in) :: im, levs, ntqv, nsamftrac, index_of_process_scnv, dtidx(:,:)
21-
integer, intent(in) :: ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntgnc,ntrac
21+
integer, intent(in) :: ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntgnc, ntsigma,ntrac
2222
logical, intent(in) :: ldiag3d, qdiag3d, flag_for_scnv_generic_tend
2323
real(kind=kind_phys), dimension(:,:), intent(in) :: gu0, gv0, gt0
2424
real(kind=kind_phys), dimension(:,:,:), intent(in) :: gq0
@@ -49,7 +49,7 @@ subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gu0, gv0, gt0,
4949
do n=2,ntrac
5050
if ( n /= ntcw .and. n /= ntiw .and. n /= ntclamt .and. &
5151
n /= ntrw .and. n /= ntsw .and. n /= ntrnc .and. &
52-
n /= ntsnc .and. n /= ntgl .and. n /= ntgnc) then
52+
n /= ntsnc .and. n /= ntgl .and. n /= ntgnc .and. n /= ntsigma) then
5353
tracers = tracers + 1
5454
if(dtidx(100+n,index_of_process_scnv)>0) then
5555
save_q(:,:,n) = clw(:,:,tracers)
@@ -70,4 +70,4 @@ subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gu0, gv0, gt0,
7070
end subroutine GFS_SCNV_generic_pre_run
7171

7272

73-
end module GFS_SCNV_generic_pre
73+
end module GFS_SCNV_generic_pre

physics/GFS_SCNV_generic_pre.meta

+7
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@
162162
dimensions = ()
163163
type = logical
164164
intent = in
165+
[ntsigma]
166+
standard_name = index_of_updraft_area_fraction_in_tracer_concentration_array
167+
long_name = tracer index of updraft_area_fraction
168+
units = index
169+
dimensions = ()
170+
type = integer
171+
intent = in
165172
[ntcw]
166173
standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array
167174
long_name = tracer index for cloud condensate (or liquid water)

physics/GFS_suite_interstitial_3.F90

+32-5
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ module GFS_suite_interstitial_3
99
!! \htmlinclude GFS_suite_interstitial_3_run.html
1010
!!
1111
subroutine GFS_suite_interstitial_3_run (otsptflag, &
12-
im, levs, nn, cscnv, &
12+
im, levs, nn, cscnv,imfshalcnv, imfdeepcnv, &
13+
imfshalcnv_samf, imfdeepcnv_samf,progsigma, &
14+
first_time_step, restart, &
1315
satmedmf, trans_trac, do_shoc, ltaerosol, ntrac, ntcw, &
1416
ntiw, ntclamt, ntrw, ntsw, ntrnc, ntsnc, ntgl, ntgnc, &
15-
xlon, xlat, gt0, gq0, imp_physics, imp_physics_mg, &
17+
xlon, xlat, gt0, gq0, sigmain,sigmaout,qmicro, &
18+
imp_physics, imp_physics_mg, &
1619
imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, &
1720
imp_physics_gfdl, imp_physics_thompson, dtidx, ntlnc, &
1821
imp_physics_wsm6, imp_physics_fer_hires, prsi, ntinc, &
@@ -33,8 +36,9 @@ subroutine GFS_suite_interstitial_3_run (otsptflag, &
3336
imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6,imp_physics_fer_hires, &
3437
imp_physics_nssl, me, index_of_process_conv_trans
3538
integer, intent(in ), dimension(:) :: islmsk, kpbl, kinver
36-
logical, intent(in ) :: cscnv, satmedmf, trans_trac, do_shoc, ltaerosol, ras
37-
39+
logical, intent(in ) :: cscnv, satmedmf, trans_trac, do_shoc, ltaerosol, ras, progsigma
40+
logical, intent(in ) :: first_time_step, restart
41+
integer, intent(in ) :: imfshalcnv, imfdeepcnv, imfshalcnv_samf,imfdeepcnv_samf
3842
integer, intent(in) :: ntinc, ntlnc
3943
logical, intent(in) :: ldiag3d, qdiag3d
4044
integer, dimension(:,:), intent(in) :: dtidx
@@ -48,6 +52,8 @@ subroutine GFS_suite_interstitial_3_run (otsptflag, &
4852
real(kind=kind_phys), intent(in ), dimension(:,:) :: gt0
4953
real(kind=kind_phys), intent(in ), dimension(:,:,:) :: gq0
5054

55+
real(kind=kind_phys), intent(inout ), dimension(:,:) :: sigmain
56+
real(kind=kind_phys), intent(inout ), dimension(:,:) :: sigmaout,qmicro
5157
real(kind=kind_phys), intent(inout), dimension(:,:) :: rhc, save_qc
5258
! save_qi is not allocated for Zhao-Carr MP
5359
real(kind=kind_phys), intent(inout), dimension(:,:) :: save_qi
@@ -73,6 +79,27 @@ subroutine GFS_suite_interstitial_3_run (otsptflag, &
7379
errmsg = ''
7480
errflg = 0
7581

82+
! In case of using prognostic updraf area fraction, initialize area fraction here
83+
! since progsigma_calc is called from both deep and shallow schemes.
84+
if(((imfshalcnv == imfshalcnv_samf) .or. (imfdeepcnv == imfdeepcnv_samf)) &
85+
.and. progsigma)then
86+
if(first_time_step .and. .not. restart)then
87+
do k=1,levs
88+
do i=1,im
89+
sigmain(i,k)=0.0
90+
sigmaout(i,k)=0.0
91+
qmicro(i,k)=0.0
92+
enddo
93+
enddo
94+
endif
95+
do k=1,levs
96+
do i=1,im
97+
sigmaout(i,k)=0.0
98+
enddo
99+
enddo
100+
endif
101+
102+
76103
if (cscnv .or. satmedmf .or. trans_trac .or. ras) then
77104
tracers = 2
78105
do n=2,ntrac
@@ -192,4 +219,4 @@ subroutine GFS_suite_interstitial_3_run (otsptflag, &
192219

193220
end subroutine GFS_suite_interstitial_3_run
194221

195-
end module GFS_suite_interstitial_3
222+
end module GFS_suite_interstitial_3

0 commit comments

Comments
 (0)