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

Last change on this file since 1809 was 1797, checked in by Ehouarn Millour, 11 years ago

Déplacement de nombreuses variables de physiq.F vers phys_local_var_mod.
UG
................................
Moving of numerous vars from physiq.F to phys_local_var_mod.
UG

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