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

Last change on this file since 5048 was 5040, checked in by evignon, 4 months ago

petite correction commit precedent

  • 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: 57.9 KB
Line 
1!
2! $Id: phys_local_var_mod.F90 5040 2024-07-09 20:44:55Z fhourdin $
3!
4      MODULE phys_local_var_mod
5! Variables locales pour effectuer les appels en serie
6!======================================================================
7!
8!
9!======================================================================
10! Declaration des variables
11
12      REAL, SAVE, ALLOCATABLE :: t_seri(:,:), q_seri(:,:)
13      !$OMP THREADPRIVATE(t_seri, q_seri)
14      REAL, SAVE, ALLOCATABLE :: ql_seri(:,:),qs_seri(:,:)
15      !$OMP THREADPRIVATE(ql_seri,qs_seri)
16      REAL, SAVE, ALLOCATABLE :: qbs_seri(:,:)
17      !$OMP THREADPRIVATE(qbs_seri)
18      REAL, SAVE, ALLOCATABLE :: u_seri(:,:), v_seri(:,:)
19      !$OMP THREADPRIVATE(u_seri, v_seri)
20      REAL, SAVE, ALLOCATABLE :: rneb_seri(:,:)
21      !$OMP THREADPRIVATE(rneb_seri)
22      REAL, SAVE, ALLOCATABLE :: d_rneb_dyn(:,:)
23      !$OMP THREADPRIVATE(d_rneb_dyn)
24      REAL, SAVE, ALLOCATABLE :: l_mixmin(:,:,:),l_mix(:,:,:),wprime(:,:,:)
25      !$OMP THREADPRIVATE(l_mixmin, l_mix, wprime)
26      REAL, SAVE, ALLOCATABLE :: pbl_eps(:,:,:)
27      !$OMP THREADPRIVATE(pbl_eps)
28      REAL, SAVE, ALLOCATABLE :: tke_shear(:,:,:), tke_buoy(:,:,:), tke_trans(:,:,:)
29      !$OMP THREADPRIVATE(tke_shear,tke_buoy,tke_trans)
30      REAL, SAVE, ALLOCATABLE :: tr_seri(:,:,:)
31      !$OMP THREADPRIVATE(tr_seri)
32      REAL, SAVE, ALLOCATABLE :: rhcl(:,:)
33      !$OMP THREADPRIVATE(rhcl)
34      REAL, SAVE, ALLOCATABLE :: d_t_dyn(:,:), d_q_dyn(:,:)
35      !$OMP THREADPRIVATE(d_t_dyn, d_q_dyn)
36      REAL, SAVE, ALLOCATABLE :: d_ql_dyn(:,:), d_qs_dyn(:,:), d_qbs_dyn(:,:)
37      !$OMP THREADPRIVATE(d_ql_dyn, d_qs_dyn, d_qbs_dyn)
38      REAL, SAVE, ALLOCATABLE :: d_q_dyn2d(:), d_ql_dyn2d(:), d_qs_dyn2d(:), d_qbs_dyn2d(:)
39      !$OMP THREADPRIVATE(d_q_dyn2d, d_ql_dyn2d, d_qs_dyn2d, d_qbs_dyn2d)
40      REAL, SAVE, ALLOCATABLE :: d_u_dyn(:,:), d_v_dyn(:,:)
41      !$OMP THREADPRIVATE(d_u_dyn, d_v_dyn)
42      REAL, SAVE, ALLOCATABLE :: d_tr_dyn(:,:,:)
43      !$OMP THREADPRIVATE(d_tr_dyn)
44      REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:),d_q_con_zmasse(:,:)
45      !$OMP THREADPRIVATE(d_t_con,d_q_con,d_q_con_zmasse)
46      REAL, SAVE, ALLOCATABLE :: d_u_con(:,:),d_v_con(:,:)
47      !$OMP THREADPRIVATE(d_u_con,d_v_con)
48      REAL, SAVE, ALLOCATABLE :: d_t_wake(:,:),d_q_wake(:,:)
49      !$OMP THREADPRIVATE( d_t_wake,d_q_wake)
50      REAL, SAVE, ALLOCATABLE :: d_t_lsc(:,:),d_q_lsc(:,:),d_ql_lsc(:,:),d_qi_lsc(:,:)
51      !$OMP THREADPRIVATE(d_t_lsc,d_q_lsc,d_ql_lsc,d_qi_lsc)
52      REAL, SAVE, ALLOCATABLE :: d_t_lwr(:,:),d_t_lw0(:,:),d_t_swr(:,:),d_t_sw0(:,:)
53      !$OMP THREADPRIVATE(d_t_lwr,d_t_lw0,d_t_swr,d_t_sw0)
54      REAL, SAVE, ALLOCATABLE :: d_t_ajsb(:,:), d_q_ajsb(:,:)
55      !$OMP THREADPRIVATE(d_t_ajsb, d_q_ajsb)
56      REAL, SAVE, ALLOCATABLE :: d_t_ajs(:,:), d_q_ajs(:,:)
57      !$OMP THREADPRIVATE(d_t_ajs, d_q_ajs)
58      REAL, SAVE, ALLOCATABLE :: d_u_ajs(:,:), d_v_ajs(:,:)
59      !$OMP THREADPRIVATE(d_u_ajs, d_v_ajs)
60!nrlmd<
61      REAL, SAVE, ALLOCATABLE :: d_t_ajs_w(:,:), d_q_ajs_w(:,:)
62      !$OMP THREADPRIVATE(d_t_ajs_w, d_q_ajs_w)
63      REAL, SAVE, ALLOCATABLE :: d_t_ajs_x(:,:), d_q_ajs_x(:,:)
64      !$OMP THREADPRIVATE(d_t_ajs_x, d_q_ajs_x)
65!>nrlmd
66      REAL, SAVE, ALLOCATABLE :: d_t_eva(:,:),d_q_eva(:,:),d_ql_eva(:,:),d_qi_eva(:,:)
67      !$OMP THREADPRIVATE(d_t_eva,d_q_eva,d_ql_eva,d_qi_eva)
68      REAL, SAVE, ALLOCATABLE :: d_t_lscst(:,:),d_q_lscst(:,:)
69      !$OMP THREADPRIVATE(d_t_lscst,d_q_lscst)
70      REAL, SAVE, ALLOCATABLE :: d_t_lscth(:,:),d_q_lscth(:,:)
71      !$OMP THREADPRIVATE(d_t_lscth,d_q_lscth)
72      REAL, SAVE, ALLOCATABLE :: plul_th(:),plul_st(:)
73      !$OMP THREADPRIVATE(plul_th,plul_st)
74!tendances dues a oro et lif
75      REAL, SAVE, ALLOCATABLE :: d_t_oli(:,:)
76      !$OMP THREADPRIVATE(d_t_oli)
77      REAL, SAVE, ALLOCATABLE :: d_u_oli(:,:), d_v_oli(:,:)
78      !$OMP THREADPRIVATE(d_u_oli, d_v_oli)
79      REAL, SAVE, ALLOCATABLE :: d_t_vdf(:,:), d_q_vdf(:,:), d_qbs_vdf(:,:), d_t_diss(:,:)
80      !$OMP THREADPRIVATE( d_t_vdf, d_q_vdf, d_qbs_vdf, d_t_diss)
81      REAL, SAVE, ALLOCATABLE :: d_u_vdf(:,:), d_v_vdf(:,:)
82      !$OMP THREADPRIVATE(d_u_vdf, d_v_vdf)
83!nrlmd+jyg<
84      REAL, SAVE, ALLOCATABLE :: d_t_vdf_w(:,:), d_q_vdf_w(:,:)
85      !$OMP THREADPRIVATE( d_t_vdf_w, d_q_vdf_w)
86      REAL, SAVE, ALLOCATABLE :: d_t_vdf_x(:,:), d_q_vdf_x(:,:)
87      !$OMP THREADPRIVATE( d_t_vdf_x, d_q_vdf_x)
88      REAL, SAVE, ALLOCATABLE :: d_t_bs(:,:), d_q_bs(:,:), d_qbs_bs(:,:)
89      !$OMP THREADPRIVATE( d_t_bs,d_q_bs, d_qbs_bs)
90!>nrlmd+jyg
91      REAL, SAVE, ALLOCATABLE :: d_t_oro(:,:)
92      !$OMP THREADPRIVATE(d_t_oro)
93      REAL, SAVE, ALLOCATABLE :: d_u_oro(:,:), d_v_oro(:,:)
94      !$OMP THREADPRIVATE(d_u_oro, d_v_oro)
95      REAL, SAVE, ALLOCATABLE :: d_t_oro_gw(:,:)
96      !$OMP THREADPRIVATE(d_t_oro_gw)
97      REAL, SAVE, ALLOCATABLE :: d_u_oro_gw(:,:), d_v_oro_gw(:,:)
98      !$OMP THREADPRIVATE(d_u_oro_gw, d_v_oro_gw)
99      REAL, SAVE, ALLOCATABLE :: d_t_lif(:,:)
100      !$OMP THREADPRIVATE(d_t_lif)
101      REAL, SAVE, ALLOCATABLE :: d_u_lif(:,:), d_v_lif(:,:)
102      !$OMP THREADPRIVATE(d_u_lif, d_v_lif)
103! Tendances Ondes de G non oro (runs strato).
104      REAL, SAVE, ALLOCATABLE :: du_gwd_hines(:,:)
105      !$OMP THREADPRIVATE(du_gwd_hines)
106      REAL, SAVE, ALLOCATABLE :: dv_gwd_hines(:,:)
107      !$OMP THREADPRIVATE(dv_gwd_hines)
108      REAL, SAVE, ALLOCATABLE :: dv_gwd_rando(:,:)
109      !$OMP THREADPRIVATE(dv_gwd_rando)
110      REAL, SAVE, ALLOCATABLE :: dv_gwd_front(:,:)
111      !$OMP THREADPRIVATE(dv_gwd_front)
112      REAL, SAVE, ALLOCATABLE :: east_gwstress(:,:)
113      !$OMP THREADPRIVATE(east_gwstress)
114      REAL, SAVE, ALLOCATABLE :: west_gwstress(:,:)
115      !$OMP THREADPRIVATE(west_gwstress)
116      REAL, SAVE, ALLOCATABLE :: d_t_hin(:,:)
117      !$OMP THREADPRIVATE(d_t_hin)
118! tendance due a l'oxydation du methane
119      REAL, SAVE, ALLOCATABLE :: d_q_ch4(:,:)
120      !$OMP THREADPRIVATE(d_q_ch4)
121
122! tendance du a la conersion Ec -> E thermique
123      REAL, SAVE, ALLOCATABLE :: d_t_ec(:,:)
124      !$OMP THREADPRIVATE(d_t_ec)
125      REAL, SAVE, ALLOCATABLE :: d_ts(:,:), d_tr(:,:,:)
126      !$OMP THREADPRIVATE(d_ts, d_tr)
127
128! diagnostique pour le rayonnement
129      REAL, SAVE, ALLOCATABLE :: topswad_aero(:),  solswad_aero(:)      ! diag
130      !$OMP THREADPRIVATE(topswad_aero,solswad_aero)
131      REAL, SAVE, ALLOCATABLE :: topswai_aero(:),  solswai_aero(:)      ! diag
132      !$OMP THREADPRIVATE(topswai_aero,solswai_aero)
133      REAL, SAVE, ALLOCATABLE :: topswad0_aero(:), solswad0_aero(:)     ! diag
134      !$OMP THREADPRIVATE(topswad0_aero,solswad0_aero)
135      REAL, SAVE, ALLOCATABLE :: topsw_aero(:,:),  solsw_aero(:,:)      ! diag
136      !$OMP THREADPRIVATE(topsw_aero,solsw_aero)
137      REAL, SAVE, ALLOCATABLE :: topsw0_aero(:,:), solsw0_aero(:,:)     ! diag
138      !$OMP THREADPRIVATE(topsw0_aero,solsw0_aero)
139      REAL, SAVE, ALLOCATABLE :: topswcf_aero(:,:),  solswcf_aero(:,:)  ! diag
140      !$OMP THREADPRIVATE(topswcf_aero,solswcf_aero)
141! LW radiation diagnostics CK
142      REAL, SAVE, ALLOCATABLE :: toplwad_aero(:),  sollwad_aero(:)      ! diag
143      !$OMP THREADPRIVATE(toplwad_aero,sollwad_aero)
144      REAL, SAVE, ALLOCATABLE :: toplwai_aero(:),  sollwai_aero(:)      ! diag
145      !$OMP THREADPRIVATE(toplwai_aero,sollwai_aero)
146      REAL, SAVE, ALLOCATABLE :: toplwad0_aero(:), sollwad0_aero(:)     ! diag
147      !$OMP THREADPRIVATE(toplwad0_aero,sollwad0_aero)
148! Special RRTM
149      REAL, SAVE, ALLOCATABLE :: ZLWFT0_i(:,:),  ZSWFT0_i(:,:)      ! diag
150      !$OMP THREADPRIVATE(ZLWFT0_i,ZSWFT0_i)
151      REAL, SAVE, ALLOCATABLE :: ZFLDN0(:,:),  ZFLUP0(:,:)      ! diag
152      !$OMP THREADPRIVATE(ZFLDN0,ZFLUP0)
153      REAL, SAVE, ALLOCATABLE :: ZFSDN0(:,:),  ZFSUP0(:,:)      ! diag
154      !$OMP THREADPRIVATE(ZFSDN0,ZFSUP0)
155!
156      REAL, SAVE, ALLOCATABLE :: stratomask(:,:)
157      !$OMP THREADPRIVATE(stratomask)
158      REAL, SAVE, ALLOCATABLE :: tausum_aero(:,:,:)
159      !$OMP THREADPRIVATE(tausum_aero)
160      REAL, SAVE, ALLOCATABLE :: drytausum_aero(:,:)
161      !$OMP THREADPRIVATE(drytausum_aero)
162      REAL, SAVE, ALLOCATABLE :: tau3d_aero(:,:,:,:)
163      !$OMP THREADPRIVATE(tau3d_aero)
164      REAL, SAVE, ALLOCATABLE :: dNovrN(:)
165      !$OMP THREADPRIVATE(dNovrN)
166      REAL, SAVE, ALLOCATABLE :: zfice(:,:)
167      !$OMP THREADPRIVATE(zfice)
168      REAL, SAVE, ALLOCATABLE :: od443aer(:)
169      !$OMP THREADPRIVATE(od443aer)
170      REAL, SAVE, ALLOCATABLE :: od550aer(:)
171      !$OMP THREADPRIVATE(od550aer)
172      REAL, SAVE, ALLOCATABLE :: dryod550aer(:)
173      !$OMP THREADPRIVATE(dryod550aer)
174      REAL, SAVE, ALLOCATABLE :: abs550aer(:)
175      !$OMP THREADPRIVATE(abs550aer)
176      REAL, SAVE, ALLOCATABLE :: od865aer(:)
177      !$OMP THREADPRIVATE(od865aer)
178      REAL, SAVE, ALLOCATABLE :: ec550aer(:,:)
179      !$OMP THREADPRIVATE(ec550aer)
180      REAL, SAVE, ALLOCATABLE :: od550lt1aer(:)
181      !$OMP THREADPRIVATE(od550lt1aer)
182      REAL, SAVE, ALLOCATABLE :: sconcso4(:)
183      !$OMP THREADPRIVATE(sconcso4)
184      REAL, SAVE, ALLOCATABLE :: sconcno3(:)
185      !$OMP THREADPRIVATE(sconcno3)
186      REAL, SAVE, ALLOCATABLE :: sconcoa(:)
187      !$OMP THREADPRIVATE(sconcoa)
188      REAL, SAVE, ALLOCATABLE :: sconcbc(:)
189      !$OMP THREADPRIVATE(sconcbc)
190      REAL, SAVE, ALLOCATABLE :: sconcss(:)
191      !$OMP THREADPRIVATE(sconcss)
192      REAL, SAVE, ALLOCATABLE :: sconcdust(:)
193      !$OMP THREADPRIVATE(sconcdust)
194      REAL, SAVE, ALLOCATABLE :: concso4(:,:)
195      !$OMP THREADPRIVATE(concso4)
196      REAL, SAVE, ALLOCATABLE :: concno3(:,:)
197      !$OMP THREADPRIVATE(concno3)
198      REAL, SAVE, ALLOCATABLE :: concoa(:,:)
199      !$OMP THREADPRIVATE(concoa)
200      REAL, SAVE, ALLOCATABLE :: concbc(:,:)
201      !$OMP THREADPRIVATE(concbc)
202      REAL, SAVE, ALLOCATABLE :: concss(:,:)
203      !$OMP THREADPRIVATE(concss)
204      REAL, SAVE, ALLOCATABLE :: concdust(:,:)
205      !$OMP THREADPRIVATE(concdust)
206      REAL, SAVE, ALLOCATABLE :: loadso4(:)
207      !$OMP THREADPRIVATE(loadso4)
208      REAL, SAVE, ALLOCATABLE :: loadoa(:)
209      !$OMP THREADPRIVATE(loadoa)
210      REAL, SAVE, ALLOCATABLE :: loadbc(:)
211      !$OMP THREADPRIVATE(loadbc)
212      REAL, SAVE, ALLOCATABLE :: loadss(:)
213      !$OMP THREADPRIVATE(loadss)
214      REAL, SAVE, ALLOCATABLE :: loaddust(:)
215      !$OMP THREADPRIVATE(loaddust)
216      REAL, SAVE, ALLOCATABLE :: loadno3(:)
217      !$OMP THREADPRIVATE(loadno3)
218      REAL, SAVE, ALLOCATABLE :: load_tmp1(:), load_tmp2(:)
219      !$OMP THREADPRIVATE(load_tmp1, load_tmp2)
220      REAL, SAVE, ALLOCATABLE :: load_tmp3(:), load_tmp4(:)
221      !$OMP THREADPRIVATE(load_tmp3, load_tmp4)
222      REAL, SAVE, ALLOCATABLE :: load_tmp5(:), load_tmp6(:)
223      !$OMP THREADPRIVATE(load_tmp5, load_tmp6)
224      REAL, SAVE, ALLOCATABLE :: load_tmp7(:), load_tmp8(:)
225      !$OMP THREADPRIVATE(load_tmp7, load_tmp8)
226      REAL, SAVE, ALLOCATABLE :: load_tmp9(:), load_tmp10(:)
227      !$OMP THREADPRIVATE(load_tmp9, load_tmp10)
228
229!IM ajout variables CFMIP2/CMIP5
230      REAL,ALLOCATABLE,SAVE :: topswad_aerop(:), solswad_aerop(:)
231!$OMP THREADPRIVATE(topswad_aerop, solswad_aerop)
232      REAL,ALLOCATABLE,SAVE :: topswai_aerop(:), solswai_aerop(:)
233!$OMP THREADPRIVATE(topswai_aerop, solswai_aerop)
234      REAL,ALLOCATABLE,SAVE :: topswad0_aerop(:), solswad0_aerop(:)
235!$OMP THREADPRIVATE(topswad0_aerop, solswad0_aerop)
236      REAL,ALLOCATABLE,SAVE :: topsw_aerop(:,:), topsw0_aerop(:,:) 
237!$OMP THREADPRIVATE(topsw_aerop, topsw0_aerop)
238      REAL,ALLOCATABLE,SAVE :: solsw_aerop(:,:), solsw0_aerop(:,:)
239!$OMP THREADPRIVATE(solsw_aerop, solsw0_aerop)
240      REAL,ALLOCATABLE,SAVE :: topswcf_aerop(:,:), solswcf_aerop(:,:)
241!$OMP THREADPRIVATE(topswcf_aerop, solswcf_aerop)
242
243! additional LW variables CK
244      REAL,ALLOCATABLE,SAVE :: toplwad_aerop(:), sollwad_aerop(:)
245!$OMP THREADPRIVATE(toplwad_aerop, sollwad_aerop)
246      REAL,ALLOCATABLE,SAVE :: toplwai_aerop(:), sollwai_aerop(:)
247!$OMP THREADPRIVATE(toplwai_aerop, sollwai_aerop)
248      REAL,ALLOCATABLE,SAVE :: toplwad0_aerop(:), sollwad0_aerop(:)
249!$OMP THREADPRIVATE(toplwad0_aerop, sollwad0_aerop)
250
251!AI 08 2023 ajout pour Ecrad
252      REAL,ALLOCATABLE,SAVE :: topswad_aero_s2(:), solswad_aero_s2(:)
253!$OMP THREADPRIVATE(topswad_aero_s2, solswad_aero_s2)
254      REAL,ALLOCATABLE,SAVE :: topswai_aero_s2(:), solswai_aero_s2(:)
255!$OMP THREADPRIVATE(topswai_aero_s2, solswai_aero_s2)
256      REAL,ALLOCATABLE,SAVE :: topswad0_aero_s2(:), solswad0_aero_s2(:)
257!$OMP THREADPRIVATE(topswad0_aero_s2, solswad0_aero_s2)
258      REAL,ALLOCATABLE,SAVE :: topsw_aero_s2(:,:), topsw0_aero_s2(:,:)
259!$OMP THREADPRIVATE(topsw_aero_s2, topsw0_aero_s2)
260      REAL,ALLOCATABLE,SAVE :: solsw_aero_s2(:,:), solsw0_aero_s2(:,:)
261!$OMP THREADPRIVATE(solsw_aero_s2, solsw0_aero_s2)
262      REAL,ALLOCATABLE,SAVE :: topswcf_aero_s2(:,:), solswcf_aero_s2(:,:)
263!$OMP THREADPRIVATE(topswcf_aero_s2, solswcf_aero_s2)
264! additional LW variables CK
265      REAL,ALLOCATABLE,SAVE :: toplwad_aero_s2(:), sollwad_aero_s2(:)
266!$OMP THREADPRIVATE(toplwad_aero_s2, sollwad_aero_s2)
267      REAL,ALLOCATABLE,SAVE :: toplwai_aero_s2(:), sollwai_aero_s2(:)
268!$OMP THREADPRIVATE(toplwai_aero_s2, sollwai_aero_s2)
269      REAL,ALLOCATABLE,SAVE :: toplwad0_aero_s2(:), sollwad0_aero_s2(:)
270!$OMP THREADPRIVATE(toplwad0_aero_s2, sollwad0_aero_s2)
271
272!Ajout de celles n??cessaires au phys_output_write_mod
273      REAL, SAVE, ALLOCATABLE :: tal1(:), pal1(:), pab1(:), pab2(:)
274!$OMP THREADPRIVATE(tal1, pal1, pab1, pab2)
275      REAL, SAVE, ALLOCATABLE :: ptstar(:), pt0(:), slp(:)
276!$OMP THREADPRIVATE(ptstar, pt0, slp)
277      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sens, flwp, fiwp
278!$OMP THREADPRIVATE(sens, flwp, fiwp)
279!!
280!FC
281      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zxfluxt, zxfluxq
282!$OMP THREADPRIVATE(zxfluxt, zxfluxq)
283!FC
284!!         Wake variables
285      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: alp_wake
286!$OMP THREADPRIVATE(alp_wake)           
287!!jyg!      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: wake_h,wake_k
288      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: wake_h
289      INTEGER,ALLOCATABLE,SAVE,DIMENSION(:)         :: wake_k
290!$OMP THREADPRIVATE(wake_h,wake_k)                       
291    REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)            :: wake_omg
292!$OMP THREADPRIVATE(wake_omg)                     
293    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:)          :: d_deltat_wk, d_deltaq_wk
294!$OMP THREADPRIVATE(d_deltat_wk, d_deltaq_wk)
295      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk
296!$OMP THREADPRIVATE(d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk)
297    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:)          :: d_deltat_wk_gw, d_deltaq_wk_gw
298!$OMP THREADPRIVATE(d_deltat_wk_gw, d_deltaq_wk_gw)
299    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:)          :: d_deltat_vdf, d_deltaq_vdf
300!$OMP THREADPRIVATE(d_deltat_vdf, d_deltaq_vdf)
301!!!      REAL,ALLOCATABLE,SAVE,DIMENSION(:)          :: d_s_vdf, d_dens_vdf
302!!!OMP THREADPRIVATE(d_s_vdf, d_dens_vdf)
303    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:)          :: d_deltat_the, d_deltaq_the
304!$OMP THREADPRIVATE(d_deltat_the, d_deltaq_the)
305!!!      REAL,ALLOCATABLE,SAVE,DIMENSION(:)          :: d_s_the, d_dens_the
306!!!OMP THREADPRIVATE(d_s_the, d_dens_the)
307      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)           :: d_deltat_ajs_cv, d_deltaq_ajs_cv
308!$OMP THREADPRIVATE(d_deltat_ajs_cv, d_deltaq_ajs_cv)                       
309!!         End of Wake variables
310!!
311      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: bils
312!$OMP THREADPRIVATE(bils)
313      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragm, cdragh
314!$OMP THREADPRIVATE(cdragm, cdragh)
315      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cldh, cldl, cldm, cldq, cldt, qsat2m
316!$OMP THREADPRIVATE(cldh, cldl, cldm, cldq, cldt, qsat2m)
317!AS: cldhjn, cldljn, cldmjn,cldtjn pas utilisés en tant que variables, juste noms de diagnostics
318      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: JrNt
319!$OMP THREADPRIVATE(JrNt)
320      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget
321!$OMP THREADPRIVATE(dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget)
322      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zustar, zu10m, zv10m, rh2m
323!$OMP THREADPRIVATE(zustar, zu10m, zv10m, rh2m)
324      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_lcl, s_pblh, s_pblt, s_therm
325!$OMP THREADPRIVATE(s_lcl, s_pblh, s_pblt, s_therm)
326!
327!nrlmd+jyg<
328      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_pblh_x, s_pblh_w
329!$OMP THREADPRIVATE(s_pblh_x, s_pblh_w)
330      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_lcl_x, s_lcl_w
331!$OMP THREADPRIVATE(s_lcl_x, s_lcl_w)
332!>nrlmd+jyg
333!
334      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: slab_wfbils
335!$OMP THREADPRIVATE(slab_wfbils)
336      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: tpot, tpote, ue, uq, uwat, ve, vq, vwat, zxffonte
337!$OMP THREADPRIVATE(tpot, tpote, ue, uq, uwat, ve, vq, vwat, zxffonte)
338      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxustartlic, zxrhoslic, zxqsaltlic
339!$OMP THREADPRIVATE(zxustartlic, zxrhoslic, zxqsaltlic)
340      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfqcalving
341!$OMP THREADPRIVATE(zxfqcalving)
342      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat, zxtsol, snow_lsc, zxfqfonte
343!$OMP THREADPRIVATE(zxfluxlat, zxtsol, snow_lsc, zxfqfonte)
344      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxrunofflic
345!$OMP THREADPRIVATE(zxrunofflic)
346      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxqsurf, rain_lsc, rain_num
347!$OMP THREADPRIVATE(zxqsurf, rain_lsc, rain_num)
348!
349!jyg+nrlmd<
350!!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
351!                                                                          c
352!       Declarations liees a la couche limite differentiee w-x             c
353!                                                                          c
354!!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
355      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sens_x, sens_w
356!$OMP THREADPRIVATE(sens_x, sens_w)
357      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat_x, zxfluxlat_w
358!$OMP THREADPRIVATE(zxfluxlat_x, zxfluxlat_w)
359      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: delta_qsurf
360!$OMP THREADPRIVATE(delta_qsurf)
361!jyg<
362!!! Entrees supplementaires couche-limite
363!!      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: t_x, t_w
364!!!$OMP THREADPRIVATE(t_x, t_w)
365!!      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: q_x, q_w
366!!!$OMP THREADPRIVATE(q_x, q_w)
367!>jyg
368!!! Sorties ferret
369      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dtvdf_x, dtvdf_w
370!$OMP THREADPRIVATE(dtvdf_x, dtvdf_w)
371      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dqvdf_x, dqvdf_w
372!$OMP THREADPRIVATE(dqvdf_x, dqvdf_w)
373! Variables supplementaires dans physiq.F relative au splitting de la surface
374      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: pbl_tke_input
375!$OMP THREADPRIVATE(pbl_tke_input)
376! Entree supplementaire Thermiques :
377      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: t_therm, q_therm, u_therm, v_therm
378!$OMP THREADPRIVATE(t_therm, q_therm, u_therm, v_therm)
379      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragh_x, cdragh_w
380!$OMP THREADPRIVATE(cdragh_x, cdragh_w)
381      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragm_x, cdragm_w
382!$OMP THREADPRIVATE(cdragm_x, cdragm_w)
383      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: kh, kh_x, kh_w
384!$OMP THREADPRIVATE(kh, kh_x, kh_w)
385!!!
386!!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
387      LOGICAL, SAVE, ALLOCATABLE :: ptconv(:,:)
388      !$OMP THREADPRIVATE(ptconv)
389      REAL, SAVE, ALLOCATABLE :: ratqsc(:,:)
390      !$OMP THREADPRIVATE(ratqsc)
391!>jyg+nrlmd
392  !
393      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wbeff, convoccur, zmax_th, zq2m, zt2m
394!$OMP THREADPRIVATE(wbeff, convoccur, zmax_th, zq2m, zt2m)
395      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zt2m_min_mon, zt2m_max_mon
396!$OMP THREADPRIVATE(zt2m_min_mon, zt2m_max_mon)
397      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: t2m_min_mon, t2m_max_mon
398!$OMP THREADPRIVATE(t2m_min_mon, t2m_max_mon)
399      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: weak_inversion
400!$OMP THREADPRIVATE(weak_inversion)
401      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_conv,alp_bl_det
402!$OMP THREADPRIVATE(alp_bl_conv,alp_bl_det)
403      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_fluct_m,alp_bl_fluct_tke
404!$OMP THREADPRIVATE(alp_bl_fluct_m,alp_bl_fluct_tke)
405      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_stat, n2, s2, strig, zcong, zlcl_th
406!$OMP THREADPRIVATE(alp_bl_stat, n2, s2, strig, zcong, zlcl_th)
407      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: proba_notrig, random_notrig
408!$OMP THREADPRIVATE(proba_notrig, random_notrig)
409      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: fsolsw, wfbils
410!$OMP THREADPRIVATE(fsolsw, wfbils)
411      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: wfevap
412!$OMP THREADPRIVATE(wfevap)
413      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: t2m, fluxlat, fsollw,evap_pot
414!$OMP THREADPRIVATE(t2m, fluxlat, fsollw,evap_pot)
415      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dnwd0, omega
416!$OMP THREADPRIVATE(dnwd0, omega)
417      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: epmax_diag ! epmax_cape
418!$OMP THREADPRIVATE(epmax_diag)
419!
420!  Deep convective variables used in phytrac
421      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: ep ! epmax_cape
422!$OMP THREADPRIVATE(ep)
423      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: dnwd, upwd
424!$OMP THREADPRIVATE(dnwd, upwd)
425      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: pmflxr, pmflxs
426!$OMP THREADPRIVATE(pmflxr, pmflxs)
427      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: wdtrainA, wdtrainS, wdtrainM
428!$OMP THREADPRIVATE(wdtrainA, wdtrainS, wdtrainM)
429      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: da, mp
430!$OMP THREADPRIVATE(da, mp)
431      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: wght_cvfd
432!$OMP THREADPRIVATE(wght_cvfd)
433      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:):: phi, phi2, elij, epmlmMm
434!$OMP THREADPRIVATE(phi, phi2, elij, epmlmMm)
435      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: d1a, dam
436!$OMP THREADPRIVATE(d1a, dam)
437      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: ev
438!$OMP THREADPRIVATE(ev)
439      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: qtaa
440!$OMP THREADPRIVATE(qtaa)
441      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: clw
442!$OMP THREADPRIVATE(clw)
443      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: eplaMm
444!$OMP THREADPRIVATE(eplaMm)
445      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:):: sij
446!$OMP THREADPRIVATE(sij)
447!
448!      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: coefh, coefm, lambda_th
449      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: lambda_th
450!$OMP THREADPRIVATE(lambda_th)
451      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: cldemi, cldfra, cldtau, fiwc, fl, re, flwc
452!$OMP THREADPRIVATE(cldemi, cldfra, cldtau, fiwc, fl, re, flwc)
453      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: qlth, qith, qsith, wiceth
454!$OMP THREADPRIVATE(qlth, qith, qsith, wiceth)
455      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ref_liq, ref_ice, theta, zphi
456!$OMP THREADPRIVATE(ref_liq, ref_ice, theta, zphi)
457      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ref_liq_pi, ref_ice_pi
458!$OMP THREADPRIVATE(ref_liq_pi, ref_ice_pi)
459      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zx_rh, zx_rhl, zx_rhi
460!$OMP THREADPRIVATE(zx_rh, zx_rhl, zx_rhi)
461      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: prfl, psfl, fraca, bsfl
462!$OMP THREADPRIVATE(prfl, psfl, fraca, bsfl)
463      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: Vprecip, zw2
464!$OMP THREADPRIVATE(Vprecip, zw2)
465      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: pmfd, pmfu
466!$OMP THREADPRIVATE(pmfd, pmfu)
467      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: fluxt, fluxu, fluxv
468!$OMP THREADPRIVATE(fluxt, fluxu, fluxv)
469      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: uwriteSTD, vwriteSTD, wwriteSTD
470!$OMP THREADPRIVATE(uwriteSTD, vwriteSTD, wwriteSTD)
471      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD
472!$OMP THREADPRIVATE(phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD)
473
474
475! ug et d'autres encore:
476      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: beta_prec
477!$OMP THREADPRIVATE(beta_prec)
478      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rneb,rnebjn,rneblsvol
479!$OMP THREADPRIVATE(rneb,rnebjn,rneblsvol)
480      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: pfraclr,pfracld
481!$OMP THREADPRIVATE(pfraclr,pfracld)
482      REAL, SAVE, ALLOCATABLE :: cldfraliq(:,:)
483!$OMP THREADPRIVATE(cldfraliq)
484      REAL, SAVE, ALLOCATABLE ::mean_icefracturb(:,:)
485!$OMP THREADPRIVATE(mean_icefracturb)
486      REAL, SAVE, ALLOCATABLE :: sigma2_icefracturb(:,:)
487!$OMP THREADPRIVATE(sigma2_icefracturb)
488
489! variables de sorties MM
490      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxsnow,snowhgt,qsnow,to_ice
491      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sissnow,runoff,albsol3_lic
492!$OMP THREADPRIVATE(zxsnow,snowhgt,qsnow,to_ice)
493!$OMP THREADPRIVATE(sissnow,runoff,albsol3_lic)
494
495      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: p_tropopause, z_tropopause, t_tropopause
496!$OMP THREADPRIVATE(p_tropopause, z_tropopause, t_tropopause)
497
498      INTEGER,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zn2mout
499!$OMP THREADPRIVATE(zn2mout)
500
501      REAL, SAVE, ALLOCATABLE :: qclr(:,:)
502      !$OMP THREADPRIVATE(qclr)
503      REAL, SAVE, ALLOCATABLE :: qcld(:,:)
504      !$OMP THREADPRIVATE(qcld)
505      REAL, SAVE, ALLOCATABLE :: qss(:,:)
506      !$OMP THREADPRIVATE(qss)
507      REAL, SAVE, ALLOCATABLE :: qvc(:,:)
508      !$OMP THREADPRIVATE(qvc)
509      REAL, SAVE, ALLOCATABLE :: rnebclr(:,:)
510      !$OMP THREADPRIVATE(rnebclr)
511      REAL, SAVE, ALLOCATABLE :: rnebss(:,:)
512      !$OMP THREADPRIVATE(rnebss)
513      REAL, SAVE, ALLOCATABLE :: gamma_ss(:,:)
514      !$OMP THREADPRIVATE(gamma_ss)
515      REAL, SAVE, ALLOCATABLE :: N1_ss(:,:)
516      !$OMP THREADPRIVATE(N1_ss)
517      REAL, SAVE, ALLOCATABLE :: N2_ss(:,:)
518      !$OMP THREADPRIVATE(N2_ss)
519      REAL, SAVE, ALLOCATABLE :: drneb_sub(:,:)
520      !$OMP THREADPRIVATE(drneb_sub)
521      REAL, SAVE, ALLOCATABLE :: drneb_con(:,:)
522      !$OMP THREADPRIVATE(drneb_con)
523      REAL, SAVE, ALLOCATABLE :: drneb_tur(:,:)
524      !$OMP THREADPRIVATE(drneb_tur)
525      REAL, SAVE, ALLOCATABLE :: drneb_avi(:,:)
526      !$OMP THREADPRIVATE(drneb_avi)
527      REAL, SAVE, ALLOCATABLE :: zqsatl(:,:)
528      !$OMP THREADPRIVATE(zqsatl)
529      REAL, SAVE, ALLOCATABLE :: zqsats(:,:)
530      !$OMP THREADPRIVATE(zqsats)
531      REAL, SAVE, ALLOCATABLE :: Tcontr(:,:)
532      !$OMP THREADPRIVATE(Tcontr)
533      REAL, SAVE, ALLOCATABLE :: qcontr(:,:)
534      !$OMP THREADPRIVATE(qcontr)
535      REAL, SAVE, ALLOCATABLE :: qcontr2(:,:)
536      !$OMP THREADPRIVATE(qcontr2)
537      REAL, SAVE, ALLOCATABLE :: fcontrN(:,:)
538      !$OMP THREADPRIVATE(fcontrN)
539      REAL, SAVE, ALLOCATABLE :: fcontrP(:,:)
540      !$OMP THREADPRIVATE(fcontrP)
541      REAL, SAVE, ALLOCATABLE :: distcltop(:,:)
542      !$OMP THREADPRIVATE(distcltop)
543      REAL, SAVE, ALLOCATABLE :: temp_cltop(:,:)
544      !$OMP THREADPRIVATE(temp_cltop)
545
546
547!--POPRECIP variables
548      REAL, SAVE, ALLOCATABLE :: qraindiag(:,:)
549      !$OMP THREADPRIVATE(qraindiag)
550      REAL, SAVE, ALLOCATABLE :: qsnowdiag(:,:)
551      !$OMP THREADPRIVATE(qsnowdiag)
552      REAL, SAVE, ALLOCATABLE :: dqreva(:,:)
553      !$OMP THREADPRIVATE(dqreva)
554      REAL, SAVE, ALLOCATABLE :: dqrauto(:,:)
555      !$OMP THREADPRIVATE(dqrauto)
556      REAL, SAVE, ALLOCATABLE :: dqrcol(:,:)
557      !$OMP THREADPRIVATE(dqrcol)
558      REAL, SAVE, ALLOCATABLE :: dqrmelt(:,:)
559      !$OMP THREADPRIVATE(dqrmelt)
560       REAL, SAVE, ALLOCATABLE :: dqrfreez(:,:)
561      !$OMP THREADPRIVATE(dqrfreez)
562      REAL, SAVE, ALLOCATABLE :: dqssub(:,:)
563      !$OMP THREADPRIVATE(dqssub)
564      REAL, SAVE, ALLOCATABLE :: dqsauto(:,:)
565      !$OMP THREADPRIVATE(dqsauto)
566      REAL, SAVE, ALLOCATABLE :: dqsagg(:,:)
567      !$OMP THREADPRIVATE(dqsagg)
568      REAL, SAVE, ALLOCATABLE :: dqsrim(:,:)
569      !$OMP THREADPRIVATE(dqsrim)
570      REAL, SAVE, ALLOCATABLE :: dqsmelt(:,:)
571      !$OMP THREADPRIVATE(dqsmelt)
572      REAL, SAVE, ALLOCATABLE :: dqsfreez(:,:)
573      !$OMP THREADPRIVATE(dqsfreez)
574
575
576     
577
578
579#ifdef CPP_StratAer
580!
581! variables for stratospheric aerosol
582      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: d_q_emiss
583!$OMP THREADPRIVATE(d_q_emiss)
584      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: R2SO4
585!$OMP THREADPRIVATE(R2SO4)
586      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: R2SO4B
587!$OMP THREADPRIVATE(R2SO4B)
588      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: DENSO4
589!$OMP THREADPRIVATE(DENSO4)
590      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:, :) :: DENSO4B
591!$OMP THREADPRIVATE(DENSO4B)     
592      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: f_r_wet
593!$OMP THREADPRIVATE(f_r_wet)
594      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:, :) :: f_r_wetB
595!$OMP THREADPRIVATE(f_r_wetB)
596      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: decfluxaer
597!$OMP THREADPRIVATE(decfluxaer)
598      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: mdw
599!$OMP THREADPRIVATE(mdw)
600      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: OCS_lifetime
601!$OMP THREADPRIVATE(OCS_lifetime)
602      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: SO2_lifetime
603!$OMP THREADPRIVATE(SO2_lifetime)
604      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: H2SO4_lifetime
605!$OMP THREADPRIVATE(H2SO4_lifetime)
606      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: O3_clim
607!$OMP THREADPRIVATE(O3_clim)
608      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: alpha_bin
609!$OMP THREADPRIVATE(alpha_bin)
610      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: piz_bin
611!$OMP THREADPRIVATE(piz_bin)
612      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: cg_bin
613!$OMP THREADPRIVATE(cg_bin)
614      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_550
615!$OMP THREADPRIVATE(tau_strat_550)
616      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_1020
617!$OMP THREADPRIVATE(tau_strat_1020)
618      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tausum_strat
619!$OMP THREADPRIVATE(tausum_strat)
620      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: surf_PM25_sulf
621!$OMP THREADPRIVATE(surf_PM25_sulf)
622      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vsed_aer
623!$OMP THREADPRIVATE(vsed_aer)
624!     Sulfate aerosol concentration (dry mixing ratio) (condensed H2SO4 mmr)
625      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sulfmmr
626!$OMP THREADPRIVATE(sulfmmr)
627!     SAD all aerosols (cm2/cm3)
628      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: SAD_sulfate
629!$OMP THREADPRIVATE(SAD_sulfate)
630!     sulfate MMR in different modes (based on sulfmmr, it must be dry mmr)
631      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sulfmmr_mode
632!$OMP THREADPRIVATE(sulfmmr_mode)
633!     particle concentration in different modes (part/m3)
634      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nd_mode
635!$OMP THREADPRIVATE(nd_mode)
636!
637!---3D budget variables
638      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_nucl
639!$OMP THREADPRIVATE(budg_3D_nucl)
640      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_cond_evap
641!$OMP THREADPRIVATE(budg_3D_cond_evap)
642      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_ocs_to_so2
643!$OMP THREADPRIVATE(budg_3D_ocs_to_so2)
644      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_so2_to_h2so4
645!$OMP THREADPRIVATE(budg_3D_so2_to_h2so4)
646      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_backgr_ocs
647!$OMP THREADPRIVATE(budg_3D_backgr_ocs)
648      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_backgr_so2
649!$OMP THREADPRIVATE(budg_3D_backgr_so2)
650!
651!---2D budget variables
652      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_ocs
653      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_so2
654      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_h2so4
655      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_part
656!$OMP THREADPRIVATE(budg_dep_dry_ocs,budg_dep_dry_so2,budg_dep_dry_h2so4,budg_dep_dry_part)
657      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_ocs
658      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_so2
659      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_h2so4
660      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_part
661!$OMP THREADPRIVATE(budg_dep_wet_ocs,budg_dep_wet_so2,budg_dep_wet_h2so4,budg_dep_wet_part)
662      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_ocs
663      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_so2
664      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_h2so4
665      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_part
666!$OMP THREADPRIVATE(budg_emi_ocs,budg_emi_so2,budg_emi_h2so4,budg_emi_part)
667      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_ocs_to_so2
668      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_so2_to_h2so4
669      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_h2so4_to_part
670!$OMP THREADPRIVATE(budg_ocs_to_so2,budg_so2_to_h2so4,budg_h2so4_to_part)
671      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_sed_part
672!$OMP THREADPRIVATE(budg_sed_part)
673#endif
674#ifdef REPROBUS
675      REAL,SAVE,ALLOCATABLE    :: d_q_emiss(:,:)
676!$OMP THREADPRIVATE(d_q_emiss)
677#endif
678
679CONTAINS
680
681!======================================================================
682SUBROUTINE phys_local_var_init
683USE dimphy
684USE infotrac_phy, ONLY : nbtr
685USE aero_mod
686USE indice_sol_mod
687USE phys_output_var_mod
688USE phys_state_var_mod
689#ifdef CPP_StratAer
690USE infotrac_phy, ONLY : nbtr_bin
691#endif
692
693IMPLICIT NONE
694      ALLOCATE(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev), qbs_seri(klon,klev))
695      ALLOCATE(u_seri(klon,klev),v_seri(klon,klev))
696      ALLOCATE(l_mixmin(klon,klev+1,nbsrf),l_mix(klon,klev+1,nbsrf),wprime(klon,klev+1,nbsrf))
697      ALLOCATE(pbl_eps(klon,klev+1,nbsrf+1))
698      ALLOCATE(tke_shear(klon,klev+1,nbsrf), tke_buoy(klon,klev+1,nbsrf), tke_trans(klon,klev+1,nbsrf))
699      pbl_eps(:,:,:)=0.
700      tke_shear(:,:,:)=0.; tke_buoy(:,:,:)=0.; tke_trans(:,:,:)=0.
701      l_mix(:,:,:)=0.;l_mixmin(:,:,:)=0.;wprime(:,:,:)=0. ! doit etre initialse car pas toujours remplis
702      ALLOCATE(rhcl(klon,klev))
703      ALLOCATE(tr_seri(klon,klev,nbtr))
704      ALLOCATE(d_t_dyn(klon,klev),d_q_dyn(klon,klev))
705      ALLOCATE(d_ql_dyn(klon,klev),d_qs_dyn(klon,klev), d_qbs_dyn(klon,klev))
706      ALLOCATE(d_q_dyn2d(klon),d_ql_dyn2d(klon),d_qs_dyn2d(klon), d_qbs_dyn2d(klon))
707      ALLOCATE(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
708      ALLOCATE(d_tr_dyn(klon,klev,nbtr))                   !RomP
709      ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev),d_q_con_zmasse(klon,klev))
710      ALLOCATE(d_u_con(klon,klev),d_v_con(klon,klev))
711      ALLOCATE(d_t_wake(klon,klev),d_q_wake(klon,klev))
712      ALLOCATE(d_t_lsc(klon,klev),d_q_lsc(klon,klev))
713      ALLOCATE(d_t_lwr(klon,klev),d_t_lw0(klon,klev))
714      ALLOCATE(d_t_swr(klon,klev),d_t_sw0(klon,klev))
715      ALLOCATE(d_ql_lsc(klon,klev),d_qi_lsc(klon,klev))
716      ALLOCATE(d_t_ajsb(klon,klev),d_q_ajsb(klon,klev))
717      ALLOCATE(d_t_ajs(klon,klev),d_q_ajs(klon,klev))
718!nrlmd<
719      ALLOCATE(d_t_ajs_w(klon,klev),d_q_ajs_w(klon,klev))
720      ALLOCATE(d_t_ajs_x(klon,klev),d_q_ajs_x(klon,klev))
721!>nrlmd
722      ALLOCATE(d_u_ajs(klon,klev),d_v_ajs(klon,klev))
723      ALLOCATE(d_t_eva(klon,klev),d_q_eva(klon,klev))
724      ALLOCATE(d_ql_eva(klon,klev),d_qi_eva(klon,klev))
725      ALLOCATE(d_t_lscst(klon,klev),d_q_lscst(klon,klev))
726      ALLOCATE(d_t_lscth(klon,klev),d_q_lscth(klon,klev))
727      ALLOCATE(plul_st(klon),plul_th(klon))
728      ALLOCATE(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))
729      ALLOCATE (d_qbs_vdf(klon,klev))
730      ALLOCATE(d_t_bs(klon,klev),d_q_bs(klon,klev),d_qbs_bs(klon,klev))
731      ALLOCATE(d_t_vdf_w(klon,klev),d_q_vdf_w(klon,klev))
732      ALLOCATE(d_t_vdf_x(klon,klev),d_q_vdf_x(klon,klev))
733
734      ALLOCATE(d_u_vdf(klon,klev),d_v_vdf(klon,klev))
735      ALLOCATE(d_t_oli(klon,klev),d_t_oro(klon,klev))
736      ALLOCATE(d_u_oli(klon,klev),d_v_oli(klon,klev))
737      ALLOCATE(d_u_oro(klon,klev),d_v_oro(klon,klev))
738      ALLOCATE(d_u_oro_gw(klon,klev),d_v_oro_gw(klon,klev))
739      ALLOCATE(d_t_oro_gw(klon,klev))
740      ALLOCATE(d_t_lif(klon,klev),d_t_ec(klon,klev))
741      ALLOCATE(d_u_lif(klon,klev),d_v_lif(klon,klev))
742      ALLOCATE(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr))
743
744! Special RRTM
745      ALLOCATE(ZLWFT0_i(klon,klev+1),ZSWFT0_i(klon,klev+1),ZFLDN0(klon,klev+1))
746      ZFLDN0= 0.
747      ALLOCATE(ZFLUP0(klon,klev+1),ZFSDN0(klon,klev+1),ZFSUP0(klon,klev+1))
748!
749      ALLOCATE(topswad_aero(klon), solswad_aero(klon))
750      ALLOCATE(topswai_aero(klon), solswai_aero(klon))
751      ALLOCATE(topswad0_aero(klon), solswad0_aero(klon))
752      ALLOCATE(toplwad_aero(klon), sollwad_aero(klon))
753      ALLOCATE(toplwai_aero(klon), sollwai_aero(klon))
754      ALLOCATE(toplwad0_aero(klon), sollwad0_aero(klon))
755      ALLOCATE(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp))
756      ALLOCATE(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp))
757      ALLOCATE(topswcf_aero(klon,3), solswcf_aero(klon,3))
758      ALLOCATE(du_gwd_hines(klon,klev),dv_gwd_hines(klon,klev))
759      ALLOCATE(dv_gwd_rando(klon,klev),dv_gwd_front(klon,klev))
760      ALLOCATE(east_gwstress(klon,klev),west_gwstress(klon,klev))
761      east_gwstress(:,:)=0 !ym missing init
762      west_gwstress(:,:)=0 !ym missing init
763      ALLOCATE(d_t_hin(klon,klev))
764      ALLOCATE(d_q_ch4(klon,klev))
765      ALLOCATE(stratomask(klon,klev))
766      ALLOCATE(tausum_aero(klon,nwave,naero_tot))
767      ALLOCATE(drytausum_aero(klon,naero_tot))
768      ALLOCATE(tau3d_aero(klon,klev,nwave,naero_tot))
769      ALLOCATE(dNovrN(klon))
770      ALLOCATE(zfice(klon, klev))
771      ALLOCATE(od443aer(klon))
772      ALLOCATE(od550aer(klon))
773      ALLOCATE(od865aer(klon))
774      ALLOCATE(dryod550aer(klon))
775      dryod550aer(:) = 0.
776      ALLOCATE(abs550aer(klon))
777      abs550aer(:) = 0.
778      ALLOCATE(ec550aer(klon,klev))
779      ALLOCATE(od550lt1aer(klon))
780      ALLOCATE(sconcso4(klon))
781      ALLOCATE(sconcno3(klon))
782      ALLOCATE(sconcoa(klon))
783      ALLOCATE(sconcbc(klon))
784      ALLOCATE(sconcss(klon))
785      ALLOCATE(sconcdust(klon))
786      ALLOCATE(concso4(klon,klev))
787      ALLOCATE(concno3(klon,klev))
788      ALLOCATE(concoa(klon,klev))
789      ALLOCATE(concbc(klon,klev))
790      ALLOCATE(concss(klon,klev))
791      ALLOCATE(concdust(klon,klev))
792      ALLOCATE(loadso4(klon))
793      ALLOCATE(loadoa(klon))
794      ALLOCATE(loadbc(klon))
795      ALLOCATE(loadss(klon))
796      ALLOCATE(loaddust(klon))
797      ALLOCATE(loadno3(klon))
798      ALLOCATE(load_tmp1(klon))
799      ALLOCATE(load_tmp2(klon))
800      ALLOCATE(load_tmp3(klon))
801      ALLOCATE(load_tmp4(klon))
802      ALLOCATE(load_tmp5(klon))
803      ALLOCATE(load_tmp6(klon))
804      ALLOCATE(load_tmp7(klon))
805      ALLOCATE(load_tmp8(klon))
806      ALLOCATE(load_tmp9(klon))
807      ALLOCATE(load_tmp10(klon))
808
809!IM ajout variables CFMIP2/CMIP5
810      ALLOCATE(topswad_aerop(klon), solswad_aerop(klon))
811      ALLOCATE(topswai_aerop(klon), solswai_aerop(klon))
812      ALLOCATE(topswad0_aerop(klon), solswad0_aerop(klon))
813      ALLOCATE(topsw_aerop(klon,naero_grp), topsw0_aerop(klon,naero_grp))
814      ALLOCATE(solsw_aerop(klon,naero_grp), solsw0_aerop(klon,naero_grp))
815      ALLOCATE(topswcf_aerop(klon,naero_grp), solswcf_aerop(klon,naero_grp))
816
817! additional LW variables CK
818      ALLOCATE(toplwad_aerop(klon), sollwad_aerop(klon))
819      ALLOCATE(toplwai_aerop(klon), sollwai_aerop(klon))
820      ALLOCATE(toplwad0_aerop(klon), sollwad0_aerop(klon))
821
822!AI Ajout Ecrad (3Deffect)
823      ALLOCATE(topswad_aero_s2(klon), solswad_aero_s2(klon))
824      ALLOCATE(topswai_aero_s2(klon), solswai_aero_s2(klon))
825      ALLOCATE(topswad0_aero_s2(klon), solswad0_aero_s2(klon))
826      ALLOCATE(topsw_aero_s2(klon,naero_grp), topsw0_aero_s2(klon,naero_grp))
827      ALLOCATE(solsw_aero_s2(klon,naero_grp), solsw0_aero_s2(klon,naero_grp))
828      ALLOCATE(topswcf_aero_s2(klon,naero_grp), solswcf_aero_s2(klon,naero_grp))
829! additional LW variables CK
830      ALLOCATE(toplwad_aero_s2(klon), sollwad_aero_s2(klon))
831      ALLOCATE(toplwai_aero_s2(klon), sollwai_aero_s2(klon))
832      ALLOCATE(toplwad0_aero_s2(klon), sollwad0_aero_s2(klon))
833
834! FH Ajout de celles necessaires au phys_output_write_mod
835
836      ALLOCATE(tal1(klon), pal1(klon), pab1(klon), pab2(klon))
837      ALLOCATE(ptstar(klon),pt0(klon),slp(klon))
838!!
839!!          Wake variables
840      ALLOCATE(alp_wake(klon))
841      ALLOCATE(wake_h(klon),wake_k(klon))
842      ALLOCATE(wake_omg(klon, klev))
843      ALLOCATE(d_deltat_wk(klon, klev), d_deltaq_wk(klon, klev))
844      ALLOCATE(d_s_wk(klon), d_s_a_wk(klon), d_dens_wk(klon), d_dens_a_wk(klon))
845      ALLOCATE(d_deltat_wk_gw(klon, klev), d_deltaq_wk_gw(klon, klev))
846      ALLOCATE(d_deltat_vdf(klon, klev), d_deltaq_vdf(klon, klev))
847!!      ALLOCATE( d_s_vdf(klon), d_dens_vdf(klon))
848      ALLOCATE(d_deltat_the(klon, klev), d_deltaq_the(klon, klev))
849!!      ALLOCATE( d_s_the(klon), d_dens_the(klon))
850      ALLOCATE(d_deltat_ajs_cv(klon, klev), d_deltaq_ajs_cv(klon, klev))
851!!         End of wake variables
852!!
853      ALLOCATE(bils(klon))
854      ALLOCATE(cdragm(klon), cdragh(klon), cldh(klon), cldl(klon))
855      ALLOCATE(cldm(klon), cldq(klon), cldt(klon), qsat2m(klon))
856      ALLOCATE(JrNt(klon))
857      ALLOCATE(dthmin(klon), evap(klon), snowerosion(klon), fder(klon), plcl(klon), plfc(klon))
858      ALLOCATE(prw(klon), prlw(klon), prsw(klon), prbsw(klon), water_budget(klon), zustar(klon), zu10m(klon), zv10m(klon), rh2m(klon))
859      ALLOCATE(s_lcl(klon))
860      ALLOCATE(s_pblh(klon), s_pblt(klon), s_therm(klon))
861!
862!nrlmd+jyg<
863      ALLOCATE(s_pblh_x(klon), s_pblh_w(klon))
864      ALLOCATE(s_lcl_x(klon), s_lcl_w(klon))
865!>nrlmd+jyg
866!
867      ALLOCATE(slab_wfbils(klon), tpot(klon), tpote(klon), ue(klon))
868      ALLOCATE(uq(klon), ve(klon), vq(klon), zxffonte(klon))
869      ALLOCATE(uwat(klon), vwat(klon))
870      ALLOCATE(zxfqcalving(klon), zxfluxlat(klon))
871      ALLOCATE(zxtsol(klon), snow_lsc(klon), zxfqfonte(klon), zxqsurf(klon))
872      ALLOCATE(zxrunofflic(klon))
873      ALLOCATE(zxustartlic(klon), zxrhoslic(klon), zxqsaltlic(klon))
874      zxustartlic(:)=0. ; zxrhoslic(:)=0. ; zxqsaltlic(:)=0.
875      ALLOCATE(rain_lsc(klon))
876      ALLOCATE(rain_num(klon))
877      ALLOCATE(qlth(klon,klev), qith(klon,klev), qsith(klon,klev), wiceth(klon,klev))
878      !
879      ALLOCATE(sens_x(klon), sens_w(klon))
880      ALLOCATE(zxfluxlat_x(klon), zxfluxlat_w(klon))
881      ALLOCATE(delta_qsurf(klon))
882!jyg<
883!!      ALLOCATE(t_x(klon,klev), t_w(klon,klev))
884!!      ALLOCATE(q_x(klon,klev), q_w(klon,klev))
885!>jyg
886      ALLOCATE(dtvdf_x(klon,klev), dtvdf_w(klon,klev))
887      dtvdf_x = 0 ; dtvdf_w=0 ;   !ym missing init
888      ALLOCATE(dqvdf_x(klon,klev), dqvdf_w(klon,klev))
889      dqvdf_x = 0 ; dqvdf_w=0 ;   !ym missing init
890      ALLOCATE(pbl_tke_input(klon,klev+1,nbsrf))
891      ALLOCATE(t_therm(klon,klev), q_therm(klon,klev),u_therm(klon,klev), v_therm(klon,klev))
892      ALLOCATE(cdragh_x(klon), cdragh_w(klon))
893      ALLOCATE(cdragm_x(klon), cdragm_w(klon))
894      ALLOCATE(kh(klon), kh_x(klon), kh_w(klon))
895!
896      ALLOCATE(ptconv(klon,klev))
897      ALLOCATE(ratqsc(klon,klev))
898!
899      ALLOCATE(wbeff(klon), convoccur(klon), zmax_th(klon))
900      ALLOCATE(zq2m(klon), zt2m(klon), weak_inversion(klon))
901      ALLOCATE(zt2m_min_mon(klon), zt2m_max_mon(klon))
902      ALLOCATE(t2m_min_mon(klon), t2m_max_mon(klon))
903      ALLOCATE(sens(klon), flwp(klon), fiwp(klon))
904      ALLOCATE(alp_bl_conv(klon), alp_bl_det(klon))
905      alp_bl_conv(:)=0 ;  alp_bl_det(:)=0
906      ALLOCATE(alp_bl_fluct_m(klon), alp_bl_fluct_tke(klon))
907      alp_bl_fluct_m(:)=0 ; alp_bl_fluct_tke(:)= 0.
908      ALLOCATE(alp_bl_stat(klon), n2(klon), s2(klon), strig(klon), zcong(klon), zlcl_th(klon))
909      alp_bl_stat(:)=0
910      ALLOCATE(proba_notrig(klon), random_notrig(klon))
911
912      ALLOCATE(dnwd0(klon, klev))
913!      ALLOCATE(upwd(klon, klev), omega(klon, klev), coefh(klon, klev))
914      ALLOCATE(omega(klon, klev))
915      ALLOCATE(epmax_diag(klon)) ! epmax_cape
916!      ALLOCATE(coefm(klon, klev), lambda_th(klon, klev), cldemi(klon, klev))
917      ALLOCATE(lambda_th(klon, klev), cldemi(klon, klev))
918      ALLOCATE(cldfra(klon, klev), cldtau(klon, klev), fiwc(klon, klev))
919      ALLOCATE(fl(klon, klev), re(klon, klev), flwc(klon, klev))
920      ALLOCATE(ref_liq(klon, klev), ref_ice(klon, klev), theta(klon, klev))
921      ALLOCATE(ref_liq_pi(klon, klev), ref_ice_pi(klon, klev))
922      ALLOCATE(zphi(klon, klev), zx_rh(klon, klev), zx_rhl(klon,klev), zx_rhi(klon,klev))
923      zx_rhl(:,:)=0.; zx_rhi(:,:)=0. ! because not always defined
924      ALLOCATE(pmfd(klon, klev), pmfu(klon, klev))
925
926      ALLOCATE(t2m(klon, nbsrf), fluxlat(klon, nbsrf))
927      ALLOCATE(fsollw(klon, nbsrf))
928      ALLOCATE(fsolsw(klon, nbsrf), wfbils(klon, nbsrf))
929      ALLOCATE(wfevap(klon, nbsrf))
930      ALLOCATE(evap_pot(klon, nbsrf))
931! FC
932      ALLOCATE(zxfluxq(klon,klev),zxfluxt(klon,klev))
933!
934!  Deep convective variables used in phytrac
935      ALLOCATE(pmflxr(klon, klev+1), pmflxs(klon, klev+1))
936      ALLOCATE(wdtrainA(klon,klev),wdtrainS(klon,klev),wdtrainM(klon,klev))
937      ALLOCATE(dnwd(klon, klev), upwd(klon, klev))
938      ALLOCATE(ep(klon,klev))                          ! epmax_cape
939      ALLOCATE(da(klon,klev), mp(klon,klev))
940      ALLOCATE(phi(klon,klev,klev))
941      ALLOCATE(wght_cvfd(klon,klev))
942      ALLOCATE(phi2(klon,klev,klev))
943      ALLOCATE(d1a(klon,klev), dam(klon,klev))
944      ALLOCATE(ev(klon,klev))
945      ALLOCATE(elij(klon,klev,klev))
946      ALLOCATE(qtaa(klon,klev))
947      ALLOCATE(clw(klon,klev))
948      ALLOCATE(epmlmMm(klon,klev,klev), eplaMm(klon,klev))
949      ALLOCATE(sij(klon,klev,klev))
950
951      ALLOCATE(prfl(klon, klev+1))
952      ALLOCATE(psfl(klon, klev+1), fraca(klon, klev+1), Vprecip(klon, klev+1))
953      ALLOCATE(bsfl(klon,klev+1))
954      ALLOCATE(zw2(klon, klev+1))
955
956      ALLOCATE(fluxu(klon, klev, nbsrf), fluxv(klon, klev, nbsrf))
957      ALLOCATE(fluxt(klon, klev, nbsrf))
958
959      ALLOCATE(uwriteSTD(klon,nlevSTD,nfiles), vwriteSTD(klon,nlevSTD,nfiles))
960      ALLOCATE(wwriteSTD(klon,nlevSTD,nfiles), phiwriteSTD(klon,nlevSTD,nfiles))
961      ALLOCATE(qwriteSTD(klon,nlevSTD,nfiles), twriteSTD(klon,nlevSTD,nfiles))
962      ALLOCATE(rhwriteSTD(klon,nlevSTD,nfiles))
963
964! ug et d'autres encore:
965      ALLOCATE(beta_prec(klon,klev))
966      ALLOCATE(rneb(klon,klev),rnebjn(klon,klev),rneblsvol(klon,klev))
967      ALLOCATE(pfraclr(klon,klev),pfracld(klon,klev))
968      pfraclr(:,:)=0. ; pfracld(:,:)=0. ! because not always defined
969      ALLOCATE(cldfraliq(klon,klev))
970      ALLOCATE(sigma2_icefracturb(klon,klev))
971      ALLOCATE(mean_icefracturb(klon,klev))
972      ALLOCATE(distcltop(klon,klev))
973      ALLOCATE(temp_cltop(klon,klev))
974
975
976      ALLOCATE (zxsnow(klon),snowhgt(klon),qsnow(klon),to_ice(klon))
977      ALLOCATE (sissnow(klon),runoff(klon),albsol3_lic(klon))
978
979      ALLOCATE (p_tropopause(klon))
980      ALLOCATE (z_tropopause(klon))
981      ALLOCATE (t_tropopause(klon))
982
983      ALLOCATE(zn2mout(klon,6))
984
985! Supersaturation
986      ALLOCATE(rneb_seri(klon,klev))
987      ALLOCATE(d_rneb_dyn(klon,klev))
988      ALLOCATE(qclr(klon,klev), qcld(klon,klev), qss(klon,klev), qvc(klon,klev))
989      ALLOCATE(rnebclr(klon,klev), rnebss(klon,klev), gamma_ss(klon,klev))
990      ALLOCATE(N1_ss(klon,klev), N2_ss(klon,klev))
991      ALLOCATE(drneb_sub(klon,klev), drneb_con(klon,klev), drneb_tur(klon,klev), drneb_avi(klon,klev))
992      ALLOCATE(zqsatl(klon,klev), zqsats(klon,klev))
993      ALLOCATE(Tcontr(klon,klev), qcontr(klon,klev), qcontr2(klon,klev), fcontrN(klon,klev), fcontrP(klon,klev))
994
995!--POPRECIP variables
996      ALLOCATE(qraindiag(klon,klev), qsnowdiag(klon,klev))
997      ALLOCATE(dqreva(klon,klev), dqssub(klon,klev))
998      ALLOCATE(dqrauto(klon,klev), dqrcol(klon,klev), dqrmelt(klon,klev), dqrfreez(klon,klev))
999      ALLOCATE(dqsauto(klon,klev), dqsagg(klon,klev), dqsrim(klon,klev), dqsmelt(klon,klev), dqsfreez(klon,klev))
1000
1001#ifdef CPP_StratAer
1002      ALLOCATE (d_q_emiss(klon,klev))
1003      ALLOCATE (R2SO4(klon,klev))
1004      ALLOCATE (R2SO4B(klon,klev,nbtr_bin))
1005      ALLOCATE (DENSO4(klon,klev))
1006      ALLOCATE (DENSO4B(klon,klev,nbtr_bin))
1007      ALLOCATE (f_r_wet(klon,klev))
1008      ALLOCATE (f_r_wetB(klon,klev,nbtr_bin))
1009      ALLOCATE (decfluxaer(klon,nbtr))
1010      ALLOCATE (mdw(nbtr))
1011      ALLOCATE (budg_3D_nucl(klon,klev))
1012      ALLOCATE (budg_3D_cond_evap(klon,klev))
1013      ALLOCATE (budg_3D_ocs_to_so2(klon,klev))
1014      ALLOCATE (budg_3D_so2_to_h2so4(klon,klev))
1015      ALLOCATE (budg_3D_backgr_ocs(klon,klev))
1016      ALLOCATE (budg_3D_backgr_so2(klon,klev))
1017      ALLOCATE (OCS_lifetime(klon,klev))
1018      ALLOCATE (SO2_lifetime(klon,klev))
1019      ALLOCATE (H2SO4_lifetime(klon,klev))
1020      ALLOCATE (O3_clim(klon,klev))
1021      ALLOCATE (alpha_bin(nbands_sw_rrtm+nbands_lw_rrtm+nwave,nbtr))
1022      ALLOCATE (piz_bin(nbands_sw_rrtm+nbands_lw_rrtm+nwave,nbtr))
1023      ALLOCATE (cg_bin(nbands_sw_rrtm+nbands_lw_rrtm+nwave,nbtr))
1024      ALLOCATE (tau_strat_550(klon,klev))
1025      ALLOCATE (tau_strat_1020(klon,klev))
1026      ALLOCATE (tausum_strat(klon,3))
1027      ALLOCATE (budg_dep_dry_ocs(klon))
1028      ALLOCATE (budg_dep_wet_ocs(klon))
1029      ALLOCATE (budg_dep_dry_so2(klon))
1030      ALLOCATE (budg_dep_wet_so2(klon))
1031      ALLOCATE (budg_dep_dry_h2so4(klon))
1032      ALLOCATE (budg_dep_wet_h2so4(klon))
1033      ALLOCATE (budg_dep_dry_part(klon))
1034      ALLOCATE (budg_dep_wet_part(klon))
1035      ALLOCATE (budg_emi_ocs(klon))
1036      ALLOCATE (budg_emi_so2(klon))
1037      ALLOCATE (budg_emi_h2so4(klon))
1038      ALLOCATE (budg_emi_part(klon))
1039      ALLOCATE (budg_ocs_to_so2(klon))
1040      ALLOCATE (budg_so2_to_h2so4(klon))
1041      ALLOCATE (budg_h2so4_to_part(klon))
1042      ALLOCATE (budg_sed_part(klon))
1043      ALLOCATE (surf_PM25_sulf(klon))
1044      ALLOCATE (vsed_aer(klon,klev))
1045      ALLOCATE (sulfmmr(klon,klev))
1046      ALLOCATE (SAD_sulfate(klon,klev))
1047      ALLOCATE (sulfmmr_mode(klon,klev,nbtr_bin))
1048      ALLOCATE (nd_mode(klon,klev,nbtr_bin))
1049#endif
1050
1051END SUBROUTINE phys_local_var_init
1052
1053!======================================================================
1054SUBROUTINE phys_local_var_end
1055USE dimphy
1056USE indice_sol_mod
1057IMPLICIT NONE
1058      DEALLOCATE(t_seri,q_seri,ql_seri,qs_seri, qbs_seri)
1059      DEALLOCATE(u_seri,v_seri)
1060      DEALLOCATE(l_mixmin,l_mix,wprime)
1061      DEALLOCATE(tke_shear,tke_buoy,tke_trans)
1062      DEALLOCATE(pbl_eps)
1063      DEALLOCATE(rhcl)
1064      DEALLOCATE(tr_seri)
1065      DEALLOCATE(d_t_dyn,d_q_dyn)
1066      DEALLOCATE(d_ql_dyn,d_qs_dyn, d_qbs_dyn)
1067      DEALLOCATE(d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d, d_qbs_dyn2d)
1068      DEALLOCATE(d_u_dyn,d_v_dyn)
1069      DEALLOCATE(d_tr_dyn)                      !RomP
1070      DEALLOCATE(d_t_con,d_q_con,d_q_con_zmasse)
1071      DEALLOCATE(d_u_con,d_v_con)
1072      DEALLOCATE(d_t_wake,d_q_wake)
1073      DEALLOCATE(d_t_lsc,d_q_lsc)
1074      DEALLOCATE(d_t_lwr,d_t_lw0)
1075      DEALLOCATE(d_t_swr,d_t_sw0)
1076      DEALLOCATE(d_ql_lsc,d_qi_lsc)
1077      DEALLOCATE(d_t_ajsb,d_q_ajsb)
1078      DEALLOCATE(d_t_ajs,d_q_ajs)
1079!nrlmd<
1080      DEALLOCATE(d_t_ajs_w,d_q_ajs_w)
1081      DEALLOCATE(d_t_ajs_x,d_q_ajs_x)
1082!>nrlmd
1083      DEALLOCATE(d_u_ajs,d_v_ajs)
1084      DEALLOCATE(d_t_eva,d_q_eva)
1085      DEALLOCATE(d_ql_eva,d_qi_eva)
1086      DEALLOCATE(d_t_lscst,d_q_lscst)
1087      DEALLOCATE(d_t_lscth,d_q_lscth)
1088      DEALLOCATE(plul_st,plul_th)
1089      DEALLOCATE(d_t_vdf,d_q_vdf,d_t_diss)
1090      DEALLOCATE(d_qbs_vdf)
1091      DEALLOCATE(d_t_bs,d_q_bs,d_qbs_bs)
1092      DEALLOCATE(d_u_vdf,d_v_vdf)
1093      DEALLOCATE(d_t_oli,d_t_oro)
1094      DEALLOCATE(d_u_oli,d_v_oli)
1095      DEALLOCATE(d_u_oro,d_v_oro)
1096      DEALLOCATE(d_t_oro_gw)
1097      DEALLOCATE(d_u_oro_gw,d_v_oro_gw)
1098      DEALLOCATE(d_t_lif,d_t_ec)
1099      DEALLOCATE(d_u_lif,d_v_lif)
1100      DEALLOCATE(d_ts, d_tr)
1101      DEALLOCATE(topswad_aero,solswad_aero)
1102      DEALLOCATE(topswai_aero,solswai_aero)
1103      DEALLOCATE(topswad0_aero,solswad0_aero)
1104      DEALLOCATE(toplwad_aero,sollwad_aero)
1105      DEALLOCATE(toplwai_aero,sollwai_aero)
1106      DEALLOCATE(toplwad0_aero,sollwad0_aero)
1107      DEALLOCATE(topsw_aero,solsw_aero)
1108      DEALLOCATE(topsw0_aero,solsw0_aero)
1109      DEALLOCATE(topswcf_aero,solswcf_aero)
1110      DEALLOCATE(stratomask)
1111      DEALLOCATE(tausum_aero)
1112      DEALLOCATE(drytausum_aero)
1113      DEALLOCATE(tau3d_aero)
1114      DEALLOCATE(dNovrN)
1115      DEALLOCATE(zfice)
1116      DEALLOCATE(od443aer)
1117      DEALLOCATE(od550aer)
1118      DEALLOCATE(od865aer)
1119      DEALLOCATE(dryod550aer)
1120      DEALLOCATE(abs550aer)
1121      DEALLOCATE(ec550aer)
1122      DEALLOCATE(od550lt1aer)
1123      DEALLOCATE(sconcso4)
1124      DEALLOCATE(sconcno3)
1125      DEALLOCATE(sconcoa)
1126      DEALLOCATE(sconcbc)
1127      DEALLOCATE(sconcss)
1128      DEALLOCATE(sconcdust)
1129      DEALLOCATE(concso4)
1130      DEALLOCATE(concno3)
1131      DEALLOCATE(concoa)
1132      DEALLOCATE(concbc)
1133      DEALLOCATE(concss)
1134      DEALLOCATE(concdust)
1135      DEALLOCATE(loadso4)
1136      DEALLOCATE(loadoa)
1137      DEALLOCATE(loadbc)
1138      DEALLOCATE(loadss)
1139      DEALLOCATE(loaddust)
1140      DEALLOCATE(loadno3)
1141      DEALLOCATE(load_tmp1)
1142      DEALLOCATE(load_tmp2)
1143      DEALLOCATE(load_tmp3)
1144      DEALLOCATE(load_tmp4)
1145      DEALLOCATE(load_tmp5)
1146      DEALLOCATE(load_tmp6)
1147      DEALLOCATE(load_tmp7)
1148      DEALLOCATE(load_tmp8)
1149      DEALLOCATE(load_tmp9)
1150      DEALLOCATE(load_tmp10)
1151      DEALLOCATE(du_gwd_hines,dv_gwd_hines,d_t_hin)
1152      DEALLOCATE(d_q_ch4)
1153      DEALLOCATE(dv_gwd_rando,dv_gwd_front)
1154      DEALLOCATE(east_gwstress,west_gwstress)
1155
1156!IM ajout variables CFMIP2/CMIP5
1157      DEALLOCATE(topswad_aerop, solswad_aerop)
1158      DEALLOCATE(topswai_aerop, solswai_aerop)
1159      DEALLOCATE(topswad0_aerop, solswad0_aerop)
1160      DEALLOCATE(topsw_aerop, topsw0_aerop)
1161      DEALLOCATE(solsw_aerop, solsw0_aerop)
1162      DEALLOCATE(topswcf_aerop, solswcf_aerop)
1163!CK LW diagnostics
1164      DEALLOCATE(toplwad_aerop, sollwad_aerop)
1165      DEALLOCATE(toplwai_aerop, sollwai_aerop)
1166      DEALLOCATE(toplwad0_aerop, sollwad0_aerop)
1167
1168!AI Ajout pour Ecrad (3Deffect)
1169      DEALLOCATE(topswad_aero_s2, solswad_aero_s2)
1170      DEALLOCATE(topswai_aero_s2, solswai_aero_s2)
1171      DEALLOCATE(topswad0_aero_s2, solswad0_aero_s2)
1172      DEALLOCATE(topsw_aero_s2, topsw0_aero_s2)
1173      DEALLOCATE(solsw_aero_s2, solsw0_aero_s2)
1174      DEALLOCATE(topswcf_aero_s2, solswcf_aero_s2)
1175!CK LW diagnostics
1176      DEALLOCATE(toplwad_aero_s2, sollwad_aero_s2)
1177      DEALLOCATE(toplwai_aero_s2, sollwai_aero_s2)
1178      DEALLOCATE(toplwad0_aero_s2, sollwad0_aero_s2)     
1179
1180! FH Ajout de celles necessaires au phys_output_write_mod
1181      DEALLOCATE(tal1, pal1, pab1, pab2)
1182      DEALLOCATE(ptstar, pt0, slp)
1183!
1184      DEALLOCATE(alp_wake)
1185      DEALLOCATE(wake_h,wake_k)
1186      DEALLOCATE(wake_omg)
1187      DEALLOCATE(d_deltat_wk, d_deltaq_wk)
1188      DEALLOCATE(d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk)
1189      DEALLOCATE(d_deltat_wk_gw, d_deltaq_wk_gw)
1190      DEALLOCATE(d_deltat_vdf, d_deltaq_vdf)
1191!!      DEALLOCATE( d_s_vdf, d_dens_vdf)
1192      DEALLOCATE(d_deltat_the, d_deltaq_the)
1193!!      DEALLOCATE( d_s_the, d_dens_the)
1194      DEALLOCATE(d_deltat_ajs_cv, d_deltaq_ajs_cv)
1195!
1196      DEALLOCATE(bils)
1197      DEALLOCATE(cdragm, cdragh, cldh, cldl)
1198      DEALLOCATE(cldm, cldq, cldt, qsat2m)
1199      DEALLOCATE(JrNt)
1200      DEALLOCATE(dthmin, evap, snowerosion, fder, plcl, plfc)
1201      DEALLOCATE(prw, prlw, prsw, prbsw, water_budget, zustar, zu10m, zv10m, rh2m, s_lcl)
1202      DEALLOCATE(s_pblh, s_pblt, s_therm)
1203!
1204!nrlmd+jyg<
1205      DEALLOCATE(s_pblh_x, s_pblh_w)
1206      DEALLOCATE(s_lcl_x, s_lcl_w)
1207!>nrlmd+jyg
1208!
1209      DEALLOCATE(slab_wfbils, tpot, tpote, ue)
1210      DEALLOCATE(uq, ve, vq, zxffonte)
1211      DEALLOCATE(uwat, vwat)
1212      DEALLOCATE(zxfqcalving, zxfluxlat)
1213      DEALLOCATE(zxrunofflic)
1214      DEALLOCATE(zxustartlic, zxrhoslic, zxqsaltlic)
1215      DEALLOCATE(zxtsol, snow_lsc, zxfqfonte, zxqsurf)
1216      DEALLOCATE(rain_lsc)
1217      DEALLOCATE(rain_num)
1218      DEALLOCATE(qlth, qith, qsith, wiceth)
1219!
1220      DEALLOCATE(sens_x, sens_w)
1221      DEALLOCATE(zxfluxlat_x, zxfluxlat_w)
1222      DEALLOCATE(delta_qsurf)
1223!jyg<
1224!!      DEALLOCATE(t_x, t_w)
1225!!      DEALLOCATE(q_x, q_w)
1226!>jyg
1227      DEALLOCATE(d_t_vdf_x, d_t_vdf_w)
1228      DEALLOCATE(d_q_vdf_x, d_q_vdf_w)
1229      DEALLOCATE(pbl_tke_input)
1230      DEALLOCATE(t_therm, q_therm, u_therm, v_therm)
1231      DEALLOCATE(cdragh_x, cdragh_w)
1232      DEALLOCATE(cdragm_x, cdragm_w)
1233      DEALLOCATE(kh, kh_x, kh_w)
1234!
1235      DEALLOCATE(ptconv)
1236      DEALLOCATE(ratqsc)
1237!
1238      DEALLOCATE(wbeff, convoccur, zmax_th)
1239      DEALLOCATE(zq2m, zt2m, weak_inversion)
1240      DEALLOCATE(zt2m_min_mon, zt2m_max_mon)
1241      DEALLOCATE(t2m_min_mon, t2m_max_mon)
1242      DEALLOCATE(sens, flwp, fiwp)
1243      DEALLOCATE(alp_bl_conv,alp_bl_det)
1244      DEALLOCATE(alp_bl_fluct_m,alp_bl_fluct_tke)
1245      DEALLOCATE(alp_bl_stat, n2, s2, strig, zcong, zlcl_th)
1246      DEALLOCATE(proba_notrig, random_notrig)
1247!FC
1248      DEALLOCATE(zxfluxq,zxfluxt)
1249
1250      DEALLOCATE(dnwd0)
1251!      DEALLOCATE(upwd, omega, coefh)
1252      DEALLOCATE(omega)
1253      DEALLOCATE(epmax_diag)
1254!      DEALLOCATE(coefm, lambda_th, cldemi)
1255      DEALLOCATE(lambda_th, cldemi)
1256      DEALLOCATE(cldfra, cldtau, fiwc)
1257      DEALLOCATE(fl, re, flwc)
1258      DEALLOCATE(ref_liq, ref_ice, theta)
1259      DEALLOCATE(ref_liq_pi, ref_ice_pi)
1260      DEALLOCATE(zphi, zx_rh, zx_rhl, zx_rhi)
1261      DEALLOCATE(pmfd, pmfu)
1262
1263      DEALLOCATE(t2m, fluxlat)
1264      DEALLOCATE(fsollw, evap_pot)
1265      DEALLOCATE(fsolsw, wfbils)
1266      DEALLOCATE(wfevap)
1267
1268      DEALLOCATE(pmflxr, pmflxs)
1269      DEALLOCATE(wdtrainA, wdtrainS, wdtrainM)
1270      DEALLOCATE(upwd, dnwd)
1271      DEALLOCATE(ep)
1272      DEALLOCATE(da, mp)
1273      DEALLOCATE(phi)
1274      DEALLOCATE(wght_cvfd)
1275      DEALLOCATE(phi2)
1276      DEALLOCATE(d1a, dam)
1277      DEALLOCATE(ev)
1278      DEALLOCATE(elij)
1279      DEALLOCATE(qtaa)
1280      DEALLOCATE(clw)
1281      DEALLOCATE(epmlmMm, eplaMm)
1282      DEALLOCATE(sij)
1283
1284
1285      DEALLOCATE(prfl, psfl, bsfl, fraca, Vprecip)
1286      DEALLOCATE(zw2)
1287
1288      DEALLOCATE(fluxu, fluxv)
1289      DEALLOCATE(fluxt)
1290
1291      DEALLOCATE(uwriteSTD, vwriteSTD)
1292      DEALLOCATE(wwriteSTD, phiwriteSTD)
1293      DEALLOCATE(qwriteSTD, twriteSTD, rhwriteSTD)
1294
1295! ug et d'autres encore:
1296      DEALLOCATE(beta_prec)
1297      DEALLOCATE(rneb)
1298      DEALLOCATE(pfraclr,pfracld)
1299      DEALLOCATE(cldfraliq)
1300      DEALLOCATE(sigma2_icefracturb)
1301      DEALLOCATE(mean_icefracturb)
1302      DEALLOCATE (zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic)
1303      DEALLOCATE(distcltop)
1304      DEALLOCATE(temp_cltop)
1305      DEALLOCATE (p_tropopause)
1306      DEALLOCATE (z_tropopause)
1307      DEALLOCATE (t_tropopause)
1308      DEALLOCATE(zn2mout)
1309
1310! Supersaturation
1311      DEALLOCATE(rneb_seri)
1312      DEALLOCATE(d_rneb_dyn)
1313      DEALLOCATE(qclr, qcld, qss, qvc)
1314      DEALLOCATE(rnebclr, rnebss, gamma_ss)
1315      DEALLOCATE(N1_ss, N2_ss)
1316      DEALLOCATE(drneb_sub, drneb_con, drneb_tur, drneb_avi)
1317      DEALLOCATE(zqsatl, zqsats)
1318      DEALLOCATE(Tcontr, qcontr, qcontr2, fcontrN, fcontrP)
1319
1320!--POPRECIP variables
1321      DEALLOCATE(qraindiag, qsnowdiag)
1322      DEALLOCATE(dqreva, dqssub)
1323      DEALLOCATE(dqrauto, dqrcol, dqrmelt, dqrfreez)
1324      DEALLOCATE(dqsauto, dqsagg, dqsrim, dqsmelt, dqsfreez)
1325
1326#ifdef CPP_StratAer
1327! variables for strat. aerosol CK
1328      DEALLOCATE (d_q_emiss)
1329      DEALLOCATE (R2SO4, R2SO4B)
1330      DEALLOCATE (DENSO4, DENSO4B)
1331      DEALLOCATE (f_r_wet, f_r_wetB)
1332      DEALLOCATE (decfluxaer)
1333      DEALLOCATE (mdw)
1334      DEALLOCATE (SO2_lifetime)
1335      DEALLOCATE (OCS_lifetime)
1336      DEALLOCATE (H2SO4_lifetime)
1337      DEALLOCATE (O3_clim)
1338      DEALLOCATE (alpha_bin)
1339      DEALLOCATE (piz_bin)
1340      DEALLOCATE (cg_bin)
1341      DEALLOCATE (tau_strat_550)
1342      DEALLOCATE (tau_strat_1020)
1343      DEALLOCATE (tausum_strat)
1344      DEALLOCATE (surf_PM25_sulf)
1345      DEALLOCATE (vsed_aer)
1346      DEALLOCATE (sulfmmr)
1347      DEALLOCATE (SAD_sulfate)
1348      DEALLOCATE (sulfmmr_mode)
1349      DEALLOCATE (nd_mode)
1350      DEALLOCATE (budg_3D_ocs_to_so2)
1351      DEALLOCATE (budg_3D_so2_to_h2so4)
1352      DEALLOCATE (budg_3D_backgr_ocs)
1353      DEALLOCATE (budg_3D_backgr_so2)
1354      DEALLOCATE (budg_3D_nucl)
1355      DEALLOCATE (budg_3D_cond_evap)
1356      DEALLOCATE (budg_dep_dry_ocs)
1357      DEALLOCATE (budg_dep_wet_ocs)
1358      DEALLOCATE (budg_dep_dry_so2)
1359      DEALLOCATE (budg_dep_wet_so2)
1360      DEALLOCATE (budg_dep_dry_h2so4)
1361      DEALLOCATE (budg_dep_wet_h2so4)
1362      DEALLOCATE (budg_dep_dry_part)
1363      DEALLOCATE (budg_dep_wet_part)
1364      DEALLOCATE (budg_emi_ocs)
1365      DEALLOCATE (budg_emi_so2)
1366      DEALLOCATE (budg_emi_h2so4)
1367      DEALLOCATE (budg_emi_part)
1368      DEALLOCATE (budg_ocs_to_so2)
1369      DEALLOCATE (budg_so2_to_h2so4)
1370      DEALLOCATE (budg_h2so4_to_part)
1371      DEALLOCATE (budg_sed_part)
1372#endif
1373
1374END SUBROUTINE phys_local_var_end
1375
1376END MODULE phys_local_var_mod
Note: See TracBrowser for help on using the repository browser.