1 | ! |
---|
2 | ! $Id: calltherm.F90 1795 2013-07-18 08:20:28Z emillour $ |
---|
3 | ! |
---|
4 | subroutine calltherm(dtime & |
---|
5 | & ,pplay,paprs,pphi,weak_inversion & |
---|
6 | & ,u_seri,v_seri,t_seri,q_seri,zqsat,debut & |
---|
7 | & ,d_u_ajs,d_v_ajs,d_t_ajs,d_q_ajs & |
---|
8 | & ,fm_therm,entr_therm,detr_therm,zqasc,clwcon0,lmax,ratqscth, & |
---|
9 | & ratqsdiff,zqsatth,Ale_bl,Alp_bl,lalim_conv,wght_th, & |
---|
10 | & zmax0,f0,zw2,fraca,ztv,zpspsk,ztla,zthl & |
---|
11 | !!! nrlmd le 10/04/2012 |
---|
12 | & ,pbl_tke,pctsrf,omega,airephy & |
---|
13 | & ,zlcl_th,fraca0,w0,w_conv,therm_tke_max0,env_tke_max0 & |
---|
14 | & ,n2,s2,ale_bl_stat & |
---|
15 | & ,therm_tke_max,env_tke_max & |
---|
16 | & ,alp_bl_det,alp_bl_fluct_m,alp_bl_fluct_tke & |
---|
17 | & ,alp_bl_conv,alp_bl_stat & |
---|
18 | !!! fin nrlmd le 10/04/2012 |
---|
19 | & ,zqla,ztva ) |
---|
20 | |
---|
21 | USE dimphy |
---|
22 | USE indice_sol_mod |
---|
23 | |
---|
24 | implicit none |
---|
25 | #include "dimensions.h" |
---|
26 | !#include "dimphy.h" |
---|
27 | #include "thermcell.h" |
---|
28 | #include "iniprint.h" |
---|
29 | |
---|
30 | |
---|
31 | !IM 140508 |
---|
32 | INTEGER, SAVE :: itap |
---|
33 | !$OMP THREADPRIVATE(itap) |
---|
34 | REAL dtime |
---|
35 | LOGICAL debut |
---|
36 | LOGICAL logexpr0, logexpr2(klon,klev), logexpr1(klon) |
---|
37 | REAL fact(klon) |
---|
38 | INTEGER nbptspb |
---|
39 | |
---|
40 | REAL u_seri(klon,klev),v_seri(klon,klev) |
---|
41 | REAL t_seri(klon,klev),q_seri(klon,klev),qmemoire(klon,klev) |
---|
42 | REAL weak_inversion(klon) |
---|
43 | REAL paprs(klon,klev+1) |
---|
44 | REAL pplay(klon,klev) |
---|
45 | REAL pphi(klon,klev) |
---|
46 | real zlev(klon,klev+1) |
---|
47 | !test: on sort lentr et a* pour alimenter KE |
---|
48 | REAL wght_th(klon,klev) |
---|
49 | INTEGER lalim_conv(klon) |
---|
50 | REAL zw2(klon,klev+1),fraca(klon,klev+1) |
---|
51 | |
---|
52 | !FH Update Thermiques |
---|
53 | REAL d_t_ajs(klon,klev), d_q_ajs(klon,klev) |
---|
54 | REAL d_u_ajs(klon,klev),d_v_ajs(klon,klev) |
---|
55 | real fm_therm(klon,klev+1) |
---|
56 | real entr_therm(klon,klev),detr_therm(klon,klev) |
---|
57 | |
---|
58 | !******************************************************** |
---|
59 | ! declarations |
---|
60 | LOGICAL flag_bidouille_stratocu |
---|
61 | real fmc_therm(klon,klev+1),zqasc(klon,klev) |
---|
62 | real zqla(klon,klev) |
---|
63 | real zqta(klon,klev) |
---|
64 | real ztv(klon,klev),ztva(klon,klev) |
---|
65 | real zpspsk(klon,klev) |
---|
66 | real ztla(klon,klev) |
---|
67 | real zthl(klon,klev) |
---|
68 | real wmax_sec(klon) |
---|
69 | real zmax_sec(klon) |
---|
70 | real f_sec(klon) |
---|
71 | real detrc_therm(klon,klev) |
---|
72 | ! FH WARNING : il semble que ces save ne servent a rien |
---|
73 | ! save fmc_therm, detrc_therm |
---|
74 | real clwcon0(klon,klev) |
---|
75 | real zqsat(klon,klev) |
---|
76 | real zw_sec(klon,klev+1) |
---|
77 | integer lmix_sec(klon) |
---|
78 | integer lmax(klon) |
---|
79 | real ratqscth(klon,klev) |
---|
80 | real ratqsdiff(klon,klev) |
---|
81 | real zqsatth(klon,klev) |
---|
82 | !nouvelles variables pour la convection |
---|
83 | real Ale_bl(klon) |
---|
84 | real Alp_bl(klon) |
---|
85 | real Ale(klon) |
---|
86 | real Alp(klon) |
---|
87 | !RC |
---|
88 | !on garde le zmax du pas de temps precedent |
---|
89 | real zmax0(klon), f0(klon) |
---|
90 | |
---|
91 | !!! nrlmd le 10/04/2012 |
---|
92 | real pbl_tke(klon,klev+1,nbsrf) |
---|
93 | real pctsrf(klon,nbsrf) |
---|
94 | real omega(klon,klev) |
---|
95 | real airephy(klon) |
---|
96 | real zlcl_th(klon),fraca0(klon),w0(klon),w_conv(klon) |
---|
97 | real therm_tke_max0(klon),env_tke_max0(klon) |
---|
98 | real n2(klon),s2(klon) |
---|
99 | real ale_bl_stat(klon) |
---|
100 | real therm_tke_max(klon,klev),env_tke_max(klon,klev) |
---|
101 | real alp_bl_det(klon),alp_bl_fluct_m(klon),alp_bl_fluct_tke(klon),alp_bl_conv(klon),alp_bl_stat(klon) |
---|
102 | !!! fin nrlmd le 10/04/2012 |
---|
103 | |
---|
104 | !******************************************************** |
---|
105 | |
---|
106 | |
---|
107 | ! variables locales |
---|
108 | REAL d_t_the(klon,klev), d_q_the(klon,klev) |
---|
109 | REAL d_u_the(klon,klev),d_v_the(klon,klev) |
---|
110 | ! |
---|
111 | real zfm_therm(klon,klev+1),zdt |
---|
112 | real zentr_therm(klon,klev),zdetr_therm(klon,klev) |
---|
113 | ! FH A VERIFIER : SAVE INUTILES |
---|
114 | ! save zentr_therm,zfm_therm |
---|
115 | |
---|
116 | character (len=20) :: modname='calltherm' |
---|
117 | character (len=80) :: abort_message |
---|
118 | |
---|
119 | integer i,k |
---|
120 | logical, save :: first=.true. |
---|
121 | !$OMP THREADPRIVATE(first) |
---|
122 | !******************************************************** |
---|
123 | if (first) then |
---|
124 | itap=0 |
---|
125 | first=.false. |
---|
126 | endif |
---|
127 | |
---|
128 | ! L. Fita, LMD July 2014. Initializing tendencies and variables |
---|
129 | d_t_the = 0. |
---|
130 | d_q_the = 0. |
---|
131 | d_u_the = 0. |
---|
132 | d_v_the = 0. |
---|
133 | Alp = 0. |
---|
134 | Ale = 0. |
---|
135 | |
---|
136 | ! Incrementer le compteur de la physique |
---|
137 | itap = itap + 1 |
---|
138 | |
---|
139 | ! Modele du thermique |
---|
140 | ! =================== |
---|
141 | ! print*,'thermiques: WARNING on passe t au lieu de t_seri' |
---|
142 | |
---|
143 | ! On prend comme valeur initiale des thermiques la valeur du pas |
---|
144 | ! de temps precedent |
---|
145 | zfm_therm(:,:)=fm_therm(:,:) |
---|
146 | zdetr_therm(:,:)=detr_therm(:,:) |
---|
147 | zentr_therm(:,:)=entr_therm(:,:) |
---|
148 | |
---|
149 | ! On reinitialise les flux de masse a zero pour le cumul en |
---|
150 | ! cas de splitting |
---|
151 | fm_therm(:,:)=0. |
---|
152 | entr_therm(:,:)=0. |
---|
153 | detr_therm(:,:)=0. |
---|
154 | |
---|
155 | Ale_bl(:)=0. |
---|
156 | Alp_bl(:)=0. |
---|
157 | if (prt_level.ge.10) then |
---|
158 | print*,'thermV4 nsplit: ',nsplit_thermals,' weak_inversion' |
---|
159 | endif |
---|
160 | |
---|
161 | ! tests sur les valeurs negatives de l'eau |
---|
162 | logexpr0=prt_level.ge.10 |
---|
163 | nbptspb=0 |
---|
164 | do k=1,klev |
---|
165 | do i=1,klon |
---|
166 | ! Attention teste abderr 19-03-09 |
---|
167 | ! logexpr2(i,k)=.not.q_seri(i,k).ge.0. |
---|
168 | logexpr2(i,k)=.not.q_seri(i,k).ge.1.e-15 |
---|
169 | if (logexpr2(i,k)) then |
---|
170 | q_seri(i,k)=1.e-15 |
---|
171 | nbptspb=nbptspb+1 |
---|
172 | endif |
---|
173 | ! if (logexpr0) & |
---|
174 | ! & print*,'WARN eau<0 avant therm i=',i,' k=',k & |
---|
175 | ! & ,' dq,q',d_q_the(i,k),q_seri(i,k) |
---|
176 | enddo |
---|
177 | enddo |
---|
178 | if(nbptspb.GT.0) print*,'Number of points with q_seri(i,k)<=0 ',nbptspb |
---|
179 | |
---|
180 | zdt=dtime/REAL(nsplit_thermals) |
---|
181 | do isplit=1,nsplit_thermals |
---|
182 | |
---|
183 | if (iflag_thermals.eq.1) then |
---|
184 | CALL thermcell_2002(klon,klev,zdt & |
---|
185 | & ,pplay,paprs,pphi & |
---|
186 | & ,u_seri,v_seri,t_seri,q_seri & |
---|
187 | & ,d_u_the,d_v_the,d_t_the,d_q_the & |
---|
188 | & ,zfm_therm,zentr_therm & |
---|
189 | & ,r_aspect_thermals,30.,w2di_thermals & |
---|
190 | & ,tau_thermals) |
---|
191 | else if (iflag_thermals.eq.2) then |
---|
192 | CALL thermcell_sec(klon,klev,zdt & |
---|
193 | & ,pplay,paprs,pphi,zlev & |
---|
194 | & ,u_seri,v_seri,t_seri,q_seri & |
---|
195 | & ,d_u_the,d_v_the,d_t_the,d_q_the & |
---|
196 | & ,zfm_therm,zentr_therm & |
---|
197 | & ,r_aspect_thermals,30.,w2di_thermals & |
---|
198 | & ,tau_thermals) |
---|
199 | else if (iflag_thermals.eq.3) then |
---|
200 | CALL thermcell(klon,klev,zdt & |
---|
201 | & ,pplay,paprs,pphi & |
---|
202 | & ,u_seri,v_seri,t_seri,q_seri & |
---|
203 | & ,d_u_the,d_v_the,d_t_the,d_q_the & |
---|
204 | & ,zfm_therm,zentr_therm & |
---|
205 | & ,r_aspect_thermals,l_mix_thermals,w2di_thermals & |
---|
206 | & ,tau_thermals) |
---|
207 | else if (iflag_thermals.eq.10) then |
---|
208 | CALL thermcell_eau(klon,klev,zdt & |
---|
209 | & ,pplay,paprs,pphi & |
---|
210 | & ,u_seri,v_seri,t_seri,q_seri & |
---|
211 | & ,d_u_the,d_v_the,d_t_the,d_q_the & |
---|
212 | & ,zfm_therm,zentr_therm & |
---|
213 | & ,r_aspect_thermals,l_mix_thermals,w2di_thermals & |
---|
214 | & ,tau_thermals) |
---|
215 | else if (iflag_thermals.eq.11) then |
---|
216 | abort_message = 'cas non prevu dans calltherm' |
---|
217 | CALL abort_gcm (modname,abort_message,1) |
---|
218 | |
---|
219 | ! CALL thermcell_pluie(klon,klev,zdt & |
---|
220 | ! & ,pplay,paprs,pphi,zlev & |
---|
221 | ! & ,u_seri,v_seri,t_seri,q_seri & |
---|
222 | ! & ,d_u_the,d_v_the,d_t_the,d_q_the & |
---|
223 | ! & ,zfm_therm,zentr_therm,zqla & |
---|
224 | ! & ,r_aspect_thermals,l_mix_thermals,w2di_thermals & |
---|
225 | ! & ,tau_thermals,3) |
---|
226 | else if (iflag_thermals.eq.12) then |
---|
227 | CALL calcul_sec(klon,klev,zdt & |
---|
228 | & ,pplay,paprs,pphi,zlev & |
---|
229 | & ,u_seri,v_seri,t_seri,q_seri & |
---|
230 | & ,zmax_sec,wmax_sec,zw_sec,lmix_sec & |
---|
231 | & ,r_aspect_thermals,l_mix_thermals,w2di_thermals & |
---|
232 | & ,tau_thermals) |
---|
233 | else if (iflag_thermals==13.or.iflag_thermals==14) then |
---|
234 | CALL thermcellV0_main(itap,klon,klev,zdt & |
---|
235 | & ,pplay,paprs,pphi,debut & |
---|
236 | & ,u_seri,v_seri,t_seri,q_seri & |
---|
237 | & ,d_u_the,d_v_the,d_t_the,d_q_the & |
---|
238 | & ,zfm_therm,zentr_therm,zdetr_therm,zqasc,zqla,lmax & |
---|
239 | & ,ratqscth,ratqsdiff,zqsatth & |
---|
240 | & ,r_aspect_thermals,l_mix_thermals & |
---|
241 | & ,tau_thermals,Ale,Alp,lalim_conv,wght_th & |
---|
242 | & ,zmax0,f0,zw2,fraca) |
---|
243 | else if (iflag_thermals>=15.and.iflag_thermals<=18) then |
---|
244 | |
---|
245 | ! print*,'THERM iflag_thermas_ed=',iflag_thermals_ed |
---|
246 | |
---|
247 | CALL thermcell_main(itap,klon,klev,zdt & |
---|
248 | & ,pplay,paprs,pphi,debut & |
---|
249 | & ,u_seri,v_seri,t_seri,q_seri & |
---|
250 | & ,d_u_the,d_v_the,d_t_the,d_q_the & |
---|
251 | & ,zfm_therm,zentr_therm,zdetr_therm,zqasc,zqla,lmax & |
---|
252 | & ,ratqscth,ratqsdiff,zqsatth & |
---|
253 | ! & ,r_aspect_thermals,l_mix_thermals & |
---|
254 | ! & ,tau_thermals,iflag_thermals_ed,iflag_coupl & |
---|
255 | & ,Ale,Alp,lalim_conv,wght_th & |
---|
256 | & ,zmax0,f0,zw2,fraca,ztv,zpspsk & |
---|
257 | & ,ztla,zthl & |
---|
258 | !!! nrlmd le 10/04/2012 |
---|
259 | & ,pbl_tke,pctsrf,omega,airephy & |
---|
260 | & ,zlcl_th,fraca0,w0,w_conv,therm_tke_max0,env_tke_max0 & |
---|
261 | & ,n2,s2,ale_bl_stat & |
---|
262 | & ,therm_tke_max,env_tke_max & |
---|
263 | & ,alp_bl_det,alp_bl_fluct_m,alp_bl_fluct_tke & |
---|
264 | & ,alp_bl_conv,alp_bl_stat & |
---|
265 | !!! fin nrlmd le 10/04/2012 |
---|
266 | & ,ztva ) |
---|
267 | if (prt_level.gt.10) write(lunout,*)'Apres thermcell_main OK' |
---|
268 | else |
---|
269 | abort_message = 'Cas des thermiques non prevu' |
---|
270 | CALL abort_gcm (modname,abort_message,1) |
---|
271 | endif |
---|
272 | |
---|
273 | ! Attention : les noms sont contre intuitif. |
---|
274 | ! flag_bidouille_stratocu est .true. si on ne fait pas de bidouille. |
---|
275 | ! Il aurait mieux valu avoir un nobidouille_stratocu |
---|
276 | ! Et pour simplifier : |
---|
277 | ! nobidouille_stratocu=.not.(iflag_thermals==13.or.iflag_thermals=15) |
---|
278 | ! Ce serait bien de changer, mai en prenant le temps de vérifier que ca |
---|
279 | ! fait bien ce qu'on croit. |
---|
280 | flag_bidouille_stratocu=iflag_thermals<=12.or.iflag_thermals==14.or.iflag_thermals==16.or.iflag_thermals==18 |
---|
281 | |
---|
282 | if (iflag_thermals<=12) then |
---|
283 | lmax=1 |
---|
284 | do k=1,klev-1 |
---|
285 | zdetr_therm(:,k)=zentr_therm(:,k)+zfm_therm(:,k)-zfm_therm(:,k+1) |
---|
286 | enddo |
---|
287 | endif |
---|
288 | |
---|
289 | fact(:)=0. |
---|
290 | DO i=1,klon |
---|
291 | logexpr1(i)=flag_bidouille_stratocu.or.weak_inversion(i).gt.0.5 |
---|
292 | IF(logexpr1(i)) fact(i)=1./REAL(nsplit_thermals) |
---|
293 | ENDDO |
---|
294 | |
---|
295 | DO k=1,klev |
---|
296 | ! transformation de la derivee en tendance |
---|
297 | d_t_the(:,k)=d_t_the(:,k)*dtime*fact(:) |
---|
298 | d_u_the(:,k)=d_u_the(:,k)*dtime*fact(:) |
---|
299 | d_v_the(:,k)=d_v_the(:,k)*dtime*fact(:) |
---|
300 | d_q_the(:,k)=d_q_the(:,k)*dtime*fact(:) |
---|
301 | fm_therm(:,k)=fm_therm(:,k) & |
---|
302 | & +zfm_therm(:,k)*fact(:) |
---|
303 | entr_therm(:,k)=entr_therm(:,k) & |
---|
304 | & +zentr_therm(:,k)*fact(:) |
---|
305 | detr_therm(:,k)=detr_therm(:,k) & |
---|
306 | & +zdetr_therm(:,k)*fact(:) |
---|
307 | ENDDO |
---|
308 | fm_therm(:,klev+1)=0. |
---|
309 | |
---|
310 | ! accumulation de la tendance |
---|
311 | d_t_ajs(:,:)=d_t_ajs(:,:)+d_t_the(:,:) |
---|
312 | d_u_ajs(:,:)=d_u_ajs(:,:)+d_u_the(:,:) |
---|
313 | d_v_ajs(:,:)=d_v_ajs(:,:)+d_v_the(:,:) |
---|
314 | d_q_ajs(:,:)=d_q_ajs(:,:)+d_q_the(:,:) |
---|
315 | |
---|
316 | ! incrementation des variables meteo |
---|
317 | t_seri(:,:) = t_seri(:,:) + d_t_the(:,:) |
---|
318 | u_seri(:,:) = u_seri(:,:) + d_u_the(:,:) |
---|
319 | v_seri(:,:) = v_seri(:,:) + d_v_the(:,:) |
---|
320 | qmemoire(:,:)=q_seri(:,:) |
---|
321 | q_seri(:,:) = q_seri(:,:) + d_q_the(:,:) |
---|
322 | if (prt_level.gt.10) write(lunout,*)'Apres apres thermcell_main OK' |
---|
323 | |
---|
324 | DO i=1,klon |
---|
325 | fm_therm(i,klev+1)=0. |
---|
326 | Ale_bl(i)=Ale_bl(i)+Ale(i)/REAL(nsplit_thermals) |
---|
327 | ! write(22,*)'ALE CALLTHERM',Ale_bl(i),Ale(i) |
---|
328 | Alp_bl(i)=Alp_bl(i)+Alp(i)/REAL(nsplit_thermals) |
---|
329 | ! write(23,*)'ALP CALLTHERM',Alp_bl(i),Alp(i) |
---|
330 | if(prt_level.GE.10) print*,'calltherm i Alp_bl Alp Ale_bl Ale',i,Alp_bl(i),Alp(i),Ale_bl(i),Ale(i) |
---|
331 | ENDDO |
---|
332 | |
---|
333 | !IM 060508 marche pas comme cela !!! enddo ! isplit |
---|
334 | |
---|
335 | ! tests sur les valeurs negatives de l'eau |
---|
336 | nbptspb=0 |
---|
337 | DO k = 1, klev |
---|
338 | DO i = 1, klon |
---|
339 | logexpr2(i,k)=.not.q_seri(i,k).ge.0. |
---|
340 | if (logexpr2(i,k)) then |
---|
341 | q_seri(i,k)=1.e-15 |
---|
342 | nbptspb=nbptspb+1 |
---|
343 | ! if (prt_level.ge.10) then |
---|
344 | ! print*,'WARN eau<0 apres therm i=',i,' k=',k & |
---|
345 | ! & ,' dq,q',d_q_the(i,k),q_seri(i,k), & |
---|
346 | ! & 'fm=',zfm_therm(i,k),'entr=',entr_therm(i,k) |
---|
347 | endif |
---|
348 | ENDDO |
---|
349 | ENDDO |
---|
350 | IF(nbptspb.GT.0) print*,'Number of points with q_seri(i,k)<=0 ',nbptspb |
---|
351 | ! tests sur les valeurs de la temperature |
---|
352 | nbptspb=0 |
---|
353 | DO k = 1, klev |
---|
354 | DO i = 1, klon |
---|
355 | logexpr2(i,k)=t_seri(i,k).lt.50..or.t_seri(i,k).gt.370. |
---|
356 | if (logexpr2(i,k)) nbptspb=nbptspb+1 |
---|
357 | ! if ((t_seri(i,k).lt.50.) .or. & |
---|
358 | ! & (t_seri(i,k).gt.370.)) then |
---|
359 | ! print*,'WARN temp apres therm i=',i,' k=',k & |
---|
360 | ! & ,' t_seri',t_seri(i,k) |
---|
361 | ! CALL abort |
---|
362 | ! endif |
---|
363 | ENDDO |
---|
364 | ENDDO |
---|
365 | IF(nbptspb.GT.0) print*,'Number of points with q_seri(i,k)<=0 ',nbptspb |
---|
366 | enddo ! isplit |
---|
367 | |
---|
368 | ! |
---|
369 | !*************************************************************** |
---|
370 | ! calcul du flux ascencant conservatif |
---|
371 | ! print*,'<<<<calcul flux ascendant conservatif' |
---|
372 | |
---|
373 | fmc_therm=0. |
---|
374 | do k=1,klev |
---|
375 | do i=1,klon |
---|
376 | if (entr_therm(i,k).gt.0.) then |
---|
377 | fmc_therm(i,k+1)=fmc_therm(i,k)+entr_therm(i,k) |
---|
378 | else |
---|
379 | fmc_therm(i,k+1)=fmc_therm(i,k) |
---|
380 | endif |
---|
381 | detrc_therm(i,k)=(fmc_therm(i,k+1)-fm_therm(i,k+1)) & |
---|
382 | & -(fmc_therm(i,k)-fm_therm(i,k)) |
---|
383 | enddo |
---|
384 | enddo |
---|
385 | |
---|
386 | |
---|
387 | !**************************************************************** |
---|
388 | ! calcul de l'humidite dans l'ascendance |
---|
389 | ! print*,'<<<<calcul de lhumidite dans thermique' |
---|
390 | !CR:on ne le calcule que pour le cas sec |
---|
391 | if (iflag_thermals.le.11) then |
---|
392 | do i=1,klon |
---|
393 | zqasc(i,1)=q_seri(i,1) |
---|
394 | do k=2,klev |
---|
395 | if (fmc_therm(i,k+1).gt.1.e-6) then |
---|
396 | zqasc(i,k)=(fmc_therm(i,k)*zqasc(i,k-1) & |
---|
397 | & +entr_therm(i,k)*q_seri(i,k))/fmc_therm(i,k+1) |
---|
398 | !CR:test on asseche le thermique |
---|
399 | ! zqasc(i,k)=zqasc(i,k)/2. |
---|
400 | ! else |
---|
401 | ! zqasc(i,k)=q_seri(i,k) |
---|
402 | endif |
---|
403 | enddo |
---|
404 | enddo |
---|
405 | |
---|
406 | |
---|
407 | ! calcul de l'eau condensee dans l'ascendance |
---|
408 | ! print*,'<<<<calcul de leau condensee dans thermique' |
---|
409 | do i=1,klon |
---|
410 | do k=1,klev |
---|
411 | clwcon0(i,k)=zqasc(i,k)-zqsat(i,k) |
---|
412 | if (clwcon0(i,k).lt.0. .or. & |
---|
413 | & (fm_therm(i,k+1)+detrc_therm(i,k)).lt.1.e-6) then |
---|
414 | clwcon0(i,k)=0. |
---|
415 | endif |
---|
416 | enddo |
---|
417 | enddo |
---|
418 | else |
---|
419 | do i=1,klon |
---|
420 | do k=1,klev |
---|
421 | clwcon0(i,k)=zqla(i,k) |
---|
422 | if (clwcon0(i,k).lt.0. .or. & |
---|
423 | & (fm_therm(i,k+1)+detrc_therm(i,k)).lt.1.e-6) then |
---|
424 | clwcon0(i,k)=0. |
---|
425 | endif |
---|
426 | enddo |
---|
427 | enddo |
---|
428 | endif |
---|
429 | !******************************************************************* |
---|
430 | |
---|
431 | |
---|
432 | !jyg Protection contre les temperatures nulles |
---|
433 | do i=1,klon |
---|
434 | do k=1,klev |
---|
435 | if (ztla(i,k) .lt. 1.e-10) fraca(i,k) =0. |
---|
436 | enddo |
---|
437 | enddo |
---|
438 | |
---|
439 | |
---|
440 | return |
---|
441 | |
---|
442 | end |
---|