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

Last change on this file since 2667 was 2635, checked in by jyg, 8 years ago

Some cleaning in the wake routines: (i) the wake
number per unit area (wdens) is now a state
variable (held constant for the time being);
(ii) wake state variable changes are computed in
subroutine 'physiq' if iflag_wake_tend=1 (it is
computed within wake routines if
iflag_wake_tend=0, consistent with earlier
versions); (iii) the new routine 'add_wake_tend'
adds tendencies to wake state variables; (iv)
tendencies due to various processes (pbl, wakes,
thermals) are named and added separately.

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