source: LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90 @ 5486

Last change on this file since 5486 was 5486, checked in by evignon, 20 hours ago

inclusion d'un diagnostique de la sublimation de la glace sur les landice
pour la conservation de l'eau

  • 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 Id
File size: 70.5 KB
RevLine 
[1279]1!
2! $Id: phys_local_var_mod.F90 5486 2025-01-17 14:38:37Z evignon $
3!
[904]4      MODULE phys_local_var_mod
[5252]5            USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER
[904]6! Variables locales pour effectuer les appels en serie
7!======================================================================
8!
9!
10!======================================================================
11! Declaration des variables
12
[987]13      REAL, SAVE, ALLOCATABLE :: t_seri(:,:), q_seri(:,:)
14      !$OMP THREADPRIVATE(t_seri, q_seri)
15      REAL, SAVE, ALLOCATABLE :: ql_seri(:,:),qs_seri(:,:)
16      !$OMP THREADPRIVATE(ql_seri,qs_seri)
[5056]17! SN 15/07/2024 ISO 4D
18      REAL, SAVE, ALLOCATABLE :: qx_seri(:,:,:)
19      !$OMP THREADPRIVATE(qx_seri)
20! SN
[4523]21      REAL, SAVE, ALLOCATABLE :: qbs_seri(:,:)
22      !$OMP THREADPRIVATE(qbs_seri)
[987]23      REAL, SAVE, ALLOCATABLE :: u_seri(:,:), v_seri(:,:)
24      !$OMP THREADPRIVATE(u_seri, v_seri)
[5204]25      REAL, SAVE, ALLOCATABLE :: cf_seri(:,:), rvc_seri(:,:)
26      !$OMP THREADPRIVATE(cf_seri, rvc_seri)
[4881]27      REAL, SAVE, ALLOCATABLE :: l_mixmin(:,:,:),l_mix(:,:,:),wprime(:,:,:)
28      !$OMP THREADPRIVATE(l_mixmin, l_mix, wprime)
29      REAL, SAVE, ALLOCATABLE :: pbl_eps(:,:,:)
30      !$OMP THREADPRIVATE(pbl_eps)
[5039]31      REAL, SAVE, ALLOCATABLE :: tke_shear(:,:,:), tke_buoy(:,:,:), tke_trans(:,:,:)
[5040]32      !$OMP THREADPRIVATE(tke_shear,tke_buoy,tke_trans)
[987]33      REAL, SAVE, ALLOCATABLE :: tr_seri(:,:,:)
34      !$OMP THREADPRIVATE(tr_seri)
[4489]35      REAL, SAVE, ALLOCATABLE :: rhcl(:,:)
36      !$OMP THREADPRIVATE(rhcl)
[987]37      REAL, SAVE, ALLOCATABLE :: d_t_dyn(:,:), d_q_dyn(:,:)
38      !$OMP THREADPRIVATE(d_t_dyn, d_q_dyn)
[4523]39      REAL, SAVE, ALLOCATABLE :: d_ql_dyn(:,:), d_qs_dyn(:,:), d_qbs_dyn(:,:)
40      !$OMP THREADPRIVATE(d_ql_dyn, d_qs_dyn, d_qbs_dyn)
41      REAL, SAVE, ALLOCATABLE :: d_q_dyn2d(:), d_ql_dyn2d(:), d_qs_dyn2d(:), d_qbs_dyn2d(:)
42      !$OMP THREADPRIVATE(d_q_dyn2d, d_ql_dyn2d, d_qs_dyn2d, d_qbs_dyn2d)
[1054]43      REAL, SAVE, ALLOCATABLE :: d_u_dyn(:,:), d_v_dyn(:,:)
44      !$OMP THREADPRIVATE(d_u_dyn, d_v_dyn)
[5204]45      REAL, SAVE, ALLOCATABLE :: d_cf_dyn(:,:), d_rvc_dyn(:,:)
46      !$OMP THREADPRIVATE(d_cf_dyn, d_rvc_dyn)
[1742]47      REAL, SAVE, ALLOCATABLE :: d_tr_dyn(:,:,:)
48      !$OMP THREADPRIVATE(d_tr_dyn)
[4742]49      REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:),d_q_con_zmasse(:,:)
50      !$OMP THREADPRIVATE(d_t_con,d_q_con,d_q_con_zmasse)
[987]51      REAL, SAVE, ALLOCATABLE :: d_u_con(:,:),d_v_con(:,:)
52      !$OMP THREADPRIVATE(d_u_con,d_v_con)
53      REAL, SAVE, ALLOCATABLE :: d_t_wake(:,:),d_q_wake(:,:)
54      !$OMP THREADPRIVATE( d_t_wake,d_q_wake)
[2086]55      REAL, SAVE, ALLOCATABLE :: d_t_lsc(:,:),d_q_lsc(:,:),d_ql_lsc(:,:),d_qi_lsc(:,:)
[2092]56      !$OMP THREADPRIVATE(d_t_lsc,d_q_lsc,d_ql_lsc,d_qi_lsc)
[2194]57      REAL, SAVE, ALLOCATABLE :: d_t_lwr(:,:),d_t_lw0(:,:),d_t_swr(:,:),d_t_sw0(:,:)
58      !$OMP THREADPRIVATE(d_t_lwr,d_t_lw0,d_t_swr,d_t_sw0)
[987]59      REAL, SAVE, ALLOCATABLE :: d_t_ajsb(:,:), d_q_ajsb(:,:)
60      !$OMP THREADPRIVATE(d_t_ajsb, d_q_ajsb)
61      REAL, SAVE, ALLOCATABLE :: d_t_ajs(:,:), d_q_ajs(:,:)
62      !$OMP THREADPRIVATE(d_t_ajs, d_q_ajs)
63      REAL, SAVE, ALLOCATABLE :: d_u_ajs(:,:), d_v_ajs(:,:)
64      !$OMP THREADPRIVATE(d_u_ajs, d_v_ajs)
[2159]65!nrlmd<
66      REAL, SAVE, ALLOCATABLE :: d_t_ajs_w(:,:), d_q_ajs_w(:,:)
67      !$OMP THREADPRIVATE(d_t_ajs_w, d_q_ajs_w)
68      REAL, SAVE, ALLOCATABLE :: d_t_ajs_x(:,:), d_q_ajs_x(:,:)
69      !$OMP THREADPRIVATE(d_t_ajs_x, d_q_ajs_x)
70!>nrlmd
[2706]71      REAL, SAVE, ALLOCATABLE :: d_t_eva(:,:),d_q_eva(:,:),d_ql_eva(:,:),d_qi_eva(:,:)
72      !$OMP THREADPRIVATE(d_t_eva,d_q_eva,d_ql_eva,d_qi_eva)
[5056]73! SN 15/07/2024 ISO 4D
74      REAL, SAVE, ALLOCATABLE :: d_qx_eva(:,:,:)
75      !$OMP THREADPRIVATE(d_qx_eva)
76! SN
[1507]77      REAL, SAVE, ALLOCATABLE :: d_t_lscst(:,:),d_q_lscst(:,:)
78      !$OMP THREADPRIVATE(d_t_lscst,d_q_lscst)
79      REAL, SAVE, ALLOCATABLE :: d_t_lscth(:,:),d_q_lscth(:,:)
80      !$OMP THREADPRIVATE(d_t_lscth,d_q_lscth)
81      REAL, SAVE, ALLOCATABLE :: plul_th(:),plul_st(:)
82      !$OMP THREADPRIVATE(plul_th,plul_st)
[909]83!tendances dues a oro et lif
[987]84      REAL, SAVE, ALLOCATABLE :: d_t_oli(:,:)
85      !$OMP THREADPRIVATE(d_t_oli)
86      REAL, SAVE, ALLOCATABLE :: d_u_oli(:,:), d_v_oli(:,:)
87      !$OMP THREADPRIVATE(d_u_oli, d_v_oli)
[4523]88      REAL, SAVE, ALLOCATABLE :: d_t_vdf(:,:), d_q_vdf(:,:), d_qbs_vdf(:,:), d_t_diss(:,:)
89      !$OMP THREADPRIVATE( d_t_vdf, d_q_vdf, d_qbs_vdf, d_t_diss)
[987]90      REAL, SAVE, ALLOCATABLE :: d_u_vdf(:,:), d_v_vdf(:,:)
91      !$OMP THREADPRIVATE(d_u_vdf, d_v_vdf)
[2159]92!nrlmd+jyg<
93      REAL, SAVE, ALLOCATABLE :: d_t_vdf_w(:,:), d_q_vdf_w(:,:)
94      !$OMP THREADPRIVATE( d_t_vdf_w, d_q_vdf_w)
95      REAL, SAVE, ALLOCATABLE :: d_t_vdf_x(:,:), d_q_vdf_x(:,:)
96      !$OMP THREADPRIVATE( d_t_vdf_x, d_q_vdf_x)
[5050]97      REAL, SAVE, ALLOCATABLE :: d_t_bsss(:,:), d_q_bsss(:,:), d_qbs_bsss(:,:)
98      !$OMP THREADPRIVATE( d_t_bsss,d_q_bsss, d_qbs_bsss)
[2159]99!>nrlmd+jyg
[987]100      REAL, SAVE, ALLOCATABLE :: d_t_oro(:,:)
101      !$OMP THREADPRIVATE(d_t_oro)
102      REAL, SAVE, ALLOCATABLE :: d_u_oro(:,:), d_v_oro(:,:)
103      !$OMP THREADPRIVATE(d_u_oro, d_v_oro)
[2897]104      REAL, SAVE, ALLOCATABLE :: d_t_oro_gw(:,:)
[2898]105      !$OMP THREADPRIVATE(d_t_oro_gw)
[2897]106      REAL, SAVE, ALLOCATABLE :: d_u_oro_gw(:,:), d_v_oro_gw(:,:)
107      !$OMP THREADPRIVATE(d_u_oro_gw, d_v_oro_gw)
[987]108      REAL, SAVE, ALLOCATABLE :: d_t_lif(:,:)
109      !$OMP THREADPRIVATE(d_t_lif)
110      REAL, SAVE, ALLOCATABLE :: d_u_lif(:,:), d_v_lif(:,:)
111      !$OMP THREADPRIVATE(d_u_lif, d_v_lif)
[1001]112! Tendances Ondes de G non oro (runs strato).
[2333]113      REAL, SAVE, ALLOCATABLE :: du_gwd_hines(:,:)
114      !$OMP THREADPRIVATE(du_gwd_hines)
115      REAL, SAVE, ALLOCATABLE :: dv_gwd_hines(:,:)
116      !$OMP THREADPRIVATE(dv_gwd_hines)
117      REAL, SAVE, ALLOCATABLE :: dv_gwd_rando(:,:)
118      !$OMP THREADPRIVATE(dv_gwd_rando)
119      REAL, SAVE, ALLOCATABLE :: dv_gwd_front(:,:)
120      !$OMP THREADPRIVATE(dv_gwd_front)
121      REAL, SAVE, ALLOCATABLE :: east_gwstress(:,:)
122      !$OMP THREADPRIVATE(east_gwstress)
123      REAL, SAVE, ALLOCATABLE :: west_gwstress(:,:)
124      !$OMP THREADPRIVATE(west_gwstress)
[1001]125      REAL, SAVE, ALLOCATABLE :: d_t_hin(:,:)
126      !$OMP THREADPRIVATE(d_t_hin)
[2136]127! tendance due a l'oxydation du methane
128      REAL, SAVE, ALLOCATABLE :: d_q_ch4(:,:)
129      !$OMP THREADPRIVATE(d_q_ch4)
[5056]130#ifdef ISO
131      REAL, SAVE, ALLOCATABLE :: xt_seri(:,:,:)
132      !$OMP THREADPRIVATE( xt_seri)
133      REAL, SAVE, ALLOCATABLE :: xtl_seri(:,:,:)
134      !$OMP THREADPRIVATE( xtl_seri)
135      REAL, SAVE, ALLOCATABLE :: xts_seri(:,:,:)
136      !$OMP THREADPRIVATE( xts_seri)
137      REAL, SAVE, ALLOCATABLE :: xtbs_seri(:,:,:)
138      !$OMP THREADPRIVATE( xtbs_seri)
139      REAL, SAVE, ALLOCATABLE :: d_xt_eva(:,:,:)
140      !$OMP THREADPRIVATE( d_xt_eva)
141      REAL, SAVE, ALLOCATABLE :: d_xtl_eva(:,:,:)
142      !$OMP THREADPRIVATE( d_xtl_eva)
143      REAL, SAVE, ALLOCATABLE :: d_xti_eva(:,:,:)
144      !$OMP THREADPRIVATE( d_xti_eva)
145      REAL, SAVE, ALLOCATABLE :: d_xt_vdf(:,:,:)
146      !$OMP THREADPRIVATE( d_xt_vdf)
147      REAL, SAVE, ALLOCATABLE :: d_xt_dyn(:,:,:)
148      !$OMP THREADPRIVATE( d_xt_dyn)
149      REAL, SAVE, ALLOCATABLE :: d_xtl_dyn(:,:,:), d_xts_dyn(:,:,:), d_xtbs_dyn(:,:,:)
150      !$OMP THREADPRIVATE(d_xtl_dyn, d_xts_dyn, d_xtbs_dyn)
151      REAL, SAVE, ALLOCATABLE :: d_xt_con(:,:,:)
152      !$OMP THREADPRIVATE( d_xt_con)
153      REAL, SAVE, ALLOCATABLE :: d_xt_wake(:,:,:)
154      !$OMP THREADPRIVATE( d_xt_wake)
155      REAL, SAVE, ALLOCATABLE :: d_xt_lsc(:,:,:),d_xtl_lsc(:,:,:),d_xti_lsc(:,:,:)
156      !$OMP THREADPRIVATE( d_xt_lsc,d_xtl_lsc,d_xti_lsc)
157      REAL, SAVE, ALLOCATABLE :: d_xt_ajsb(:,:,:)
158      !$OMP THREADPRIVATE( d_xt_ajsb)
159      REAL, SAVE, ALLOCATABLE :: d_xt_ajs(:,:,:)
160      !$OMP THREADPRIVATE( d_xt_ajs)
161      REAL, SAVE, ALLOCATABLE :: d_xt_ajs_w(:,:,:), d_xt_ajs_x(:,:,:)
162      !$OMP THREADPRIVATE(d_xt_ajs_w, d_xt_ajs_x)
163      REAL, SAVE, ALLOCATABLE :: d_xt_vdf_w(:,:,:), d_xt_vdf_x(:,:,:)
164      !$OMP THREADPRIVATE(d_xt_vdf_w, d_xt_vdf_x)
165      REAL, SAVE, ALLOCATABLE :: d_xt_ch4(:,:,:)
166      !$OMP THREADPRIVATE( d_xt_ch4)
167      REAL, SAVE, ALLOCATABLE :: d_xt_prod_nucl(:,:,:)
168      !$OMP THREADPRIVATE( d_xt_prod_nucl)
169      REAL, SAVE, ALLOCATABLE :: d_xt_cosmo(:,:,:)
170      !$OMP THREADPRIVATE( d_xt_cosmo)
171      REAL, SAVE, ALLOCATABLE :: d_xt_decroiss(:,:,:)
172      !$OMP THREADPRIVATE( d_xt_decroiss)
173#endif
[1001]174
[909]175! tendance du a la conersion Ec -> E thermique
[987]176      REAL, SAVE, ALLOCATABLE :: d_t_ec(:,:)
177      !$OMP THREADPRIVATE(d_t_ec)
178      REAL, SAVE, ALLOCATABLE :: d_ts(:,:), d_tr(:,:,:)
179      !$OMP THREADPRIVATE(d_ts, d_tr)
[1279]180
181! diagnostique pour le rayonnement
182      REAL, SAVE, ALLOCATABLE :: topswad_aero(:),  solswad_aero(:)      ! diag
183      !$OMP THREADPRIVATE(topswad_aero,solswad_aero)
184      REAL, SAVE, ALLOCATABLE :: topswai_aero(:),  solswai_aero(:)      ! diag
185      !$OMP THREADPRIVATE(topswai_aero,solswai_aero)
186      REAL, SAVE, ALLOCATABLE :: topswad0_aero(:), solswad0_aero(:)     ! diag
187      !$OMP THREADPRIVATE(topswad0_aero,solswad0_aero)
188      REAL, SAVE, ALLOCATABLE :: topsw_aero(:,:),  solsw_aero(:,:)      ! diag
189      !$OMP THREADPRIVATE(topsw_aero,solsw_aero)
190      REAL, SAVE, ALLOCATABLE :: topsw0_aero(:,:), solsw0_aero(:,:)     ! diag
191      !$OMP THREADPRIVATE(topsw0_aero,solsw0_aero)
192      REAL, SAVE, ALLOCATABLE :: topswcf_aero(:,:),  solswcf_aero(:,:)  ! diag
193      !$OMP THREADPRIVATE(topswcf_aero,solswcf_aero)
[2146]194! LW radiation diagnostics CK
195      REAL, SAVE, ALLOCATABLE :: toplwad_aero(:),  sollwad_aero(:)      ! diag
196      !$OMP THREADPRIVATE(toplwad_aero,sollwad_aero)
197      REAL, SAVE, ALLOCATABLE :: toplwai_aero(:),  sollwai_aero(:)      ! diag
198      !$OMP THREADPRIVATE(toplwai_aero,sollwai_aero)
199      REAL, SAVE, ALLOCATABLE :: toplwad0_aero(:), sollwad0_aero(:)     ! diag
200      !$OMP THREADPRIVATE(toplwad0_aero,sollwad0_aero)
[1989]201! Special RRTM
202      REAL, SAVE, ALLOCATABLE :: ZLWFT0_i(:,:),  ZSWFT0_i(:,:)      ! diag
203      !$OMP THREADPRIVATE(ZLWFT0_i,ZSWFT0_i)
204      REAL, SAVE, ALLOCATABLE :: ZFLDN0(:,:),  ZFLUP0(:,:)      ! diag
205      !$OMP THREADPRIVATE(ZFLDN0,ZFLUP0)
206      REAL, SAVE, ALLOCATABLE :: ZFSDN0(:,:),  ZFSUP0(:,:)      ! diag
207      !$OMP THREADPRIVATE(ZFSDN0,ZFSUP0)
208!
[2536]209      REAL, SAVE, ALLOCATABLE :: stratomask(:,:)
210      !$OMP THREADPRIVATE(stratomask)
[1279]211      REAL, SAVE, ALLOCATABLE :: tausum_aero(:,:,:)
212      !$OMP THREADPRIVATE(tausum_aero)
[2854]213      REAL, SAVE, ALLOCATABLE :: drytausum_aero(:,:)
214      !$OMP THREADPRIVATE(drytausum_aero)
[1279]215      REAL, SAVE, ALLOCATABLE :: tau3d_aero(:,:,:,:)
216      !$OMP THREADPRIVATE(tau3d_aero)
[3274]217      REAL, SAVE, ALLOCATABLE :: dNovrN(:)
218      !$OMP THREADPRIVATE(dNovrN)
[3124]219      REAL, SAVE, ALLOCATABLE :: zfice(:,:)
220      !$OMP THREADPRIVATE(zfice)
[2806]221      REAL, SAVE, ALLOCATABLE :: od443aer(:)
222      !$OMP THREADPRIVATE(od443aer)
[1337]223      REAL, SAVE, ALLOCATABLE :: od550aer(:)
224      !$OMP THREADPRIVATE(od550aer)
[2854]225      REAL, SAVE, ALLOCATABLE :: dryod550aer(:)
226      !$OMP THREADPRIVATE(dryod550aer)
[2842]227      REAL, SAVE, ALLOCATABLE :: abs550aer(:)
228      !$OMP THREADPRIVATE(abs550aer)
[1337]229      REAL, SAVE, ALLOCATABLE :: od865aer(:)
230      !$OMP THREADPRIVATE(od865aer)
231      REAL, SAVE, ALLOCATABLE :: ec550aer(:,:)
232      !$OMP THREADPRIVATE(ec550aer)
233      REAL, SAVE, ALLOCATABLE :: od550lt1aer(:)
234      !$OMP THREADPRIVATE(od550lt1aer)
235      REAL, SAVE, ALLOCATABLE :: sconcso4(:)
236      !$OMP THREADPRIVATE(sconcso4)
[2146]237      REAL, SAVE, ALLOCATABLE :: sconcno3(:)
238      !$OMP THREADPRIVATE(sconcno3)
[1337]239      REAL, SAVE, ALLOCATABLE :: sconcoa(:)
240      !$OMP THREADPRIVATE(sconcoa)
241      REAL, SAVE, ALLOCATABLE :: sconcbc(:)
242      !$OMP THREADPRIVATE(sconcbc)
243      REAL, SAVE, ALLOCATABLE :: sconcss(:)
244      !$OMP THREADPRIVATE(sconcss)
245      REAL, SAVE, ALLOCATABLE :: sconcdust(:)
246      !$OMP THREADPRIVATE(sconcdust)
247      REAL, SAVE, ALLOCATABLE :: concso4(:,:)
248      !$OMP THREADPRIVATE(concso4)
[2146]249      REAL, SAVE, ALLOCATABLE :: concno3(:,:)
250      !$OMP THREADPRIVATE(concno3)
[1337]251      REAL, SAVE, ALLOCATABLE :: concoa(:,:)
252      !$OMP THREADPRIVATE(concoa)
253      REAL, SAVE, ALLOCATABLE :: concbc(:,:)
254      !$OMP THREADPRIVATE(concbc)
255      REAL, SAVE, ALLOCATABLE :: concss(:,:)
256      !$OMP THREADPRIVATE(concss)
257      REAL, SAVE, ALLOCATABLE :: concdust(:,:)
258      !$OMP THREADPRIVATE(concdust)
259      REAL, SAVE, ALLOCATABLE :: loadso4(:)
260      !$OMP THREADPRIVATE(loadso4)
261      REAL, SAVE, ALLOCATABLE :: loadoa(:)
262      !$OMP THREADPRIVATE(loadoa)
263      REAL, SAVE, ALLOCATABLE :: loadbc(:)
264      !$OMP THREADPRIVATE(loadbc)
265      REAL, SAVE, ALLOCATABLE :: loadss(:)
266      !$OMP THREADPRIVATE(loadss)
267      REAL, SAVE, ALLOCATABLE :: loaddust(:)
268      !$OMP THREADPRIVATE(loaddust)
[2823]269      REAL, SAVE, ALLOCATABLE :: loadno3(:)
270      !$OMP THREADPRIVATE(loadno3)
[2953]271      REAL, SAVE, ALLOCATABLE :: load_tmp1(:), load_tmp2(:)
272      !$OMP THREADPRIVATE(load_tmp1, load_tmp2)
273      REAL, SAVE, ALLOCATABLE :: load_tmp3(:), load_tmp4(:)
274      !$OMP THREADPRIVATE(load_tmp3, load_tmp4)
275      REAL, SAVE, ALLOCATABLE :: load_tmp5(:), load_tmp6(:)
276      !$OMP THREADPRIVATE(load_tmp5, load_tmp6)
277      REAL, SAVE, ALLOCATABLE :: load_tmp7(:), load_tmp8(:)
278      !$OMP THREADPRIVATE(load_tmp7, load_tmp8)
279      REAL, SAVE, ALLOCATABLE :: load_tmp9(:), load_tmp10(:)
280      !$OMP THREADPRIVATE(load_tmp9, load_tmp10)
[1279]281
[1539]282!IM ajout variables CFMIP2/CMIP5
283      REAL,ALLOCATABLE,SAVE :: topswad_aerop(:), solswad_aerop(:)
284!$OMP THREADPRIVATE(topswad_aerop, solswad_aerop)
285      REAL,ALLOCATABLE,SAVE :: topswai_aerop(:), solswai_aerop(:)
286!$OMP THREADPRIVATE(topswai_aerop, solswai_aerop)
287      REAL,ALLOCATABLE,SAVE :: topswad0_aerop(:), solswad0_aerop(:)
288!$OMP THREADPRIVATE(topswad0_aerop, solswad0_aerop)
289      REAL,ALLOCATABLE,SAVE :: topsw_aerop(:,:), topsw0_aerop(:,:) 
290!$OMP THREADPRIVATE(topsw_aerop, topsw0_aerop)
291      REAL,ALLOCATABLE,SAVE :: solsw_aerop(:,:), solsw0_aerop(:,:)
292!$OMP THREADPRIVATE(solsw_aerop, solsw0_aerop)
293      REAL,ALLOCATABLE,SAVE :: topswcf_aerop(:,:), solswcf_aerop(:,:)
294!$OMP THREADPRIVATE(topswcf_aerop, solswcf_aerop)
295
[2146]296! additional LW variables CK
297      REAL,ALLOCATABLE,SAVE :: toplwad_aerop(:), sollwad_aerop(:)
298!$OMP THREADPRIVATE(toplwad_aerop, sollwad_aerop)
299      REAL,ALLOCATABLE,SAVE :: toplwai_aerop(:), sollwai_aerop(:)
300!$OMP THREADPRIVATE(toplwai_aerop, sollwai_aerop)
301      REAL,ALLOCATABLE,SAVE :: toplwad0_aerop(:), sollwad0_aerop(:)
302!$OMP THREADPRIVATE(toplwad0_aerop, sollwad0_aerop)
[1797]303
[4677]304!AI 08 2023 ajout pour Ecrad
305      REAL,ALLOCATABLE,SAVE :: topswad_aero_s2(:), solswad_aero_s2(:)
306!$OMP THREADPRIVATE(topswad_aero_s2, solswad_aero_s2)
307      REAL,ALLOCATABLE,SAVE :: topswai_aero_s2(:), solswai_aero_s2(:)
308!$OMP THREADPRIVATE(topswai_aero_s2, solswai_aero_s2)
309      REAL,ALLOCATABLE,SAVE :: topswad0_aero_s2(:), solswad0_aero_s2(:)
310!$OMP THREADPRIVATE(topswad0_aero_s2, solswad0_aero_s2)
311      REAL,ALLOCATABLE,SAVE :: topsw_aero_s2(:,:), topsw0_aero_s2(:,:)
312!$OMP THREADPRIVATE(topsw_aero_s2, topsw0_aero_s2)
313      REAL,ALLOCATABLE,SAVE :: solsw_aero_s2(:,:), solsw0_aero_s2(:,:)
314!$OMP THREADPRIVATE(solsw_aero_s2, solsw0_aero_s2)
315      REAL,ALLOCATABLE,SAVE :: topswcf_aero_s2(:,:), solswcf_aero_s2(:,:)
316!$OMP THREADPRIVATE(topswcf_aero_s2, solswcf_aero_s2)
317! additional LW variables CK
318      REAL,ALLOCATABLE,SAVE :: toplwad_aero_s2(:), sollwad_aero_s2(:)
319!$OMP THREADPRIVATE(toplwad_aero_s2, sollwad_aero_s2)
320      REAL,ALLOCATABLE,SAVE :: toplwai_aero_s2(:), sollwai_aero_s2(:)
321!$OMP THREADPRIVATE(toplwai_aero_s2, sollwai_aero_s2)
322      REAL,ALLOCATABLE,SAVE :: toplwad0_aero_s2(:), sollwad0_aero_s2(:)
323!$OMP THREADPRIVATE(toplwad0_aero_s2, sollwad0_aero_s2)
324
[2897]325!Ajout de celles n??cessaires au phys_output_write_mod
[2385]326      REAL, SAVE, ALLOCATABLE :: tal1(:), pal1(:), pab1(:), pab2(:)
327!$OMP THREADPRIVATE(tal1, pal1, pab1, pab2)
328      REAL, SAVE, ALLOCATABLE :: ptstar(:), pt0(:), slp(:)
329!$OMP THREADPRIVATE(ptstar, pt0, slp)
[1797]330      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sens, flwp, fiwp
331!$OMP THREADPRIVATE(sens, flwp, fiwp)
[2635]332!!
[4575]333!FC
334      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zxfluxt, zxfluxq
335!$OMP THREADPRIVATE(zxfluxt, zxfluxq)
336!FC
[2635]337!!         Wake variables
[3080]338      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: alp_wake
339!$OMP THREADPRIVATE(alp_wake)           
[2849]340!!jyg!      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: wake_h,wake_k
341      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: wake_h
342      INTEGER,ALLOCATABLE,SAVE,DIMENSION(:)         :: wake_k
[2732]343!$OMP THREADPRIVATE(wake_h,wake_k)                       
[2635]344    REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)            :: wake_omg
345!$OMP THREADPRIVATE(wake_omg)                     
346    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:)          :: d_deltat_wk, d_deltaq_wk
347!$OMP THREADPRIVATE(d_deltat_wk, d_deltaq_wk)
[4744]348      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk
349!$OMP THREADPRIVATE(d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk)
[2635]350    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:)          :: d_deltat_wk_gw, d_deltaq_wk_gw
351!$OMP THREADPRIVATE(d_deltat_wk_gw, d_deltaq_wk_gw)
352    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:)          :: d_deltat_vdf, d_deltaq_vdf
353!$OMP THREADPRIVATE(d_deltat_vdf, d_deltaq_vdf)
354!!!      REAL,ALLOCATABLE,SAVE,DIMENSION(:)          :: d_s_vdf, d_dens_vdf
[5084]355!!!OMP THREADPRIVATE(d_s_vdf, d_dens_vdf)
[2635]356    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:)          :: d_deltat_the, d_deltaq_the
357!$OMP THREADPRIVATE(d_deltat_the, d_deltaq_the)
358!!!      REAL,ALLOCATABLE,SAVE,DIMENSION(:)          :: d_s_the, d_dens_the
[5084]359!!!OMP THREADPRIVATE(d_s_the, d_dens_the)
[2635]360      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)           :: d_deltat_ajs_cv, d_deltaq_ajs_cv
[5056]361!$OMP THREADPRIVATE(d_deltat_ajs_cv, d_deltaq_ajs_cv)
362#ifdef ISO
363    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:,:)          :: d_deltaxt_wk
364!$OMP THREADPRIVATE(d_deltaxt_wk)
365    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:,:)          :: d_deltaxt_wk_gw
366!$OMP THREADPRIVATE(d_deltaxt_wk_gw)
367    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:,:)          ::  d_deltaxt_the
368!$OMP THREADPRIVATE(d_deltaxt_the)
369    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:,:)          ::  d_deltaxt_vdf
370!$OMP THREADPRIVATE(d_deltaxt_vdf)
371      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)           ::  d_deltaxt_ajs_cv
372!$OMP THREADPRIVATE(d_deltaxt_ajs_cv)
373#endif                       
[2635]374!!         End of Wake variables
375!!
376      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: bils
377!$OMP THREADPRIVATE(bils)
[1797]378      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragm, cdragh
379!$OMP THREADPRIVATE(cdragm, cdragh)
[2243]380      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cldh, cldl, cldm, cldq, cldt, qsat2m
[4737]381!$OMP THREADPRIVATE(cldh, cldl, cldm, cldq, cldt, qsat2m)
[3779]382!AS: cldhjn, cldljn, cldmjn,cldtjn pas utilisés en tant que variables, juste noms de diagnostics
[1924]383      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: JrNt
384!$OMP THREADPRIVATE(JrNt)
[4887]385      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget
386!$OMP THREADPRIVATE(dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget)
[5486]387      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: icesub_lic
388!$OMP THREADPRIVATE(icesub_lic)
[1797]389      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zustar, zu10m, zv10m, rh2m
390!$OMP THREADPRIVATE(zustar, zu10m, zv10m, rh2m)
391      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_lcl, s_pblh, s_pblt, s_therm
392!$OMP THREADPRIVATE(s_lcl, s_pblh, s_pblt, s_therm)
[2159]393!
394!nrlmd+jyg<
395      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_pblh_x, s_pblh_w
396!$OMP THREADPRIVATE(s_pblh_x, s_pblh_w)
397      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_lcl_x, s_lcl_w
398!$OMP THREADPRIVATE(s_lcl_x, s_lcl_w)
399!>nrlmd+jyg
400!
[1797]401      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: slab_wfbils
402!$OMP THREADPRIVATE(slab_wfbils)
[3257]403      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: tpot, tpote, ue, uq, uwat, ve, vq, vwat, zxffonte
404!$OMP THREADPRIVATE(tpot, tpote, ue, uq, uwat, ve, vq, vwat, zxffonte)
[5188]405      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxustartlic, zxrhoslic, zxqsaltlic, tempsmoothlic
406!$OMP THREADPRIVATE(zxustartlic, zxrhoslic, zxqsaltlic, tempsmoothlic)
[1797]407      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfqcalving
408!$OMP THREADPRIVATE(zxfqcalving)
[2243]409      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat, zxtsol, snow_lsc, zxfqfonte
410!$OMP THREADPRIVATE(zxfluxlat, zxtsol, snow_lsc, zxfqfonte)
[5109]411!SN runoffdiag
412      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxrunofflic, runoff_diag
413!$OMP THREADPRIVATE(zxrunofflic, runoff_diag)
[2516]414      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxqsurf, rain_lsc, rain_num
415!$OMP THREADPRIVATE(zxqsurf, rain_lsc, rain_num)
[5056]416#ifdef ISO
417      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: xtevap,xtprw
418!$OMP THREADPRIVATE(xtevap,xtprw)
[5109]419      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: h1_diag
[5056]420      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: xtrunoff_diag
[5215]421!$OMP THREADPRIVATE(h1_diag,xtrunoff_diag)
[5056]422      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zxfxtcalving
423!$OMP THREADPRIVATE(zxfxtcalving)
424      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: xtsnow_lsc, zxfxtfonte
425!$OMP THREADPRIVATE(xtsnow_lsc, zxfxtfonte)
426      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zxxtrunofflic
427!$OMP THREADPRIVATE(zxxtrunofflic)
428      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: xtrain_lsc
429!$OMP THREADPRIVATE(xtrain_lsc)
430#endif
[2159]431!
432!jyg+nrlmd<
433!!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
434!                                                                          c
435!       Declarations liees a la couche limite differentiee w-x             c
436!                                                                          c
437!!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
438      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sens_x, sens_w
439!$OMP THREADPRIVATE(sens_x, sens_w)
440      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat_x, zxfluxlat_w
441!$OMP THREADPRIVATE(zxfluxlat_x, zxfluxlat_w)
[3888]442      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: delta_qsurf
443!$OMP THREADPRIVATE(delta_qsurf)
[2181]444!jyg<
[3435]445!!! Entrees supplementaires couche-limite
[2181]446!!      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: t_x, t_w
447!!!$OMP THREADPRIVATE(t_x, t_w)
448!!      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: q_x, q_w
449!!!$OMP THREADPRIVATE(q_x, q_w)
450!>jyg
[3435]451!!! Sorties ferret
452      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dtvdf_x, dtvdf_w
453!$OMP THREADPRIVATE(dtvdf_x, dtvdf_w)
454      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dqvdf_x, dqvdf_w
455!$OMP THREADPRIVATE(dqvdf_x, dqvdf_w)
456! Variables supplementaires dans physiq.F relative au splitting de la surface
[2159]457      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: pbl_tke_input
458!$OMP THREADPRIVATE(pbl_tke_input)
459! Entree supplementaire Thermiques :
[2607]460      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: t_therm, q_therm, u_therm, v_therm
461!$OMP THREADPRIVATE(t_therm, q_therm, u_therm, v_therm)
[2159]462      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragh_x, cdragh_w
463!$OMP THREADPRIVATE(cdragh_x, cdragh_w)
464      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragm_x, cdragm_w
465!$OMP THREADPRIVATE(cdragm_x, cdragm_w)
466      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: kh, kh_x, kh_w
467!$OMP THREADPRIVATE(kh, kh_x, kh_w)
[5056]468#ifdef ISO
469      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: dxtvdf_x, dxtvdf_w
470!$OMP THREADPRIVATE(dxtvdf_x, dxtvdf_w)
471      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: xt_therm
472!$OMP THREADPRIVATE(xt_therm)
473#endif
[2159]474!!!
475!!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
[2877]476      LOGICAL, SAVE, ALLOCATABLE :: ptconv(:,:)
477      !$OMP THREADPRIVATE(ptconv)
[3148]478      REAL, SAVE, ALLOCATABLE :: ratqsc(:,:)
479      !$OMP THREADPRIVATE(ratqsc)
[2159]480!>jyg+nrlmd
481  !
[2824]482      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wbeff, convoccur, zmax_th, zq2m, zt2m
483!$OMP THREADPRIVATE(wbeff, convoccur, zmax_th, zq2m, zt2m)
[2103]484      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zt2m_min_mon, zt2m_max_mon
485!$OMP THREADPRIVATE(zt2m_min_mon, zt2m_max_mon)
486      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: t2m_min_mon, t2m_max_mon
487!$OMP THREADPRIVATE(t2m_min_mon, t2m_max_mon)
[1797]488      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: weak_inversion
489!$OMP THREADPRIVATE(weak_inversion)
[3080]490      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_conv,alp_bl_det
491!$OMP THREADPRIVATE(alp_bl_conv,alp_bl_det)
[1797]492      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_fluct_m,alp_bl_fluct_tke
493!$OMP THREADPRIVATE(alp_bl_fluct_m,alp_bl_fluct_tke)
[4843]494      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_stat, n2, s2, strig, zcong, zlcl_th
495!$OMP THREADPRIVATE(alp_bl_stat, n2, s2, strig, zcong, zlcl_th)
[1797]496      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: proba_notrig, random_notrig
497!$OMP THREADPRIVATE(proba_notrig, random_notrig)
[4737]498      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: fsolsw, wfbils
499!$OMP THREADPRIVATE(fsolsw, wfbils)
500      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: wfevap
501!$OMP THREADPRIVATE(wfevap)
[2243]502      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: t2m, fluxlat, fsollw,evap_pot
503!$OMP THREADPRIVATE(t2m, fluxlat, fsollw,evap_pot)
[3134]504      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dnwd0, omega
505!$OMP THREADPRIVATE(dnwd0, omega)
[2481]506      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: epmax_diag ! epmax_cape
507!$OMP THREADPRIVATE(epmax_diag)
[3134]508!
509!  Deep convective variables used in phytrac
510      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: ep ! epmax_cape
[2481]511!$OMP THREADPRIVATE(ep)
[3134]512      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: dnwd, upwd
513!$OMP THREADPRIVATE(dnwd, upwd)
514      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: pmflxr, pmflxs
515!$OMP THREADPRIVATE(pmflxr, pmflxs)
[5425]516      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: wdtrainA, wdtrainS, wdtrainM, wdtrainAS
517!$OMP THREADPRIVATE(wdtrainA, wdtrainS, wdtrainM, wdtrainAS)
[3134]518      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: da, mp
519!$OMP THREADPRIVATE(da, mp)
520      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: wght_cvfd
521!$OMP THREADPRIVATE(wght_cvfd)
522      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:):: phi, phi2, elij, epmlmMm
523!$OMP THREADPRIVATE(phi, phi2, elij, epmlmMm)
524      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: d1a, dam
525!$OMP THREADPRIVATE(d1a, dam)
526      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: ev
527!$OMP THREADPRIVATE(ev)
[3496]528      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: qtaa
529!$OMP THREADPRIVATE(qtaa)
[3134]530      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: clw
531!$OMP THREADPRIVATE(clw)
532      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: eplaMm
533!$OMP THREADPRIVATE(eplaMm)
534      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:):: sij
535!$OMP THREADPRIVATE(sij)
[5056]536#ifdef ISO
537      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xtwdtrainA
538!$OMP THREADPRIVATE(xtwdtrainA)
539      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xtev
540!$OMP THREADPRIVATE(xtev)
541      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xttaa
542!$OMP THREADPRIVATE(xttaa)
543      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xtclw
544!$OMP THREADPRIVATE(xtclw)
545#ifdef DIAGISO
546      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: qlp
547!$OMP THREADPRIVATE(qlp)
548      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: qvp
549!$OMP THREADPRIVATE(qvp)
550      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: fq_detrainement
551!$OMP THREADPRIVATE(fq_detrainement)
552      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: fq_ddft
553!$OMP THREADPRIVATE(fq_ddft)
554      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: fq_fluxmasse
555!$OMP THREADPRIVATE(fq_fluxmasse)
556      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: fq_evapprecip
557!$OMP THREADPRIVATE(fq_evapprecip)
558      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: f_detrainement
559!$OMP THREADPRIVATE(f_detrainement)
560      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: q_detrainement
561!$OMP THREADPRIVATE(q_detrainement)
562      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xt_detrainement
563!$OMP THREADPRIVATE(xt_detrainement)
564      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xtlp
565!$OMP THREADPRIVATE(xtlp)
566      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xtvp
567!$OMP THREADPRIVATE(xtvp)
568      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: q_the
569!$OMP THREADPRIVATE(q_the)
570      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xt_the
571!$OMP THREADPRIVATE(xt_the)
572      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: fxt_detrainement
573!$OMP THREADPRIVATE(fxt_detrainement)
574      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: fxt_ddft
575!$OMP THREADPRIVATE(fxt_ddft)
576      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: fxt_fluxmasse
577!$OMP THREADPRIVATE(fxt_fluxmasse)
578      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: fxt_evapprecip
579!$OMP THREADPRIVATE(fxt_evapprecip)
580#endif
581#endif
[3134]582!
[1797]583!      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: coefh, coefm, lambda_th
584      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: lambda_th
585!$OMP THREADPRIVATE(lambda_th)
586      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: cldemi, cldfra, cldtau, fiwc, fl, re, flwc
587!$OMP THREADPRIVATE(cldemi, cldfra, cldtau, fiwc, fl, re, flwc)
[4118]588      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: qlth, qith, qsith, wiceth
589!$OMP THREADPRIVATE(qlth, qith, qsith, wiceth)
[1797]590      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ref_liq, ref_ice, theta, zphi
591!$OMP THREADPRIVATE(ref_liq, ref_ice, theta, zphi)
[1989]592      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ref_liq_pi, ref_ice_pi
593!$OMP THREADPRIVATE(ref_liq_pi, ref_ice_pi)
[3780]594      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zx_rh, zx_rhl, zx_rhi
595!$OMP THREADPRIVATE(zx_rh, zx_rhl, zx_rhi)
[4523]596      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: prfl, psfl, fraca, bsfl
597!$OMP THREADPRIVATE(prfl, psfl, fraca, bsfl)
[1797]598      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: Vprecip, zw2
599!$OMP THREADPRIVATE(Vprecip, zw2)
600      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: pmfd, pmfu
601!$OMP THREADPRIVATE(pmfd, pmfu)
602      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: fluxt, fluxu, fluxv
603!$OMP THREADPRIVATE(fluxt, fluxu, fluxv)
604      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: uwriteSTD, vwriteSTD, wwriteSTD
605!$OMP THREADPRIVATE(uwriteSTD, vwriteSTD, wwriteSTD)
[1828]606      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD
607!$OMP THREADPRIVATE(phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD)
[1797]608
[4072]609
[1797]610! ug et d'autres encore:
611      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: beta_prec
612!$OMP THREADPRIVATE(beta_prec)
[2945]613      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rneb,rnebjn,rneblsvol
614!$OMP THREADPRIVATE(rneb,rnebjn,rneblsvol)
[4530]615      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: pfraclr,pfracld
616!$OMP THREADPRIVATE(pfraclr,pfracld)
[5007]617      REAL, SAVE, ALLOCATABLE :: cldfraliq(:,:)
618!$OMP THREADPRIVATE(cldfraliq)
619      REAL, SAVE, ALLOCATABLE ::mean_icefracturb(:,:)
620!$OMP THREADPRIVATE(mean_icefracturb)
621      REAL, SAVE, ALLOCATABLE :: sigma2_icefracturb(:,:)
622!$OMP THREADPRIVATE(sigma2_icefracturb)
[1797]623
[1865]624! variables de sorties MM
[1872]625      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxsnow,snowhgt,qsnow,to_ice
626      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sissnow,runoff,albsol3_lic
627!$OMP THREADPRIVATE(zxsnow,snowhgt,qsnow,to_ice)
628!$OMP THREADPRIVATE(sissnow,runoff,albsol3_lic)
[5056]629#ifdef ISO
630      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: zxxtsnow
631!$OMP THREADPRIVATE(zxxtsnow)     
632      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: xtVprecip,xtVprecipi
633!$OMP THREADPRIVATE(xtVprecip,xtVprecipi)
634      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: pxtrfl, pxtsfl
635!$OMP THREADPRIVATE(pxtrfl, pxtsfl)
636#endif
[1865]637
[2992]638      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: p_tropopause, z_tropopause, t_tropopause
639!$OMP THREADPRIVATE(p_tropopause, z_tropopause, t_tropopause)
640
[3817]641      INTEGER,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zn2mout
642!$OMP THREADPRIVATE(zn2mout)
643
[5204]644!-- LSCP - condensation and ice supersaturation variables
645      REAL, SAVE, ALLOCATABLE :: qsub(:,:), qissr(:,:), qcld(:,:)
646      !$OMP THREADPRIVATE(qsub, qissr, qcld)
647      REAL, SAVE, ALLOCATABLE :: subfra(:,:), issrfra(:,:)
648      !$OMP THREADPRIVATE(subfra, issrfra)
649      REAL, SAVE, ALLOCATABLE :: gamma_cond(:,:)
650      !$OMP THREADPRIVATE(gamma_cond)
[5396]651      REAL, SAVE, ALLOCATABLE :: ql_seri_lscp(:,:)
652      !$OMP THREADPRIVATE(ql_seri_lscp)
653      REAL, SAVE, ALLOCATABLE :: ratio_ql_qtot(:,:)
654      !$OMP THREADPRIVATE(ratio_ql_qtot)
655      REAL, SAVE, ALLOCATABLE :: qi_seri_lscp(:,:)
656      !$OMP THREADPRIVATE(qi_seri_lscp)
[5204]657      REAL, SAVE, ALLOCATABLE :: ratio_qi_qtot(:,:)
658      !$OMP THREADPRIVATE(ratio_qi_qtot)
659      REAL, SAVE, ALLOCATABLE :: dcf_sub(:,:), dcf_con(:,:), dcf_mix(:,:)
660      !$OMP THREADPRIVATE(dcf_sub, dcf_con, dcf_mix)
661      REAL, SAVE, ALLOCATABLE :: dqi_adj(:,:), dqi_sub(:,:), dqi_con(:,:), dqi_mix(:,:)
662      !$OMP THREADPRIVATE(dqi_adj, dqi_sub, dqi_con, dqi_mix)
663      REAL, SAVE, ALLOCATABLE :: dqvc_adj(:,:), dqvc_sub(:,:), dqvc_con(:,:), dqvc_mix(:,:)
664      !$OMP THREADPRIVATE(dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix)
665      REAL, SAVE, ALLOCATABLE :: qsatliq(:,:), qsatice(:,:)
666      !$OMP THREADPRIVATE(qsatliq, qsatice)
667
668!-- LSCP - aviation and contrails variables
669      REAL, SAVE, ALLOCATABLE :: Tcontr(:,:), qcontr(:,:), qcontr2(:,:)
670      !$OMP THREADPRIVATE(Tcontr, qcontr, qcontr2)
671      REAL, SAVE, ALLOCATABLE :: fcontrN(:,:), fcontrP(:,:)
672      !$OMP THREADPRIVATE(fcontrN, fcontrP)
673      REAL, SAVE, ALLOCATABLE :: dcf_avi(:,:), dqi_avi(:,:), dqvc_avi(:,:)
674      !$OMP THREADPRIVATE(dcf_avi, dqi_avi, dqvc_avi)
675      REAL, SAVE, ALLOCATABLE :: flight_dist(:,:), flight_h2o(:,:)
676      !$OMP THREADPRIVATE(flight_dist, flight_h2o)
677
678!-- LSCP - mixed phase clouds variables
[4562]679      REAL, SAVE, ALLOCATABLE :: distcltop(:,:)
[4564]680      !$OMP THREADPRIVATE(distcltop)
[4639]681      REAL, SAVE, ALLOCATABLE :: temp_cltop(:,:)
[4677]682      !$OMP THREADPRIVATE(temp_cltop)
[4059]683
[5204]684!-- LSCP - POPRECIP variables
[4830]685      REAL, SAVE, ALLOCATABLE :: qraindiag(:,:)
686      !$OMP THREADPRIVATE(qraindiag)
687      REAL, SAVE, ALLOCATABLE :: qsnowdiag(:,:)
688      !$OMP THREADPRIVATE(qsnowdiag)
[4803]689      REAL, SAVE, ALLOCATABLE :: dqreva(:,:)
690      !$OMP THREADPRIVATE(dqreva)
691      REAL, SAVE, ALLOCATABLE :: dqrauto(:,:)
692      !$OMP THREADPRIVATE(dqrauto)
693      REAL, SAVE, ALLOCATABLE :: dqrcol(:,:)
694      !$OMP THREADPRIVATE(dqrcol)
695      REAL, SAVE, ALLOCATABLE :: dqrmelt(:,:)
696      !$OMP THREADPRIVATE(dqrmelt)
697       REAL, SAVE, ALLOCATABLE :: dqrfreez(:,:)
698      !$OMP THREADPRIVATE(dqrfreez)
699      REAL, SAVE, ALLOCATABLE :: dqssub(:,:)
700      !$OMP THREADPRIVATE(dqssub)
701      REAL, SAVE, ALLOCATABLE :: dqsauto(:,:)
702      !$OMP THREADPRIVATE(dqsauto)
703      REAL, SAVE, ALLOCATABLE :: dqsagg(:,:)
704      !$OMP THREADPRIVATE(dqsagg)
705      REAL, SAVE, ALLOCATABLE :: dqsrim(:,:)
706      !$OMP THREADPRIVATE(dqsrim)
707      REAL, SAVE, ALLOCATABLE :: dqsmelt(:,:)
708      !$OMP THREADPRIVATE(dqsmelt)
709      REAL, SAVE, ALLOCATABLE :: dqsfreez(:,:)
710      !$OMP THREADPRIVATE(dqsfreez)
711
[2752]712! variables for stratospheric aerosol
[4601]713      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: d_q_emiss
714!$OMP THREADPRIVATE(d_q_emiss)
[2690]715      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: R2SO4
716!$OMP THREADPRIVATE(R2SO4)
[4950]717      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: R2SO4B
718!$OMP THREADPRIVATE(R2SO4B)
[2690]719      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: DENSO4
720!$OMP THREADPRIVATE(DENSO4)
[4950]721      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:, :) :: DENSO4B
[5252]722!$OMP THREADPRIVATE(DENSO4B)
[2690]723      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: f_r_wet
724!$OMP THREADPRIVATE(f_r_wet)
[4950]725      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:, :) :: f_r_wetB
726!$OMP THREADPRIVATE(f_r_wetB)
[2690]727      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: decfluxaer
728!$OMP THREADPRIVATE(decfluxaer)
729      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: mdw
730!$OMP THREADPRIVATE(mdw)
731      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: OCS_lifetime
732!$OMP THREADPRIVATE(OCS_lifetime)
733      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: SO2_lifetime
734!$OMP THREADPRIVATE(SO2_lifetime)
[4601]735      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: H2SO4_lifetime
736!$OMP THREADPRIVATE(H2SO4_lifetime)
737      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: O3_clim
738!$OMP THREADPRIVATE(O3_clim)
[2690]739      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: alpha_bin
740!$OMP THREADPRIVATE(alpha_bin)
741      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: piz_bin
742!$OMP THREADPRIVATE(piz_bin)
743      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: cg_bin
744!$OMP THREADPRIVATE(cg_bin)
745      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_550
746!$OMP THREADPRIVATE(tau_strat_550)
747      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_1020
748!$OMP THREADPRIVATE(tau_strat_1020)
749      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tausum_strat
750!$OMP THREADPRIVATE(tausum_strat)
751      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: surf_PM25_sulf
752!$OMP THREADPRIVATE(surf_PM25_sulf)
753      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vsed_aer
754!$OMP THREADPRIVATE(vsed_aer)
[4998]755!     Sulfate aerosol concentration (dry mixing ratio) (condensed H2SO4 mmr)
756      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sulfmmr
757!$OMP THREADPRIVATE(sulfmmr)
758!     SAD all aerosols (cm2/cm3)
759      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: SAD_sulfate
760!$OMP THREADPRIVATE(SAD_sulfate)
[5150]761!     Effective radius of wet surface aerosols (cm)
762      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: reff_sulfate
763!$OMP THREADPRIVATE(reff_sulfate)
[4998]764!     sulfate MMR in different modes (based on sulfmmr, it must be dry mmr)
765      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sulfmmr_mode
766!$OMP THREADPRIVATE(sulfmmr_mode)
767!     particle concentration in different modes (part/m3)
768      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nd_mode
769!$OMP THREADPRIVATE(nd_mode)
[2752]770!
771!---3D budget variables
772      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_nucl
773!$OMP THREADPRIVATE(budg_3D_nucl)
774      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_cond_evap
775!$OMP THREADPRIVATE(budg_3D_cond_evap)
776      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_ocs_to_so2
777!$OMP THREADPRIVATE(budg_3D_ocs_to_so2)
778      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_so2_to_h2so4
779!$OMP THREADPRIVATE(budg_3D_so2_to_h2so4)
780      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_backgr_ocs
781!$OMP THREADPRIVATE(budg_3D_backgr_ocs)
782      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_backgr_so2
783!$OMP THREADPRIVATE(budg_3D_backgr_so2)
784!
785!---2D budget variables
[3100]786      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_ocs
787      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_so2
[2752]788      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_h2so4
789      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_part
[3100]790!$OMP THREADPRIVATE(budg_dep_dry_ocs,budg_dep_dry_so2,budg_dep_dry_h2so4,budg_dep_dry_part)
791      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_ocs
792      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_so2
[2752]793      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_h2so4
794      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_part
[3100]795!$OMP THREADPRIVATE(budg_dep_wet_ocs,budg_dep_wet_so2,budg_dep_wet_h2so4,budg_dep_wet_part)
[2752]796      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_ocs
797      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_so2
798      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_h2so4
799      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_part
800!$OMP THREADPRIVATE(budg_emi_ocs,budg_emi_so2,budg_emi_h2so4,budg_emi_part)
801      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_ocs_to_so2
802      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_so2_to_h2so4
803      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_h2so4_to_part
804!$OMP THREADPRIVATE(budg_ocs_to_so2,budg_so2_to_h2so4,budg_h2so4_to_part)
805      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_sed_part
806!$OMP THREADPRIVATE(budg_sed_part)
[2690]807
[904]808CONTAINS
809
810!======================================================================
811SUBROUTINE phys_local_var_init
[1785]812USE dimphy
[5056]813USE infotrac_phy, ONLY : nbtr,nqtot
814#ifdef ISO
815USE infotrac_phy, ONLY : ntraciso=>ntiso,niso
816#endif
[1279]817USE aero_mod
[1785]818USE indice_sol_mod
[1797]819USE phys_output_var_mod
820USE phys_state_var_mod
[4950]821USE infotrac_phy, ONLY : nbtr_bin
[1279]822
[3117]823IMPLICIT NONE
[4523]824      ALLOCATE(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev), qbs_seri(klon,klev))
[5056]825! SN 4D ISO
826      ALLOCATE(qx_seri(klon,klev,nqtot))
827! SN
[2854]828      ALLOCATE(u_seri(klon,klev),v_seri(klon,klev))
[5204]829      ALLOCATE(cf_seri(klon,klev),rvc_seri(klon,klev))
[4881]830      ALLOCATE(l_mixmin(klon,klev+1,nbsrf),l_mix(klon,klev+1,nbsrf),wprime(klon,klev+1,nbsrf))
831      ALLOCATE(pbl_eps(klon,klev+1,nbsrf+1))
[5039]832      ALLOCATE(tke_shear(klon,klev+1,nbsrf), tke_buoy(klon,klev+1,nbsrf), tke_trans(klon,klev+1,nbsrf))
[4926]833      pbl_eps(:,:,:)=0.
[5039]834      tke_shear(:,:,:)=0.; tke_buoy(:,:,:)=0.; tke_trans(:,:,:)=0.
[4881]835      l_mix(:,:,:)=0.;l_mixmin(:,:,:)=0.;wprime(:,:,:)=0. ! doit etre initialse car pas toujours remplis
[4489]836      ALLOCATE(rhcl(klon,klev))
[2854]837      ALLOCATE(tr_seri(klon,klev,nbtr))
838      ALLOCATE(d_t_dyn(klon,klev),d_q_dyn(klon,klev))
[4523]839      ALLOCATE(d_ql_dyn(klon,klev),d_qs_dyn(klon,klev), d_qbs_dyn(klon,klev))
840      ALLOCATE(d_q_dyn2d(klon),d_ql_dyn2d(klon),d_qs_dyn2d(klon), d_qbs_dyn2d(klon))
[2854]841      ALLOCATE(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
[5204]842      ALLOCATE(d_cf_dyn(klon,klev),d_rvc_dyn(klon,klev))
[2854]843      ALLOCATE(d_tr_dyn(klon,klev,nbtr))                   !RomP
[4742]844      ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev),d_q_con_zmasse(klon,klev))
[2854]845      ALLOCATE(d_u_con(klon,klev),d_v_con(klon,klev))
846      ALLOCATE(d_t_wake(klon,klev),d_q_wake(klon,klev))
847      ALLOCATE(d_t_lsc(klon,klev),d_q_lsc(klon,klev))
848      ALLOCATE(d_t_lwr(klon,klev),d_t_lw0(klon,klev))
849      ALLOCATE(d_t_swr(klon,klev),d_t_sw0(klon,klev))
850      ALLOCATE(d_ql_lsc(klon,klev),d_qi_lsc(klon,klev))
851      ALLOCATE(d_t_ajsb(klon,klev),d_q_ajsb(klon,klev))
852      ALLOCATE(d_t_ajs(klon,klev),d_q_ajs(klon,klev))
[2159]853!nrlmd<
[2854]854      ALLOCATE(d_t_ajs_w(klon,klev),d_q_ajs_w(klon,klev))
855      ALLOCATE(d_t_ajs_x(klon,klev),d_q_ajs_x(klon,klev))
[2159]856!>nrlmd
[2854]857      ALLOCATE(d_u_ajs(klon,klev),d_v_ajs(klon,klev))
858      ALLOCATE(d_t_eva(klon,klev),d_q_eva(klon,klev))
[5056]859! SN 4D ISO
860      ALLOCATE(d_qx_eva(klon,klev,nqtot))
861! SN
[2854]862      ALLOCATE(d_ql_eva(klon,klev),d_qi_eva(klon,klev))
863      ALLOCATE(d_t_lscst(klon,klev),d_q_lscst(klon,klev))
864      ALLOCATE(d_t_lscth(klon,klev),d_q_lscth(klon,klev))
865      ALLOCATE(plul_st(klon),plul_th(klon))
866      ALLOCATE(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))
[4523]867      ALLOCATE (d_qbs_vdf(klon,klev))
[5050]868      ALLOCATE(d_t_bsss(klon,klev),d_q_bsss(klon,klev),d_qbs_bsss(klon,klev))
[3435]869      ALLOCATE(d_t_vdf_w(klon,klev),d_q_vdf_w(klon,klev))
870      ALLOCATE(d_t_vdf_x(klon,klev),d_q_vdf_x(klon,klev))
[5056]871#ifdef ISO
872      allocate(xt_seri(ntraciso,klon,klev))
873      allocate(xtl_seri(ntraciso,klon,klev))
874      allocate(xts_seri(ntraciso,klon,klev))
875      allocate(xtbs_seri(ntraciso,klon,klev))
876      allocate(d_xt_dyn(ntraciso,klon,klev))
877      allocate(d_xtl_dyn(ntraciso,klon,klev))
878      allocate(d_xts_dyn(ntraciso,klon,klev))
879      allocate(d_xtbs_dyn(ntraciso,klon,klev))
880      allocate(d_xt_con(ntraciso,klon,klev))
881      allocate(d_xt_wake(ntraciso,klon,klev))
882      allocate(d_xt_lsc(ntraciso,klon,klev))
883      allocate(d_xtl_lsc(ntraciso,klon,klev))
884      allocate(d_xti_lsc(ntraciso,klon,klev))
885      allocate(d_xt_ajsb(ntraciso,klon,klev))
886      allocate(d_xt_ajs(ntraciso,klon,klev))
887      allocate(d_xt_ajs_w(ntraciso,klon,klev))
888      allocate(d_xt_ajs_x(ntraciso,klon,klev))
889      allocate(d_xt_eva(ntraciso,klon,klev))
890      allocate(d_xtl_eva(ntraciso,klon,klev))
891      allocate(d_xti_eva(ntraciso,klon,klev))
892      allocate(d_xt_vdf(ntraciso,klon,klev)) 
893      allocate(d_xt_vdf_w(ntraciso,klon,klev))
894      allocate(d_xt_vdf_x(ntraciso,klon,klev))
895      allocate(d_xt_ch4(ntraciso,klon,klev))
896      allocate(d_xt_prod_nucl(ntraciso,klon,klev))
897      allocate(d_xt_cosmo(ntraciso,klon,klev))
898      allocate(d_xt_decroiss(ntraciso,klon,klev))
899#endif
[3435]900
[2854]901      ALLOCATE(d_u_vdf(klon,klev),d_v_vdf(klon,klev))
902      ALLOCATE(d_t_oli(klon,klev),d_t_oro(klon,klev))
903      ALLOCATE(d_u_oli(klon,klev),d_v_oli(klon,klev))
904      ALLOCATE(d_u_oro(klon,klev),d_v_oro(klon,klev))
[2897]905      ALLOCATE(d_u_oro_gw(klon,klev),d_v_oro_gw(klon,klev))
906      ALLOCATE(d_t_oro_gw(klon,klev))
[2854]907      ALLOCATE(d_t_lif(klon,klev),d_t_ec(klon,klev))
908      ALLOCATE(d_u_lif(klon,klev),d_v_lif(klon,klev))
909      ALLOCATE(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr))
[4489]910
[1989]911! Special RRTM
[2854]912      ALLOCATE(ZLWFT0_i(klon,klev+1),ZSWFT0_i(klon,klev+1),ZFLDN0(klon,klev+1))
[3435]913      ZFLDN0= 0.
[2854]914      ALLOCATE(ZFLUP0(klon,klev+1),ZFSDN0(klon,klev+1),ZFSUP0(klon,klev+1))
[1989]915!
[2854]916      ALLOCATE(topswad_aero(klon), solswad_aero(klon))
917      ALLOCATE(topswai_aero(klon), solswai_aero(klon))
918      ALLOCATE(topswad0_aero(klon), solswad0_aero(klon))
919      ALLOCATE(toplwad_aero(klon), sollwad_aero(klon))
920      ALLOCATE(toplwai_aero(klon), sollwai_aero(klon))
921      ALLOCATE(toplwad0_aero(klon), sollwad0_aero(klon))
922      ALLOCATE(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp))
923      ALLOCATE(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp))
924      ALLOCATE(topswcf_aero(klon,3), solswcf_aero(klon,3))
925      ALLOCATE(du_gwd_hines(klon,klev),dv_gwd_hines(klon,klev))
926      ALLOCATE(dv_gwd_rando(klon,klev),dv_gwd_front(klon,klev))
927      ALLOCATE(east_gwstress(klon,klev),west_gwstress(klon,klev))
[3435]928      east_gwstress(:,:)=0 !ym missing init
929      west_gwstress(:,:)=0 !ym missing init
[2854]930      ALLOCATE(d_t_hin(klon,klev))
931      ALLOCATE(d_q_ch4(klon,klev))
932      ALLOCATE(stratomask(klon,klev))
933      ALLOCATE(tausum_aero(klon,nwave,naero_tot))
934      ALLOCATE(drytausum_aero(klon,naero_tot))
935      ALLOCATE(tau3d_aero(klon,klev,nwave,naero_tot))
[3274]936      ALLOCATE(dNovrN(klon))
[3124]937      ALLOCATE(zfice(klon, klev))
[2854]938      ALLOCATE(od443aer(klon))
939      ALLOCATE(od550aer(klon))
940      ALLOCATE(od865aer(klon))
941      ALLOCATE(dryod550aer(klon))
[3435]942      dryod550aer(:) = 0.
[2854]943      ALLOCATE(abs550aer(klon))
[3435]944      abs550aer(:) = 0.
[2854]945      ALLOCATE(ec550aer(klon,klev))
946      ALLOCATE(od550lt1aer(klon))
947      ALLOCATE(sconcso4(klon))
948      ALLOCATE(sconcno3(klon))
949      ALLOCATE(sconcoa(klon))
950      ALLOCATE(sconcbc(klon))
951      ALLOCATE(sconcss(klon))
952      ALLOCATE(sconcdust(klon))
953      ALLOCATE(concso4(klon,klev))
954      ALLOCATE(concno3(klon,klev))
955      ALLOCATE(concoa(klon,klev))
956      ALLOCATE(concbc(klon,klev))
957      ALLOCATE(concss(klon,klev))
958      ALLOCATE(concdust(klon,klev))
959      ALLOCATE(loadso4(klon))
960      ALLOCATE(loadoa(klon))
961      ALLOCATE(loadbc(klon))
962      ALLOCATE(loadss(klon))
963      ALLOCATE(loaddust(klon))
964      ALLOCATE(loadno3(klon))
965      ALLOCATE(load_tmp1(klon))
966      ALLOCATE(load_tmp2(klon))
967      ALLOCATE(load_tmp3(klon))
[2953]968      ALLOCATE(load_tmp4(klon))
969      ALLOCATE(load_tmp5(klon))
970      ALLOCATE(load_tmp6(klon))
971      ALLOCATE(load_tmp7(klon))
972      ALLOCATE(load_tmp8(klon))
973      ALLOCATE(load_tmp9(klon))
974      ALLOCATE(load_tmp10(klon))
[1279]975
[1539]976!IM ajout variables CFMIP2/CMIP5
977      ALLOCATE(topswad_aerop(klon), solswad_aerop(klon))
978      ALLOCATE(topswai_aerop(klon), solswai_aerop(klon))
979      ALLOCATE(topswad0_aerop(klon), solswad0_aerop(klon))
980      ALLOCATE(topsw_aerop(klon,naero_grp), topsw0_aerop(klon,naero_grp))
981      ALLOCATE(solsw_aerop(klon,naero_grp), solsw0_aerop(klon,naero_grp))
982      ALLOCATE(topswcf_aerop(klon,naero_grp), solswcf_aerop(klon,naero_grp))
983
[2146]984! additional LW variables CK
985      ALLOCATE(toplwad_aerop(klon), sollwad_aerop(klon))
986      ALLOCATE(toplwai_aerop(klon), sollwai_aerop(klon))
987      ALLOCATE(toplwad0_aerop(klon), sollwad0_aerop(klon))
988
[4677]989!AI Ajout Ecrad (3Deffect)
990      ALLOCATE(topswad_aero_s2(klon), solswad_aero_s2(klon))
991      ALLOCATE(topswai_aero_s2(klon), solswai_aero_s2(klon))
992      ALLOCATE(topswad0_aero_s2(klon), solswad0_aero_s2(klon))
993      ALLOCATE(topsw_aero_s2(klon,naero_grp), topsw0_aero_s2(klon,naero_grp))
994      ALLOCATE(solsw_aero_s2(klon,naero_grp), solsw0_aero_s2(klon,naero_grp))
995      ALLOCATE(topswcf_aero_s2(klon,naero_grp), solswcf_aero_s2(klon,naero_grp))
996! additional LW variables CK
997      ALLOCATE(toplwad_aero_s2(klon), sollwad_aero_s2(klon))
998      ALLOCATE(toplwai_aero_s2(klon), sollwai_aero_s2(klon))
999      ALLOCATE(toplwad0_aero_s2(klon), sollwad0_aero_s2(klon))
1000
[3435]1001! FH Ajout de celles necessaires au phys_output_write_mod
[1797]1002
[2385]1003      ALLOCATE(tal1(klon), pal1(klon), pab1(klon), pab2(klon))
1004      ALLOCATE(ptstar(klon),pt0(klon),slp(klon))
[2635]1005!!
1006!!          Wake variables
[3080]1007      ALLOCATE(alp_wake(klon))
[2732]1008      ALLOCATE(wake_h(klon),wake_k(klon))
[2635]1009      ALLOCATE(wake_omg(klon, klev))
1010      ALLOCATE(d_deltat_wk(klon, klev), d_deltaq_wk(klon, klev))
[4744]1011      ALLOCATE(d_s_wk(klon), d_s_a_wk(klon), d_dens_wk(klon), d_dens_a_wk(klon))
[2635]1012      ALLOCATE(d_deltat_wk_gw(klon, klev), d_deltaq_wk_gw(klon, klev))
1013      ALLOCATE(d_deltat_vdf(klon, klev), d_deltaq_vdf(klon, klev))
1014!!      ALLOCATE( d_s_vdf(klon), d_dens_vdf(klon))
1015      ALLOCATE(d_deltat_the(klon, klev), d_deltaq_the(klon, klev))
1016!!      ALLOCATE( d_s_the(klon), d_dens_the(klon))
1017      ALLOCATE(d_deltat_ajs_cv(klon, klev), d_deltaq_ajs_cv(klon, klev))
[5056]1018#ifdef ISO
1019      ALLOCATE(d_deltaxt_wk(ntraciso,klon, klev))
1020      ALLOCATE(d_deltaxt_wk_gw(ntraciso,klon, klev))
1021      ALLOCATE(d_deltaxt_the(ntraciso,klon, klev))
1022      ALLOCATE(d_deltaxt_vdf(ntraciso,klon, klev))
1023      ALLOCATE(d_deltaxt_ajs_cv(ntraciso,klon, klev))
1024#endif
[2635]1025!!         End of wake variables
1026!!
1027      ALLOCATE(bils(klon))
[1797]1028      ALLOCATE(cdragm(klon), cdragh(klon), cldh(klon), cldl(klon))
[2243]1029      ALLOCATE(cldm(klon), cldq(klon), cldt(klon), qsat2m(klon))
[1924]1030      ALLOCATE(JrNt(klon))
[5486]1031      ALLOCATE(dthmin(klon), evap(klon), snowerosion(klon), fder(klon), plcl(klon), plfc(klon), icesub_lic(klon))
[4887]1032      ALLOCATE(prw(klon), prlw(klon), prsw(klon), prbsw(klon), water_budget(klon), zustar(klon), zu10m(klon), zv10m(klon), rh2m(klon))
[1797]1033      ALLOCATE(s_lcl(klon))
1034      ALLOCATE(s_pblh(klon), s_pblt(klon), s_therm(klon))
[2159]1035!
1036!nrlmd+jyg<
1037      ALLOCATE(s_pblh_x(klon), s_pblh_w(klon))
1038      ALLOCATE(s_lcl_x(klon), s_lcl_w(klon))
1039!>nrlmd+jyg
1040!
[1797]1041      ALLOCATE(slab_wfbils(klon), tpot(klon), tpote(klon), ue(klon))
1042      ALLOCATE(uq(klon), ve(klon), vq(klon), zxffonte(klon))
[3257]1043      ALLOCATE(uwat(klon), vwat(klon))
[2243]1044      ALLOCATE(zxfqcalving(klon), zxfluxlat(klon))
[1797]1045      ALLOCATE(zxtsol(klon), snow_lsc(klon), zxfqfonte(klon), zxqsurf(klon))
[5109]1046! SN add runoff_diag
1047      ALLOCATE(zxrunofflic(klon), runoff_diag(klon))
1048      runoff_diag(:)=0.
[5188]1049      ALLOCATE(zxustartlic(klon), zxrhoslic(klon), zxqsaltlic(klon), tempsmoothlic(klon))
1050      zxustartlic(:)=0. ; zxrhoslic(:)=0. ; zxqsaltlic(:)=0. ; tempsmoothlic(:)=0.
[2159]1051      ALLOCATE(rain_lsc(klon))
[2516]1052      ALLOCATE(rain_num(klon))
[4118]1053      ALLOCATE(qlth(klon,klev), qith(klon,klev), qsith(klon,klev), wiceth(klon,klev))
[3999]1054      !
[5056]1055#ifdef ISO
1056      ALLOCATE(xtevap(ntraciso,klon))
1057      ALLOCATE(xtprw(ntraciso,klon))
1058      ALLOCATE(zxfxtcalving(niso,klon))
1059      ALLOCATE(xtsnow_lsc(ntraciso,klon), zxfxtfonte(niso,klon))
1060      ALLOCATE(zxxtrunofflic(niso,klon))
1061      ALLOCATE(xtrain_lsc(ntraciso,klon))
1062      ALLOCATE(xtrunoff_diag(niso,klon))
[5109]1063      ALLOCATE(h1_diag(klon))
[5056]1064!SN
[5109]1065      xtrunoff_diag(:,:)=0. ! because variables are only given values on knon grid points
[5056]1066#endif
1067!
[2159]1068      ALLOCATE(sens_x(klon), sens_w(klon))
1069      ALLOCATE(zxfluxlat_x(klon), zxfluxlat_w(klon))
[3888]1070      ALLOCATE(delta_qsurf(klon))
[2181]1071!jyg<
1072!!      ALLOCATE(t_x(klon,klev), t_w(klon,klev))
1073!!      ALLOCATE(q_x(klon,klev), q_w(klon,klev))
1074!>jyg
[3435]1075      ALLOCATE(dtvdf_x(klon,klev), dtvdf_w(klon,klev))
1076      dtvdf_x = 0 ; dtvdf_w=0 ;   !ym missing init
1077      ALLOCATE(dqvdf_x(klon,klev), dqvdf_w(klon,klev))
1078      dqvdf_x = 0 ; dqvdf_w=0 ;   !ym missing init
[2159]1079      ALLOCATE(pbl_tke_input(klon,klev+1,nbsrf))
[2607]1080      ALLOCATE(t_therm(klon,klev), q_therm(klon,klev),u_therm(klon,klev), v_therm(klon,klev))
[2159]1081      ALLOCATE(cdragh_x(klon), cdragh_w(klon))
1082      ALLOCATE(cdragm_x(klon), cdragm_w(klon))
1083      ALLOCATE(kh(klon), kh_x(klon), kh_w(klon))
[5056]1084#ifdef ISO
1085      ALLOCATE(dxtvdf_x(ntraciso,klon,klev), dxtvdf_w(ntraciso,klon,klev))
1086      ALLOCATE(xt_therm(ntraciso,klon,klev))
1087#endif
[2159]1088!
[2877]1089      ALLOCATE(ptconv(klon,klev))
[3148]1090      ALLOCATE(ratqsc(klon,klev))
[2877]1091!
[2824]1092      ALLOCATE(wbeff(klon), convoccur(klon), zmax_th(klon))
[1797]1093      ALLOCATE(zq2m(klon), zt2m(klon), weak_inversion(klon))
[2103]1094      ALLOCATE(zt2m_min_mon(klon), zt2m_max_mon(klon))
1095      ALLOCATE(t2m_min_mon(klon), t2m_max_mon(klon))
[1797]1096      ALLOCATE(sens(klon), flwp(klon), fiwp(klon))
[3080]1097      ALLOCATE(alp_bl_conv(klon), alp_bl_det(klon))
[3439]1098      alp_bl_conv(:)=0 ;  alp_bl_det(:)=0
[1797]1099      ALLOCATE(alp_bl_fluct_m(klon), alp_bl_fluct_tke(klon))
[3435]1100      alp_bl_fluct_m(:)=0 ; alp_bl_fluct_tke(:)= 0.
[4843]1101      ALLOCATE(alp_bl_stat(klon), n2(klon), s2(klon), strig(klon), zcong(klon), zlcl_th(klon))
[3435]1102      alp_bl_stat(:)=0
[1797]1103      ALLOCATE(proba_notrig(klon), random_notrig(klon))
1104
[3134]1105      ALLOCATE(dnwd0(klon, klev))
[1797]1106!      ALLOCATE(upwd(klon, klev), omega(klon, klev), coefh(klon, klev))
[3134]1107      ALLOCATE(omega(klon, klev))
[2481]1108      ALLOCATE(epmax_diag(klon)) ! epmax_cape
[1797]1109!      ALLOCATE(coefm(klon, klev), lambda_th(klon, klev), cldemi(klon, klev))
1110      ALLOCATE(lambda_th(klon, klev), cldemi(klon, klev))
1111      ALLOCATE(cldfra(klon, klev), cldtau(klon, klev), fiwc(klon, klev))
1112      ALLOCATE(fl(klon, klev), re(klon, klev), flwc(klon, klev))
1113      ALLOCATE(ref_liq(klon, klev), ref_ice(klon, klev), theta(klon, klev))
[1989]1114      ALLOCATE(ref_liq_pi(klon, klev), ref_ice_pi(klon, klev))
[3780]1115      ALLOCATE(zphi(klon, klev), zx_rh(klon, klev), zx_rhl(klon,klev), zx_rhi(klon,klev))
[4072]1116      zx_rhl(:,:)=0.; zx_rhi(:,:)=0. ! because not always defined
[1797]1117      ALLOCATE(pmfd(klon, klev), pmfu(klon, klev))
1118
[2243]1119      ALLOCATE(t2m(klon, nbsrf), fluxlat(klon, nbsrf))
1120      ALLOCATE(fsollw(klon, nbsrf))
[4737]1121      ALLOCATE(fsolsw(klon, nbsrf), wfbils(klon, nbsrf))
1122      ALLOCATE(wfevap(klon, nbsrf))
[1797]1123      ALLOCATE(evap_pot(klon, nbsrf))
[4575]1124! FC
1125      ALLOCATE(zxfluxq(klon,klev),zxfluxt(klon,klev))
[3134]1126!
1127!  Deep convective variables used in phytrac
1128      ALLOCATE(pmflxr(klon, klev+1), pmflxs(klon, klev+1))
[5425]1129      ALLOCATE(wdtrainA(klon,klev),wdtrainS(klon,klev),wdtrainM(klon,klev),wdtrainAS(klon,klev))
[4737]1130      ALLOCATE(dnwd(klon, klev), upwd(klon, klev))
[3134]1131      ALLOCATE(ep(klon,klev))                          ! epmax_cape
[4737]1132      ALLOCATE(da(klon,klev), mp(klon,klev))
1133      ALLOCATE(phi(klon,klev,klev))
1134      ALLOCATE(wght_cvfd(klon,klev))
1135      ALLOCATE(phi2(klon,klev,klev))
[3134]1136      ALLOCATE(d1a(klon,klev), dam(klon,klev))
[4737]1137      ALLOCATE(ev(klon,klev))
1138      ALLOCATE(elij(klon,klev,klev))
1139      ALLOCATE(qtaa(klon,klev))
1140      ALLOCATE(clw(klon,klev))
1141      ALLOCATE(epmlmMm(klon,klev,klev), eplaMm(klon,klev))
1142      ALLOCATE(sij(klon,klev,klev))
[5056]1143#ifdef ISO
1144      ALLOCATE(xtwdtrainA(ntraciso,klon,klev))
1145      ALLOCATE(xtev(ntraciso,klon,klev) )
1146      ALLOCATE(xttaa(ntraciso,klon,klev) )
1147      ALLOCATE(xtclw(ntraciso,klon,klev) )
1148#ifdef DIAGISO
1149      ALLOCATE(qlp(klon,klev))
1150      ALLOCATE(qvp(klon,klev))
1151      ALLOCATE(fq_detrainement(klon,klev))
1152      ALLOCATE(fq_ddft(klon,klev))
1153      ALLOCATE(fq_fluxmasse(klon,klev))
1154      ALLOCATE(fq_evapprecip(klon,klev))
1155      ALLOCATE(f_detrainement(klon,klev), q_detrainement(klon,klev))
1156      ALLOCATE(xtlp(ntraciso,klon,klev))
1157      ALLOCATE(xtvp(ntraciso,klon,klev))
1158      ALLOCATE(q_the(klon,klev), xt_the(ntraciso,klon,klev))
1159      ALLOCATE(fxt_detrainement(ntraciso,klon,klev))
1160      ALLOCATE(fxt_ddft(ntraciso,klon,klev))
1161      ALLOCATE(fxt_fluxmasse(ntraciso,klon,klev))
1162      ALLOCATE(fxt_evapprecip(ntraciso,klon,klev))
1163      ALLOCATE(xt_detrainement(ntraciso,klon,klev))
1164#endif
1165#endif
[1797]1166
[3134]1167      ALLOCATE(prfl(klon, klev+1))
[1797]1168      ALLOCATE(psfl(klon, klev+1), fraca(klon, klev+1), Vprecip(klon, klev+1))
[4523]1169      ALLOCATE(bsfl(klon,klev+1))
[1797]1170      ALLOCATE(zw2(klon, klev+1))
1171
1172      ALLOCATE(fluxu(klon, klev, nbsrf), fluxv(klon, klev, nbsrf))
1173      ALLOCATE(fluxt(klon, klev, nbsrf))
1174
1175      ALLOCATE(uwriteSTD(klon,nlevSTD,nfiles), vwriteSTD(klon,nlevSTD,nfiles))
1176      ALLOCATE(wwriteSTD(klon,nlevSTD,nfiles), phiwriteSTD(klon,nlevSTD,nfiles))
1177      ALLOCATE(qwriteSTD(klon,nlevSTD,nfiles), twriteSTD(klon,nlevSTD,nfiles))
[1828]1178      ALLOCATE(rhwriteSTD(klon,nlevSTD,nfiles))
[1797]1179
1180! ug et d'autres encore:
1181      ALLOCATE(beta_prec(klon,klev))
[2945]1182      ALLOCATE(rneb(klon,klev),rnebjn(klon,klev),rneblsvol(klon,klev))
[4530]1183      ALLOCATE(pfraclr(klon,klev),pfracld(klon,klev))
1184      pfraclr(:,:)=0. ; pfracld(:,:)=0. ! because not always defined
[5007]1185      ALLOCATE(cldfraliq(klon,klev))
1186      ALLOCATE(sigma2_icefracturb(klon,klev))
1187      ALLOCATE(mean_icefracturb(klon,klev))
[4562]1188      ALLOCATE(distcltop(klon,klev))
[4639]1189      ALLOCATE(temp_cltop(klon,klev))
[1797]1190
[4677]1191
[1872]1192      ALLOCATE (zxsnow(klon),snowhgt(klon),qsnow(klon),to_ice(klon))
1193      ALLOCATE (sissnow(klon),runoff(klon),albsol3_lic(klon))
[5056]1194#ifdef ISO
1195      ALLOCATE (zxxtsnow(niso,klon))
1196      ALLOCATE(xtVprecip(ntraciso,klon, klev+1),xtVprecipi(ntraciso,klon, klev+1))
1197      ALLOCATE(pxtsfl(ntraciso,klon, klev+1),pxtrfl(ntraciso,klon, klev+1))
1198#endif
[1865]1199
[2992]1200      ALLOCATE (p_tropopause(klon))
1201      ALLOCATE (z_tropopause(klon))
1202      ALLOCATE (t_tropopause(klon))
1203
[3817]1204      ALLOCATE(zn2mout(klon,6))
1205
[5204]1206!-- LSCP - condensation and ice supersaturation variables
1207      ALLOCATE(qsub(klon,klev), qissr(klon,klev), qcld(klon,klev))
1208      ALLOCATE(subfra(klon,klev), issrfra(klon,klev))
[5396]1209      ALLOCATE(gamma_cond(klon,klev), ql_seri_lscp(klon,klev), ratio_ql_qtot(klon,klev))
1210      ALLOCATE(qi_seri_lscp(klon,klev), ratio_qi_qtot(klon,klev))
[5204]1211      ALLOCATE(dcf_sub(klon,klev), dcf_con(klon,klev), dcf_mix(klon,klev))
1212      ALLOCATE(dqi_adj(klon,klev), dqi_sub(klon,klev), dqi_con(klon,klev), dqi_mix(klon,klev))
1213      ALLOCATE(dqvc_adj(klon,klev), dqvc_sub(klon,klev), dqvc_con(klon,klev), dqvc_mix(klon,klev))
1214      ALLOCATE(qsatliq(klon,klev), qsatice(klon,klev))
[4059]1215
[5204]1216!-- LSCP - aviation and contrails variables
1217      ALLOCATE(Tcontr(klon,klev), qcontr(klon,klev), qcontr2(klon,klev))
1218      ALLOCATE(fcontrN(klon,klev), fcontrP(klon,klev))
1219      ALLOCATE(dcf_avi(klon,klev), dqi_avi(klon,klev), dqvc_avi(klon,klev))
1220      ALLOCATE(flight_dist(klon,klev), flight_h2o(klon,klev))
1221
1222!-- LSCP - POPRECIP variables
[4830]1223      ALLOCATE(qraindiag(klon,klev), qsnowdiag(klon,klev))
[4819]1224      ALLOCATE(dqreva(klon,klev), dqssub(klon,klev))
[4803]1225      ALLOCATE(dqrauto(klon,klev), dqrcol(klon,klev), dqrmelt(klon,klev), dqrfreez(klon,klev))
1226      ALLOCATE(dqsauto(klon,klev), dqsagg(klon,klev), dqsrim(klon,klev), dqsmelt(klon,klev), dqsfreez(klon,klev))
1227
[5252]1228IF (CPPKEY_STRATAER) THEN
[4601]1229      ALLOCATE (d_q_emiss(klon,klev))
[2690]1230      ALLOCATE (R2SO4(klon,klev))
[4950]1231      ALLOCATE (R2SO4B(klon,klev,nbtr_bin))
[2690]1232      ALLOCATE (DENSO4(klon,klev))
[4950]1233      ALLOCATE (DENSO4B(klon,klev,nbtr_bin))
[2690]1234      ALLOCATE (f_r_wet(klon,klev))
[4950]1235      ALLOCATE (f_r_wetB(klon,klev,nbtr_bin))
[2690]1236      ALLOCATE (decfluxaer(klon,nbtr))
1237      ALLOCATE (mdw(nbtr))
[2752]1238      ALLOCATE (budg_3D_nucl(klon,klev))
1239      ALLOCATE (budg_3D_cond_evap(klon,klev))
1240      ALLOCATE (budg_3D_ocs_to_so2(klon,klev))
1241      ALLOCATE (budg_3D_so2_to_h2so4(klon,klev))
1242      ALLOCATE (budg_3D_backgr_ocs(klon,klev))
1243      ALLOCATE (budg_3D_backgr_so2(klon,klev))
[2690]1244      ALLOCATE (OCS_lifetime(klon,klev))
1245      ALLOCATE (SO2_lifetime(klon,klev))
[4601]1246      ALLOCATE (H2SO4_lifetime(klon,klev))
1247      ALLOCATE (O3_clim(klon,klev))
[3662]1248      ALLOCATE (alpha_bin(nbands_sw_rrtm+nbands_lw_rrtm+nwave,nbtr))
1249      ALLOCATE (piz_bin(nbands_sw_rrtm+nbands_lw_rrtm+nwave,nbtr))
1250      ALLOCATE (cg_bin(nbands_sw_rrtm+nbands_lw_rrtm+nwave,nbtr))
[2690]1251      ALLOCATE (tau_strat_550(klon,klev))
1252      ALLOCATE (tau_strat_1020(klon,klev))
1253      ALLOCATE (tausum_strat(klon,3))
[3100]1254      ALLOCATE (budg_dep_dry_ocs(klon))
1255      ALLOCATE (budg_dep_wet_ocs(klon))
1256      ALLOCATE (budg_dep_dry_so2(klon))
1257      ALLOCATE (budg_dep_wet_so2(klon))
[2752]1258      ALLOCATE (budg_dep_dry_h2so4(klon))
1259      ALLOCATE (budg_dep_wet_h2so4(klon))
1260      ALLOCATE (budg_dep_dry_part(klon))
1261      ALLOCATE (budg_dep_wet_part(klon))
1262      ALLOCATE (budg_emi_ocs(klon))
1263      ALLOCATE (budg_emi_so2(klon))
1264      ALLOCATE (budg_emi_h2so4(klon))
1265      ALLOCATE (budg_emi_part(klon))
1266      ALLOCATE (budg_ocs_to_so2(klon))
1267      ALLOCATE (budg_so2_to_h2so4(klon))
1268      ALLOCATE (budg_h2so4_to_part(klon))
1269      ALLOCATE (budg_sed_part(klon))
[2690]1270      ALLOCATE (surf_PM25_sulf(klon))
1271      ALLOCATE (vsed_aer(klon,klev))
[4998]1272      ALLOCATE (sulfmmr(klon,klev))
1273      ALLOCATE (SAD_sulfate(klon,klev))
[5150]1274      ALLOCATE (reff_sulfate(klon,klev))
[4998]1275      ALLOCATE (sulfmmr_mode(klon,klev,nbtr_bin))
1276      ALLOCATE (nd_mode(klon,klev,nbtr_bin))
[5252]1277END IF
[1865]1278
[904]1279END SUBROUTINE phys_local_var_init
1280
1281!======================================================================
1282SUBROUTINE phys_local_var_end
[1785]1283USE dimphy
1284USE indice_sol_mod
[904]1285IMPLICIT NONE
[4523]1286      DEALLOCATE(t_seri,q_seri,ql_seri,qs_seri, qbs_seri)
[5056]1287! SN 4D ISO
1288      DEALLOCATE(qx_seri)
1289! SN
[2854]1290      DEALLOCATE(u_seri,v_seri)
[5204]1291      DEALLOCATE(cf_seri,rvc_seri)
[4881]1292      DEALLOCATE(l_mixmin,l_mix,wprime)
[5039]1293      DEALLOCATE(tke_shear,tke_buoy,tke_trans)
[4881]1294      DEALLOCATE(pbl_eps)
[4489]1295      DEALLOCATE(rhcl)
[2854]1296      DEALLOCATE(tr_seri)
1297      DEALLOCATE(d_t_dyn,d_q_dyn)
[4523]1298      DEALLOCATE(d_ql_dyn,d_qs_dyn, d_qbs_dyn)
1299      DEALLOCATE(d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d, d_qbs_dyn2d)
[2854]1300      DEALLOCATE(d_u_dyn,d_v_dyn)
[5204]1301      DEALLOCATE(d_cf_dyn,d_rvc_dyn)
[2854]1302      DEALLOCATE(d_tr_dyn)                      !RomP
[4742]1303      DEALLOCATE(d_t_con,d_q_con,d_q_con_zmasse)
[2854]1304      DEALLOCATE(d_u_con,d_v_con)
1305      DEALLOCATE(d_t_wake,d_q_wake)
1306      DEALLOCATE(d_t_lsc,d_q_lsc)
1307      DEALLOCATE(d_t_lwr,d_t_lw0)
1308      DEALLOCATE(d_t_swr,d_t_sw0)
1309      DEALLOCATE(d_ql_lsc,d_qi_lsc)
1310      DEALLOCATE(d_t_ajsb,d_q_ajsb)
1311      DEALLOCATE(d_t_ajs,d_q_ajs)
[2159]1312!nrlmd<
[2854]1313      DEALLOCATE(d_t_ajs_w,d_q_ajs_w)
1314      DEALLOCATE(d_t_ajs_x,d_q_ajs_x)
[2159]1315!>nrlmd
[2854]1316      DEALLOCATE(d_u_ajs,d_v_ajs)
1317      DEALLOCATE(d_t_eva,d_q_eva)
[5056]1318! SN 4D ISO
1319      DEALLOCATE(d_qx_eva)
1320! SN
[2854]1321      DEALLOCATE(d_ql_eva,d_qi_eva)
1322      DEALLOCATE(d_t_lscst,d_q_lscst)
1323      DEALLOCATE(d_t_lscth,d_q_lscth)
1324      DEALLOCATE(plul_st,plul_th)
1325      DEALLOCATE(d_t_vdf,d_q_vdf,d_t_diss)
[4523]1326      DEALLOCATE(d_qbs_vdf)
[5050]1327      DEALLOCATE(d_t_bsss,d_q_bsss,d_qbs_bsss)
[5056]1328#ifdef ISO
1329      deallocate(xt_seri,xtl_seri,xts_seri,xtbs_seri)
1330      DEALLOCATE(d_xtl_eva,d_xti_eva)
1331      deallocate(d_xt_dyn,d_xtl_dyn,d_xts_dyn,d_xtbs_dyn)
1332      deallocate(d_xt_con)
1333      deallocate(d_xt_wake)
1334      deallocate(d_xt_lsc)
1335      deallocate(d_xtl_lsc,d_xti_lsc)
1336      deallocate(d_xt_ajsb)
1337      deallocate(d_xt_ajs)
1338      deallocate(d_xt_ajs_w,d_xt_ajs_x)
1339      deallocate(d_xt_eva)
1340      deallocate(d_xtl_eva)
1341      deallocate(d_xti_eva)
1342      deallocate(d_xt_vdf)
1343      deallocate(d_xt_vdf_w,d_xt_vdf_x)
1344      deallocate(d_xt_ch4)
1345      deallocate(d_xt_prod_nucl)
1346      deallocate(d_xt_cosmo)
1347      deallocate(d_xt_decroiss)
1348#endif
1349
[2854]1350      DEALLOCATE(d_u_vdf,d_v_vdf)
1351      DEALLOCATE(d_t_oli,d_t_oro)
1352      DEALLOCATE(d_u_oli,d_v_oli)
1353      DEALLOCATE(d_u_oro,d_v_oro)
[2897]1354      DEALLOCATE(d_t_oro_gw)
1355      DEALLOCATE(d_u_oro_gw,d_v_oro_gw)
[2854]1356      DEALLOCATE(d_t_lif,d_t_ec)
1357      DEALLOCATE(d_u_lif,d_v_lif)
1358      DEALLOCATE(d_ts, d_tr)
1359      DEALLOCATE(topswad_aero,solswad_aero)
1360      DEALLOCATE(topswai_aero,solswai_aero)
1361      DEALLOCATE(topswad0_aero,solswad0_aero)
1362      DEALLOCATE(toplwad_aero,sollwad_aero)
1363      DEALLOCATE(toplwai_aero,sollwai_aero)
1364      DEALLOCATE(toplwad0_aero,sollwad0_aero)
1365      DEALLOCATE(topsw_aero,solsw_aero)
1366      DEALLOCATE(topsw0_aero,solsw0_aero)
1367      DEALLOCATE(topswcf_aero,solswcf_aero)
1368      DEALLOCATE(stratomask)
1369      DEALLOCATE(tausum_aero)
1370      DEALLOCATE(drytausum_aero)
1371      DEALLOCATE(tau3d_aero)
[3274]1372      DEALLOCATE(dNovrN)
[3124]1373      DEALLOCATE(zfice)
[2854]1374      DEALLOCATE(od443aer)
1375      DEALLOCATE(od550aer)
1376      DEALLOCATE(od865aer)
1377      DEALLOCATE(dryod550aer)
1378      DEALLOCATE(abs550aer)
1379      DEALLOCATE(ec550aer)
1380      DEALLOCATE(od550lt1aer)
1381      DEALLOCATE(sconcso4)
1382      DEALLOCATE(sconcno3)
1383      DEALLOCATE(sconcoa)
1384      DEALLOCATE(sconcbc)
1385      DEALLOCATE(sconcss)
1386      DEALLOCATE(sconcdust)
1387      DEALLOCATE(concso4)
1388      DEALLOCATE(concno3)
1389      DEALLOCATE(concoa)
1390      DEALLOCATE(concbc)
1391      DEALLOCATE(concss)
1392      DEALLOCATE(concdust)
1393      DEALLOCATE(loadso4)
1394      DEALLOCATE(loadoa)
1395      DEALLOCATE(loadbc)
1396      DEALLOCATE(loadss)
1397      DEALLOCATE(loaddust)
1398      DEALLOCATE(loadno3)
1399      DEALLOCATE(load_tmp1)
1400      DEALLOCATE(load_tmp2)
1401      DEALLOCATE(load_tmp3)
[2953]1402      DEALLOCATE(load_tmp4)
1403      DEALLOCATE(load_tmp5)
1404      DEALLOCATE(load_tmp6)
1405      DEALLOCATE(load_tmp7)
1406      DEALLOCATE(load_tmp8)
1407      DEALLOCATE(load_tmp9)
1408      DEALLOCATE(load_tmp10)
[2854]1409      DEALLOCATE(du_gwd_hines,dv_gwd_hines,d_t_hin)
1410      DEALLOCATE(d_q_ch4)
1411      DEALLOCATE(dv_gwd_rando,dv_gwd_front)
1412      DEALLOCATE(east_gwstress,west_gwstress)
[1279]1413
[1539]1414!IM ajout variables CFMIP2/CMIP5
[2854]1415      DEALLOCATE(topswad_aerop, solswad_aerop)
1416      DEALLOCATE(topswai_aerop, solswai_aerop)
1417      DEALLOCATE(topswad0_aerop, solswad0_aerop)
1418      DEALLOCATE(topsw_aerop, topsw0_aerop)
1419      DEALLOCATE(solsw_aerop, solsw0_aerop)
1420      DEALLOCATE(topswcf_aerop, solswcf_aerop)
[2146]1421!CK LW diagnostics
[2854]1422      DEALLOCATE(toplwad_aerop, sollwad_aerop)
1423      DEALLOCATE(toplwai_aerop, sollwai_aerop)
1424      DEALLOCATE(toplwad0_aerop, sollwad0_aerop)
[1797]1425
[4677]1426!AI Ajout pour Ecrad (3Deffect)
1427      DEALLOCATE(topswad_aero_s2, solswad_aero_s2)
1428      DEALLOCATE(topswai_aero_s2, solswai_aero_s2)
1429      DEALLOCATE(topswad0_aero_s2, solswad0_aero_s2)
1430      DEALLOCATE(topsw_aero_s2, topsw0_aero_s2)
1431      DEALLOCATE(solsw_aero_s2, solsw0_aero_s2)
1432      DEALLOCATE(topswcf_aero_s2, solswcf_aero_s2)
1433!CK LW diagnostics
1434      DEALLOCATE(toplwad_aero_s2, sollwad_aero_s2)
1435      DEALLOCATE(toplwai_aero_s2, sollwai_aero_s2)
1436      DEALLOCATE(toplwad0_aero_s2, sollwad0_aero_s2)     
1437
[3435]1438! FH Ajout de celles necessaires au phys_output_write_mod
[2385]1439      DEALLOCATE(tal1, pal1, pab1, pab2)
1440      DEALLOCATE(ptstar, pt0, slp)
[2635]1441!
[3080]1442      DEALLOCATE(alp_wake)
[2732]1443      DEALLOCATE(wake_h,wake_k)
[2635]1444      DEALLOCATE(wake_omg)
1445      DEALLOCATE(d_deltat_wk, d_deltaq_wk)
[4744]1446      DEALLOCATE(d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk)
[2635]1447      DEALLOCATE(d_deltat_wk_gw, d_deltaq_wk_gw)
1448      DEALLOCATE(d_deltat_vdf, d_deltaq_vdf)
1449!!      DEALLOCATE( d_s_vdf, d_dens_vdf)
1450      DEALLOCATE(d_deltat_the, d_deltaq_the)
1451!!      DEALLOCATE( d_s_the, d_dens_the)
1452      DEALLOCATE(d_deltat_ajs_cv, d_deltaq_ajs_cv)
[5056]1453#ifdef ISO
1454      DEALLOCATE(d_deltaxt_wk)
1455      DEALLOCATE(d_deltaxt_wk_gw)
1456      DEALLOCATE(d_deltaxt_ajs_cv)
1457      DEALLOCATE(d_deltaxt_vdf)
1458#endif
[2635]1459!
1460      DEALLOCATE(bils)
[1797]1461      DEALLOCATE(cdragm, cdragh, cldh, cldl)
[2243]1462      DEALLOCATE(cldm, cldq, cldt, qsat2m)
[3779]1463      DEALLOCATE(JrNt)
[5486]1464      DEALLOCATE(dthmin, evap, snowerosion, icesub_lic, fder, plcl, plfc)
[4887]1465      DEALLOCATE(prw, prlw, prsw, prbsw, water_budget, zustar, zu10m, zv10m, rh2m, s_lcl)
[1797]1466      DEALLOCATE(s_pblh, s_pblt, s_therm)
[2159]1467!
1468!nrlmd+jyg<
1469      DEALLOCATE(s_pblh_x, s_pblh_w)
1470      DEALLOCATE(s_lcl_x, s_lcl_w)
1471!>nrlmd+jyg
1472!
[1797]1473      DEALLOCATE(slab_wfbils, tpot, tpote, ue)
1474      DEALLOCATE(uq, ve, vq, zxffonte)
[3257]1475      DEALLOCATE(uwat, vwat)
[2243]1476      DEALLOCATE(zxfqcalving, zxfluxlat)
[5109]1477! SN runoff_diag
1478      DEALLOCATE(zxrunofflic, runoff_diag)
[5188]1479      DEALLOCATE(zxustartlic, zxrhoslic, zxqsaltlic, tempsmoothlic)
[1797]1480      DEALLOCATE(zxtsol, snow_lsc, zxfqfonte, zxqsurf)
[2159]1481      DEALLOCATE(rain_lsc)
[2516]1482      DEALLOCATE(rain_num)
[4118]1483      DEALLOCATE(qlth, qith, qsith, wiceth)
[2159]1484!
1485      DEALLOCATE(sens_x, sens_w)
1486      DEALLOCATE(zxfluxlat_x, zxfluxlat_w)
[3888]1487      DEALLOCATE(delta_qsurf)
[2181]1488!jyg<
1489!!      DEALLOCATE(t_x, t_w)
1490!!      DEALLOCATE(q_x, q_w)
1491!>jyg
[3179]1492      DEALLOCATE(d_t_vdf_x, d_t_vdf_w)
1493      DEALLOCATE(d_q_vdf_x, d_q_vdf_w)
[2159]1494      DEALLOCATE(pbl_tke_input)
[2607]1495      DEALLOCATE(t_therm, q_therm, u_therm, v_therm)
[2159]1496      DEALLOCATE(cdragh_x, cdragh_w)
1497      DEALLOCATE(cdragm_x, cdragm_w)
1498      DEALLOCATE(kh, kh_x, kh_w)
[5056]1499#ifdef ISO
1500      DEALLOCATE(xtevap,xtprw)
1501      DEALLOCATE(zxfxtcalving)
1502      DEALLOCATE(zxxtrunofflic)
1503      DEALLOCATE(xtsnow_lsc, zxfxtfonte)
1504      DEALLOCATE(xtrain_lsc)
1505      DEALLOCATE(dxtvdf_x, dxtvdf_w)
1506      DEALLOCATE(xt_therm)
[5109]1507      DEALLOCATE(h1_diag,xtrunoff_diag)
[5056]1508#endif
[2159]1509!
[2877]1510      DEALLOCATE(ptconv)
[3148]1511      DEALLOCATE(ratqsc)
[2877]1512!
[2824]1513      DEALLOCATE(wbeff, convoccur, zmax_th)
[1797]1514      DEALLOCATE(zq2m, zt2m, weak_inversion)
[2103]1515      DEALLOCATE(zt2m_min_mon, zt2m_max_mon)
1516      DEALLOCATE(t2m_min_mon, t2m_max_mon)
[1797]1517      DEALLOCATE(sens, flwp, fiwp)
[3080]1518      DEALLOCATE(alp_bl_conv,alp_bl_det)
[1797]1519      DEALLOCATE(alp_bl_fluct_m,alp_bl_fluct_tke)
[4843]1520      DEALLOCATE(alp_bl_stat, n2, s2, strig, zcong, zlcl_th)
[1797]1521      DEALLOCATE(proba_notrig, random_notrig)
[4575]1522!FC
1523      DEALLOCATE(zxfluxq,zxfluxt)
[1797]1524
[3134]1525      DEALLOCATE(dnwd0)
[1797]1526!      DEALLOCATE(upwd, omega, coefh)
[3134]1527      DEALLOCATE(omega)
[2481]1528      DEALLOCATE(epmax_diag)
[1797]1529!      DEALLOCATE(coefm, lambda_th, cldemi)
1530      DEALLOCATE(lambda_th, cldemi)
1531      DEALLOCATE(cldfra, cldtau, fiwc)
1532      DEALLOCATE(fl, re, flwc)
1533      DEALLOCATE(ref_liq, ref_ice, theta)
[1989]1534      DEALLOCATE(ref_liq_pi, ref_ice_pi)
[3780]1535      DEALLOCATE(zphi, zx_rh, zx_rhl, zx_rhi)
[1797]1536      DEALLOCATE(pmfd, pmfu)
1537
[2243]1538      DEALLOCATE(t2m, fluxlat)
1539      DEALLOCATE(fsollw, evap_pot)
[4737]1540      DEALLOCATE(fsolsw, wfbils)
1541      DEALLOCATE(wfevap)
[1797]1542
[3134]1543      DEALLOCATE(pmflxr, pmflxs)
[5425]1544      DEALLOCATE(wdtrainA, wdtrainS, wdtrainM, wdtrainAS)
[3134]1545      DEALLOCATE(upwd, dnwd)
1546      DEALLOCATE(ep)
[4737]1547      DEALLOCATE(da, mp)
1548      DEALLOCATE(phi)
1549      DEALLOCATE(wght_cvfd)
1550      DEALLOCATE(phi2)
[3134]1551      DEALLOCATE(d1a, dam)
[4737]1552      DEALLOCATE(ev)
1553      DEALLOCATE(elij)
1554      DEALLOCATE(qtaa)
1555      DEALLOCATE(clw)
1556      DEALLOCATE(epmlmMm, eplaMm)
1557      DEALLOCATE(sij)
[5056]1558#ifdef ISO
1559      DEALLOCATE(xtwdtrainA)
1560      DEALLOCATE(xttaa )
1561      DEALLOCATE(xtclw )
1562      DEALLOCATE(xtev )
1563#ifdef DIAGISO
1564      DEALLOCATE(qlp)
1565      DEALLOCATE(qvp)
1566      DEALLOCATE(fq_detrainement)
1567      DEALLOCATE(fq_ddft)
1568      DEALLOCATE(fq_fluxmasse)
1569      DEALLOCATE(fq_evapprecip)
1570      DEALLOCATE(f_detrainement,q_detrainement)
1571      DEALLOCATE(xtlp)
1572      DEALLOCATE(xtvp)
1573      DEALLOCATE(q_the,xt_the)
1574      DEALLOCATE(fxt_detrainement)
1575      DEALLOCATE(fxt_ddft)
1576      DEALLOCATE(fxt_fluxmasse)
1577      DEALLOCATE(fxt_evapprecip)
1578      DEALLOCATE(xt_detrainement)
1579#endif
1580#endif
[3134]1581
1582
[4523]1583      DEALLOCATE(prfl, psfl, bsfl, fraca, Vprecip)
[1797]1584      DEALLOCATE(zw2)
1585
1586      DEALLOCATE(fluxu, fluxv)
1587      DEALLOCATE(fluxt)
1588
1589      DEALLOCATE(uwriteSTD, vwriteSTD)
1590      DEALLOCATE(wwriteSTD, phiwriteSTD)
[1828]1591      DEALLOCATE(qwriteSTD, twriteSTD, rhwriteSTD)
[1797]1592
1593! ug et d'autres encore:
1594      DEALLOCATE(beta_prec)
1595      DEALLOCATE(rneb)
[4530]1596      DEALLOCATE(pfraclr,pfracld)
[5007]1597      DEALLOCATE(cldfraliq)
1598      DEALLOCATE(sigma2_icefracturb)
1599      DEALLOCATE(mean_icefracturb)
[1865]1600      DEALLOCATE (zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic)
[4562]1601      DEALLOCATE(distcltop)
[4639]1602      DEALLOCATE(temp_cltop)
[5056]1603#ifdef ISO
1604      DEALLOCATE (zxxtsnow,xtVprecip,xtVprecipi,pxtrfl,pxtsfl)
1605#endif
1606
[2992]1607      DEALLOCATE (p_tropopause)
1608      DEALLOCATE (z_tropopause)
1609      DEALLOCATE (t_tropopause)
[3817]1610      DEALLOCATE(zn2mout)
[2992]1611
[5204]1612!-- LSCP - condensation and ice supersaturation variables
1613      DEALLOCATE(qsub, qissr, qcld)
1614      DEALLOCATE(subfra, issrfra)
[5396]1615      DEALLOCATE(gamma_cond, ql_seri_lscp, ratio_ql_qtot, qi_seri_lscp, ratio_qi_qtot)
[5204]1616      DEALLOCATE(dcf_sub, dcf_con, dcf_mix)
1617      DEALLOCATE(dqi_adj, dqi_sub, dqi_con, dqi_mix)
1618      DEALLOCATE(dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix)
1619      DEALLOCATE(qsatliq, qsatice)
[4059]1620
[5204]1621!-- LSCP - aviation and contrails variables
1622      DEALLOCATE(Tcontr, qcontr, qcontr2)
1623      DEALLOCATE(fcontrN, fcontrP)
1624      DEALLOCATE(dcf_avi, dqi_avi, dqvc_avi)
1625      DEALLOCATE(flight_dist, flight_h2o)
1626
1627!-- LSCP - POPRECIP variables
[4830]1628      DEALLOCATE(qraindiag, qsnowdiag)
[4819]1629      DEALLOCATE(dqreva, dqssub)
1630      DEALLOCATE(dqrauto, dqrcol, dqrmelt, dqrfreez)
1631      DEALLOCATE(dqsauto, dqsagg, dqsrim, dqsmelt, dqsfreez)
[4803]1632
[5252]1633IF (CPPKEY_STRATAER) THEN
[2690]1634! variables for strat. aerosol CK
[4601]1635      DEALLOCATE (d_q_emiss)
[4950]1636      DEALLOCATE (R2SO4, R2SO4B)
1637      DEALLOCATE (DENSO4, DENSO4B)
1638      DEALLOCATE (f_r_wet, f_r_wetB)
[2690]1639      DEALLOCATE (decfluxaer)
1640      DEALLOCATE (mdw)
1641      DEALLOCATE (SO2_lifetime)
1642      DEALLOCATE (OCS_lifetime)
[4601]1643      DEALLOCATE (H2SO4_lifetime)
1644      DEALLOCATE (O3_clim)
[2690]1645      DEALLOCATE (alpha_bin)
1646      DEALLOCATE (piz_bin)
1647      DEALLOCATE (cg_bin)
1648      DEALLOCATE (tau_strat_550)
1649      DEALLOCATE (tau_strat_1020)
1650      DEALLOCATE (tausum_strat)
1651      DEALLOCATE (surf_PM25_sulf)
1652      DEALLOCATE (vsed_aer)
[4998]1653      DEALLOCATE (sulfmmr)
1654      DEALLOCATE (SAD_sulfate)
[5150]1655      DEALLOCATE (reff_sulfate)
[4998]1656      DEALLOCATE (sulfmmr_mode)
1657      DEALLOCATE (nd_mode)
[2752]1658      DEALLOCATE (budg_3D_ocs_to_so2)
1659      DEALLOCATE (budg_3D_so2_to_h2so4)
1660      DEALLOCATE (budg_3D_backgr_ocs)
1661      DEALLOCATE (budg_3D_backgr_so2)
1662      DEALLOCATE (budg_3D_nucl)
1663      DEALLOCATE (budg_3D_cond_evap)
[3100]1664      DEALLOCATE (budg_dep_dry_ocs)
1665      DEALLOCATE (budg_dep_wet_ocs)
1666      DEALLOCATE (budg_dep_dry_so2)
1667      DEALLOCATE (budg_dep_wet_so2)
[2752]1668      DEALLOCATE (budg_dep_dry_h2so4)
1669      DEALLOCATE (budg_dep_wet_h2so4)
1670      DEALLOCATE (budg_dep_dry_part)
1671      DEALLOCATE (budg_dep_wet_part)
1672      DEALLOCATE (budg_emi_ocs)
1673      DEALLOCATE (budg_emi_so2)
1674      DEALLOCATE (budg_emi_h2so4)
1675      DEALLOCATE (budg_emi_part)
1676      DEALLOCATE (budg_ocs_to_so2)
1677      DEALLOCATE (budg_so2_to_h2so4)
1678      DEALLOCATE (budg_h2so4_to_part)
1679      DEALLOCATE (budg_sed_part)
[5252]1680END IF
[2690]1681
[904]1682END SUBROUTINE phys_local_var_end
1683
[2898]1684END MODULE phys_local_var_mod
Note: See TracBrowser for help on using the repository browser.