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

Last change on this file since 2159 was 2159, checked in by jyg, 10 years ago

1/ Splitting of the boundary layer : the climbing down and up of Pbl_surface is
split between the off-wake and wake regions ; the thermal scheme is applied
only to the off-wake region.
2/ Elimination of wake_scal and calwake_scal.

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