PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
shallow_convection.F90
Go to the documentation of this file.
1!MNH_LIC Copyright 1996-2024 CNRS, Meteo-France and Universite Paul Sabatier
2!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
3!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4!MNH_LIC for details. version 1.
5!-----------------------------------------------------------------
6! ###############################################################################
7 SUBROUTINE shallow_convection(CVP_SHAL, CST, D, NSV, CONVPAR, KBDIA, KTDIA, &
8 KICE, OSETTADJ, PTADJS, PPABST, PZZ, &
9 PTKECLS, PTT, PRVT, PRCT, PRIT, PWT, &
10 PTTEN, PRVTEN, PRCTEN, PRITEN, &
11 KCLTOP, KCLBAS, PUMF, OCH1CONV, KCH1,&
12 PCH1, PCH1TEN)
13! ###############################################################################
14!
15!!**** Monitor routine to compute all convective tendencies by calls
16!! of several subroutines.
17!!
18!!
19!! PURPOSE
20!! -------
21!! The purpose of this routine is to determine the convective
22!! tendencies. The routine first prepares all necessary grid-scale
23!! variables. The final convective tendencies are then computed by
24!! calls of different subroutines.
25!!
26!!
27!!** METHOD
28!! ------
29!! We start by selecting convective columns in the model domain through
30!! the call of routine TRIGGER_FUNCT. Then, we allocate memory for the
31!! convection updraft and downdraft variables and gather the grid scale
32!! variables in convective arrays.
33!! The updraft and downdraft computations are done level by level starting
34!! at the bottom and top of the domain, respectively.
35!! All computations are done on MNH thermodynamic levels. The depth
36!! of the current model layer k is defined by DP(k)=P(k-1)-P(k)
37!!
38!!
39!!
40!! EXTERNAL
41!! --------
42!! CONVECT_TRIGGER_SHAL
43!! CONVECT_SATMIXRATIO
44!! CONVECT_UPDRAFT_SHAL
45!! CONVECT_CONDENS
46!! CONVECT_MIXING_FUNCT
47!! CONVECT_CLOSURE_SHAL
48!! CONVECT_CLOSURE_THRVLCL
49!! CONVECT_CLOSURE_ADJUST_SHAL
50!!
51!! IMPLICIT ARGUMENTS
52!! ------------------
53!! Module MODD_CST
54!! XG ! gravity constant
55!! XPI ! number Pi
56!! XP00 ! reference pressure
57!! XRD, XRV ! gaz constants for dry air and water vapor
58!! XCPD, XCPV ! specific heat for dry air and water vapor
59!! XRHOLW ! density of liquid water
60!! XALPW, XBETAW, XGAMW ! constants for water saturation pressure
61!! XTT ! triple point temperature
62!! XLVTT, XLSTT ! vaporization, sublimation heat constant
63!! XCL, XCI ! specific heat for liquid water and ice
64!!
65!! Module MODD_CONVPAREXT
66!! JCVEXB, JCVEXT ! extra levels on the vertical boundaries
67!!
68!! Module MODD_CONVPAR
69!! XA25 ! reference grid area
70!! XCRAD ! cloud radius
71!!
72!!
73!! REFERENCE
74!! ---------
75!!
76!! Bechtold, 1997 : Meso-NH scientific documentation (31 pp)
77!! Fritsch and Chappell, 1980, J. Atmos. Sci., Vol. 37, 1722-1761.
78!! Kain and Fritsch, 1990, J. Atmos. Sci., Vol. 47, 2784-2801.
79!! Kain and Fritsch, 1993, Meteor. Monographs, Vol. 24, 165-170.
80!!
81!! AUTHOR
82!! ------
83!! P. BECHTOLD * Laboratoire d'Aerologie *
84!!
85!! MODIFICATIONS
86!! -------------
87!! Original 26/03/96
88!! Peter Bechtold 15/11/96 replace theta_il by enthalpy
89!! " 10/12/98 changes for ARPEGE
90!! " 01/01/02 Apply conservation correction
91!! F Bouyssel 05/11/08 Modifications for reproductibility
92!! E. Bazile 20/07/09 Input of TKECLS.
93!! F. Bouyssel 08/11/13 Modifications for reproductibility
94! P. Wautelet 03/06/2019: simplify code (remove always true masks) + replace PACK intrinsics
95!-------------------------------------------------------------------------------
96!
97!* 0. DECLARATIONS
98! ------------
99!
100USE yomhook , ONLY : lhook, dr_hook, jphook
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
107USE modi_shallow_convection_part1, ONLY: shallow_convection_part1
108USE modi_shallow_convection_part2_select, ONLY: shallow_convection_part2_select
109!
110IMPLICIT NONE
111!
112!* 0.1 Declarations of dummy arguments :
113!
114!
115TYPE(convpar_shal) ,INTENT(IN) :: CVP_SHAL
116TYPE(cst_t) ,INTENT(IN) :: CST
117TYPE(dimphyex_t) ,INTENT(IN) :: D
118TYPE(nsv_t) ,INTENT(IN) :: NSV
119TYPE(convpar_t) ,INTENT(IN) :: CONVPAR
120INTEGER, INTENT(IN) :: KBDIA ! vertical computations start at
121! ! KBDIA that is at least 1
122INTEGER, INTENT(IN) :: KTDIA ! vertical computations can be
123 ! limited to D%NKT + 1 - KTDIA
124 ! default=1
125INTEGER, INTENT(IN) :: KICE ! flag for ice ( 1 = yes,
126 ! 0 = no ice )
127LOGICAL, INTENT(IN) :: OSETTADJ ! logical to set convective
128 ! adjustment time by user
129REAL, INTENT(IN) :: PTADJS ! user defined adjustment time
130REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PPABST ! grid scale pressure at t
131REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PZZ ! height of model layer (m)
132REAL, DIMENSION(D%NIJT), INTENT(IN) :: PTKECLS ! TKE in the CLS (m2/s2)
133REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PTT ! grid scale temperature at t
134REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PRVT ! grid scale water vapor "
135REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PRCT ! grid scale r_c "
136REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PRIT ! grid scale r_i "
137REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PWT ! grid scale vertical
138 ! velocity (m/s)
139!
140REAL, DIMENSION(D%NIJT,D%NKT), INTENT(INOUT):: PTTEN ! convective temperature tendency (K/s)
141REAL, DIMENSION(D%NIJT,D%NKT), INTENT(INOUT):: PRVTEN ! convective r_v tendency (1/s)
142REAL, DIMENSION(D%NIJT,D%NKT), INTENT(INOUT):: PRCTEN ! convective r_c tendency (1/s)
143REAL, DIMENSION(D%NIJT,D%NKT), INTENT(INOUT):: PRITEN ! convective r_i tendency (1/s)
144INTEGER, DIMENSION(D%NIJT), INTENT(INOUT):: KCLTOP ! cloud top level
145INTEGER, DIMENSION(D%NIJT), INTENT(INOUT):: KCLBAS ! cloud base level
146 ! they are given a value of
147 ! 0 if no convection
148REAL, DIMENSION(D%NIJT,D%NKT), INTENT(INOUT):: PUMF ! updraft mass flux (kg/s m2)
149!
150LOGICAL, INTENT(IN) :: OCH1CONV ! include tracer transport
151INTEGER, INTENT(IN) :: KCH1 ! number of species
152REAL, DIMENSION(D%NIJT,D%NKT,KCH1), INTENT(IN) :: PCH1 ! grid scale chemical species
153REAL, DIMENSION(D%NIJT,D%NKT,KCH1), INTENT(INOUT):: PCH1TEN! species conv. tendency (1/s)
154!
155!
156!* 0.2 Declarations of local fixed memory variables :
157!
158REAL :: ZRDOCP ! R_d/C_p
159!
160REAL, DIMENSION(D%NIJT,D%NKT) :: ZTHT, ZSTHV, ZSTHES ! grid scale theta, theta_v
161!
162!
163!* 0.2 Declarations of local allocatable variables :
164!
165INTEGER :: ISDPL(D%NIJT) ! index for parcel departure level
166INTEGER :: ISPBL(D%NIJT) ! index for source layer top
167INTEGER :: ISLCL(D%NIJT) ! index for lifting condensation level
168REAL :: ZSTHLCL(D%NIJT) ! updraft theta at LCL/L
169REAL :: ZSTLCL(D%NIJT) ! updraft temp. at LCL
170REAL :: ZSRVLCL(D%NIJT) ! updraft rv at LCL
171REAL :: ZSWLCL(D%NIJT) ! updraft w at LCL
172REAL :: ZSZLCL(D%NIJT) ! LCL height
173REAL :: ZSTHVELCL(D%NIJT)! envir. theta_v at LCL
174!
175LOGICAL :: GTRIG1(D%NIJT) ! logical mask for convection
176!
177TYPE(convparext) :: CVPEXT
178!
179!-------------------------------------------------------------------------------
180!
181!
182!* 0.3 Compute loop bounds
183! -------------------
184!
185REAL(KIND=jphook) :: zhook_handle
186
187IF (lhook) CALL dr_hook('SHALLOW_CONVECTION',0,zhook_handle)
188
189cvpext%JCVEXB = max( 0, kbdia - 1 )
190cvpext%JCVEXT = max( 0, ktdia - 1)
191
192zrdocp = cst%XRD / cst%XCPD
193
194CALL shallow_convection_part1(cvpext, cvp_shal, cst, d, nsv, convpar, kbdia, ktdia, &
195 kice, osettadj, ptadjs, ppabst, pzz, &
196 ptkecls, ptt, prvt, prct, prit, pwt, &
197 ptten, prvten, prcten, priten, &
198 kcltop, kclbas, pumf, och1conv, kch1,&
199 pch1, pch1ten, ztht, zsthv, zsthes, &
200 isdpl, ispbl, islcl, zsthlcl, zstlcl,&
201 zsrvlcl, zswlcl, zszlcl, zsthvelcl, gtrig1)
202
204 & (cvp_shal, cvpext, cst, d, nsv, convpar, kice, &
205 osettadj, ptadjs, ppabst, pzz, ptt, &
206 prvt, prct, prit, och1conv, kch1, &
207 pch1, zrdocp, ztht, zsthv, zsthes, &
208 isdpl, ispbl, islcl, zsthlcl, zstlcl,&
209 zsrvlcl, zswlcl, zszlcl, zsthvelcl, &
210 gtrig1, pumf, ptten, prvten, prcten, &
211 priten, kcltop, kclbas, pch1ten)
212
213IF (lhook) CALL dr_hook('SHALLOW_CONVECTION',1,zhook_handle)
214END SUBROUTINE shallow_convection
subroutine shallow_convection(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)
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)
subroutine shallow_convection_part2_select(cvp_shal, cvpext, cst, d, nsv, convpar, kice, osettadj, ptadjs, ppabst, pzz, ptt, prvt, prct, prit, och1conv, kch1, pch1, prdocp, ptht, psthv, psthes, isdpl, ispbl, islcl, psthlcl, pstlcl, psrvlcl, pswlcl, pszlcl, psthvelcl, gtrig1, pumf, pthc, prvc, prcc, pric, ictl, iminctl, ppch1ten)