PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
shallow_convection_part1.F90
Go to the documentation of this file.
1! ######spl
3 CVPEXT, CVP_SHAL, CST, D, NSV, CONVPAR, KBDIA, KTDIA, &
4 KICE, OSETTADJ, PTADJS, PPABST, PZZ, &
5 PTKECLS, PTT, PRVT, PRCT, PRIT, PWT, &
6 PTTEN, PRVTEN, PRCTEN, PRITEN, &
7 KCLTOP, KCLBAS, PUMF, OCH1CONV, KCH1,&
8 PCH1, PCH1TEN, PTHT, PSTHV, PSTHES, &
9 KSDPL, KSPBL, KSLCL, PSTHLCL, PSTLCL,&
10 PSRVLCL, PSWLCL, PSZLCL, PSTHVELCL, OTRIG1)
11
12!$ACDC singlecolumn --nocreate-interface
13
14 USE yomhook , ONLY : lhook, jphook, dr_hook
15! ###############################################################################
16!
17!!**** Monitor routine to compute all convective tendencies by calls
18!! of several subroutines.
19!!
20!!
21!! PURPOSE
22!! -------
23!! The purpose of this routine is to determine the convective
24!! tendencies. The routine first prepares all necessary grid-scale
25!! variables. The final convective tendencies are then computed by
26!! calls of different subroutines.
27!!
28!!
29!!** METHOD
30!! ------
31!! We start by selecting convective columns in the model domain through
32!! the call of routine TRIGGER_FUNCT. Then, we allocate memory for the
33!! convection updraft and downdraft variables and gather the grid scale
34!! variables in convective arrays.
35!! The updraft and downdraft computations are done level by level starting
36!! at the bottom and top of the domain, respectively.
37!! All computations are done on MNH thermodynamic levels. The depth
38!! of the current model layer k is defined by DP(k)=P(k-1)-P(k)
39!!
40!!
41!!
42!! EXTERNAL
43!! --------
44!! CONVECT_TRIGGER_SHAL
45!! CONVECT_SATMIXRATIO
46!! CONVECT_UPDRAFT_SHAL
47!! CONVECT_CONDENS
48!! CONVECT_MIXING_FUNCT
49!! CONVECT_CLOSURE_SHAL
50!! CONVECT_CLOSURE_THRVLCL
51!! CONVECT_CLOSURE_ADJUST_SHAL
52!!
53!! IMPLICIT ARGUMENTS
54!! ------------------
55!! Module MODD_CST
56!! XG ! gravity constant
57!! XPI ! number Pi
58!! XP00 ! reference pressure
59!! XRD, XRV ! gaz constants for dry air and water vapor
60!! XCPD, XCPV ! specific heat for dry air and water vapor
61!! XRHOLW ! density of liquid water
62!! XALPW, XBETAW, XGAMW ! constants for water saturation pressure
63!! XTT ! triple point temperature
64!! XLVTT, XLSTT ! vaporization, sublimation heat constant
65!! XCL, XCI ! specific heat for liquid water and ice
66!!
67!! Module MODD_CONVPAREXT
68!! JCVEXB, JCVEXT ! extra levels on the vertical boundaries
69!!
70!! Module MODD_CONVPAR
71!! XA25 ! reference grid area
72!! XCRAD ! cloud radius
73!!
74!!
75!! REFERENCE
76!! ---------
77!!
78!! Bechtold, 1997 : Meso-NH scientific documentation (31 pp)
79!! Fritsch and Chappell, 1980, J. Atmos. Sci., Vol. 37, 1722-1761.
80!! Kain and Fritsch, 1990, J. Atmos. Sci., Vol. 47, 2784-2801.
81!! Kain and Fritsch, 1993, Meteor. Monographs, Vol. 24, 165-170.
82!!
83!! AUTHOR
84!! ------
85!! P. BECHTOLD * Laboratoire d'Aerologie *
86!!
87!! MODIFICATIONS
88!! -------------
89!! Original 26/03/96
90!! Peter Bechtold 15/11/96 replace theta_il by enthalpy
91!! " 10/12/98 changes for ARPEGE
92!! " 01/01/02 Apply conservation correction
93!! F Bouyssel 05/11/08 Modifications for reproductibility
94!! E. Bazile 20/07/09 Input of TKECLS.
95!! F. Bouyssel 08/11/13 Modifications for reproductibility
96!-------------------------------------------------------------------------------
97!
98!* 0. DECLARATIONS
99! ------------
100!
101USE modd_cst, ONLY : cst_t
102USE modd_convparext, ONLY : convparext
103USE modd_convpar, ONLY: convpar_t
105USE modd_dimphyex, ONLY: dimphyex_t
106USE modd_nsv, ONLY: nsv_t
108!
109!
110IMPLICIT NONE
111!
112!* 0.1 Declarations of dummy arguments :
113!
114!
115TYPE(convparext) ,INTENT(IN) :: CVPEXT
116TYPE(convpar_shal) ,INTENT(IN) :: CVP_SHAL
117TYPE(cst_t) ,INTENT(IN) :: CST
118TYPE(dimphyex_t) ,INTENT(IN) :: D
119TYPE(nsv_t) ,INTENT(IN) :: NSV
120TYPE(convpar_t) ,INTENT(IN) :: CONVPAR
121INTEGER ,INTENT(IN) :: KBDIA ! vertical computations start at
122! ! KBDIA that is at least 1
123INTEGER ,INTENT(IN) :: KTDIA ! vertical computations can be
124 ! limited to D%NKT + 1 - KTDIA
125 ! default=1
126 ! scheme
127INTEGER ,INTENT(IN) :: KICE ! flag for ice ( 1 = yes,
128 ! 0 = no ice )
129LOGICAL ,INTENT(IN) :: OSETTADJ ! logical to set convective
130 ! adjustment time by user
131REAL ,INTENT(IN) :: PTADJS ! user defined adjustment time
132REAL ,INTENT(IN) :: PPABST(D%NIJT,D%NKT) ! grid scale pressure at t
133REAL ,INTENT(IN) :: PZZ(D%NIJT,D%NKT) ! height of model layer (m)
134REAL ,INTENT(IN) :: PTKECLS(D%NIJT) ! TKE in the CLS (m2/s2)
135REAL ,INTENT(IN) :: PTT(D%NIJT,D%NKT) ! grid scale temperature at t
136REAL ,INTENT(IN) :: PRVT(D%NIJT,D%NKT) ! grid scale water vapor "
137REAL ,INTENT(IN) :: PRCT(D%NIJT,D%NKT) ! grid scale r_c "
138REAL ,INTENT(IN) :: PRIT(D%NIJT,D%NKT) ! grid scale r_i "
139REAL ,INTENT(IN) :: PWT(D%NIJT,D%NKT) ! grid scale vertical
140 ! velocity (m/s)
141!
142REAL ,INTENT(INOUT) :: PTTEN(D%NIJT,D%NKT) ! convective temperature
143 ! tendency (K/s)
144REAL ,INTENT(INOUT) :: PRVTEN(D%NIJT,D%NKT) ! convective r_v tendency (1/s)
145REAL ,INTENT(INOUT) :: PRCTEN(D%NIJT,D%NKT) ! convective r_c tendency (1/s)
146REAL ,INTENT(INOUT) :: PRITEN(D%NIJT,D%NKT) ! convective r_i tendency (1/s)
147INTEGER ,INTENT(INOUT) :: KCLTOP(D%NIJT) ! cloud top level
148INTEGER ,INTENT(INOUT) :: KCLBAS(D%NIJT) ! cloud base level
149 ! they are given a value of
150 ! 0 if no convection
151REAL ,INTENT(INOUT) :: PUMF(D%NIJT,D%NKT) ! updraft mass flux (kg/s m2)
152LOGICAL ,INTENT(IN) :: OCH1CONV ! include tracer transport
153INTEGER ,INTENT(IN) :: KCH1 ! number of species
154REAL ,INTENT(IN) :: PCH1(D%NIJT,D%NKT,KCH1)! grid scale chemical species
155REAL ,INTENT(INOUT) :: PCH1TEN(D%NIJT,D%NKT,KCH1)! species conv. tendency (1/s)
156REAL ,INTENT(OUT) :: PTHT(D%NIJT,D%NKT)
157REAL ,INTENT(OUT) :: PSTHV(D%NIJT,D%NKT)
158REAL ,INTENT(OUT) :: PSTHES(D%NIJT,D%NKT) ! grid scale theta, theta_v
159INTEGER ,INTENT(OUT) :: KSDPL(D%NIJT) ! index for parcel departure level
160INTEGER ,INTENT(OUT) :: KSPBL(D%NIJT) ! index for source layer top
161INTEGER ,INTENT(OUT) :: KSLCL(D%NIJT) ! index for lifting condensation level
162REAL ,INTENT(OUT) :: PSTHLCL(D%NIJT) ! updraft theta at LCL/L
163REAL ,INTENT(OUT) :: PSTLCL(D%NIJT) ! updraft temp. at LCL
164REAL ,INTENT(OUT) :: PSRVLCL(D%NIJT) ! updraft rv at LCL
165REAL ,INTENT(OUT) :: PSWLCL(D%NIJT) ! updraft w at LCL
166REAL ,INTENT(OUT) :: PSZLCL(D%NIJT) ! LCL height
167REAL ,INTENT(OUT) :: PSTHVELCL(D%NIJT)! envir. theta_v at LCL
168LOGICAL ,INTENT(OUT) :: OTRIG1(D%NIJT) ! logical mask for convection
169!
170!
171!* 0.2 Declarations of local fixed memory variables :
172!
173INTEGER :: IKB, IKE ! vertical loop bounds
174INTEGER :: JI ! horizontal loop index
175INTEGER :: JK ! vertical loop index
176REAL :: ZEPS, ZEPSA ! R_d / R_v, R_v / R_d
177REAL :: ZRDOCP ! R_d/C_p
178!
179REAL :: ZES ! saturation vapor mixng ratio
180!
181REAL(KIND=jphook) :: zhook_handle
182
183IF (lhook) CALL dr_hook('SHALLOW_CONVECTION_PART1',0,zhook_handle)
184
185ikb = 1 + cvpext%JCVEXB
186ike = d%NKT - cvpext%JCVEXT
187!
188!* 0.7 Reset convective tendencies to zero if convective
189! counter becomes negative
190! -------------------------------------------------
191!
192ptten(:,:) = 0.
193prvten(:,:) = 0.
194prcten(:,:) = 0.
195priten(:,:) = 0.
196pumf(:,:) = 0.
197kcltop(:) = 0
198kclbas(:) = 0
199
200IF ( och1conv ) THEN
201 pch1ten(:,:,:) = 0.
202END IF
203!
204!
205!* 1. Initialize local variables
206! ----------------------------
207!
208zeps = cst%XRD / cst%XRV
209zepsa = cst%XRV / cst%XRD
210zrdocp = cst%XRD / cst%XCPD
211!
212!-------------------------------------------------------------------------------
213!
214!* 1.1 Set up grid scale theta, theta_v, theta_es
215! ------------------------------------------
216!
217ptht(:,:) = 300.
218psthv(:,:)= 300.
219psthes(:,:)= 400.
220DO jk = ikb, ike
221DO ji = d%NIJB, d%NIJE
222 IF ( ppabst(ji,jk) > 40.e2 ) THEN
223 ptht(ji,jk) = ptt(ji,jk) * ( cst%XP00 / ppabst(ji,jk) ) ** zrdocp
224 psthv(ji,jk) = ptht(ji,jk) * ( 1. + zepsa * prvt(ji,jk) ) / &
225 ( 1. + prvt(ji,jk) + prct(ji,jk) + prit(ji,jk) )
226!
227 ! use conservative Bolton (1980) formula for theta_e
228 ! it is used to compute CAPE for undilute parcel ascent
229 ! For economical reasons we do not use routine CONVECT_SATMIXRATIO here
230!
231 zes = exp( cst%XALPW - cst%XBETAW / ptt(ji,jk) - cst%XGAMW * log( ptt(ji,jk) ) )
232 zes = min( 1., zeps * zes / ( ppabst(ji,jk) - zes ) )
233 psthes(ji,jk) = ptt(ji,jk) * ( ptht(ji,jk) / ptt(ji,jk) ) ** &
234 ( 1. - 0.28 * zes ) * exp( ( 3374.6525 / ptt(ji,jk) - 2.5403 ) &
235 * zes * ( 1. + 0.81 * zes ) )
236 END IF
237END DO
238END DO
239!
240!-------------------------------------------------------------------------------
241!
242!* 2. Test for convective columns and determine properties at the LCL
243! --------------------------------------------------------------
244!
245!* 2.3 Test for convective columns and determine properties at the LCL
246! --------------------------------------------------------------
247!
248kslcl(:) = max( ikb, 2 ) ! initialize DPL PBL and LCL
249ksdpl(:) = ikb
250kspbl(:) = ikb
251!
252CALL convect_trigger_shal(cvp_shal, cvpext, cst, d, ppabst, ptht, &
253 psthv, psthes, prvt, pwt, pzz, ptkecls, &
254 psthlcl, pstlcl, psrvlcl, pswlcl, pszlcl, &
255 psthvelcl, kslcl, ksdpl, kspbl, otrig1)
256
257IF (lhook) CALL dr_hook('SHALLOW_CONVECTION_PART1',1,zhook_handle)
258
259END SUBROUTINE
260
261
subroutine convect_trigger_shal(cvp_shal, cvpext, cst, d, ppres, pth, pthv, pthes, prv, pw, pz, ptkecls, pthlcl, ptlcl, prvlcl, pwlcl, pzlcl, pthvelcl, klcl, kdpl, kpbl, otrig)
subroutine shallow_convection_part1(cvpext, cvp_shal, cst, d, nsv, convpar, kbdia, ktdia, kice, osettadj, ptadjs, ppabst, pzz, ptkecls, ptt, prvt, prct, prit, pwt, ptten, prvten, prcten, priten, kcltop, kclbas, pumf, och1conv, kch1, pch1, pch1ten, ptht, psthv, psthes, ksdpl, kspbl, kslcl, psthlcl, pstlcl, psrvlcl, pswlcl, pszlcl, psthvelcl, otrig1)