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

Last change on this file since 2501 was 2499, checked in by oboucher, 9 years ago

Various changes to diagnose properly 2D tendency in q, ql, qs from dynamics
as previous diagnostics were incorrect.
Cleaned up all such diagnostics in physiq_mod.F90 as well

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