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

Last change on this file since 2344 was 2333, checked in by lguez, 9 years ago

New parameterization of gravity wave drag due to front/jet systems, by

  1. de la Camara and F. Lott. The new Camara-Lott parameterization

replaces the Hines parameterization so it is activated if not ok_hines
and ok_gwd_rando.

Also changed distribution of phase speeds in FLOTT_GWD_rando, from
uniform to Gaussian. Bug fix in sugwd_strato. Bug fix in the arguments
of the call to add_phys_tend for methane oxydation.

For the new Camara-Lott parameterization, we need to compute relative
vorticity in calfis and pass it as a new argument "rot" to
physiq. Interpolation of relative vorticity to the physics grid is not
optimal for now: it is not weighted by cell areas.

Alvaro de la Camara, Fran\c{}cois Lott

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