source: lmdz_wrf/WRFV3/lmdz/output_lmdz_NOmodule.F90 @ 1

Last change on this file since 1 was 1, checked in by lfita, 10 years ago
  • -- --- Opening of the WRF+LMDZ coupling repository --- -- -

WRF: version v3.3
LMDZ: version v1818

More details in:

File size: 22.9 KB
Line 
1MODULE output_lmdz_NOmodule
2! Module to define that variables which are not included in any module as SAVE variables
3
4  IMPLICIT NONE
5
6    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: agesno ! nbsrf
7!$OMP THREADPRIVATE(agesno)
8    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: ale_wake ! 1D
9!$OMP THREADPRIVATE(ale_wake)
10    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: alp_wake ! 1D
11!$OMP THREADPRIVATE(alp_wake)
12    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: beta_prec
13!$OMP THREADPRIVATE(beta_prec)
14    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: bils ! 1D
15!$OMP THREADPRIVATE(bils)
16    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: cdragh ! 1D
17!$OMP THREADPRIVATE(cdragh)
18    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: cdragm ! 1D
19!$OMP THREADPRIVATE(cdragm)
20    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: cldh ! 1D
21!$OMP THREADPRIVATE(cldh)
22    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: cldl ! 1D
23!$OMP THREADPRIVATE(cldl)
24    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: cldm ! 1D
25!$OMP THREADPRIVATE(cldm)
26    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: cldq ! 1D
27!$OMP THREADPRIVATE(cldq)
28    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: cldt ! 1D
29!$OMP THREADPRIVATE(cldt)
30    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: cldemi
31!$OMP THREADPRIVATE(cldemi)
32    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: cldfra
33!$OMP THREADPRIVATE(cldfra)
34    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: cldtau
35!$OMP THREADPRIVATE(cldtau)
36    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: dnwd
37!$OMP THREADPRIVATE(dnwd)
38    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: dnwd0
39!$OMP THREADPRIVATE(dnwd0)
40    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: dthmin ! 1D
41!$OMP THREADPRIVATE(dthmin)
42    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: evap ! 1D
43!$OMP THREADPRIVATE(evap)
44    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: evap_pot ! nbsrf
45!$OMP THREADPRIVATE(evap_pot)
46    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: evap_srf ! nbsrf
47!$OMP THREADPRIVATE(evap_srf)
48    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: evappot_srf ! nbsrf
49!$OMP THREADPRIVATE(evappot_srf)
50    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: fder ! 1D
51!$OMP THREADPRIVATE(fder)
52    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: fevap ! nbsrf
53!$OMP THREADPRIVATE(fevap)
54    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: fiwc
55!$OMP THREADPRIVATE(fiwc)
56    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: fiwp ! 1D
57!$OMP THREADPRIVATE(fiwp)
58    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: fl
59!$OMP THREADPRIVATE(fl)
60    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: fluxlat ! nbsrf
61!$OMP THREADPRIVATE(fluxlat)
62    REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE            :: fluxt ! 3D nbsrf
63!$OMP THREADPRIVATE(fluxt)
64    REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE            :: fluxu ! 3D nbsrf
65!$OMP THREADPRIVATE(fluxu)
66    REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE            :: fluxv ! 3D nbsrf
67!$OMP THREADPRIVATE(fluxv)
68    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: flwc
69!$OMP THREADPRIVATE(flwc)
70    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: fraca ! z-stagg
71!$OMP THREADPRIVATE(fraca)
72    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: frugs ! nbsrf
73!$OMP THREADPRIVATE(frugs)
74    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: flwp ! 1D
75!$OMP THREADPRIVATE(flwp)
76    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: fsollw ! nbsrf
77!$OMP THREADPRIVATE(fsollw)
78    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: fsolsw ! nbsrf
79!$OMP THREADPRIVATE(fsolsw)
80    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: fsolw ! nbsrf
81!$OMP THREADPRIVATE(fsolw)
82    INTEGER, ALLOCATABLE, DIMENSION(:,:), SAVE           :: lambda_th
83!$OMP THREADPRIVATE(lambda_th) 
84    INTEGER, ALLOCATABLE, DIMENSION(:), SAVE             :: lmax_th ! 1D
85!$OMP THREADPRIVATE(lmax_th) 
86    INTEGER, ALLOCATABLE, DIMENSION(:,:), SAVE           :: mc
87!$OMP THREADPRIVATE(mc) 
88    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: omega
89!$OMP THREADPRIVATE(omega)
90    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: plcl ! 1D
91!$OMP THREADPRIVATE(plcl)
92    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: plfc ! 1D
93!$OMP THREADPRIVATE(plfc)
94    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: pmfd
95!$OMP THREADPRIVATE(pmfd)
96    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: pmflxr ! stag
97!$OMP THREADPRIVATE(pmflxr)
98    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: pmflxs ! stag
99!$OMP THREADPRIVATE(pmflxs)
100    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: pmfu
101!$OMP THREADPRIVATE(pmfu)
102    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: prfl ! stag
103!$OMP THREADPRIVATE(prfl)
104    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: prw ! 1D
105!$OMP THREADPRIVATE(prw)
106    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: psfl
107!$OMP THREADPRIVATE(psfl)
108    LOGICAL, ALLOCATABLE, DIMENSION(:,:), SAVE           :: ptconv
109!$OMP THREADPRIVATE(ptconv)
110    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: qsat2m ! 1D
111!$OMP THREADPRIVATE(qsat2m)
112    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: qsol
113!$OMP THREADPRIVATE(qsol)
114    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: qsol_d
115!$OMP THREADPRIVATE(qsol_d)
116    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: rain_lsc ! 1D
117!$OMP THREADPRIVATE(rain_lsc)
118    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: re
119!$OMP THREADPRIVATE(re)
120    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: ref_ice
121!$OMP THREADPRIVATE(ref_ice)
122    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: ref_liq
123!$OMP THREADPRIVATE(ref_liq)
124    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: rh2m ! 1D
125!$OMP THREADPRIVATE(rh2m)
126    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: rneb
127!$OMP THREADPRIVATE(rneb)
128    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: s_lcl ! 1D
129!$OMP THREADPRIVATE(s_lcl)
130    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: s_pblh ! 1D
131!$OMP THREADPRIVATE(s_pblh)
132    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: s_pblt ! 1D
133!$OMP THREADPRIVATE(s_pblt)
134    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: s_therm ! 1D
135!$OMP THREADPRIVATE(s_therm)
136    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: sens ! 1D
137!$OMP THREADPRIVATE(sens)
138    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: slp ! 1D
139!$OMP THREADPRIVATE(slp)
140    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: snow_lsc ! 1D
141!$OMP THREADPRIVATE(snow_lsc)
142    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: t2m ! nbsrf
143!$OMP THREADPRIVATE(t2m)
144    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: theta
145!$OMP THREADPRIVATE(theta)
146    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: tpot ! 1D
147!$OMP THREADPRIVATE(tpot)
148    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: tpote ! 1D
149!$OMP THREADPRIVATE(tpote)
150    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: ue ! 1D
151!$OMP THREADPRIVATE(ue)
152    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: upwd
153!$OMP THREADPRIVATE(upwd)
154    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: uq ! 1D
155!$OMP THREADPRIVATE(uq)
156    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: ve ! 1D
157!$OMP THREADPRIVATE(ve)
158    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: Vprecip ! stag
159!$OMP THREADPRIVATE(Vprecip)
160    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: vq ! 1D
161!$OMP THREADPRIVATE(vq)
162    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: wake_omg
163!$OMP THREADPRIVATE(wake_omg)
164    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: wake_h ! 1D
165!$OMP THREADPRIVATE(wake_h)
166    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: weak_inversion ! 1D
167!$OMP THREADPRIVATE(weak_inversion)
168    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: wbeff ! 1D
169!$OMP THREADPRIVATE(wbeff)
170    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: wdtrainA
171!$OMP THREADPRIVATE(wdtrainA)
172    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: wdtrainM
173!$OMP THREADPRIVATE(wdtrainM)
174    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: wfbilo ! nbsrf
175!$OMP THREADPRIVATE(wfbilo)
176    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: wfbils ! nbsrf
177!$OMP THREADPRIVATE(wfbils)
178    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: zmasse
179!$OMP THREADPRIVATE(zmasse)
180    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: zmax_th ! 1D
181!$OMP THREADPRIVATE(zmax_th)
182    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: zphi
183!$OMP THREADPRIVATE(zphi)
184    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: zq2m ! 1D
185!$OMP THREADPRIVATE(zq2m)
186    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: zt2m ! 1D
187!$OMP THREADPRIVATE(zt2m)
188    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: zu10m ! 1D
189!$OMP THREADPRIVATE(zu10m)
190    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: zustar ! 1D
191!$OMP THREADPRIVATE(zustar)
192    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: zv10m ! 1D
193!$OMP THREADPRIVATE(zv10m)
194    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE              :: zx_rh
195!$OMP THREADPRIVATE(zx_rh)
196    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: zxffonte ! 1D
197!$OMP THREADPRIVATE(zxffonte)
198    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: zxfluxlat ! 1D
199!$OMP THREADPRIVATE(zxfluxlat)
200    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: zxfqcalving ! 1D
201!$OMP THREADPRIVATE(zxfqcalving)
202    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: zxfqfonte ! 1D
203!$OMP THREADPRIVATE(zxfqfonte)
204    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: zxqsurf ! 1D
205!$OMP THREADPRIVATE(zxqsurf)
206    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: zxrugs ! 1D
207!$OMP THREADPRIVATE(zxrugs)
208    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: zxsnow ! 1D
209!$OMP THREADPRIVATE(zxsnow)
210    REAL, ALLOCATABLE, DIMENSION(:), SAVE                :: zxtsol ! 1D
211!$OMP THREADPRIVATE(zxtsol)
212
213  CONTAINS
214
215  SUBROUTINE init_ovars_lmdz_NOmodule(klon,klev,nbsrf)
216! Subroutine to activate all the output variables without module
217!! cat output_lmdz_NOmodule.F90 | grep SAVE | awk '{print "    IF (ALLOCATED("$6")) DEALLOCATE("$6")\n    ALLOCATE("$6"(klon,klev))\n"}'>> output_lmdz_NOmodule.F90
218
219    IMPLICIT NONE
220
221    INTEGER, INTENT(IN)                                  :: klon, klev, nbsrf
222
223    IF (ALLOCATED(agesno)) DEALLOCATE(agesno)
224    ALLOCATE(agesno(klon,nbsrf))
225
226    IF (ALLOCATED(ale_wake)) DEALLOCATE(ale_wake)
227    ALLOCATE(ale_wake(klon))
228
229    IF (ALLOCATED(alp_wake)) DEALLOCATE(alp_wake)
230    ALLOCATE(alp_wake(klon))
231
232    IF (ALLOCATED(beta_prec)) DEALLOCATE(beta_prec)
233    ALLOCATE(beta_prec(klon,klev))
234
235    IF (ALLOCATED(bils)) DEALLOCATE(bils)
236    ALLOCATE(bils(klon))
237
238    IF (ALLOCATED(cdragh)) DEALLOCATE(cdragh)
239    ALLOCATE(cdragh(klon))
240
241    IF (ALLOCATED(cdragm)) DEALLOCATE(cdragm)
242    ALLOCATE(cdragm(klon))
243
244    IF (ALLOCATED(cldh)) DEALLOCATE(cldh)
245    ALLOCATE(cldh(klon))
246
247    IF (ALLOCATED(cldl)) DEALLOCATE(cldl)
248    ALLOCATE(cldl(klon))
249
250    IF (ALLOCATED(cldm)) DEALLOCATE(cldm)
251    ALLOCATE(cldm(klon))
252
253    IF (ALLOCATED(cldq)) DEALLOCATE(cldq)
254    ALLOCATE(cldq(klon))
255
256    IF (ALLOCATED(cldt)) DEALLOCATE(cldt)
257    ALLOCATE(cldt(klon))
258
259    IF (ALLOCATED(cldemi)) DEALLOCATE(cldemi)
260    ALLOCATE(cldemi(klon,klev))
261
262    IF (ALLOCATED(cldfra)) DEALLOCATE(cldfra)
263    ALLOCATE(cldfra(klon,klev))
264
265    IF (ALLOCATED(cldtau)) DEALLOCATE(cldtau)
266    ALLOCATE(cldtau(klon,klev))
267
268    IF (ALLOCATED(dnwd)) DEALLOCATE(dnwd)
269    ALLOCATE(dnwd(klon,klev))
270
271    IF (ALLOCATED(dnwd0)) DEALLOCATE(dnwd0)
272    ALLOCATE(dnwd0(klon,klev))
273
274    IF (ALLOCATED(dthmin)) DEALLOCATE(dthmin)
275    ALLOCATE(dthmin(klon))
276
277    IF (ALLOCATED(evap)) DEALLOCATE(evap)
278    ALLOCATE(evap(klon))
279
280    IF (ALLOCATED(evap_pot)) DEALLOCATE(evap_pot)
281    ALLOCATE(evap_pot(klon,nbsrf))
282
283    IF (ALLOCATED(evap_srf)) DEALLOCATE(evap_srf)
284    ALLOCATE(evap_srf(klon,nbsrf))
285
286    IF (ALLOCATED(evappot_srf)) DEALLOCATE(evappot_srf)
287    ALLOCATE(evappot_srf(klon,nbsrf))
288
289    IF (ALLOCATED(fder)) DEALLOCATE(fder)
290    ALLOCATE(fder(klon))
291
292    IF (ALLOCATED(fevap)) DEALLOCATE(fevap)
293    ALLOCATE(fevap(klon,nbsrf))
294
295    IF (ALLOCATED(fiwc)) DEALLOCATE(fiwc)
296    ALLOCATE(fiwc(klon,klev))
297
298    IF (ALLOCATED(fiwp)) DEALLOCATE(fiwp)
299    ALLOCATE(fiwp(klon))
300
301    IF (ALLOCATED(fl)) DEALLOCATE(fl)
302    ALLOCATE(fl(klon,klev))
303
304    IF (ALLOCATED(fluxlat)) DEALLOCATE(fluxlat)
305    ALLOCATE(fluxlat(klon,nbsrf))
306
307    IF (ALLOCATED(fluxt)) DEALLOCATE(fluxt)
308    ALLOCATE(fluxt(klon,klev,nbsrf))
309
310    IF (ALLOCATED(fluxu)) DEALLOCATE(fluxu)
311    ALLOCATE(fluxu(klon,klev,nbsrf))
312
313    IF (ALLOCATED(fluxv)) DEALLOCATE(fluxv)
314    ALLOCATE(fluxv(klon,klev,nbsrf))
315
316    IF (ALLOCATED(flwp)) DEALLOCATE(flwp)
317    ALLOCATE(flwp(klon))
318
319    IF (ALLOCATED(flwc)) DEALLOCATE(flwc)
320    ALLOCATE(flwc(klon,klev))
321
322    IF (ALLOCATED(fraca)) DEALLOCATE(fraca)
323    ALLOCATE(fraca(klon,klev+1))
324
325    IF (ALLOCATED(frugs)) DEALLOCATE(frugs)
326    ALLOCATE(frugs(klon,nbsrf))
327
328    IF (ALLOCATED(fsollw)) DEALLOCATE(fsollw)
329    ALLOCATE(fsollw(klon,nbsrf))
330
331    IF (ALLOCATED(fsolsw)) DEALLOCATE(fsolsw)
332    ALLOCATE(fsolsw(klon,nbsrf))
333
334    IF (ALLOCATED(fsolw)) DEALLOCATE(fsolw)
335    ALLOCATE(fsolw(klon,nbsrf))
336
337    IF (ALLOCATED(lambda_th)) DEALLOCATE(lambda_th)
338    ALLOCATE(lambda_th(klon,klev))
339
340    IF (ALLOCATED(lmax_th)) DEALLOCATE(lmax_th)
341    ALLOCATE(lmax_th(klon))
342
343    IF (ALLOCATED(mc)) DEALLOCATE(mc)
344    ALLOCATE(mc(klon,klev))
345
346    IF (ALLOCATED(omega)) DEALLOCATE(omega)
347    ALLOCATE(omega(klon,klev))
348
349    IF (ALLOCATED(plcl)) DEALLOCATE(plcl)
350    ALLOCATE(plcl(klon))
351
352    IF (ALLOCATED(plfc)) DEALLOCATE(plfc)
353    ALLOCATE(plfc(klon))
354
355    IF (ALLOCATED(pmfd)) DEALLOCATE(pmfd)
356    ALLOCATE(pmfd(klon,klev))
357
358    IF (ALLOCATED(pmflxr)) DEALLOCATE(pmflxr)
359    ALLOCATE(pmflxr(klon,klev+1))
360
361    IF (ALLOCATED(pmflxs)) DEALLOCATE(pmflxs)
362    ALLOCATE(pmflxs(klon,klev+1))
363
364    IF (ALLOCATED(pmfu)) DEALLOCATE(pmfu)
365    ALLOCATE(pmfu(klon,klev))
366
367    IF (ALLOCATED(prfl)) DEALLOCATE(prfl)
368    ALLOCATE(prfl(klon,klev+1))
369
370    IF (ALLOCATED(prw)) DEALLOCATE(prw)
371    ALLOCATE(prw(klon))
372
373    IF (ALLOCATED(psfl)) DEALLOCATE(psfl)
374    ALLOCATE(psfl(klon,klev+1))
375
376    IF (ALLOCATED(ptconv)) DEALLOCATE(ptconv)
377    ALLOCATE(ptconv(klon,klev))
378
379    IF (ALLOCATED(qsat2m)) DEALLOCATE(qsat2m)
380    ALLOCATE(qsat2m(klon))
381
382    IF (ALLOCATED(qsol)) DEALLOCATE(qsol)
383    ALLOCATE(qsol(klon))
384
385    IF (ALLOCATED(qsol_d)) DEALLOCATE(qsol_d)
386    ALLOCATE(qsol_d(klon,nbsrf))
387
388    IF (ALLOCATED(rain_lsc)) DEALLOCATE(rain_lsc)
389    ALLOCATE(rain_lsc(klon))
390
391    IF (ALLOCATED(re)) DEALLOCATE(re)
392    ALLOCATE(re(klon,klev))
393
394    IF (ALLOCATED(ref_ice)) DEALLOCATE(ref_ice)
395    ALLOCATE(ref_ice(klon,klev))
396
397    IF (ALLOCATED(ref_liq)) DEALLOCATE(ref_liq)
398    ALLOCATE(ref_liq(klon,klev))
399
400    IF (ALLOCATED(rh2m)) DEALLOCATE(rh2m)
401    ALLOCATE(rh2m(klon))
402
403    IF (ALLOCATED(rneb)) DEALLOCATE(rneb)
404    ALLOCATE(rneb(klon,klev))
405
406    IF (ALLOCATED(s_lcl)) DEALLOCATE(s_lcl)
407    ALLOCATE(s_lcl(klon))
408
409    IF (ALLOCATED(s_pblh)) DEALLOCATE(s_pblh)
410    ALLOCATE(s_pblh(klon))
411
412    IF (ALLOCATED(s_pblt)) DEALLOCATE(s_pblt)
413    ALLOCATE(s_pblt(klon))
414
415    IF (ALLOCATED(s_therm)) DEALLOCATE(s_therm)
416    ALLOCATE(s_therm(klon))
417
418    IF (ALLOCATED(sens)) DEALLOCATE(sens)
419    ALLOCATE(sens(klon))
420
421    IF (ALLOCATED(slp)) DEALLOCATE(slp)
422    ALLOCATE(slp(klon))
423
424    IF (ALLOCATED(snow_lsc)) DEALLOCATE(snow_lsc)
425    ALLOCATE(snow_lsc(klon))
426
427    IF (ALLOCATED(t2m)) DEALLOCATE(t2m)
428    ALLOCATE(t2m(klon,nbsrf))
429
430    IF (ALLOCATED(theta)) DEALLOCATE(theta)
431    ALLOCATE(theta(klon,klev))
432
433    IF (ALLOCATED(tpot)) DEALLOCATE(tpot)
434    ALLOCATE(tpot(klon))
435
436    IF (ALLOCATED(tpote)) DEALLOCATE(tpote)
437    ALLOCATE(tpote(klon))
438
439    IF (ALLOCATED(ue)) DEALLOCATE(ue)
440    ALLOCATE(ue(klon))
441
442    IF (ALLOCATED(upwd)) DEALLOCATE(upwd)
443    ALLOCATE(upwd(klon,klev))
444
445    IF (ALLOCATED(uq)) DEALLOCATE(uq)
446    ALLOCATE(uq(klon))
447
448    IF (ALLOCATED(ve)) DEALLOCATE(ve)
449    ALLOCATE(ve(klon))
450
451    IF (ALLOCATED(Vprecip)) DEALLOCATE(Vprecip)
452    ALLOCATE(Vprecip(klon,klev+1))
453
454    IF (ALLOCATED(vq)) DEALLOCATE(vq)
455    ALLOCATE(vq(klon))
456
457    IF (ALLOCATED(wake_omg)) DEALLOCATE(wake_omg)
458    ALLOCATE(wake_omg(klon,klev))
459
460    IF (ALLOCATED(wake_h)) DEALLOCATE(wake_h)
461    ALLOCATE(wake_h(klon))
462
463    IF (ALLOCATED(weak_inversion)) DEALLOCATE(weak_inversion)
464    ALLOCATE(weak_inversion(klon))
465
466    IF (ALLOCATED(wbeff)) DEALLOCATE(wbeff)
467    ALLOCATE(wbeff(klon))
468
469    IF (ALLOCATED(wdtrainA)) DEALLOCATE(wdtrainA)
470    ALLOCATE(wdtrainA(klon,klev))
471
472    IF (ALLOCATED(wdtrainM)) DEALLOCATE(wdtrainM)
473    ALLOCATE(wdtrainM(klon,klev))
474
475    IF (ALLOCATED(wfbilo)) DEALLOCATE(wfbilo)
476    ALLOCATE(wfbilo(klon,nbsrf))
477
478    IF (ALLOCATED(wfbils)) DEALLOCATE(wfbils)
479    ALLOCATE(wfbils(klon,nbsrf))
480
481    IF (ALLOCATED(zmasse)) DEALLOCATE(zmasse)
482    ALLOCATE(zmasse(klon,klev))
483
484    IF (ALLOCATED(zmax_th)) DEALLOCATE(zmax_th)
485    ALLOCATE(zmax_th(klon))
486
487    IF (ALLOCATED(zphi)) DEALLOCATE(zphi)
488    ALLOCATE(zphi(klon,klev))
489
490    IF (ALLOCATED(zq2m)) DEALLOCATE(zq2m)
491    ALLOCATE(zq2m(klon))
492
493    IF (ALLOCATED(zt2m)) DEALLOCATE(zt2m)
494    ALLOCATE(zt2m(klon))
495
496    IF (ALLOCATED(zu10m)) DEALLOCATE(zu10m)
497    ALLOCATE(zu10m(klon))
498
499    IF (ALLOCATED(zustar)) DEALLOCATE(zustar)
500    ALLOCATE(zustar(klon))
501
502    IF (ALLOCATED(zv10m)) DEALLOCATE(zv10m)
503    ALLOCATE(zv10m(klon))
504
505    IF (ALLOCATED(zx_rh)) DEALLOCATE(zx_rh)
506    ALLOCATE(zx_rh(klon,klev))
507
508    IF (ALLOCATED(zxffonte)) DEALLOCATE(zxffonte)
509    ALLOCATE(zxffonte(klon))
510
511    IF (ALLOCATED(zxfluxlat)) DEALLOCATE(zxfluxlat)
512    ALLOCATE(zxfluxlat(klon))
513
514    IF (ALLOCATED(zxfqcalving)) DEALLOCATE(zxfqcalving)
515    ALLOCATE(zxfqcalving(klon))
516
517    IF (ALLOCATED(zxfqfonte)) DEALLOCATE(zxfqfonte)
518    ALLOCATE(zxfqfonte(klon))
519
520    IF (ALLOCATED(zxqsurf)) DEALLOCATE(zxqsurf)
521    ALLOCATE(zxqsurf(klon))
522
523    IF (ALLOCATED(zxrugs)) DEALLOCATE(zxrugs)
524    ALLOCATE(zxrugs(klon))
525
526    IF (ALLOCATED(zxsnow)) DEALLOCATE(zxsnow)
527    ALLOCATE(zxsnow(klon))
528
529    IF (ALLOCATED(zxtsol)) DEALLOCATE(zxtsol)
530    ALLOCATE(zxtsol(klon))
531
532  END SUBROUTINE init_ovars_lmdz_NOmodule
533
534  SUBROUTINE end_ovars_lmdz_NOmodule()
535! Subroutine to de-activate all the output variables without module
536
537    IMPLICIT NONE
538
539    IF (ALLOCATED(agesno)) DEALLOCATE(agesno)
540
541    IF (ALLOCATED(ale_wake)) DEALLOCATE(ale_wake)
542
543    IF (ALLOCATED(alp_wake)) DEALLOCATE(alp_wake)
544
545    IF (ALLOCATED(beta_prec)) DEALLOCATE(beta_prec)
546
547    IF (ALLOCATED(bils)) DEALLOCATE(bils)
548
549    IF (ALLOCATED(cdragh)) DEALLOCATE(cdragh)
550
551    IF (ALLOCATED(cdragm)) DEALLOCATE(cdragm)
552
553    IF (ALLOCATED(cldh)) DEALLOCATE(cldh)
554
555    IF (ALLOCATED(cldl)) DEALLOCATE(cldl)
556
557    IF (ALLOCATED(cldm)) DEALLOCATE(cldm)
558
559    IF (ALLOCATED(cldq)) DEALLOCATE(cldq)
560
561    IF (ALLOCATED(cldt)) DEALLOCATE(cldt)
562
563    IF (ALLOCATED(cldemi)) DEALLOCATE(cldemi)
564
565    IF (ALLOCATED(cldfra)) DEALLOCATE(cldfra)
566
567    IF (ALLOCATED(cldtau)) DEALLOCATE(cldtau)
568
569    IF (ALLOCATED(dnwd)) DEALLOCATE(dnwd)
570
571    IF (ALLOCATED(dnwd0)) DEALLOCATE(dnwd0)
572
573    IF (ALLOCATED(dthmin)) DEALLOCATE(dthmin)
574
575    IF (ALLOCATED(evap)) DEALLOCATE(evap)
576
577    IF (ALLOCATED(evap_pot)) DEALLOCATE(evap_pot)
578
579    IF (ALLOCATED(evap_srf)) DEALLOCATE(evap_srf)
580
581    IF (ALLOCATED(evappot_srf)) DEALLOCATE(evappot_srf)
582
583    IF (ALLOCATED(fder)) DEALLOCATE(fder)
584
585    IF (ALLOCATED(fevap)) DEALLOCATE(fevap)
586
587    IF (ALLOCATED(fiwc)) DEALLOCATE(fiwc)
588
589    IF (ALLOCATED(fiwp)) DEALLOCATE(fiwp)
590
591    IF (ALLOCATED(fl)) DEALLOCATE(fl)
592
593    IF (ALLOCATED(fluxlat)) DEALLOCATE(fluxlat)
594
595    IF (ALLOCATED(fluxt)) DEALLOCATE(fluxt)
596
597    IF (ALLOCATED(fluxu)) DEALLOCATE(fluxu)
598
599    IF (ALLOCATED(fluxv)) DEALLOCATE(fluxv)
600
601    IF (ALLOCATED(flwp)) DEALLOCATE(flwp)
602
603    IF (ALLOCATED(flwc)) DEALLOCATE(flwc)
604
605    IF (ALLOCATED(fraca)) DEALLOCATE(fraca)
606
607    IF (ALLOCATED(frugs)) DEALLOCATE(frugs)
608
609    IF (ALLOCATED(fsollw)) DEALLOCATE(fsollw)
610
611    IF (ALLOCATED(fsolsw)) DEALLOCATE(fsolsw)
612
613    IF (ALLOCATED(fsolw)) DEALLOCATE(fsolw)
614
615    IF (ALLOCATED(lambda_th)) DEALLOCATE(lambda_th)
616
617    IF (ALLOCATED(lmax_th)) DEALLOCATE(lmax_th)
618
619    IF (ALLOCATED(mc)) DEALLOCATE(mc)
620
621    IF (ALLOCATED(omega)) DEALLOCATE(omega)
622
623    IF (ALLOCATED(plcl)) DEALLOCATE(plcl)
624
625    IF (ALLOCATED(plfc)) DEALLOCATE(plfc)
626
627    IF (ALLOCATED(pmfd)) DEALLOCATE(pmfd)
628
629    IF (ALLOCATED(pmflxr)) DEALLOCATE(pmflxr)
630
631    IF (ALLOCATED(pmflxs)) DEALLOCATE(pmflxs)
632
633    IF (ALLOCATED(pmfu)) DEALLOCATE(pmfu)
634
635    IF (ALLOCATED(prfl)) DEALLOCATE(prfl)
636
637    IF (ALLOCATED(prw)) DEALLOCATE(prw)
638
639    IF (ALLOCATED(psfl)) DEALLOCATE(psfl)
640
641    IF (ALLOCATED(ptconv)) DEALLOCATE(ptconv)
642
643    IF (ALLOCATED(qsat2m)) DEALLOCATE(qsat2m)
644
645    IF (ALLOCATED(qsol)) DEALLOCATE(qsol)
646
647    IF (ALLOCATED(qsol_d)) DEALLOCATE(qsol_d)
648
649    IF (ALLOCATED(rain_lsc)) DEALLOCATE(rain_lsc)
650
651    IF (ALLOCATED(re)) DEALLOCATE(re)
652
653    IF (ALLOCATED(ref_ice)) DEALLOCATE(ref_ice)
654
655    IF (ALLOCATED(ref_liq)) DEALLOCATE(ref_liq)
656
657    IF (ALLOCATED(rh2m)) DEALLOCATE(rh2m)
658
659    IF (ALLOCATED(rneb)) DEALLOCATE(rneb)
660
661    IF (ALLOCATED(s_lcl)) DEALLOCATE(s_lcl)
662
663    IF (ALLOCATED(s_pblh)) DEALLOCATE(s_pblh)
664
665    IF (ALLOCATED(s_pblt)) DEALLOCATE(s_pblt)
666
667    IF (ALLOCATED(s_therm)) DEALLOCATE(s_therm)
668
669    IF (ALLOCATED(sens)) DEALLOCATE(sens)
670
671    IF (ALLOCATED(slp)) DEALLOCATE(slp)
672
673    IF (ALLOCATED(snow_lsc)) DEALLOCATE(snow_lsc)
674
675    IF (ALLOCATED(t2m)) DEALLOCATE(t2m)
676
677    IF (ALLOCATED(theta)) DEALLOCATE(theta)
678
679    IF (ALLOCATED(tpot)) DEALLOCATE(tpot)
680
681    IF (ALLOCATED(tpote)) DEALLOCATE(tpote)
682
683    IF (ALLOCATED(ue)) DEALLOCATE(ue)
684
685    IF (ALLOCATED(upwd)) DEALLOCATE(upwd)
686
687    IF (ALLOCATED(uq)) DEALLOCATE(uq)
688
689    IF (ALLOCATED(ve)) DEALLOCATE(ve)
690
691    IF (ALLOCATED(Vprecip)) DEALLOCATE(Vprecip)
692
693    IF (ALLOCATED(vq)) DEALLOCATE(vq)
694
695    IF (ALLOCATED(wake_omg)) DEALLOCATE(wake_omg)
696
697    IF (ALLOCATED(wake_h)) DEALLOCATE(wake_h)
698
699    IF (ALLOCATED(weak_inversion)) DEALLOCATE(weak_inversion)
700
701    IF (ALLOCATED(wbeff)) DEALLOCATE(wbeff)
702
703    IF (ALLOCATED(wdtrainA)) DEALLOCATE(wdtrainA)
704
705    IF (ALLOCATED(wdtrainM)) DEALLOCATE(wdtrainM)
706
707    IF (ALLOCATED(wfbilo)) DEALLOCATE(wfbilo)
708
709    IF (ALLOCATED(wfbils)) DEALLOCATE(wfbils)
710
711    IF (ALLOCATED(zmasse)) DEALLOCATE(zmasse)
712
713    IF (ALLOCATED(zmax_th)) DEALLOCATE(zmax_th)
714
715    IF (ALLOCATED(zphi)) DEALLOCATE(zphi)
716
717    IF (ALLOCATED(zq2m)) DEALLOCATE(zq2m)
718
719    IF (ALLOCATED(zt2m)) DEALLOCATE(zt2m)
720
721    IF (ALLOCATED(zu10m)) DEALLOCATE(zu10m)
722
723    IF (ALLOCATED(zustar)) DEALLOCATE(zustar)
724
725    IF (ALLOCATED(zv10m)) DEALLOCATE(zv10m)
726
727    IF (ALLOCATED(zx_rh)) DEALLOCATE(zx_rh)
728
729    IF (ALLOCATED(zxffonte)) DEALLOCATE(zxffonte)
730
731    IF (ALLOCATED(zxfluxlat)) DEALLOCATE(zxfluxlat)
732
733    IF (ALLOCATED(zxfqcalving)) DEALLOCATE(zxfqcalving)
734
735    IF (ALLOCATED(zxfqfonte)) DEALLOCATE(zxfqfonte)
736
737    IF (ALLOCATED(zxqsurf)) DEALLOCATE(zxqsurf)
738
739    IF (ALLOCATED(zxrugs)) DEALLOCATE(zxrugs)
740
741    IF (ALLOCATED(zxsnow)) DEALLOCATE(zxsnow)
742
743    IF (ALLOCATED(zxtsol)) DEALLOCATE(zxtsol)
744
745  END SUBROUTINE end_ovars_lmdz_NOmodule
746
747
748END MODULE output_lmdz_NOmodule
749
Note: See TracBrowser for help on using the repository browser.