source: LMDZ5/trunk/libf/phylmd/phys_local_var_mod.F90 @ 1907

Last change on this file since 1907 was 1907, checked in by lguez, 11 years ago

Added a copyright property to every file of the distribution, except
for the fcm files (which have their own copyright). Use svn propget on
a file to see the copyright. For instance:

$ svn propget copyright libf/phylmd/physiq.F90
Name of program: LMDZ
Creation date: 1984
Version: LMDZ5
License: CeCILL version 2
Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
See the license file in the root directory

Also added the files defining the CeCILL version 2 license, in French
and English, at the top of the LMDZ tree.

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 24.0 KB
Line 
1!
2! $Id: phys_local_var_mod.F90 1907 2013-11-26 13:10:46Z lguez $
3!
4      MODULE phys_local_var_mod
5! Variables locales pour effectuer les appels en serie
6!======================================================================
7!
8!
9!======================================================================
10! Declaration des variables
11
12      REAL, SAVE, ALLOCATABLE :: t_seri(:,:), q_seri(:,:)
13      !$OMP THREADPRIVATE(t_seri, q_seri)
14      REAL, SAVE, ALLOCATABLE :: ql_seri(:,:),qs_seri(:,:)
15      !$OMP THREADPRIVATE(ql_seri,qs_seri)
16      REAL, SAVE, ALLOCATABLE :: u_seri(:,:), v_seri(:,:)
17      !$OMP THREADPRIVATE(u_seri, v_seri)
18
19      REAL, SAVE, ALLOCATABLE :: tr_seri(:,:,:)
20      !$OMP THREADPRIVATE(tr_seri)
21      REAL, SAVE, ALLOCATABLE :: d_t_dyn(:,:), d_q_dyn(:,:)
22      !$OMP THREADPRIVATE(d_t_dyn, d_q_dyn)
23      REAL, SAVE, ALLOCATABLE :: d_u_dyn(:,:), d_v_dyn(:,:)
24      !$OMP THREADPRIVATE(d_u_dyn, d_v_dyn)
25!!!!
26      REAL, SAVE, ALLOCATABLE :: d_tr_dyn(:,:,:)
27      !$OMP THREADPRIVATE(d_tr_dyn)
28!!!!
29      REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:)
30      !$OMP THREADPRIVATE(d_t_con,d_q_con)
31      REAL, SAVE, ALLOCATABLE :: d_u_con(:,:),d_v_con(:,:)
32      !$OMP THREADPRIVATE(d_u_con,d_v_con)
33      REAL, SAVE, ALLOCATABLE :: d_t_wake(:,:),d_q_wake(:,:)
34      !$OMP THREADPRIVATE( d_t_wake,d_q_wake)
35      REAL, SAVE, ALLOCATABLE :: d_t_lsc(:,:),d_q_lsc(:,:),d_ql_lsc(:,:)
36      !$OMP THREADPRIVATE(d_t_lsc,d_q_lsc,d_ql_lsc)
37      REAL, SAVE, ALLOCATABLE :: d_t_ajsb(:,:), d_q_ajsb(:,:)
38      !$OMP THREADPRIVATE(d_t_ajsb, d_q_ajsb)
39      REAL, SAVE, ALLOCATABLE :: d_t_ajs(:,:), d_q_ajs(:,:)
40      !$OMP THREADPRIVATE(d_t_ajs, d_q_ajs)
41      REAL, SAVE, ALLOCATABLE :: d_u_ajs(:,:), d_v_ajs(:,:)
42      !$OMP THREADPRIVATE(d_u_ajs, d_v_ajs)
43      REAL, SAVE, ALLOCATABLE :: d_u_ajsb(:,:), d_v_ajsb(:,:)
44      !$OMP THREADPRIVATE(d_u_ajsb, d_v_ajsb)
45      REAL, SAVE, ALLOCATABLE :: d_t_eva(:,:),d_q_eva(:,:)
46      !$OMP THREADPRIVATE(d_t_eva,d_q_eva)
47      REAL, SAVE, ALLOCATABLE :: d_t_lscst(:,:),d_q_lscst(:,:)
48      !$OMP THREADPRIVATE(d_t_lscst,d_q_lscst)
49      REAL, SAVE, ALLOCATABLE :: d_t_lscth(:,:),d_q_lscth(:,:)
50      !$OMP THREADPRIVATE(d_t_lscth,d_q_lscth)
51      REAL, SAVE, ALLOCATABLE :: plul_th(:),plul_st(:)
52      !$OMP THREADPRIVATE(plul_th,plul_st)
53!tendances dues a oro et lif
54      REAL, SAVE, ALLOCATABLE :: d_t_oli(:,:)
55      !$OMP THREADPRIVATE(d_t_oli)
56      REAL, SAVE, ALLOCATABLE :: d_u_oli(:,:), d_v_oli(:,:)
57      !$OMP THREADPRIVATE(d_u_oli, d_v_oli)
58      REAL, SAVE, ALLOCATABLE :: d_t_vdf(:,:), d_q_vdf(:,:), d_t_diss(:,:)
59      !$OMP THREADPRIVATE( d_t_vdf, d_q_vdf,d_t_diss)
60      REAL, SAVE, ALLOCATABLE :: d_u_vdf(:,:), d_v_vdf(:,:)
61      !$OMP THREADPRIVATE(d_u_vdf, d_v_vdf)
62      REAL, SAVE, ALLOCATABLE :: d_t_oro(:,:)
63      !$OMP THREADPRIVATE(d_t_oro)
64      REAL, SAVE, ALLOCATABLE :: d_u_oro(:,:), d_v_oro(:,:)
65      !$OMP THREADPRIVATE(d_u_oro, d_v_oro)
66      REAL, SAVE, ALLOCATABLE :: d_t_lif(:,:)
67      !$OMP THREADPRIVATE(d_t_lif)
68      REAL, SAVE, ALLOCATABLE :: d_u_lif(:,:), d_v_lif(:,:)
69      !$OMP THREADPRIVATE(d_u_lif, d_v_lif)
70! Tendances Ondes de G non oro (runs strato).
71      REAL, SAVE, ALLOCATABLE :: d_u_hin(:,:)
72      !$OMP THREADPRIVATE(d_u_hin)
73      REAL, SAVE, ALLOCATABLE :: d_v_hin(:,:)
74      !$OMP THREADPRIVATE(d_v_hin)
75      REAL, SAVE, ALLOCATABLE :: d_t_hin(:,:)
76      !$OMP THREADPRIVATE(d_t_hin)
77
78! tendance du a la conersion Ec -> E thermique
79      REAL, SAVE, ALLOCATABLE :: d_t_ec(:,:)
80      !$OMP THREADPRIVATE(d_t_ec)
81      REAL, SAVE, ALLOCATABLE :: d_ts(:,:), d_tr(:,:,:)
82      !$OMP THREADPRIVATE(d_ts, d_tr)
83
84! diagnostique pour le rayonnement
85      REAL, SAVE, ALLOCATABLE :: topswad_aero(:),  solswad_aero(:)      ! diag
86      !$OMP THREADPRIVATE(topswad_aero,solswad_aero)
87      REAL, SAVE, ALLOCATABLE :: topswai_aero(:),  solswai_aero(:)      ! diag
88      !$OMP THREADPRIVATE(topswai_aero,solswai_aero)
89      REAL, SAVE, ALLOCATABLE :: topswad0_aero(:), solswad0_aero(:)     ! diag
90      !$OMP THREADPRIVATE(topswad0_aero,solswad0_aero)
91      REAL, SAVE, ALLOCATABLE :: topsw_aero(:,:),  solsw_aero(:,:)      ! diag
92      !$OMP THREADPRIVATE(topsw_aero,solsw_aero)
93      REAL, SAVE, ALLOCATABLE :: topsw0_aero(:,:), solsw0_aero(:,:)     ! diag
94      !$OMP THREADPRIVATE(topsw0_aero,solsw0_aero)
95      REAL, SAVE, ALLOCATABLE :: topswcf_aero(:,:),  solswcf_aero(:,:)  ! diag
96      !$OMP THREADPRIVATE(topswcf_aero,solswcf_aero)
97      REAL, SAVE, ALLOCATABLE :: tausum_aero(:,:,:)
98      !$OMP THREADPRIVATE(tausum_aero)
99      REAL, SAVE, ALLOCATABLE :: tau3d_aero(:,:,:,:)
100      !$OMP THREADPRIVATE(tau3d_aero)
101      REAL, SAVE, ALLOCATABLE :: scdnc(:,:)
102      !$OMP THREADPRIVATE(scdnc)
103      REAL, SAVE, ALLOCATABLE :: cldncl(:)
104      !$OMP THREADPRIVATE(cldncl)
105      REAL, SAVE, ALLOCATABLE :: reffclwtop(:)
106      !$OMP THREADPRIVATE(reffclwtop)
107      REAL, SAVE, ALLOCATABLE :: lcc(:)
108      !$OMP THREADPRIVATE(lcc)
109      REAL, SAVE, ALLOCATABLE :: reffclws(:,:)
110      !$OMP THREADPRIVATE(reffclws)
111      REAL, SAVE, ALLOCATABLE :: reffclwc(:,:)
112      !$OMP THREADPRIVATE(reffclwc)
113      REAL, SAVE, ALLOCATABLE :: cldnvi(:)
114      !$OMP THREADPRIVATE(cldnvi)
115      REAL, SAVE, ALLOCATABLE :: lcc3d(:,:)
116      !$OMP THREADPRIVATE(lcc3d)
117      REAL, SAVE, ALLOCATABLE :: lcc3dcon(:,:)
118      !$OMP THREADPRIVATE(lcc3dcon)
119      REAL, SAVE, ALLOCATABLE :: lcc3dstra(:,:)
120      !$OMP THREADPRIVATE(lcc3dstra)
121      REAL, SAVE, ALLOCATABLE :: od550aer(:)
122      !$OMP THREADPRIVATE(od550aer)
123      REAL, SAVE, ALLOCATABLE :: absvisaer(:)
124      !$OMP THREADPRIVATE(absvisaer)
125      REAL, SAVE, ALLOCATABLE :: od865aer(:)
126      !$OMP THREADPRIVATE(od865aer)
127      REAL, SAVE, ALLOCATABLE :: ec550aer(:,:)
128      !$OMP THREADPRIVATE(ec550aer)
129      REAL, SAVE, ALLOCATABLE :: od550lt1aer(:)
130      !$OMP THREADPRIVATE(od550lt1aer)
131      REAL, SAVE, ALLOCATABLE :: sconcso4(:)
132      !$OMP THREADPRIVATE(sconcso4)
133      REAL, SAVE, ALLOCATABLE :: sconcoa(:)
134      !$OMP THREADPRIVATE(sconcoa)
135      REAL, SAVE, ALLOCATABLE :: sconcbc(:)
136      !$OMP THREADPRIVATE(sconcbc)
137      REAL, SAVE, ALLOCATABLE :: sconcss(:)
138      !$OMP THREADPRIVATE(sconcss)
139      REAL, SAVE, ALLOCATABLE :: sconcdust(:)
140      !$OMP THREADPRIVATE(sconcdust)
141      REAL, SAVE, ALLOCATABLE :: concso4(:,:)
142      !$OMP THREADPRIVATE(concso4)
143      REAL, SAVE, ALLOCATABLE :: concoa(:,:)
144      !$OMP THREADPRIVATE(concoa)
145      REAL, SAVE, ALLOCATABLE :: concbc(:,:)
146      !$OMP THREADPRIVATE(concbc)
147      REAL, SAVE, ALLOCATABLE :: concss(:,:)
148      !$OMP THREADPRIVATE(concss)
149      REAL, SAVE, ALLOCATABLE :: concdust(:,:)
150      !$OMP THREADPRIVATE(concdust)
151      REAL, SAVE, ALLOCATABLE :: loadso4(:)
152      !$OMP THREADPRIVATE(loadso4)
153      REAL, SAVE, ALLOCATABLE :: loadoa(:)
154      !$OMP THREADPRIVATE(loadoa)
155      REAL, SAVE, ALLOCATABLE :: loadbc(:)
156      !$OMP THREADPRIVATE(loadbc)
157      REAL, SAVE, ALLOCATABLE :: loadss(:)
158      !$OMP THREADPRIVATE(loadss)
159      REAL, SAVE, ALLOCATABLE :: loaddust(:)
160      !$OMP THREADPRIVATE(loaddust)
161      REAL, SAVE, ALLOCATABLE :: load_tmp1(:)
162      !$OMP THREADPRIVATE(load_tmp1)
163      REAL, SAVE, ALLOCATABLE :: load_tmp2(:)
164      !$OMP THREADPRIVATE(load_tmp2)
165      REAL, SAVE, ALLOCATABLE :: load_tmp3(:)
166      !$OMP THREADPRIVATE(load_tmp3)
167      REAL, SAVE, ALLOCATABLE :: load_tmp4(:)
168      !$OMP THREADPRIVATE(load_tmp4)
169      REAL, SAVE, ALLOCATABLE :: load_tmp5(:)
170      !$OMP THREADPRIVATE(load_tmp5)
171      REAL, SAVE, ALLOCATABLE :: load_tmp6(:)
172      !$OMP THREADPRIVATE(load_tmp6)
173      REAL, SAVE, ALLOCATABLE :: load_tmp7(:)
174      !$OMP THREADPRIVATE(load_tmp7)
175
176!IM ajout variables CFMIP2/CMIP5
177      REAL,ALLOCATABLE,SAVE :: topswad_aerop(:), solswad_aerop(:)
178!$OMP THREADPRIVATE(topswad_aerop, solswad_aerop)
179      REAL,ALLOCATABLE,SAVE :: topswai_aerop(:), solswai_aerop(:)
180!$OMP THREADPRIVATE(topswai_aerop, solswai_aerop)
181      REAL,ALLOCATABLE,SAVE :: topswad0_aerop(:), solswad0_aerop(:)
182!$OMP THREADPRIVATE(topswad0_aerop, solswad0_aerop)
183      REAL,ALLOCATABLE,SAVE :: topsw_aerop(:,:), topsw0_aerop(:,:) 
184!$OMP THREADPRIVATE(topsw_aerop, topsw0_aerop)
185      REAL,ALLOCATABLE,SAVE :: solsw_aerop(:,:), solsw0_aerop(:,:)
186!$OMP THREADPRIVATE(solsw_aerop, solsw0_aerop)
187      REAL,ALLOCATABLE,SAVE :: topswcf_aerop(:,:), solswcf_aerop(:,:)
188!$OMP THREADPRIVATE(topswcf_aerop, solswcf_aerop)
189
190
191!Ajout de celles nécessaires au phys_output_write_mod
192      REAL, SAVE, ALLOCATABLE :: slp(:)
193!$OMP THREADPRIVATE(slp)
194      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sens, flwp, fiwp
195!$OMP THREADPRIVATE(sens, flwp, fiwp)
196      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: ale_wake, alp_wake, bils
197!$OMP THREADPRIVATE(ale_wake, alp_wake, bils)
198      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragm, cdragh
199!$OMP THREADPRIVATE(cdragm, cdragh)
200      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cldh, cldl, cldm, cldq, cldt, qsat2m, qsol
201!$OMP THREADPRIVATE(cldh, cldl, cldm, cldq, cldt, qsat2m, qsol)
202      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: dthmin, evap, fder, plcl, plfc, prw
203!$OMP THREADPRIVATE(dthmin, evap, fder, plcl, plfc, prw)
204      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zustar, zu10m, zv10m, rh2m
205!$OMP THREADPRIVATE(zustar, zu10m, zv10m, rh2m)
206      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_lcl, s_pblh, s_pblt, s_therm
207!$OMP THREADPRIVATE(s_lcl, s_pblh, s_pblt, s_therm)
208      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: slab_wfbils
209!$OMP THREADPRIVATE(slab_wfbils)
210      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: tpot, tpote, ue, uq, ve, vq, zxffonte
211!$OMP THREADPRIVATE(tpot, tpote, ue, uq, ve, vq, zxffonte)
212      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfqcalving
213!$OMP THREADPRIVATE(zxfqcalving)
214      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat, zxrugs, zxtsol, snow_lsc, zxfqfonte
215!$OMP THREADPRIVATE(zxfluxlat, zxrugs, zxtsol, snow_lsc, zxfqfonte)
216      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxqsurf, rain_lsc
217!$OMP THREADPRIVATE(zxqsurf, rain_lsc)
218      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wake_h, wbeff, zmax_th, zq2m, zt2m
219!$OMP THREADPRIVATE(wake_h, wbeff, zmax_th, zq2m, zt2m)
220      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: weak_inversion
221!$OMP THREADPRIVATE(weak_inversion)
222      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: ale_bl_stat,alp_bl_conv,alp_bl_det
223!$OMP THREADPRIVATE(ale_bl_stat,alp_bl_conv,alp_bl_det)
224      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_fluct_m,alp_bl_fluct_tke
225!$OMP THREADPRIVATE(alp_bl_fluct_m,alp_bl_fluct_tke)
226      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_stat, n2, s2
227!$OMP THREADPRIVATE(alp_bl_stat, n2, s2)
228      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: proba_notrig, random_notrig
229!$OMP THREADPRIVATE(proba_notrig, random_notrig)
230      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: fsolsw, wfbils, wfbilo
231!$OMP THREADPRIVATE(fsolsw, wfbils, wfbilo)
232      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: t2m, fevap, fluxlat, fsollw,evap_pot
233!$OMP THREADPRIVATE(t2m, fevap, fluxlat, fsollw,evap_pot)
234      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dnwd, dnwd0, upwd, omega
235!$OMP THREADPRIVATE(dnwd, dnwd0, upwd, omega)
236!      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: coefh, coefm, lambda_th
237      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: lambda_th
238!$OMP THREADPRIVATE(lambda_th)
239      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: cldemi, cldfra, cldtau, fiwc, fl, re, flwc
240!$OMP THREADPRIVATE(cldemi, cldfra, cldtau, fiwc, fl, re, flwc)
241      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ref_liq, ref_ice, theta, zphi
242!$OMP THREADPRIVATE(ref_liq, ref_ice, theta, zphi)
243      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: wake_omg, zx_rh
244!$OMP THREADPRIVATE(wake_omg, zx_rh)
245      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: frugs, agesno
246!$OMP THREADPRIVATE(frugs, agesno)
247      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: pmflxr, pmflxs, prfl, psfl, fraca
248!$OMP THREADPRIVATE(pmflxr, pmflxs, prfl, psfl, fraca)
249      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: Vprecip, zw2
250!$OMP THREADPRIVATE(Vprecip, zw2)
251      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: pmfd, pmfu
252!$OMP THREADPRIVATE(pmfd, pmfu)
253      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: fluxt, fluxu, fluxv
254!$OMP THREADPRIVATE(fluxt, fluxu, fluxv)
255      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: uwriteSTD, vwriteSTD, wwriteSTD
256!$OMP THREADPRIVATE(uwriteSTD, vwriteSTD, wwriteSTD)
257      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD
258!$OMP THREADPRIVATE(phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD)
259
260! ug et d'autres encore:
261      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: wdtrainA, wdtrainM
262!$OMP THREADPRIVATE(wdtrainA, wdtrainM)
263      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: beta_prec
264!$OMP THREADPRIVATE(beta_prec)
265      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rneb
266!$OMP THREADPRIVATE(rneb)
267
268! variables de sorties MM
269      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxsnow,snowhgt,qsnow,to_ice
270      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sissnow,runoff,albsol3_lic
271!$OMP THREADPRIVATE(zxsnow,snowhgt,qsnow,to_ice)
272!$OMP THREADPRIVATE(sissnow,runoff,albsol3_lic)
273
274CONTAINS
275
276!======================================================================
277SUBROUTINE phys_local_var_init
278USE dimphy
279USE infotrac, ONLY : nbtr
280USE aero_mod
281USE indice_sol_mod
282USE phys_output_var_mod
283USE phys_state_var_mod
284
285IMPLICIT NONE
286      allocate(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev))
287      allocate(u_seri(klon,klev),v_seri(klon,klev))
288
289      allocate(tr_seri(klon,klev,nbtr))
290      allocate(d_t_dyn(klon,klev),d_q_dyn(klon,klev))
291      allocate(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
292      allocate(d_tr_dyn(klon,klev,nbtr))                   !RomP
293      allocate(d_t_con(klon,klev),d_q_con(klon,klev))
294      allocate(d_u_con(klon,klev),d_v_con(klon,klev))
295      allocate(d_t_wake(klon,klev),d_q_wake(klon,klev))
296      allocate(d_t_lsc(klon,klev),d_q_lsc(klon,klev))
297      allocate(d_ql_lsc(klon,klev))
298      allocate(d_t_ajsb(klon,klev),d_q_ajsb(klon,klev))
299      allocate(d_t_ajs(klon,klev),d_q_ajs(klon,klev))
300      allocate(d_u_ajs(klon,klev),d_v_ajs(klon,klev))
301      allocate(d_u_ajsb(klon,klev),d_v_ajsb(klon,klev))
302      allocate(d_t_eva(klon,klev),d_q_eva(klon,klev))
303      allocate(d_t_lscst(klon,klev),d_q_lscst(klon,klev))
304      allocate(d_t_lscth(klon,klev),d_q_lscth(klon,klev))
305      allocate(plul_st(klon),plul_th(klon))
306      allocate(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))
307      allocate(d_u_vdf(klon,klev),d_v_vdf(klon,klev))
308      allocate(d_t_oli(klon,klev),d_t_oro(klon,klev))
309      allocate(d_u_oli(klon,klev),d_v_oli(klon,klev))
310      allocate(d_u_oro(klon,klev),d_v_oro(klon,klev))
311      allocate(d_t_lif(klon,klev),d_t_ec(klon,klev))
312      allocate(d_u_lif(klon,klev),d_v_lif(klon,klev))
313      allocate(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr))
314      allocate(topswad_aero(klon), solswad_aero(klon))
315      allocate(topswai_aero(klon), solswai_aero(klon))
316      allocate(topswad0_aero(klon), solswad0_aero(klon))
317      allocate(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp))
318      allocate(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp))
319      allocate(topswcf_aero(klon,3), solswcf_aero(klon,3))
320      allocate(d_u_hin(klon,klev),d_v_hin(klon,klev),d_t_hin(klon,klev))
321      allocate(tausum_aero(klon,nwave,naero_spc))
322      allocate(tau3d_aero(klon,klev,nwave,naero_spc))
323      allocate(scdnc(klon, klev))
324      allocate(cldncl(klon))
325      allocate(reffclwtop(klon))
326      allocate(lcc(klon))
327      allocate(reffclws(klon, klev))
328      allocate(reffclwc(klon, klev))
329      allocate(cldnvi(klon))
330      allocate(lcc3d(klon, klev))
331      allocate(lcc3dcon(klon, klev))
332      allocate(lcc3dstra(klon, klev))
333      allocate(od550aer(klon))   
334      allocate(od865aer(klon))   
335      allocate(absvisaer(klon)) 
336      allocate(ec550aer(klon,klev))
337      allocate(od550lt1aer(klon))               
338      allocate(sconcso4(klon))
339      allocate(sconcoa(klon))
340      allocate(sconcbc(klon))
341      allocate(sconcss(klon))
342      allocate(sconcdust(klon))
343      allocate(concso4(klon,klev))
344      allocate(concoa(klon,klev))
345      allocate(concbc(klon,klev))
346      allocate(concss(klon,klev))
347      allocate(concdust(klon,klev))
348      allocate(loadso4(klon))
349      allocate(loadoa(klon))
350      allocate(loadbc(klon))
351      allocate(loadss(klon))
352      allocate(loaddust(klon))
353      allocate(load_tmp1(klon))
354      allocate(load_tmp2(klon))
355      allocate(load_tmp3(klon))
356      allocate(load_tmp4(klon))
357      allocate(load_tmp5(klon))
358      allocate(load_tmp6(klon))
359      allocate(load_tmp7(klon))
360
361!IM ajout variables CFMIP2/CMIP5
362      ALLOCATE(topswad_aerop(klon), solswad_aerop(klon))
363      ALLOCATE(topswai_aerop(klon), solswai_aerop(klon))
364      ALLOCATE(topswad0_aerop(klon), solswad0_aerop(klon))
365      ALLOCATE(topsw_aerop(klon,naero_grp), topsw0_aerop(klon,naero_grp))
366      ALLOCATE(solsw_aerop(klon,naero_grp), solsw0_aerop(klon,naero_grp))
367      ALLOCATE(topswcf_aerop(klon,naero_grp), solswcf_aerop(klon,naero_grp))
368
369! FH Ajout de celles nécessaires au phys_output_write_mod
370
371      ALLOCATE(slp(klon))
372      ALLOCATE(ale_wake(klon), alp_wake(klon), bils(klon))
373      ALLOCATE(cdragm(klon), cdragh(klon), cldh(klon), cldl(klon))
374      ALLOCATE(cldm(klon), cldq(klon), cldt(klon), qsat2m(klon), qsol(klon))
375      ALLOCATE(dthmin(klon), evap(klon), fder(klon), plcl(klon), plfc(klon))
376      ALLOCATE(prw(klon), zustar(klon), zu10m(klon), zv10m(klon), rh2m(klon))
377      ALLOCATE(s_lcl(klon))
378      ALLOCATE(s_pblh(klon), s_pblt(klon), s_therm(klon))
379      ALLOCATE(slab_wfbils(klon), tpot(klon), tpote(klon), ue(klon))
380      ALLOCATE(uq(klon), ve(klon), vq(klon), zxffonte(klon))
381      ALLOCATE(zxfqcalving(klon), zxfluxlat(klon), zxrugs(klon))
382      ALLOCATE(zxtsol(klon), snow_lsc(klon), zxfqfonte(klon), zxqsurf(klon))
383      ALLOCATE(rain_lsc(klon), wake_h(klon), wbeff(klon), zmax_th(klon))
384      ALLOCATE(zq2m(klon), zt2m(klon), weak_inversion(klon))
385      ALLOCATE(sens(klon), flwp(klon), fiwp(klon))
386      ALLOCATE(ale_bl_stat(klon), alp_bl_conv(klon), alp_bl_det(klon))
387      ALLOCATE(alp_bl_fluct_m(klon), alp_bl_fluct_tke(klon))
388      ALLOCATE(alp_bl_stat(klon), n2(klon), s2(klon))
389      ALLOCATE(proba_notrig(klon), random_notrig(klon))
390
391      ALLOCATE(dnwd(klon, klev), dnwd0(klon, klev))
392!      ALLOCATE(upwd(klon, klev), omega(klon, klev), coefh(klon, klev))
393      ALLOCATE(upwd(klon, klev), omega(klon, klev))
394!      ALLOCATE(coefm(klon, klev), lambda_th(klon, klev), cldemi(klon, klev))
395      ALLOCATE(lambda_th(klon, klev), cldemi(klon, klev))
396      ALLOCATE(cldfra(klon, klev), cldtau(klon, klev), fiwc(klon, klev))
397      ALLOCATE(fl(klon, klev), re(klon, klev), flwc(klon, klev))
398      ALLOCATE(ref_liq(klon, klev), ref_ice(klon, klev), theta(klon, klev))
399      ALLOCATE(zphi(klon, klev), wake_omg(klon, klev), zx_rh(klon, klev))
400      ALLOCATE(pmfd(klon, klev), pmfu(klon, klev))
401
402      ALLOCATE(t2m(klon, nbsrf), fevap(klon, nbsrf), fluxlat(klon, nbsrf))
403      ALLOCATE(frugs(klon, nbsrf), agesno(klon, nbsrf), fsollw(klon, nbsrf))
404      ALLOCATE(fsolsw(klon, nbsrf), wfbils(klon, nbsrf), wfbilo(klon, nbsrf))
405      ALLOCATE(evap_pot(klon, nbsrf))
406
407      ALLOCATE(pmflxr(klon, klev+1), pmflxs(klon, klev+1), prfl(klon, klev+1))
408      ALLOCATE(psfl(klon, klev+1), fraca(klon, klev+1), Vprecip(klon, klev+1))
409      ALLOCATE(zw2(klon, klev+1))
410
411      ALLOCATE(fluxu(klon, klev, nbsrf), fluxv(klon, klev, nbsrf))
412      ALLOCATE(fluxt(klon, klev, nbsrf))
413
414      ALLOCATE(uwriteSTD(klon,nlevSTD,nfiles), vwriteSTD(klon,nlevSTD,nfiles))
415      ALLOCATE(wwriteSTD(klon,nlevSTD,nfiles), phiwriteSTD(klon,nlevSTD,nfiles))
416      ALLOCATE(qwriteSTD(klon,nlevSTD,nfiles), twriteSTD(klon,nlevSTD,nfiles))
417      ALLOCATE(rhwriteSTD(klon,nlevSTD,nfiles))
418
419! ug et d'autres encore:
420      ALLOCATE(wdtrainA(klon,klev),wdtrainM(klon,klev))
421      ALLOCATE(beta_prec(klon,klev))
422      ALLOCATE(rneb(klon,klev))
423
424
425      ALLOCATE (zxsnow(klon),snowhgt(klon),qsnow(klon),to_ice(klon))
426      ALLOCATE (sissnow(klon),runoff(klon),albsol3_lic(klon))
427
428
429
430END SUBROUTINE phys_local_var_init
431
432!======================================================================
433SUBROUTINE phys_local_var_end
434USE dimphy
435USE indice_sol_mod
436IMPLICIT NONE
437      deallocate(t_seri,q_seri,ql_seri,qs_seri)
438      deallocate(u_seri,v_seri)
439
440      deallocate(tr_seri)
441      deallocate(d_t_dyn,d_q_dyn)
442      deallocate(d_u_dyn,d_v_dyn)
443      deallocate(d_tr_dyn)                      !RomP
444      deallocate(d_t_con,d_q_con)
445      deallocate(d_u_con,d_v_con)
446      deallocate(d_t_wake,d_q_wake)
447      deallocate(d_t_lsc,d_q_lsc)
448      deallocate(d_ql_lsc)
449      deallocate(d_t_ajsb,d_q_ajsb)
450      deallocate(d_t_ajs,d_q_ajs)
451      deallocate(d_u_ajs,d_v_ajs)
452      deallocate(d_u_ajsb,d_v_ajsb)
453      deallocate(d_t_eva,d_q_eva)
454      deallocate(d_t_lscst,d_q_lscst)
455      deallocate(d_t_lscth,d_q_lscth)
456      deallocate(plul_st,plul_th)
457      deallocate(d_t_vdf,d_q_vdf,d_t_diss)
458      deallocate(d_u_vdf,d_v_vdf)
459      deallocate(d_t_oli,d_t_oro)
460      deallocate(d_u_oli,d_v_oli)
461      deallocate(d_u_oro,d_v_oro)
462      deallocate(d_t_lif,d_t_ec)
463      deallocate(d_u_lif,d_v_lif)
464      deallocate(d_ts, d_tr)
465      deallocate(topswad_aero,solswad_aero)
466      deallocate(topswai_aero,solswai_aero)
467      deallocate(topswad0_aero,solswad0_aero)
468      deallocate(topsw_aero,solsw_aero)
469      deallocate(topsw0_aero,solsw0_aero)
470      deallocate(topswcf_aero,solswcf_aero)
471      deallocate(tausum_aero)
472      deallocate(tau3d_aero)
473      deallocate(scdnc)
474      deallocate(cldncl)
475      deallocate(reffclwtop)
476      deallocate(lcc)
477      deallocate(reffclws)
478      deallocate(reffclwc)
479      deallocate(cldnvi)
480      deallocate(lcc3d)
481      deallocate(lcc3dcon)
482      deallocate(lcc3dstra)
483      deallocate(od550aer)       
484      deallocate(od865aer)
485      deallocate(absvisaer)
486      deallocate(ec550aer)
487      deallocate(od550lt1aer)
488      deallocate(sconcso4)
489      deallocate(sconcoa)
490      deallocate(sconcbc)
491      deallocate(sconcss)
492      deallocate(sconcdust)
493      deallocate(concso4)
494      deallocate(concoa)
495      deallocate(concbc)
496      deallocate(concss)
497      deallocate(concdust)
498      deallocate(loadso4)
499      deallocate(loadoa)
500      deallocate(loadbc)
501      deallocate(loadss)
502      deallocate(loaddust)
503      deallocate(load_tmp1)
504      deallocate(load_tmp2)
505      deallocate(load_tmp3)
506      deallocate(load_tmp4)
507      deallocate(load_tmp5)
508      deallocate(load_tmp6)
509      deallocate(load_tmp7)
510      deallocate(d_u_hin,d_v_hin,d_t_hin)
511
512!IM ajout variables CFMIP2/CMIP5
513      deallocate(topswad_aerop, solswad_aerop)
514      deallocate(topswai_aerop, solswai_aerop)
515      deallocate(topswad0_aerop, solswad0_aerop)
516      deallocate(topsw_aerop, topsw0_aerop)
517      deallocate(solsw_aerop, solsw0_aerop)
518      deallocate(topswcf_aerop, solswcf_aerop)
519
520
521! FH Ajout de celles nécessaires au phys_output_write_mod
522      DEALLOCATE(slp)
523      DEALLOCATE(ale_wake, alp_wake, bils)
524      DEALLOCATE(cdragm, cdragh, cldh, cldl)
525      DEALLOCATE(cldm, cldq, cldt, qsat2m, qsol)
526      DEALLOCATE(dthmin, evap, fder, plcl, plfc)
527      DEALLOCATE(prw, zustar, zu10m, zv10m, rh2m, s_lcl)
528      DEALLOCATE(s_pblh, s_pblt, s_therm)
529      DEALLOCATE(slab_wfbils, tpot, tpote, ue)
530      DEALLOCATE(uq, ve, vq, zxffonte)
531      DEALLOCATE(zxfqcalving, zxfluxlat, zxrugs)
532      DEALLOCATE(zxtsol, snow_lsc, zxfqfonte, zxqsurf)
533      DEALLOCATE(rain_lsc, wake_h, wbeff, zmax_th)
534      DEALLOCATE(zq2m, zt2m, weak_inversion)
535      DEALLOCATE(sens, flwp, fiwp)
536      DEALLOCATE(ale_bl_stat,alp_bl_conv,alp_bl_det)
537      DEALLOCATE(alp_bl_fluct_m,alp_bl_fluct_tke)
538      DEALLOCATE(alp_bl_stat, n2, s2)
539      DEALLOCATE(proba_notrig, random_notrig)
540
541      DEALLOCATE(dnwd, dnwd0)
542!      DEALLOCATE(upwd, omega, coefh)
543      DEALLOCATE(upwd, omega)
544!      DEALLOCATE(coefm, lambda_th, cldemi)
545      DEALLOCATE(lambda_th, cldemi)
546      DEALLOCATE(cldfra, cldtau, fiwc)
547      DEALLOCATE(fl, re, flwc)
548      DEALLOCATE(ref_liq, ref_ice, theta)
549      DEALLOCATE(zphi, wake_omg, zx_rh)
550      DEALLOCATE(pmfd, pmfu)
551
552      DEALLOCATE(t2m, fevap, fluxlat)
553      DEALLOCATE(frugs, agesno, fsollw, evap_pot)
554      DEALLOCATE(fsolsw, wfbils, wfbilo)
555
556      DEALLOCATE(pmflxr, pmflxs, prfl)
557      DEALLOCATE(psfl, fraca, Vprecip)
558      DEALLOCATE(zw2)
559
560      DEALLOCATE(fluxu, fluxv)
561      DEALLOCATE(fluxt)
562
563      DEALLOCATE(uwriteSTD, vwriteSTD)
564      DEALLOCATE(wwriteSTD, phiwriteSTD)
565      DEALLOCATE(qwriteSTD, twriteSTD, rhwriteSTD)
566
567! ug et d'autres encore:
568      DEALLOCATE(wdtrainA, wdtrainM)
569      DEALLOCATE(beta_prec)
570      DEALLOCATE(rneb)
571      DEALLOCATE (zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic)
572
573END SUBROUTINE phys_local_var_end
574
575END MODULE phys_local_var_mod
Note: See TracBrowser for help on using the repository browser.