1 | ! $Header$ |
---|
2 | |
---|
3 | SUBROUTINE tlift(p, t, rr, rs, gz, plcl, icb, nk, tvp, tpk, clw, nd, nl, & |
---|
4 | dtvpdt1, dtvpdq1) |
---|
5 | USE lmdz_yomcst |
---|
6 | |
---|
7 | IMPLICIT NONE |
---|
8 | ! Argument NK ajoute (jyg) = Niveau de depart de la |
---|
9 | ! convection |
---|
10 | INTEGER icb, nk, nd, nl |
---|
11 | INTEGER, PARAMETER :: na = 60 |
---|
12 | REAL gz(nd), tpk(nd), clw(nd), plcl |
---|
13 | REAL t(nd), rr(nd), rs(nd), tvp(nd), p(nd) |
---|
14 | REAL dtvpdt1(nd), dtvpdq1(nd) ! Derivatives of parcel virtual |
---|
15 | ! temperature wrt T1 and Q1 |
---|
16 | |
---|
17 | REAL clw_new(na), qi(na) |
---|
18 | REAL dtpdt1(na), dtpdq1(na) ! Derivatives of parcel temperature |
---|
19 | ! wrt T1 and Q1 |
---|
20 | REAL gravity, cpd, cpv, cl, ci, cpvmcl, clmci, eps, alv0, alf0 |
---|
21 | REAL cpp, cpinv, ah0, alf, tg, s, ahg, tc, denom, alv, es, esi |
---|
22 | REAL qsat_new, snew |
---|
23 | INTEGER icbl, i, imin, j, icb1 |
---|
24 | |
---|
25 | LOGICAL ice_conv |
---|
26 | |
---|
27 | ! *** ASSIGN VALUES OF THERMODYNAMIC CONSTANTS *** |
---|
28 | |
---|
29 | ! sb CPD=1005.7 |
---|
30 | ! sb CPV=1870.0 |
---|
31 | ! sb CL=4190.0 |
---|
32 | ! sb CPVMCL=2320.0 |
---|
33 | ! sb RV=461.5 |
---|
34 | ! sb RD=287.04 |
---|
35 | ! sb EPS=RD/RV |
---|
36 | ! sb ALV0=2.501E6 |
---|
37 | ! cccccccccccccccccccccc |
---|
38 | ! constantes coherentes avec le modele du Centre Europeen |
---|
39 | ! sb RD = 1000.0 * 1.380658E-23 * 6.0221367E+23 / 28.9644 |
---|
40 | ! sb RV = 1000.0 * 1.380658E-23 * 6.0221367E+23 / 18.0153 |
---|
41 | ! sb CPD = 3.5 * RD |
---|
42 | ! sb CPV = 4.0 * RV |
---|
43 | ! sb CL = 4218.0 |
---|
44 | ! sb CI=2090.0 |
---|
45 | ! sb CPVMCL=CL-CPV |
---|
46 | ! sb CLMCI=CL-CI |
---|
47 | ! sb EPS=RD/RV |
---|
48 | ! sb ALV0=2.5008E+06 |
---|
49 | ! sb ALF0=3.34E+05 |
---|
50 | |
---|
51 | ! on utilise les constantes thermo du Centre Europeen: (SB) |
---|
52 | |
---|
53 | gravity = rg !sb: Pr que gravite ne devienne pas humidite! |
---|
54 | |
---|
55 | cpd = rcpd |
---|
56 | cpv = rcpv |
---|
57 | cl = rcw |
---|
58 | ci = rcs |
---|
59 | cpvmcl = cl - cpv |
---|
60 | clmci = cl - ci |
---|
61 | eps = rd / rv |
---|
62 | alv0 = rlvtt |
---|
63 | alf0 = rlmlt ! (ALF0 = RLSTT-RLVTT) |
---|
64 | |
---|
65 | ! ccccccccccccccccccccc |
---|
66 | |
---|
67 | ! *** CALCULATE CERTAIN PARCEL QUANTITIES, INCLUDING STATIC ENERGY *** |
---|
68 | |
---|
69 | icb1 = max(icb, 2) |
---|
70 | icb1 = min(icb, nl) |
---|
71 | |
---|
72 | ! jyg1 |
---|
73 | ! C CPP=CPD*(1.-RR(1))+RR(1)*CPV |
---|
74 | cpp = cpd * (1. - rr(nk)) + rr(nk) * cpv |
---|
75 | ! jyg2 |
---|
76 | cpinv = 1. / cpp |
---|
77 | ! jyg1 |
---|
78 | ! ICB may be below condensation level |
---|
79 | ! CC DO 100 I=1,ICB1-1 |
---|
80 | ! CC TPK(I)=T(1)-GZ(I)*CPINV |
---|
81 | ! CC TVP(I)=TPK(I)*(1.+RR(1)/EPS) |
---|
82 | DO i = 1, icb1 |
---|
83 | clw(i) = 0.0 |
---|
84 | END DO |
---|
85 | |
---|
86 | DO i = nk, icb1 |
---|
87 | tpk(i) = t(nk) - (gz(i) - gz(nk)) * cpinv |
---|
88 | ! jyg1 |
---|
89 | ! CC TVP(I)=TPK(I)*(1.+RR(NK)/EPS) |
---|
90 | tvp(i) = tpk(i) * (1. + rr(nk) / eps - rr(nk)) |
---|
91 | ! jyg2 |
---|
92 | dtvpdt1(i) = 1. + rr(nk) / eps - rr(nk) |
---|
93 | dtvpdq1(i) = tpk(i) * (1. / eps - 1.) |
---|
94 | |
---|
95 | ! jyg2 |
---|
96 | |
---|
97 | END DO |
---|
98 | |
---|
99 | |
---|
100 | ! *** FIND LIFTED PARCEL TEMPERATURE AND MIXING RATIO *** |
---|
101 | |
---|
102 | ! jyg1 |
---|
103 | ! C AH0=(CPD*(1.-RR(1))+CL*RR(1))*T(1) |
---|
104 | ! C $ +RR(1)*(ALV0-CPVMCL*(T(1)-273.15)) |
---|
105 | ah0 = (cpd * (1. - rr(nk)) + cl * rr(nk)) * t(nk) + rr(nk) * (alv0 - cpvmcl * (t(nk) - 273.15 & |
---|
106 | )) + gz(nk) |
---|
107 | ! jyg2 |
---|
108 | |
---|
109 | ! jyg1 |
---|
110 | imin = icb1 |
---|
111 | ! If ICB is below LCL, start loop at ICB+1 |
---|
112 | IF (plcl<p(icb1)) imin = min(imin + 1, nl) |
---|
113 | |
---|
114 | ! CC DO 300 I=ICB1,NL |
---|
115 | DO i = imin, nl |
---|
116 | ! jyg2 |
---|
117 | alv = alv0 - cpvmcl * (t(i) - 273.15) |
---|
118 | alf = alf0 + clmci * (t(i) - 273.15) |
---|
119 | |
---|
120 | rg = rs(i) |
---|
121 | tg = t(i) |
---|
122 | ! S=CPD+ALV*ALV*RG/(RV*T(I)*T(I)) |
---|
123 | ! jyg1 |
---|
124 | ! C S=CPD*(1.-RR(1))+CL*RR(1)+ALV*ALV*RG/(RV*T(I)*T(I)) |
---|
125 | s = cpd * (1. - rr(nk)) + cl * rr(nk) + alv * alv * rg / (rv * t(i) * t(i)) |
---|
126 | ! jyg2 |
---|
127 | s = 1. / s |
---|
128 | |
---|
129 | DO j = 1, 2 |
---|
130 | ! jyg1 |
---|
131 | ! C AHG=CPD*TG+(CL-CPD)*RR(1)*TG+ALV*RG+GZ(I) |
---|
132 | ahg = cpd * tg + (cl - cpd) * rr(nk) * tg + alv * rg + gz(i) |
---|
133 | ! jyg2 |
---|
134 | tg = tg + s * (ah0 - ahg) |
---|
135 | tc = tg - 273.15 |
---|
136 | denom = 243.5 + tc |
---|
137 | denom = max(denom, 1.0) |
---|
138 | |
---|
139 | ! FORMULE DE BOLTON POUR PSAT |
---|
140 | |
---|
141 | es = 6.112 * exp(17.67 * tc / denom) |
---|
142 | rg = eps * es / (p(i) - es * (1. - eps)) |
---|
143 | |
---|
144 | END DO |
---|
145 | |
---|
146 | ! jyg1 |
---|
147 | ! C TPK(I)=(AH0-GZ(I)-ALV*RG)/(CPD+(CL-CPD)*RR(1)) |
---|
148 | tpk(i) = (ah0 - gz(i) - alv * rg) / (cpd + (cl - cpd) * rr(nk)) |
---|
149 | ! jyg2 |
---|
150 | ! TPK(I)=(AH0-GZ(I)-ALV*RG-(CL-CPD)*T(I)*RR(1))/CPD |
---|
151 | |
---|
152 | ! jyg1 |
---|
153 | ! C CLW(I)=RR(1)-RG |
---|
154 | clw(i) = rr(nk) - rg |
---|
155 | ! jyg2 |
---|
156 | clw(i) = max(0.0, clw(i)) |
---|
157 | ! jyg1 |
---|
158 | ! CC TVP(I)=TPK(I)*(1.+RG/EPS) |
---|
159 | tvp(i) = tpk(i) * (1. + rg / eps - rr(nk)) |
---|
160 | ! jyg2 |
---|
161 | |
---|
162 | ! jyg1 Derivatives |
---|
163 | |
---|
164 | dtpdt1(i) = cpd * s |
---|
165 | dtpdq1(i) = alv * s |
---|
166 | |
---|
167 | dtvpdt1(i) = dtpdt1(i) * (1. + rg / eps - rr(nk) + alv * rg / (rd * tpk(i))) |
---|
168 | dtvpdq1(i) = dtpdq1(i) * (1. + rg / eps - rr(nk) + alv * rg / (rd * tpk(i))) - tpk(i) |
---|
169 | |
---|
170 | ! jyg2 |
---|
171 | |
---|
172 | END DO |
---|
173 | |
---|
174 | ice_conv = .FALSE. |
---|
175 | |
---|
176 | IF (ice_conv) THEN |
---|
177 | |
---|
178 | ! JAM |
---|
179 | ! RAJOUT DE LA PROCEDURE ICEFRAC |
---|
180 | |
---|
181 | ! sb CALL ICEFRAC(T,CLW,CLW_NEW,QI,ND,NL) |
---|
182 | |
---|
183 | DO i = icb1, nl |
---|
184 | IF (t(i)<263.15) THEN |
---|
185 | tg = tpk(i) |
---|
186 | tc = tpk(i) - 273.15 |
---|
187 | denom = 243.5 + tc |
---|
188 | es = 6.112 * exp(17.67 * tc / denom) |
---|
189 | alv = alv0 - cpvmcl * (t(i) - 273.15) |
---|
190 | alf = alf0 + clmci * (t(i) - 273.15) |
---|
191 | |
---|
192 | DO j = 1, 4 |
---|
193 | esi = exp(23.33086 - (6111.72784 / tpk(i)) + 0.15215 * log(tpk(i))) |
---|
194 | qsat_new = eps * esi / (p(i) - esi * (1. - eps)) |
---|
195 | ! CC SNEW= |
---|
196 | ! CPD*(1.-RR(1))+CL*RR(1)+ALV*ALV*QSAT_NEW/(RV*TPK(I)*TPK(I)) |
---|
197 | snew = cpd * (1. - rr(nk)) + cl * rr(nk) + alv * alv * qsat_new / (rv * tpk(i) * & |
---|
198 | tpk(i)) |
---|
199 | |
---|
200 | snew = 1. / snew |
---|
201 | tpk(i) = tg + (alf * qi(i) + alv * rg * (1. - (esi / es))) * snew |
---|
202 | ! @$$ PRINT*,'################################' |
---|
203 | ! @$$ PRINT*,TPK(I) |
---|
204 | ! @$$ PRINT*,(ALF*QI(I)+ALV*RG*(1.-(ESI/ES)))*SNEW |
---|
205 | END DO |
---|
206 | ! CC CLW(I)=RR(1)-QSAT_NEW |
---|
207 | clw(i) = rr(nk) - qsat_new |
---|
208 | clw(i) = max(0.0, clw(i)) |
---|
209 | ! jyg1 |
---|
210 | ! CC TVP(I)=TPK(I)*(1.+QSAT_NEW/EPS) |
---|
211 | tvp(i) = tpk(i) * (1. + qsat_new / eps - rr(nk)) |
---|
212 | ! jyg2 |
---|
213 | END IF |
---|
214 | |
---|
215 | END DO |
---|
216 | |
---|
217 | END IF |
---|
218 | |
---|
219 | |
---|
220 | ! ***************************************************** |
---|
221 | ! * BK : RAJOUT DE LA TEMPERATURE DES ASCENDANCES |
---|
222 | ! * NON DILUES AU NIVEAU KLEV = ND |
---|
223 | ! * POSONS LE ENVIRON EGAL A CELUI DE KLEV-1 |
---|
224 | ! ******************************************************* |
---|
225 | |
---|
226 | tpk(nl + 1) = tpk(nl) |
---|
227 | |
---|
228 | ! ****************************************************** |
---|
229 | |
---|
230 | rg = gravity ! RG redevient la gravite de YOMCST (sb) |
---|
231 | |
---|
232 | END SUBROUTINE tlift |
---|
233 | |
---|
234 | |
---|
235 | |
---|
236 | |
---|
237 | |
---|
238 | |
---|
239 | |
---|
240 | |
---|