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

Last change on this file since 2590 was 2574, checked in by fhourdin, 8 years ago

Bug fixing

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