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

Last change on this file since 2415 was 2385, checked in by musat, 9 years ago

Correction calcul sea level pressure (slp) cf. Arpege-IFS
Ajout initialisation cldfrarad

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