source: dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/phys_local_var_mod.F90 @ 3809

Last change on this file since 3809 was 3809, checked in by ymipsl, 10 years ago

Add LMDZ in aquaplanet configuration
YM

File size: 31.9 KB
Line 
1!
2! $Id: phys_local_var_mod.F90 2243 2015-03-24 13:28:51Z fhourdin $
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(:,:),d_qi_lsc(:,:)
36      !$OMP THREADPRIVATE(d_t_lsc,d_q_lsc,d_ql_lsc,d_qi_lsc)
37      REAL, SAVE, ALLOCATABLE :: d_t_lwr(:,:),d_t_lw0(:,:),d_t_swr(:,:),d_t_sw0(:,:)
38      !$OMP THREADPRIVATE(d_t_lwr,d_t_lw0,d_t_swr,d_t_sw0)
39      REAL, SAVE, ALLOCATABLE :: d_t_ajsb(:,:), d_q_ajsb(:,:)
40      !$OMP THREADPRIVATE(d_t_ajsb, d_q_ajsb)
41      REAL, SAVE, ALLOCATABLE :: d_t_ajs(:,:), d_q_ajs(:,:)
42      !$OMP THREADPRIVATE(d_t_ajs, d_q_ajs)
43      REAL, SAVE, ALLOCATABLE :: d_u_ajs(:,:), d_v_ajs(:,:)
44      !$OMP THREADPRIVATE(d_u_ajs, d_v_ajs)
45!nrlmd<
46      REAL, SAVE, ALLOCATABLE :: d_t_ajs_w(:,:), d_q_ajs_w(:,:)
47      !$OMP THREADPRIVATE(d_t_ajs_w, d_q_ajs_w)
48      REAL, SAVE, ALLOCATABLE :: d_t_ajs_x(:,:), d_q_ajs_x(:,:)
49      !$OMP THREADPRIVATE(d_t_ajs_x, d_q_ajs_x)
50!>nrlmd
51      REAL, SAVE, ALLOCATABLE :: d_t_eva(:,:),d_q_eva(:,:)
52      !$OMP THREADPRIVATE(d_t_eva,d_q_eva)
53      REAL, SAVE, ALLOCATABLE :: d_t_lscst(:,:),d_q_lscst(:,:)
54      !$OMP THREADPRIVATE(d_t_lscst,d_q_lscst)
55      REAL, SAVE, ALLOCATABLE :: d_t_lscth(:,:),d_q_lscth(:,:)
56      !$OMP THREADPRIVATE(d_t_lscth,d_q_lscth)
57      REAL, SAVE, ALLOCATABLE :: plul_th(:),plul_st(:)
58      !$OMP THREADPRIVATE(plul_th,plul_st)
59!tendances dues a oro et lif
60      REAL, SAVE, ALLOCATABLE :: d_t_oli(:,:)
61      !$OMP THREADPRIVATE(d_t_oli)
62      REAL, SAVE, ALLOCATABLE :: d_u_oli(:,:), d_v_oli(:,:)
63      !$OMP THREADPRIVATE(d_u_oli, d_v_oli)
64      REAL, SAVE, ALLOCATABLE :: d_t_vdf(:,:), d_q_vdf(:,:), d_t_diss(:,:)
65      !$OMP THREADPRIVATE( d_t_vdf, d_q_vdf,d_t_diss)
66      REAL, SAVE, ALLOCATABLE :: d_u_vdf(:,:), d_v_vdf(:,:)
67      !$OMP THREADPRIVATE(d_u_vdf, d_v_vdf)
68!nrlmd+jyg<
69      REAL, SAVE, ALLOCATABLE :: d_t_vdf_w(:,:), d_q_vdf_w(:,:)
70      !$OMP THREADPRIVATE( d_t_vdf_w, d_q_vdf_w)
71      REAL, SAVE, ALLOCATABLE :: d_t_vdf_x(:,:), d_q_vdf_x(:,:)
72      !$OMP THREADPRIVATE( d_t_vdf_x, d_q_vdf_x)
73!>nrlmd+jyg
74      REAL, SAVE, ALLOCATABLE :: d_t_oro(:,:)
75      !$OMP THREADPRIVATE(d_t_oro)
76      REAL, SAVE, ALLOCATABLE :: d_u_oro(:,:), d_v_oro(:,:)
77      !$OMP THREADPRIVATE(d_u_oro, d_v_oro)
78      REAL, SAVE, ALLOCATABLE :: d_t_lif(:,:)
79      !$OMP THREADPRIVATE(d_t_lif)
80      REAL, SAVE, ALLOCATABLE :: d_u_lif(:,:), d_v_lif(:,:)
81      !$OMP THREADPRIVATE(d_u_lif, d_v_lif)
82! Tendances Ondes de G non oro (runs strato).
83      REAL, SAVE, ALLOCATABLE :: d_u_hin(:,:)
84      !$OMP THREADPRIVATE(d_u_hin)
85      REAL, SAVE, ALLOCATABLE :: d_v_hin(:,:)
86      !$OMP THREADPRIVATE(d_v_hin)
87      REAL, SAVE, ALLOCATABLE :: d_t_hin(:,:)
88      !$OMP THREADPRIVATE(d_t_hin)
89! tendance due a l'oxydation du methane
90      REAL, SAVE, ALLOCATABLE :: d_q_ch4(:,:)
91      !$OMP THREADPRIVATE(d_q_ch4)
92
93! tendance du a la conersion Ec -> E thermique
94      REAL, SAVE, ALLOCATABLE :: d_t_ec(:,:)
95      !$OMP THREADPRIVATE(d_t_ec)
96      REAL, SAVE, ALLOCATABLE :: d_ts(:,:), d_tr(:,:,:)
97      !$OMP THREADPRIVATE(d_ts, d_tr)
98
99! diagnostique pour le rayonnement
100      REAL, SAVE, ALLOCATABLE :: topswad_aero(:),  solswad_aero(:)      ! diag
101      !$OMP THREADPRIVATE(topswad_aero,solswad_aero)
102      REAL, SAVE, ALLOCATABLE :: topswai_aero(:),  solswai_aero(:)      ! diag
103      !$OMP THREADPRIVATE(topswai_aero,solswai_aero)
104      REAL, SAVE, ALLOCATABLE :: topswad0_aero(:), solswad0_aero(:)     ! diag
105      !$OMP THREADPRIVATE(topswad0_aero,solswad0_aero)
106      REAL, SAVE, ALLOCATABLE :: topsw_aero(:,:),  solsw_aero(:,:)      ! diag
107      !$OMP THREADPRIVATE(topsw_aero,solsw_aero)
108      REAL, SAVE, ALLOCATABLE :: topsw0_aero(:,:), solsw0_aero(:,:)     ! diag
109      !$OMP THREADPRIVATE(topsw0_aero,solsw0_aero)
110      REAL, SAVE, ALLOCATABLE :: topswcf_aero(:,:),  solswcf_aero(:,:)  ! diag
111      !$OMP THREADPRIVATE(topswcf_aero,solswcf_aero)
112! LW radiation diagnostics CK
113      REAL, SAVE, ALLOCATABLE :: toplwad_aero(:),  sollwad_aero(:)      ! diag
114      !$OMP THREADPRIVATE(toplwad_aero,sollwad_aero)
115      REAL, SAVE, ALLOCATABLE :: toplwai_aero(:),  sollwai_aero(:)      ! diag
116      !$OMP THREADPRIVATE(toplwai_aero,sollwai_aero)
117      REAL, SAVE, ALLOCATABLE :: toplwad0_aero(:), sollwad0_aero(:)     ! diag
118      !$OMP THREADPRIVATE(toplwad0_aero,sollwad0_aero)
119! Special RRTM
120      REAL, SAVE, ALLOCATABLE :: ZLWFT0_i(:,:),  ZSWFT0_i(:,:)      ! diag
121      !$OMP THREADPRIVATE(ZLWFT0_i,ZSWFT0_i)
122      REAL, SAVE, ALLOCATABLE :: ZFLDN0(:,:),  ZFLUP0(:,:)      ! diag
123      !$OMP THREADPRIVATE(ZFLDN0,ZFLUP0)
124      REAL, SAVE, ALLOCATABLE :: ZFSDN0(:,:),  ZFSUP0(:,:)      ! diag
125      !$OMP THREADPRIVATE(ZFSDN0,ZFSUP0)
126!
127      REAL, SAVE, ALLOCATABLE :: tausum_aero(:,:,:)
128      !$OMP THREADPRIVATE(tausum_aero)
129      REAL, SAVE, ALLOCATABLE :: tau3d_aero(:,:,:,:)
130      !$OMP THREADPRIVATE(tau3d_aero)
131      REAL, SAVE, ALLOCATABLE :: scdnc(:,:)
132      !$OMP THREADPRIVATE(scdnc)
133      REAL, SAVE, ALLOCATABLE :: cldncl(:)
134      !$OMP THREADPRIVATE(cldncl)
135      REAL, SAVE, ALLOCATABLE :: reffclwtop(:)
136      !$OMP THREADPRIVATE(reffclwtop)
137      REAL, SAVE, ALLOCATABLE :: lcc(:)
138      !$OMP THREADPRIVATE(lcc)
139      REAL, SAVE, ALLOCATABLE :: reffclws(:,:)
140      !$OMP THREADPRIVATE(reffclws)
141      REAL, SAVE, ALLOCATABLE :: reffclwc(:,:)
142      !$OMP THREADPRIVATE(reffclwc)
143      REAL, SAVE, ALLOCATABLE :: cldnvi(:)
144      !$OMP THREADPRIVATE(cldnvi)
145      REAL, SAVE, ALLOCATABLE :: lcc3d(:,:)
146      !$OMP THREADPRIVATE(lcc3d)
147      REAL, SAVE, ALLOCATABLE :: lcc3dcon(:,:)
148      !$OMP THREADPRIVATE(lcc3dcon)
149      REAL, SAVE, ALLOCATABLE :: lcc3dstra(:,:)
150      !$OMP THREADPRIVATE(lcc3dstra)
151      REAL, SAVE, ALLOCATABLE :: od550aer(:)
152      !$OMP THREADPRIVATE(od550aer)
153      REAL, SAVE, ALLOCATABLE :: absvisaer(:)
154      !$OMP THREADPRIVATE(absvisaer)
155      REAL, SAVE, ALLOCATABLE :: od865aer(:)
156      !$OMP THREADPRIVATE(od865aer)
157      REAL, SAVE, ALLOCATABLE :: ec550aer(:,:)
158      !$OMP THREADPRIVATE(ec550aer)
159      REAL, SAVE, ALLOCATABLE :: od550lt1aer(:)
160      !$OMP THREADPRIVATE(od550lt1aer)
161      REAL, SAVE, ALLOCATABLE :: sconcso4(:)
162      !$OMP THREADPRIVATE(sconcso4)
163      REAL, SAVE, ALLOCATABLE :: sconcno3(:)
164      !$OMP THREADPRIVATE(sconcno3)
165      REAL, SAVE, ALLOCATABLE :: sconcoa(:)
166      !$OMP THREADPRIVATE(sconcoa)
167      REAL, SAVE, ALLOCATABLE :: sconcbc(:)
168      !$OMP THREADPRIVATE(sconcbc)
169      REAL, SAVE, ALLOCATABLE :: sconcss(:)
170      !$OMP THREADPRIVATE(sconcss)
171      REAL, SAVE, ALLOCATABLE :: sconcdust(:)
172      !$OMP THREADPRIVATE(sconcdust)
173      REAL, SAVE, ALLOCATABLE :: concso4(:,:)
174      !$OMP THREADPRIVATE(concso4)
175      REAL, SAVE, ALLOCATABLE :: concno3(:,:)
176      !$OMP THREADPRIVATE(concno3)
177      REAL, SAVE, ALLOCATABLE :: concoa(:,:)
178      !$OMP THREADPRIVATE(concoa)
179      REAL, SAVE, ALLOCATABLE :: concbc(:,:)
180      !$OMP THREADPRIVATE(concbc)
181      REAL, SAVE, ALLOCATABLE :: concss(:,:)
182      !$OMP THREADPRIVATE(concss)
183      REAL, SAVE, ALLOCATABLE :: concdust(:,:)
184      !$OMP THREADPRIVATE(concdust)
185      REAL, SAVE, ALLOCATABLE :: loadso4(:)
186      !$OMP THREADPRIVATE(loadso4)
187      REAL, SAVE, ALLOCATABLE :: loadoa(:)
188      !$OMP THREADPRIVATE(loadoa)
189      REAL, SAVE, ALLOCATABLE :: loadbc(:)
190      !$OMP THREADPRIVATE(loadbc)
191      REAL, SAVE, ALLOCATABLE :: loadss(:)
192      !$OMP THREADPRIVATE(loadss)
193      REAL, SAVE, ALLOCATABLE :: loaddust(:)
194      !$OMP THREADPRIVATE(loaddust)
195      REAL, SAVE, ALLOCATABLE :: load_tmp1(:)
196      !$OMP THREADPRIVATE(load_tmp1)
197      REAL, SAVE, ALLOCATABLE :: load_tmp2(:)
198      !$OMP THREADPRIVATE(load_tmp2)
199      REAL, SAVE, ALLOCATABLE :: load_tmp3(:)
200      !$OMP THREADPRIVATE(load_tmp3)
201      REAL, SAVE, ALLOCATABLE :: load_tmp4(:)
202      !$OMP THREADPRIVATE(load_tmp4)
203      REAL, SAVE, ALLOCATABLE :: load_tmp5(:)
204      !$OMP THREADPRIVATE(load_tmp5)
205      REAL, SAVE, ALLOCATABLE :: load_tmp6(:)
206      !$OMP THREADPRIVATE(load_tmp6)
207      REAL, SAVE, ALLOCATABLE :: load_tmp7(:)
208      !$OMP THREADPRIVATE(load_tmp7)
209
210!IM ajout variables CFMIP2/CMIP5
211      REAL,ALLOCATABLE,SAVE :: topswad_aerop(:), solswad_aerop(:)
212!$OMP THREADPRIVATE(topswad_aerop, solswad_aerop)
213      REAL,ALLOCATABLE,SAVE :: topswai_aerop(:), solswai_aerop(:)
214!$OMP THREADPRIVATE(topswai_aerop, solswai_aerop)
215      REAL,ALLOCATABLE,SAVE :: topswad0_aerop(:), solswad0_aerop(:)
216!$OMP THREADPRIVATE(topswad0_aerop, solswad0_aerop)
217      REAL,ALLOCATABLE,SAVE :: topsw_aerop(:,:), topsw0_aerop(:,:) 
218!$OMP THREADPRIVATE(topsw_aerop, topsw0_aerop)
219      REAL,ALLOCATABLE,SAVE :: solsw_aerop(:,:), solsw0_aerop(:,:)
220!$OMP THREADPRIVATE(solsw_aerop, solsw0_aerop)
221      REAL,ALLOCATABLE,SAVE :: topswcf_aerop(:,:), solswcf_aerop(:,:)
222!$OMP THREADPRIVATE(topswcf_aerop, solswcf_aerop)
223
224! additional LW variables CK
225      REAL,ALLOCATABLE,SAVE :: toplwad_aerop(:), sollwad_aerop(:)
226!$OMP THREADPRIVATE(toplwad_aerop, sollwad_aerop)
227      REAL,ALLOCATABLE,SAVE :: toplwai_aerop(:), sollwai_aerop(:)
228!$OMP THREADPRIVATE(toplwai_aerop, sollwai_aerop)
229      REAL,ALLOCATABLE,SAVE :: toplwad0_aerop(:), sollwad0_aerop(:)
230!$OMP THREADPRIVATE(toplwad0_aerop, sollwad0_aerop)
231
232!Ajout de celles nécessaires au phys_output_write_mod
233      REAL, SAVE, ALLOCATABLE :: slp(:)
234!$OMP THREADPRIVATE(slp)
235      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sens, flwp, fiwp
236!$OMP THREADPRIVATE(sens, flwp, fiwp)
237      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: ale_wake, alp_wake, bils
238!$OMP THREADPRIVATE(ale_wake, alp_wake, bils)
239      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragm, cdragh
240!$OMP THREADPRIVATE(cdragm, cdragh)
241      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cldh, cldl, cldm, cldq, cldt, qsat2m
242!$OMP THREADPRIVATE(cldh, cldl, cldm, cldq, cldt, qsat2m )
243      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cldhjn, cldljn, cldmjn,cldtjn
244!$OMP THREADPRIVATE(cldhjn, cldljn, cldmjn, cldtjn)
245      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: JrNt
246!$OMP THREADPRIVATE(JrNt)
247      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: dthmin, evap, fder, plcl, plfc, prw
248!$OMP THREADPRIVATE(dthmin, evap, fder, plcl, plfc, prw)
249      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zustar, zu10m, zv10m, rh2m
250!$OMP THREADPRIVATE(zustar, zu10m, zv10m, rh2m)
251      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_lcl, s_pblh, s_pblt, s_therm
252!$OMP THREADPRIVATE(s_lcl, s_pblh, s_pblt, s_therm)
253!
254!nrlmd+jyg<
255      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_pblh_x, s_pblh_w
256!$OMP THREADPRIVATE(s_pblh_x, s_pblh_w)
257      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_lcl_x, s_lcl_w
258!$OMP THREADPRIVATE(s_lcl_x, s_lcl_w)
259!>nrlmd+jyg
260!
261      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: slab_wfbils
262!$OMP THREADPRIVATE(slab_wfbils)
263      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: tpot, tpote, ue, uq, ve, vq, zxffonte
264!$OMP THREADPRIVATE(tpot, tpote, ue, uq, ve, vq, zxffonte)
265      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfqcalving
266!$OMP THREADPRIVATE(zxfqcalving)
267      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat, zxtsol, snow_lsc, zxfqfonte
268!$OMP THREADPRIVATE(zxfluxlat, zxtsol, snow_lsc, zxfqfonte)
269      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxqsurf, rain_lsc
270!$OMP THREADPRIVATE(zxqsurf, rain_lsc)
271!
272!jyg+nrlmd<
273!!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
274!                                                                          c
275!       Declarations liees a la couche limite differentiee w-x             c
276!                                                                          c
277!!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
278      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sens_x, sens_w
279!$OMP THREADPRIVATE(sens_x, sens_w)
280      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat_x, zxfluxlat_w
281!$OMP THREADPRIVATE(zxfluxlat_x, zxfluxlat_w)
282!jyg<
283!!! Entrées supplémentaires couche-limite
284!!      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: t_x, t_w
285!!!$OMP THREADPRIVATE(t_x, t_w)
286!!      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: q_x, q_w
287!!!$OMP THREADPRIVATE(q_x, q_w)
288!>jyg
289!!! Sorties ferret
290      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dtvdf_x, dtvdf_w
291!$OMP THREADPRIVATE(dtvdf_x, dtvdf_w)
292      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dqvdf_x, dqvdf_w
293!$OMP THREADPRIVATE(dqvdf_x, dqvdf_w)
294      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: undi_tke, wake_tke
295!$OMP THREADPRIVATE(undi_tke, wake_tke)
296! Variables supplémentaires dans physiq.F relative au splitting de la surface
297      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: pbl_tke_input
298!$OMP THREADPRIVATE(pbl_tke_input)
299! Entree supplementaire Thermiques :
300      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: t_therm, q_therm
301!$OMP THREADPRIVATE(t_therm, q_therm)
302      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragh_x, cdragh_w
303!$OMP THREADPRIVATE(cdragh_x, cdragh_w)
304      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragm_x, cdragm_w
305!$OMP THREADPRIVATE(cdragm_x, cdragm_w)
306      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: kh, kh_x, kh_w
307!$OMP THREADPRIVATE(kh, kh_x, kh_w)
308!!!
309!!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
310!>jyg+nrlmd
311  !
312      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wake_h, wbeff, zmax_th, zq2m, zt2m
313!$OMP THREADPRIVATE(wake_h, wbeff, zmax_th, zq2m, zt2m)
314      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zt2m_min_mon, zt2m_max_mon
315!$OMP THREADPRIVATE(zt2m_min_mon, zt2m_max_mon)
316      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: t2m_min_mon, t2m_max_mon
317!$OMP THREADPRIVATE(t2m_min_mon, t2m_max_mon)
318      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: weak_inversion
319!$OMP THREADPRIVATE(weak_inversion)
320      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: ale_bl_stat,alp_bl_conv,alp_bl_det
321!$OMP THREADPRIVATE(ale_bl_stat,alp_bl_conv,alp_bl_det)
322      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_fluct_m,alp_bl_fluct_tke
323!$OMP THREADPRIVATE(alp_bl_fluct_m,alp_bl_fluct_tke)
324      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_stat, n2, s2
325!$OMP THREADPRIVATE(alp_bl_stat, n2, s2)
326      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: proba_notrig, random_notrig
327!$OMP THREADPRIVATE(proba_notrig, random_notrig)
328      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: fsolsw, wfbils, wfbilo
329!$OMP THREADPRIVATE(fsolsw, wfbils, wfbilo)
330      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: t2m, fluxlat, fsollw,evap_pot
331!$OMP THREADPRIVATE(t2m, fluxlat, fsollw,evap_pot)
332      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dnwd, dnwd0, upwd, omega
333!$OMP THREADPRIVATE(dnwd, dnwd0, upwd, omega)
334!      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: coefh, coefm, lambda_th
335      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: lambda_th
336!$OMP THREADPRIVATE(lambda_th)
337      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: cldemi, cldfra, cldtau, fiwc, fl, re, flwc
338!$OMP THREADPRIVATE(cldemi, cldfra, cldtau, fiwc, fl, re, flwc)
339      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ref_liq, ref_ice, theta, zphi
340!$OMP THREADPRIVATE(ref_liq, ref_ice, theta, zphi)
341      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ref_liq_pi, ref_ice_pi
342!$OMP THREADPRIVATE(ref_liq_pi, ref_ice_pi)
343      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: wake_omg, zx_rh
344!$OMP THREADPRIVATE(wake_omg, zx_rh)
345      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: pmflxr, pmflxs, prfl, psfl, fraca
346!$OMP THREADPRIVATE(pmflxr, pmflxs, prfl, psfl, fraca)
347      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: Vprecip, zw2
348!$OMP THREADPRIVATE(Vprecip, zw2)
349      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: pmfd, pmfu
350!$OMP THREADPRIVATE(pmfd, pmfu)
351      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: fluxt, fluxu, fluxv
352!$OMP THREADPRIVATE(fluxt, fluxu, fluxv)
353      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: uwriteSTD, vwriteSTD, wwriteSTD
354!$OMP THREADPRIVATE(uwriteSTD, vwriteSTD, wwriteSTD)
355      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD
356!$OMP THREADPRIVATE(phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD)
357
358! ug et d'autres encore:
359      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: wdtrainA, wdtrainM
360!$OMP THREADPRIVATE(wdtrainA, wdtrainM)
361      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: beta_prec
362!$OMP THREADPRIVATE(beta_prec)
363      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rneb,rnebjn
364!$OMP THREADPRIVATE(rneb,rnebjn)
365
366! variables de sorties MM
367      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxsnow,snowhgt,qsnow,to_ice
368      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sissnow,runoff,albsol3_lic
369!$OMP THREADPRIVATE(zxsnow,snowhgt,qsnow,to_ice)
370!$OMP THREADPRIVATE(sissnow,runoff,albsol3_lic)
371
372CONTAINS
373
374!======================================================================
375SUBROUTINE phys_local_var_init
376USE dimphy
377USE infotrac, ONLY : nbtr
378USE aero_mod
379USE indice_sol_mod
380USE phys_output_var_mod
381USE phys_state_var_mod
382
383IMPLICIT NONE
384      allocate(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev))
385      allocate(u_seri(klon,klev),v_seri(klon,klev))
386
387      allocate(tr_seri(klon,klev,nbtr))
388      allocate(d_t_dyn(klon,klev),d_q_dyn(klon,klev))
389      allocate(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
390      allocate(d_tr_dyn(klon,klev,nbtr))                   !RomP
391      allocate(d_t_con(klon,klev),d_q_con(klon,klev))
392      allocate(d_u_con(klon,klev),d_v_con(klon,klev))
393      allocate(d_t_wake(klon,klev),d_q_wake(klon,klev))
394      allocate(d_t_lsc(klon,klev),d_q_lsc(klon,klev))
395      allocate(d_t_lwr(klon,klev),d_t_lw0(klon,klev))
396      allocate(d_t_swr(klon,klev),d_t_sw0(klon,klev))
397      allocate(d_ql_lsc(klon,klev),d_qi_lsc(klon,klev))
398      allocate(d_t_ajsb(klon,klev),d_q_ajsb(klon,klev))
399      allocate(d_t_ajs(klon,klev),d_q_ajs(klon,klev))
400!nrlmd<
401      allocate(d_t_ajs_w(klon,klev),d_q_ajs_w(klon,klev))
402      allocate(d_t_ajs_x(klon,klev),d_q_ajs_x(klon,klev))
403!>nrlmd
404      allocate(d_u_ajs(klon,klev),d_v_ajs(klon,klev))
405      allocate(d_t_eva(klon,klev),d_q_eva(klon,klev))
406      allocate(d_t_lscst(klon,klev),d_q_lscst(klon,klev))
407      allocate(d_t_lscth(klon,klev),d_q_lscth(klon,klev))
408      allocate(plul_st(klon),plul_th(klon))
409      allocate(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))
410!nrlmd+jyg<
411      allocate(d_t_vdf_w(klon,klev),d_q_vdf_w(klon,klev))
412      allocate(d_t_vdf_x(klon,klev),d_q_vdf_x(klon,klev))
413!>nrlmd+jyg
414      allocate(d_u_vdf(klon,klev),d_v_vdf(klon,klev))
415      allocate(d_t_oli(klon,klev),d_t_oro(klon,klev))
416      allocate(d_u_oli(klon,klev),d_v_oli(klon,klev))
417      allocate(d_u_oro(klon,klev),d_v_oro(klon,klev))
418      allocate(d_t_lif(klon,klev),d_t_ec(klon,klev))
419      allocate(d_u_lif(klon,klev),d_v_lif(klon,klev))
420      allocate(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr))
421! Special RRTM
422      allocate(ZLWFT0_i(klon,klev+1),ZSWFT0_i(klon,klev+1),ZFLDN0(klon,klev+1))
423      allocate(ZFLUP0(klon,klev+1),ZFSDN0(klon,klev+1),ZFSUP0(klon,klev+1))
424!
425      allocate(topswad_aero(klon), solswad_aero(klon))
426      allocate(topswai_aero(klon), solswai_aero(klon))
427      allocate(topswad0_aero(klon), solswad0_aero(klon))
428     ! LW diagnostics CK
429      allocate(toplwad_aero(klon), sollwad_aero(klon))
430      allocate(toplwai_aero(klon), sollwai_aero(klon))
431      allocate(toplwad0_aero(klon), sollwad0_aero(klon))
432      ! end
433      allocate(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp))
434      allocate(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp))
435      allocate(topswcf_aero(klon,3), solswcf_aero(klon,3))
436      allocate(d_u_hin(klon,klev),d_v_hin(klon,klev),d_t_hin(klon,klev))
437      allocate(d_q_ch4(klon,klev))
438!      allocate(tausum_aero(klon,nwave,naero_spc))
439!      allocate(tau3d_aero(klon,klev,nwave,naero_spc))
440!--correction mini bug OB
441      allocate(tausum_aero(klon,nwave,naero_tot))
442      allocate(tau3d_aero(klon,klev,nwave,naero_tot))
443      allocate(scdnc(klon, klev))
444      allocate(cldncl(klon))
445      allocate(reffclwtop(klon))
446      allocate(lcc(klon))
447      allocate(reffclws(klon, klev))
448      allocate(reffclwc(klon, klev))
449      allocate(cldnvi(klon))
450      allocate(lcc3d(klon, klev))
451      allocate(lcc3dcon(klon, klev))
452      allocate(lcc3dstra(klon, klev))
453      allocate(od550aer(klon))
454      allocate(od865aer(klon))
455      allocate(absvisaer(klon))
456      allocate(ec550aer(klon,klev))
457      allocate(od550lt1aer(klon))
458      allocate(sconcso4(klon))
459      allocate(sconcno3(klon))
460      allocate(sconcoa(klon))
461      allocate(sconcbc(klon))
462      allocate(sconcss(klon))
463      allocate(sconcdust(klon))
464      allocate(concso4(klon,klev))
465      allocate(concno3(klon,klev))
466      allocate(concoa(klon,klev))
467      allocate(concbc(klon,klev))
468      allocate(concss(klon,klev))
469      allocate(concdust(klon,klev))
470      allocate(loadso4(klon))
471      allocate(loadoa(klon))
472      allocate(loadbc(klon))
473      allocate(loadss(klon))
474      allocate(loaddust(klon))
475      allocate(load_tmp1(klon))
476      allocate(load_tmp2(klon))
477      allocate(load_tmp3(klon))
478      allocate(load_tmp4(klon))
479      allocate(load_tmp5(klon))
480      allocate(load_tmp6(klon))
481      allocate(load_tmp7(klon))
482
483!IM ajout variables CFMIP2/CMIP5
484      ALLOCATE(topswad_aerop(klon), solswad_aerop(klon))
485      ALLOCATE(topswai_aerop(klon), solswai_aerop(klon))
486      ALLOCATE(topswad0_aerop(klon), solswad0_aerop(klon))
487      ALLOCATE(topsw_aerop(klon,naero_grp), topsw0_aerop(klon,naero_grp))
488      ALLOCATE(solsw_aerop(klon,naero_grp), solsw0_aerop(klon,naero_grp))
489      ALLOCATE(topswcf_aerop(klon,naero_grp), solswcf_aerop(klon,naero_grp))
490
491! additional LW variables CK
492      ALLOCATE(toplwad_aerop(klon), sollwad_aerop(klon))
493      ALLOCATE(toplwai_aerop(klon), sollwai_aerop(klon))
494      ALLOCATE(toplwad0_aerop(klon), sollwad0_aerop(klon))
495
496! FH Ajout de celles nécessaires au phys_output_write_mod
497
498      ALLOCATE(slp(klon))
499      ALLOCATE(ale_wake(klon), alp_wake(klon), bils(klon))
500      ALLOCATE(cdragm(klon), cdragh(klon), cldh(klon), cldl(klon))
501      ALLOCATE(cldm(klon), cldq(klon), cldt(klon), qsat2m(klon))
502      ALLOCATE(cldhjn(klon), cldljn(klon), cldmjn(klon), cldtjn(klon))
503      ALLOCATE(JrNt(klon))
504      ALLOCATE(dthmin(klon), evap(klon), fder(klon), plcl(klon), plfc(klon))
505      ALLOCATE(prw(klon), zustar(klon), zu10m(klon), zv10m(klon), rh2m(klon))
506      ALLOCATE(s_lcl(klon))
507      ALLOCATE(s_pblh(klon), s_pblt(klon), s_therm(klon))
508!
509!nrlmd+jyg<
510      ALLOCATE(s_pblh_x(klon), s_pblh_w(klon))
511      ALLOCATE(s_lcl_x(klon), s_lcl_w(klon))
512!>nrlmd+jyg
513!
514      ALLOCATE(slab_wfbils(klon), tpot(klon), tpote(klon), ue(klon))
515      ALLOCATE(uq(klon), ve(klon), vq(klon), zxffonte(klon))
516      ALLOCATE(zxfqcalving(klon), zxfluxlat(klon))
517      ALLOCATE(zxtsol(klon), snow_lsc(klon), zxfqfonte(klon), zxqsurf(klon))
518      ALLOCATE(rain_lsc(klon))
519!
520      ALLOCATE(sens_x(klon), sens_w(klon))
521      ALLOCATE(zxfluxlat_x(klon), zxfluxlat_w(klon))
522!jyg<
523!!      ALLOCATE(t_x(klon,klev), t_w(klon,klev))
524!!      ALLOCATE(q_x(klon,klev), q_w(klon,klev))
525!>jyg
526      ALLOCATE(dtvdf_x(klon,klev), dtvdf_w(klon,klev))
527      ALLOCATE(dqvdf_x(klon,klev), dqvdf_w(klon,klev))
528      ALLOCATE(undi_tke(klon,klev), wake_tke(klon,klev))
529      ALLOCATE(pbl_tke_input(klon,klev+1,nbsrf))
530      ALLOCATE(t_therm(klon,klev), q_therm(klon,klev))
531      ALLOCATE(cdragh_x(klon), cdragh_w(klon))
532      ALLOCATE(cdragm_x(klon), cdragm_w(klon))
533      ALLOCATE(kh(klon), kh_x(klon), kh_w(klon))
534!
535      ALLOCATE(wake_h(klon), wbeff(klon), zmax_th(klon))
536      ALLOCATE(zq2m(klon), zt2m(klon), weak_inversion(klon))
537      ALLOCATE(zt2m_min_mon(klon), zt2m_max_mon(klon))
538      ALLOCATE(t2m_min_mon(klon), t2m_max_mon(klon))
539      ALLOCATE(sens(klon), flwp(klon), fiwp(klon))
540      ALLOCATE(ale_bl_stat(klon), alp_bl_conv(klon), alp_bl_det(klon))
541      ALLOCATE(alp_bl_fluct_m(klon), alp_bl_fluct_tke(klon))
542      ALLOCATE(alp_bl_stat(klon), n2(klon), s2(klon))
543      ALLOCATE(proba_notrig(klon), random_notrig(klon))
544
545      ALLOCATE(dnwd(klon, klev), dnwd0(klon, klev))
546!      ALLOCATE(upwd(klon, klev), omega(klon, klev), coefh(klon, klev))
547      ALLOCATE(upwd(klon, klev), omega(klon, klev))
548!      ALLOCATE(coefm(klon, klev), lambda_th(klon, klev), cldemi(klon, klev))
549      ALLOCATE(lambda_th(klon, klev), cldemi(klon, klev))
550      ALLOCATE(cldfra(klon, klev), cldtau(klon, klev), fiwc(klon, klev))
551      ALLOCATE(fl(klon, klev), re(klon, klev), flwc(klon, klev))
552      ALLOCATE(ref_liq(klon, klev), ref_ice(klon, klev), theta(klon, klev))
553      ALLOCATE(ref_liq_pi(klon, klev), ref_ice_pi(klon, klev))
554      ALLOCATE(zphi(klon, klev), wake_omg(klon, klev), zx_rh(klon, klev))
555      ALLOCATE(pmfd(klon, klev), pmfu(klon, klev))
556
557      ALLOCATE(t2m(klon, nbsrf), fluxlat(klon, nbsrf))
558      ALLOCATE(fsollw(klon, nbsrf))
559      ALLOCATE(fsolsw(klon, nbsrf), wfbils(klon, nbsrf), wfbilo(klon, nbsrf))
560      ALLOCATE(evap_pot(klon, nbsrf))
561
562      ALLOCATE(pmflxr(klon, klev+1), pmflxs(klon, klev+1), prfl(klon, klev+1))
563      ALLOCATE(psfl(klon, klev+1), fraca(klon, klev+1), Vprecip(klon, klev+1))
564      ALLOCATE(zw2(klon, klev+1))
565
566      ALLOCATE(fluxu(klon, klev, nbsrf), fluxv(klon, klev, nbsrf))
567      ALLOCATE(fluxt(klon, klev, nbsrf))
568
569      ALLOCATE(uwriteSTD(klon,nlevSTD,nfiles), vwriteSTD(klon,nlevSTD,nfiles))
570      ALLOCATE(wwriteSTD(klon,nlevSTD,nfiles), phiwriteSTD(klon,nlevSTD,nfiles))
571      ALLOCATE(qwriteSTD(klon,nlevSTD,nfiles), twriteSTD(klon,nlevSTD,nfiles))
572      ALLOCATE(rhwriteSTD(klon,nlevSTD,nfiles))
573
574! ug et d'autres encore:
575      ALLOCATE(wdtrainA(klon,klev),wdtrainM(klon,klev))
576      ALLOCATE(beta_prec(klon,klev))
577      ALLOCATE(rneb(klon,klev),rnebjn(klon,klev))
578
579
580      ALLOCATE (zxsnow(klon),snowhgt(klon),qsnow(klon),to_ice(klon))
581      ALLOCATE (sissnow(klon),runoff(klon),albsol3_lic(klon))
582
583
584
585END SUBROUTINE phys_local_var_init
586
587!======================================================================
588SUBROUTINE phys_local_var_end
589USE dimphy
590USE indice_sol_mod
591IMPLICIT NONE
592      deallocate(t_seri,q_seri,ql_seri,qs_seri)
593      deallocate(u_seri,v_seri)
594
595      deallocate(tr_seri)
596      deallocate(d_t_dyn,d_q_dyn)
597      deallocate(d_u_dyn,d_v_dyn)
598      deallocate(d_tr_dyn)                      !RomP
599      deallocate(d_t_con,d_q_con)
600      deallocate(d_u_con,d_v_con)
601      deallocate(d_t_wake,d_q_wake)
602      deallocate(d_t_lsc,d_q_lsc)
603      deallocate(d_t_lwr,d_t_lw0)
604      deallocate(d_t_swr,d_t_sw0)
605      deallocate(d_ql_lsc,d_qi_lsc)
606      deallocate(d_t_ajsb,d_q_ajsb)
607      deallocate(d_t_ajs,d_q_ajs)
608!nrlmd<
609      deallocate(d_t_ajs_w,d_q_ajs_w)
610      deallocate(d_t_ajs_x,d_q_ajs_x)
611!>nrlmd
612      deallocate(d_u_ajs,d_v_ajs)
613      deallocate(d_t_eva,d_q_eva)
614      deallocate(d_t_lscst,d_q_lscst)
615      deallocate(d_t_lscth,d_q_lscth)
616      deallocate(plul_st,plul_th)
617      deallocate(d_t_vdf,d_q_vdf,d_t_diss)
618!nrlmd+jyg<
619      deallocate(d_t_vdf_w,d_q_vdf_w)
620      deallocate(d_t_vdf_x,d_q_vdf_x)
621!>nrlmd+jyg
622      deallocate(d_u_vdf,d_v_vdf)
623      deallocate(d_t_oli,d_t_oro)
624      deallocate(d_u_oli,d_v_oli)
625      deallocate(d_u_oro,d_v_oro)
626      deallocate(d_t_lif,d_t_ec)
627      deallocate(d_u_lif,d_v_lif)
628      deallocate(d_ts, d_tr)
629      deallocate(topswad_aero,solswad_aero)
630      deallocate(topswai_aero,solswai_aero)
631      deallocate(topswad0_aero,solswad0_aero)
632      ! LW additional CK
633      deallocate(toplwad_aero,sollwad_aero)
634      deallocate(toplwai_aero,sollwai_aero)
635      deallocate(toplwad0_aero,sollwad0_aero)
636      ! end
637      deallocate(topsw_aero,solsw_aero)
638      deallocate(topsw0_aero,solsw0_aero)
639      deallocate(topswcf_aero,solswcf_aero)
640      deallocate(tausum_aero)
641      deallocate(tau3d_aero)
642      deallocate(scdnc)
643      deallocate(cldncl)
644      deallocate(reffclwtop)
645      deallocate(lcc)
646      deallocate(reffclws)
647      deallocate(reffclwc)
648      deallocate(cldnvi)
649      deallocate(lcc3d)
650      deallocate(lcc3dcon)
651      deallocate(lcc3dstra)
652      deallocate(od550aer)
653      deallocate(od865aer)
654      deallocate(absvisaer)
655      deallocate(ec550aer)
656      deallocate(od550lt1aer)
657      deallocate(sconcso4)
658      deallocate(sconcno3)
659      deallocate(sconcoa)
660      deallocate(sconcbc)
661      deallocate(sconcss)
662      deallocate(sconcdust)
663      deallocate(concso4)
664      deallocate(concno3)
665      deallocate(concoa)
666      deallocate(concbc)
667      deallocate(concss)
668      deallocate(concdust)
669      deallocate(loadso4)
670      deallocate(loadoa)
671      deallocate(loadbc)
672      deallocate(loadss)
673      deallocate(loaddust)
674      deallocate(load_tmp1)
675      deallocate(load_tmp2)
676      deallocate(load_tmp3)
677      deallocate(load_tmp4)
678      deallocate(load_tmp5)
679      deallocate(load_tmp6)
680      deallocate(load_tmp7)
681      deallocate(d_u_hin,d_v_hin,d_t_hin)
682      deallocate(d_q_ch4)
683
684!IM ajout variables CFMIP2/CMIP5
685      deallocate(topswad_aerop, solswad_aerop)
686      deallocate(topswai_aerop, solswai_aerop)
687      deallocate(topswad0_aerop, solswad0_aerop)
688      deallocate(topsw_aerop, topsw0_aerop)
689      deallocate(solsw_aerop, solsw0_aerop)
690      deallocate(topswcf_aerop, solswcf_aerop)
691
692!CK LW diagnostics
693      deallocate(toplwad_aerop, sollwad_aerop)
694      deallocate(toplwai_aerop, sollwai_aerop)
695      deallocate(toplwad0_aerop, sollwad0_aerop)
696
697! FH Ajout de celles nécessaires au phys_output_write_mod
698      DEALLOCATE(slp)
699      DEALLOCATE(ale_wake, alp_wake, bils)
700      DEALLOCATE(cdragm, cdragh, cldh, cldl)
701      DEALLOCATE(cldm, cldq, cldt, qsat2m)
702      DEALLOCATE(cldljn, cldmjn, cldhjn, cldtjn, JrNt)
703      DEALLOCATE(dthmin, evap, fder, plcl, plfc)
704      DEALLOCATE(prw, zustar, zu10m, zv10m, rh2m, s_lcl)
705      DEALLOCATE(s_pblh, s_pblt, s_therm)
706!
707!nrlmd+jyg<
708      DEALLOCATE(s_pblh_x, s_pblh_w)
709      DEALLOCATE(s_lcl_x, s_lcl_w)
710!>nrlmd+jyg
711!
712      DEALLOCATE(slab_wfbils, tpot, tpote, ue)
713      DEALLOCATE(uq, ve, vq, zxffonte)
714      DEALLOCATE(zxfqcalving, zxfluxlat)
715      DEALLOCATE(zxtsol, snow_lsc, zxfqfonte, zxqsurf)
716      DEALLOCATE(rain_lsc)
717!
718      DEALLOCATE(sens_x, sens_w)
719      DEALLOCATE(zxfluxlat_x, zxfluxlat_w)
720!jyg<
721!!      DEALLOCATE(t_x, t_w)
722!!      DEALLOCATE(q_x, q_w)
723!>jyg
724      DEALLOCATE(dtvdf_x, dtvdf_w)
725      DEALLOCATE(dqvdf_x, dqvdf_w)
726      DEALLOCATE(undi_tke, wake_tke)
727      DEALLOCATE(pbl_tke_input)
728      DEALLOCATE(t_therm, q_therm)
729      DEALLOCATE(cdragh_x, cdragh_w)
730      DEALLOCATE(cdragm_x, cdragm_w)
731      DEALLOCATE(kh, kh_x, kh_w)
732!
733      DEALLOCATE(wake_h, wbeff, zmax_th)
734      DEALLOCATE(zq2m, zt2m, weak_inversion)
735      DEALLOCATE(zt2m_min_mon, zt2m_max_mon)
736      DEALLOCATE(t2m_min_mon, t2m_max_mon)
737      DEALLOCATE(sens, flwp, fiwp)
738      DEALLOCATE(ale_bl_stat,alp_bl_conv,alp_bl_det)
739      DEALLOCATE(alp_bl_fluct_m,alp_bl_fluct_tke)
740      DEALLOCATE(alp_bl_stat, n2, s2)
741      DEALLOCATE(proba_notrig, random_notrig)
742
743      DEALLOCATE(dnwd, dnwd0)
744!      DEALLOCATE(upwd, omega, coefh)
745      DEALLOCATE(upwd, omega)
746!      DEALLOCATE(coefm, lambda_th, cldemi)
747      DEALLOCATE(lambda_th, cldemi)
748      DEALLOCATE(cldfra, cldtau, fiwc)
749      DEALLOCATE(fl, re, flwc)
750      DEALLOCATE(ref_liq, ref_ice, theta)
751      DEALLOCATE(ref_liq_pi, ref_ice_pi)
752      DEALLOCATE(zphi, wake_omg, zx_rh)
753      DEALLOCATE(pmfd, pmfu)
754
755      DEALLOCATE(t2m, fluxlat)
756      DEALLOCATE(fsollw, evap_pot)
757      DEALLOCATE(fsolsw, wfbils, wfbilo)
758
759      DEALLOCATE(pmflxr, pmflxs, prfl)
760      DEALLOCATE(psfl, fraca, Vprecip)
761      DEALLOCATE(zw2)
762
763      DEALLOCATE(fluxu, fluxv)
764      DEALLOCATE(fluxt)
765
766      DEALLOCATE(uwriteSTD, vwriteSTD)
767      DEALLOCATE(wwriteSTD, phiwriteSTD)
768      DEALLOCATE(qwriteSTD, twriteSTD, rhwriteSTD)
769
770! ug et d'autres encore:
771      DEALLOCATE(wdtrainA, wdtrainM)
772      DEALLOCATE(beta_prec)
773      DEALLOCATE(rneb)
774      DEALLOCATE (zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic)
775
776END SUBROUTINE phys_local_var_end
777
778END MODULE phys_local_var_mod
Note: See TracBrowser for help on using the repository browser.