source: LMDZ5/branches/LMDZ6_rc0/libf/phylmd/phys_local_var_mod.F90 @ 2597

Last change on this file since 2597 was 2160, checked in by Laurent Fairhead, 10 years ago

Merged trunk changes -r2070:2158 into testing branch. Compilation problems introduced by revision r2155 have been corrected by hand

  • 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: 27.5 KB
Line 
1!
2! $Id: phys_local_var_mod.F90 2160 2014-11-28 15:36:29Z 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_ajsb(:,:), d_q_ajsb(:,:)
38      !$OMP THREADPRIVATE(d_t_ajsb, d_q_ajsb)
39      REAL, SAVE, ALLOCATABLE :: d_t_ajs(:,:), d_q_ajs(:,:)
40      !$OMP THREADPRIVATE(d_t_ajs, d_q_ajs)
41      REAL, SAVE, ALLOCATABLE :: d_u_ajs(:,:), d_v_ajs(:,:)
42      !$OMP THREADPRIVATE(d_u_ajs, d_v_ajs)
43      REAL, SAVE, ALLOCATABLE :: d_t_eva(:,:),d_q_eva(:,:)
44      !$OMP THREADPRIVATE(d_t_eva,d_q_eva)
45      REAL, SAVE, ALLOCATABLE :: d_t_lscst(:,:),d_q_lscst(:,:)
46      !$OMP THREADPRIVATE(d_t_lscst,d_q_lscst)
47      REAL, SAVE, ALLOCATABLE :: d_t_lscth(:,:),d_q_lscth(:,:)
48      !$OMP THREADPRIVATE(d_t_lscth,d_q_lscth)
49      REAL, SAVE, ALLOCATABLE :: plul_th(:),plul_st(:)
50      !$OMP THREADPRIVATE(plul_th,plul_st)
51!tendances dues a oro et lif
52      REAL, SAVE, ALLOCATABLE :: d_t_oli(:,:)
53      !$OMP THREADPRIVATE(d_t_oli)
54      REAL, SAVE, ALLOCATABLE :: d_u_oli(:,:), d_v_oli(:,:)
55      !$OMP THREADPRIVATE(d_u_oli, d_v_oli)
56      REAL, SAVE, ALLOCATABLE :: d_t_vdf(:,:), d_q_vdf(:,:), d_t_diss(:,:)
57      !$OMP THREADPRIVATE( d_t_vdf, d_q_vdf,d_t_diss)
58      REAL, SAVE, ALLOCATABLE :: d_u_vdf(:,:), d_v_vdf(:,:)
59      !$OMP THREADPRIVATE(d_u_vdf, d_v_vdf)
60      REAL, SAVE, ALLOCATABLE :: d_t_oro(:,:)
61      !$OMP THREADPRIVATE(d_t_oro)
62      REAL, SAVE, ALLOCATABLE :: d_u_oro(:,:), d_v_oro(:,:)
63      !$OMP THREADPRIVATE(d_u_oro, d_v_oro)
64      REAL, SAVE, ALLOCATABLE :: d_t_lif(:,:)
65      !$OMP THREADPRIVATE(d_t_lif)
66      REAL, SAVE, ALLOCATABLE :: d_u_lif(:,:), d_v_lif(:,:)
67      !$OMP THREADPRIVATE(d_u_lif, d_v_lif)
68! Tendances Ondes de G non oro (runs strato).
69      REAL, SAVE, ALLOCATABLE :: d_u_hin(:,:)
70      !$OMP THREADPRIVATE(d_u_hin)
71      REAL, SAVE, ALLOCATABLE :: d_v_hin(:,:)
72      !$OMP THREADPRIVATE(d_v_hin)
73      REAL, SAVE, ALLOCATABLE :: d_t_hin(:,:)
74      !$OMP THREADPRIVATE(d_t_hin)
75! tendance due a l'oxydation du methane
76      REAL, SAVE, ALLOCATABLE :: d_q_ch4(:,:)
77      !$OMP THREADPRIVATE(d_q_ch4)
78
79! tendance du a la conersion Ec -> E thermique
80      REAL, SAVE, ALLOCATABLE :: d_t_ec(:,:)
81      !$OMP THREADPRIVATE(d_t_ec)
82      REAL, SAVE, ALLOCATABLE :: d_ts(:,:), d_tr(:,:,:)
83      !$OMP THREADPRIVATE(d_ts, d_tr)
84
85! diagnostique pour le rayonnement
86      REAL, SAVE, ALLOCATABLE :: topswad_aero(:),  solswad_aero(:)      ! diag
87      !$OMP THREADPRIVATE(topswad_aero,solswad_aero)
88      REAL, SAVE, ALLOCATABLE :: topswai_aero(:),  solswai_aero(:)      ! diag
89      !$OMP THREADPRIVATE(topswai_aero,solswai_aero)
90      REAL, SAVE, ALLOCATABLE :: topswad0_aero(:), solswad0_aero(:)     ! diag
91      !$OMP THREADPRIVATE(topswad0_aero,solswad0_aero)
92      REAL, SAVE, ALLOCATABLE :: topsw_aero(:,:),  solsw_aero(:,:)      ! diag
93      !$OMP THREADPRIVATE(topsw_aero,solsw_aero)
94      REAL, SAVE, ALLOCATABLE :: topsw0_aero(:,:), solsw0_aero(:,:)     ! diag
95      !$OMP THREADPRIVATE(topsw0_aero,solsw0_aero)
96      REAL, SAVE, ALLOCATABLE :: topswcf_aero(:,:),  solswcf_aero(:,:)  ! diag
97      !$OMP THREADPRIVATE(topswcf_aero,solswcf_aero)
98! LW radiation diagnostics CK
99      REAL, SAVE, ALLOCATABLE :: toplwad_aero(:),  sollwad_aero(:)      ! diag
100      !$OMP THREADPRIVATE(toplwad_aero,sollwad_aero)
101      REAL, SAVE, ALLOCATABLE :: toplwai_aero(:),  sollwai_aero(:)      ! diag
102      !$OMP THREADPRIVATE(toplwai_aero,sollwai_aero)
103      REAL, SAVE, ALLOCATABLE :: toplwad0_aero(:), sollwad0_aero(:)     ! diag
104      !$OMP THREADPRIVATE(toplwad0_aero,sollwad0_aero)
105! Special RRTM
106      REAL, SAVE, ALLOCATABLE :: ZLWFT0_i(:,:),  ZSWFT0_i(:,:)      ! diag
107      !$OMP THREADPRIVATE(ZLWFT0_i,ZSWFT0_i)
108      REAL, SAVE, ALLOCATABLE :: ZFLDN0(:,:),  ZFLUP0(:,:)      ! diag
109      !$OMP THREADPRIVATE(ZFLDN0,ZFLUP0)
110      REAL, SAVE, ALLOCATABLE :: ZFSDN0(:,:),  ZFSUP0(:,:)      ! diag
111      !$OMP THREADPRIVATE(ZFSDN0,ZFSUP0)
112!
113      REAL, SAVE, ALLOCATABLE :: tausum_aero(:,:,:)
114      !$OMP THREADPRIVATE(tausum_aero)
115      REAL, SAVE, ALLOCATABLE :: tau3d_aero(:,:,:,:)
116      !$OMP THREADPRIVATE(tau3d_aero)
117      REAL, SAVE, ALLOCATABLE :: scdnc(:,:)
118      !$OMP THREADPRIVATE(scdnc)
119      REAL, SAVE, ALLOCATABLE :: cldncl(:)
120      !$OMP THREADPRIVATE(cldncl)
121      REAL, SAVE, ALLOCATABLE :: reffclwtop(:)
122      !$OMP THREADPRIVATE(reffclwtop)
123      REAL, SAVE, ALLOCATABLE :: lcc(:)
124      !$OMP THREADPRIVATE(lcc)
125      REAL, SAVE, ALLOCATABLE :: reffclws(:,:)
126      !$OMP THREADPRIVATE(reffclws)
127      REAL, SAVE, ALLOCATABLE :: reffclwc(:,:)
128      !$OMP THREADPRIVATE(reffclwc)
129      REAL, SAVE, ALLOCATABLE :: cldnvi(:)
130      !$OMP THREADPRIVATE(cldnvi)
131      REAL, SAVE, ALLOCATABLE :: lcc3d(:,:)
132      !$OMP THREADPRIVATE(lcc3d)
133      REAL, SAVE, ALLOCATABLE :: lcc3dcon(:,:)
134      !$OMP THREADPRIVATE(lcc3dcon)
135      REAL, SAVE, ALLOCATABLE :: lcc3dstra(:,:)
136      !$OMP THREADPRIVATE(lcc3dstra)
137      REAL, SAVE, ALLOCATABLE :: od550aer(:)
138      !$OMP THREADPRIVATE(od550aer)
139      REAL, SAVE, ALLOCATABLE :: absvisaer(:)
140      !$OMP THREADPRIVATE(absvisaer)
141      REAL, SAVE, ALLOCATABLE :: od865aer(:)
142      !$OMP THREADPRIVATE(od865aer)
143      REAL, SAVE, ALLOCATABLE :: ec550aer(:,:)
144      !$OMP THREADPRIVATE(ec550aer)
145      REAL, SAVE, ALLOCATABLE :: od550lt1aer(:)
146      !$OMP THREADPRIVATE(od550lt1aer)
147      REAL, SAVE, ALLOCATABLE :: sconcso4(:)
148      !$OMP THREADPRIVATE(sconcso4)
149      REAL, SAVE, ALLOCATABLE :: sconcno3(:)
150      !$OMP THREADPRIVATE(sconcno3)
151      REAL, SAVE, ALLOCATABLE :: sconcoa(:)
152      !$OMP THREADPRIVATE(sconcoa)
153      REAL, SAVE, ALLOCATABLE :: sconcbc(:)
154      !$OMP THREADPRIVATE(sconcbc)
155      REAL, SAVE, ALLOCATABLE :: sconcss(:)
156      !$OMP THREADPRIVATE(sconcss)
157      REAL, SAVE, ALLOCATABLE :: sconcdust(:)
158      !$OMP THREADPRIVATE(sconcdust)
159      REAL, SAVE, ALLOCATABLE :: concso4(:,:)
160      !$OMP THREADPRIVATE(concso4)
161      REAL, SAVE, ALLOCATABLE :: concno3(:,:)
162      !$OMP THREADPRIVATE(concno3)
163      REAL, SAVE, ALLOCATABLE :: concoa(:,:)
164      !$OMP THREADPRIVATE(concoa)
165      REAL, SAVE, ALLOCATABLE :: concbc(:,:)
166      !$OMP THREADPRIVATE(concbc)
167      REAL, SAVE, ALLOCATABLE :: concss(:,:)
168      !$OMP THREADPRIVATE(concss)
169      REAL, SAVE, ALLOCATABLE :: concdust(:,:)
170      !$OMP THREADPRIVATE(concdust)
171      REAL, SAVE, ALLOCATABLE :: loadso4(:)
172      !$OMP THREADPRIVATE(loadso4)
173      REAL, SAVE, ALLOCATABLE :: loadoa(:)
174      !$OMP THREADPRIVATE(loadoa)
175      REAL, SAVE, ALLOCATABLE :: loadbc(:)
176      !$OMP THREADPRIVATE(loadbc)
177      REAL, SAVE, ALLOCATABLE :: loadss(:)
178      !$OMP THREADPRIVATE(loadss)
179      REAL, SAVE, ALLOCATABLE :: loaddust(:)
180      !$OMP THREADPRIVATE(loaddust)
181      REAL, SAVE, ALLOCATABLE :: load_tmp1(:)
182      !$OMP THREADPRIVATE(load_tmp1)
183      REAL, SAVE, ALLOCATABLE :: load_tmp2(:)
184      !$OMP THREADPRIVATE(load_tmp2)
185      REAL, SAVE, ALLOCATABLE :: load_tmp3(:)
186      !$OMP THREADPRIVATE(load_tmp3)
187      REAL, SAVE, ALLOCATABLE :: load_tmp4(:)
188      !$OMP THREADPRIVATE(load_tmp4)
189      REAL, SAVE, ALLOCATABLE :: load_tmp5(:)
190      !$OMP THREADPRIVATE(load_tmp5)
191      REAL, SAVE, ALLOCATABLE :: load_tmp6(:)
192      !$OMP THREADPRIVATE(load_tmp6)
193      REAL, SAVE, ALLOCATABLE :: load_tmp7(:)
194      !$OMP THREADPRIVATE(load_tmp7)
195
196!IM ajout variables CFMIP2/CMIP5
197      REAL,ALLOCATABLE,SAVE :: topswad_aerop(:), solswad_aerop(:)
198!$OMP THREADPRIVATE(topswad_aerop, solswad_aerop)
199      REAL,ALLOCATABLE,SAVE :: topswai_aerop(:), solswai_aerop(:)
200!$OMP THREADPRIVATE(topswai_aerop, solswai_aerop)
201      REAL,ALLOCATABLE,SAVE :: topswad0_aerop(:), solswad0_aerop(:)
202!$OMP THREADPRIVATE(topswad0_aerop, solswad0_aerop)
203      REAL,ALLOCATABLE,SAVE :: topsw_aerop(:,:), topsw0_aerop(:,:) 
204!$OMP THREADPRIVATE(topsw_aerop, topsw0_aerop)
205      REAL,ALLOCATABLE,SAVE :: solsw_aerop(:,:), solsw0_aerop(:,:)
206!$OMP THREADPRIVATE(solsw_aerop, solsw0_aerop)
207      REAL,ALLOCATABLE,SAVE :: topswcf_aerop(:,:), solswcf_aerop(:,:)
208!$OMP THREADPRIVATE(topswcf_aerop, solswcf_aerop)
209
210! additional LW variables CK
211      REAL,ALLOCATABLE,SAVE :: toplwad_aerop(:), sollwad_aerop(:)
212!$OMP THREADPRIVATE(toplwad_aerop, sollwad_aerop)
213      REAL,ALLOCATABLE,SAVE :: toplwai_aerop(:), sollwai_aerop(:)
214!$OMP THREADPRIVATE(toplwai_aerop, sollwai_aerop)
215      REAL,ALLOCATABLE,SAVE :: toplwad0_aerop(:), sollwad0_aerop(:)
216!$OMP THREADPRIVATE(toplwad0_aerop, sollwad0_aerop)
217
218!Ajout de celles nécessaires au phys_output_write_mod
219      REAL, SAVE, ALLOCATABLE :: slp(:)
220!$OMP THREADPRIVATE(slp)
221      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sens, flwp, fiwp
222!$OMP THREADPRIVATE(sens, flwp, fiwp)
223      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: ale_wake, alp_wake, bils
224!$OMP THREADPRIVATE(ale_wake, alp_wake, bils)
225      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragm, cdragh
226!$OMP THREADPRIVATE(cdragm, cdragh)
227      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cldh, cldl, cldm, cldq, cldt, qsat2m, qsol
228!$OMP THREADPRIVATE(cldh, cldl, cldm, cldq, cldt, qsat2m, qsol)
229      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cldhjn, cldljn, cldmjn,cldtjn
230!$OMP THREADPRIVATE(cldhjn, cldljn, cldmjn, cldtjn)
231      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: JrNt
232!$OMP THREADPRIVATE(JrNt)
233      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: dthmin, evap, fder, plcl, plfc, prw
234!$OMP THREADPRIVATE(dthmin, evap, fder, plcl, plfc, prw)
235      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zustar, zu10m, zv10m, rh2m
236!$OMP THREADPRIVATE(zustar, zu10m, zv10m, rh2m)
237      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_lcl, s_pblh, s_pblt, s_therm
238!$OMP THREADPRIVATE(s_lcl, s_pblh, s_pblt, s_therm)
239      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: slab_wfbils
240!$OMP THREADPRIVATE(slab_wfbils)
241      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: tpot, tpote, ue, uq, ve, vq, zxffonte
242!$OMP THREADPRIVATE(tpot, tpote, ue, uq, ve, vq, zxffonte)
243      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfqcalving
244!$OMP THREADPRIVATE(zxfqcalving)
245      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat, zxrugs, zxtsol, snow_lsc, zxfqfonte
246!$OMP THREADPRIVATE(zxfluxlat, zxrugs, zxtsol, snow_lsc, zxfqfonte)
247      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxqsurf, rain_lsc
248!$OMP THREADPRIVATE(zxqsurf, rain_lsc)
249      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wake_h, wbeff, zmax_th, zq2m, zt2m
250!$OMP THREADPRIVATE(wake_h, wbeff, zmax_th, zq2m, zt2m)
251      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zt2m_min_mon, zt2m_max_mon
252!$OMP THREADPRIVATE(zt2m_min_mon, zt2m_max_mon)
253      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: t2m_min_mon, t2m_max_mon
254!$OMP THREADPRIVATE(t2m_min_mon, t2m_max_mon)
255      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: weak_inversion
256!$OMP THREADPRIVATE(weak_inversion)
257      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: ale_bl_stat,alp_bl_conv,alp_bl_det
258!$OMP THREADPRIVATE(ale_bl_stat,alp_bl_conv,alp_bl_det)
259      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_fluct_m,alp_bl_fluct_tke
260!$OMP THREADPRIVATE(alp_bl_fluct_m,alp_bl_fluct_tke)
261      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_stat, n2, s2
262!$OMP THREADPRIVATE(alp_bl_stat, n2, s2)
263      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: proba_notrig, random_notrig
264!$OMP THREADPRIVATE(proba_notrig, random_notrig)
265      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: fsolsw, wfbils, wfbilo
266!$OMP THREADPRIVATE(fsolsw, wfbils, wfbilo)
267      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: t2m, fevap, fluxlat, fsollw,evap_pot
268!$OMP THREADPRIVATE(t2m, fevap, fluxlat, fsollw,evap_pot)
269      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dnwd, dnwd0, upwd, omega
270!$OMP THREADPRIVATE(dnwd, dnwd0, upwd, omega)
271!      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: coefh, coefm, lambda_th
272      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: lambda_th
273!$OMP THREADPRIVATE(lambda_th)
274      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: cldemi, cldfra, cldtau, fiwc, fl, re, flwc
275!$OMP THREADPRIVATE(cldemi, cldfra, cldtau, fiwc, fl, re, flwc)
276      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ref_liq, ref_ice, theta, zphi
277!$OMP THREADPRIVATE(ref_liq, ref_ice, theta, zphi)
278      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ref_liq_pi, ref_ice_pi
279!$OMP THREADPRIVATE(ref_liq_pi, ref_ice_pi)
280      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: wake_omg, zx_rh
281!$OMP THREADPRIVATE(wake_omg, zx_rh)
282      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: frugs, agesno
283!$OMP THREADPRIVATE(frugs, agesno)
284      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: pmflxr, pmflxs, prfl, psfl, fraca
285!$OMP THREADPRIVATE(pmflxr, pmflxs, prfl, psfl, fraca)
286      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: Vprecip, zw2
287!$OMP THREADPRIVATE(Vprecip, zw2)
288      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: pmfd, pmfu
289!$OMP THREADPRIVATE(pmfd, pmfu)
290      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: fluxt, fluxu, fluxv
291!$OMP THREADPRIVATE(fluxt, fluxu, fluxv)
292      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: uwriteSTD, vwriteSTD, wwriteSTD
293!$OMP THREADPRIVATE(uwriteSTD, vwriteSTD, wwriteSTD)
294      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD
295!$OMP THREADPRIVATE(phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD)
296
297! ug et d'autres encore:
298      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: wdtrainA, wdtrainM
299!$OMP THREADPRIVATE(wdtrainA, wdtrainM)
300      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: beta_prec
301!$OMP THREADPRIVATE(beta_prec)
302      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rneb,rnebjn
303!$OMP THREADPRIVATE(rneb,rnebjn)
304
305! variables de sorties MM
306      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxsnow,snowhgt,qsnow,to_ice
307      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sissnow,runoff,albsol3_lic
308!$OMP THREADPRIVATE(zxsnow,snowhgt,qsnow,to_ice)
309!$OMP THREADPRIVATE(sissnow,runoff,albsol3_lic)
310
311CONTAINS
312
313!======================================================================
314SUBROUTINE phys_local_var_init
315USE dimphy
316USE infotrac, ONLY : nbtr
317USE aero_mod
318USE indice_sol_mod
319USE phys_output_var_mod
320USE phys_state_var_mod
321
322IMPLICIT NONE
323      allocate(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev))
324      allocate(u_seri(klon,klev),v_seri(klon,klev))
325
326      allocate(tr_seri(klon,klev,nbtr))
327      allocate(d_t_dyn(klon,klev),d_q_dyn(klon,klev))
328      allocate(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
329      allocate(d_tr_dyn(klon,klev,nbtr))                   !RomP
330      allocate(d_t_con(klon,klev),d_q_con(klon,klev))
331      allocate(d_u_con(klon,klev),d_v_con(klon,klev))
332      allocate(d_t_wake(klon,klev),d_q_wake(klon,klev))
333      allocate(d_t_lsc(klon,klev),d_q_lsc(klon,klev))
334      allocate(d_ql_lsc(klon,klev),d_qi_lsc(klon,klev))
335      allocate(d_t_ajsb(klon,klev),d_q_ajsb(klon,klev))
336      allocate(d_t_ajs(klon,klev),d_q_ajs(klon,klev))
337      allocate(d_u_ajs(klon,klev),d_v_ajs(klon,klev))
338      allocate(d_t_eva(klon,klev),d_q_eva(klon,klev))
339      allocate(d_t_lscst(klon,klev),d_q_lscst(klon,klev))
340      allocate(d_t_lscth(klon,klev),d_q_lscth(klon,klev))
341      allocate(plul_st(klon),plul_th(klon))
342      allocate(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))
343      allocate(d_u_vdf(klon,klev),d_v_vdf(klon,klev))
344      allocate(d_t_oli(klon,klev),d_t_oro(klon,klev))
345      allocate(d_u_oli(klon,klev),d_v_oli(klon,klev))
346      allocate(d_u_oro(klon,klev),d_v_oro(klon,klev))
347      allocate(d_t_lif(klon,klev),d_t_ec(klon,klev))
348      allocate(d_u_lif(klon,klev),d_v_lif(klon,klev))
349      allocate(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr))
350! Special RRTM
351      allocate(ZLWFT0_i(klon,klev+1),ZSWFT0_i(klon,klev+1),ZFLDN0(klon,klev+1))
352      allocate(ZFLUP0(klon,klev+1),ZFSDN0(klon,klev+1),ZFSUP0(klon,klev+1))
353!
354      allocate(topswad_aero(klon), solswad_aero(klon))
355      allocate(topswai_aero(klon), solswai_aero(klon))
356      allocate(topswad0_aero(klon), solswad0_aero(klon))
357     ! LW diagnostics CK
358      allocate(toplwad_aero(klon), sollwad_aero(klon))
359      allocate(toplwai_aero(klon), sollwai_aero(klon))
360      allocate(toplwad0_aero(klon), sollwad0_aero(klon))
361      ! end
362      allocate(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp))
363      allocate(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp))
364      allocate(topswcf_aero(klon,3), solswcf_aero(klon,3))
365      allocate(d_u_hin(klon,klev),d_v_hin(klon,klev),d_t_hin(klon,klev))
366      allocate(d_q_ch4(klon,klev))
367!      allocate(tausum_aero(klon,nwave,naero_spc))
368!      allocate(tau3d_aero(klon,klev,nwave,naero_spc))
369!--correction mini bug OB
370      allocate(tausum_aero(klon,nwave,naero_tot))
371      allocate(tau3d_aero(klon,klev,nwave,naero_tot))
372      allocate(scdnc(klon, klev))
373      allocate(cldncl(klon))
374      allocate(reffclwtop(klon))
375      allocate(lcc(klon))
376      allocate(reffclws(klon, klev))
377      allocate(reffclwc(klon, klev))
378      allocate(cldnvi(klon))
379      allocate(lcc3d(klon, klev))
380      allocate(lcc3dcon(klon, klev))
381      allocate(lcc3dstra(klon, klev))
382      allocate(od550aer(klon))   
383      allocate(od865aer(klon))   
384      allocate(absvisaer(klon)) 
385      allocate(ec550aer(klon,klev))
386      allocate(od550lt1aer(klon))               
387      allocate(sconcso4(klon))
388      allocate(sconcno3(klon))
389      allocate(sconcoa(klon))
390      allocate(sconcbc(klon))
391      allocate(sconcss(klon))
392      allocate(sconcdust(klon))
393      allocate(concso4(klon,klev))
394      allocate(concno3(klon,klev))
395      allocate(concoa(klon,klev))
396      allocate(concbc(klon,klev))
397      allocate(concss(klon,klev))
398      allocate(concdust(klon,klev))
399      allocate(loadso4(klon))
400      allocate(loadoa(klon))
401      allocate(loadbc(klon))
402      allocate(loadss(klon))
403      allocate(loaddust(klon))
404      allocate(load_tmp1(klon))
405      allocate(load_tmp2(klon))
406      allocate(load_tmp3(klon))
407      allocate(load_tmp4(klon))
408      allocate(load_tmp5(klon))
409      allocate(load_tmp6(klon))
410      allocate(load_tmp7(klon))
411
412!IM ajout variables CFMIP2/CMIP5
413      ALLOCATE(topswad_aerop(klon), solswad_aerop(klon))
414      ALLOCATE(topswai_aerop(klon), solswai_aerop(klon))
415      ALLOCATE(topswad0_aerop(klon), solswad0_aerop(klon))
416      ALLOCATE(topsw_aerop(klon,naero_grp), topsw0_aerop(klon,naero_grp))
417      ALLOCATE(solsw_aerop(klon,naero_grp), solsw0_aerop(klon,naero_grp))
418      ALLOCATE(topswcf_aerop(klon,naero_grp), solswcf_aerop(klon,naero_grp))
419
420! additional LW variables CK
421      ALLOCATE(toplwad_aerop(klon), sollwad_aerop(klon))
422      ALLOCATE(toplwai_aerop(klon), sollwai_aerop(klon))
423      ALLOCATE(toplwad0_aerop(klon), sollwad0_aerop(klon))
424
425! FH Ajout de celles nécessaires au phys_output_write_mod
426
427      ALLOCATE(slp(klon))
428      ALLOCATE(ale_wake(klon), alp_wake(klon), bils(klon))
429      ALLOCATE(cdragm(klon), cdragh(klon), cldh(klon), cldl(klon))
430      ALLOCATE(cldm(klon), cldq(klon), cldt(klon), qsat2m(klon), qsol(klon))
431      ALLOCATE(cldhjn(klon), cldljn(klon), cldmjn(klon), cldtjn(klon))
432      ALLOCATE(JrNt(klon))
433      ALLOCATE(dthmin(klon), evap(klon), fder(klon), plcl(klon), plfc(klon))
434      ALLOCATE(prw(klon), zustar(klon), zu10m(klon), zv10m(klon), rh2m(klon))
435      ALLOCATE(s_lcl(klon))
436      ALLOCATE(s_pblh(klon), s_pblt(klon), s_therm(klon))
437      ALLOCATE(slab_wfbils(klon), tpot(klon), tpote(klon), ue(klon))
438      ALLOCATE(uq(klon), ve(klon), vq(klon), zxffonte(klon))
439      ALLOCATE(zxfqcalving(klon), zxfluxlat(klon), zxrugs(klon))
440      ALLOCATE(zxtsol(klon), snow_lsc(klon), zxfqfonte(klon), zxqsurf(klon))
441      ALLOCATE(rain_lsc(klon), wake_h(klon), wbeff(klon), zmax_th(klon))
442      ALLOCATE(zq2m(klon), zt2m(klon), weak_inversion(klon))
443      ALLOCATE(zt2m_min_mon(klon), zt2m_max_mon(klon))
444      ALLOCATE(t2m_min_mon(klon), t2m_max_mon(klon))
445      ALLOCATE(sens(klon), flwp(klon), fiwp(klon))
446      ALLOCATE(ale_bl_stat(klon), alp_bl_conv(klon), alp_bl_det(klon))
447      ALLOCATE(alp_bl_fluct_m(klon), alp_bl_fluct_tke(klon))
448      ALLOCATE(alp_bl_stat(klon), n2(klon), s2(klon))
449      ALLOCATE(proba_notrig(klon), random_notrig(klon))
450
451      ALLOCATE(dnwd(klon, klev), dnwd0(klon, klev))
452!      ALLOCATE(upwd(klon, klev), omega(klon, klev), coefh(klon, klev))
453      ALLOCATE(upwd(klon, klev), omega(klon, klev))
454!      ALLOCATE(coefm(klon, klev), lambda_th(klon, klev), cldemi(klon, klev))
455      ALLOCATE(lambda_th(klon, klev), cldemi(klon, klev))
456      ALLOCATE(cldfra(klon, klev), cldtau(klon, klev), fiwc(klon, klev))
457      ALLOCATE(fl(klon, klev), re(klon, klev), flwc(klon, klev))
458      ALLOCATE(ref_liq(klon, klev), ref_ice(klon, klev), theta(klon, klev))
459      ALLOCATE(ref_liq_pi(klon, klev), ref_ice_pi(klon, klev))
460      ALLOCATE(zphi(klon, klev), wake_omg(klon, klev), zx_rh(klon, klev))
461      ALLOCATE(pmfd(klon, klev), pmfu(klon, klev))
462
463      ALLOCATE(t2m(klon, nbsrf), fevap(klon, nbsrf), fluxlat(klon, nbsrf))
464      ALLOCATE(frugs(klon, nbsrf), agesno(klon, nbsrf), fsollw(klon, nbsrf))
465      ALLOCATE(fsolsw(klon, nbsrf), wfbils(klon, nbsrf), wfbilo(klon, nbsrf))
466      ALLOCATE(evap_pot(klon, nbsrf))
467
468      ALLOCATE(pmflxr(klon, klev+1), pmflxs(klon, klev+1), prfl(klon, klev+1))
469      ALLOCATE(psfl(klon, klev+1), fraca(klon, klev+1), Vprecip(klon, klev+1))
470      ALLOCATE(zw2(klon, klev+1))
471
472      ALLOCATE(fluxu(klon, klev, nbsrf), fluxv(klon, klev, nbsrf))
473      ALLOCATE(fluxt(klon, klev, nbsrf))
474
475      ALLOCATE(uwriteSTD(klon,nlevSTD,nfiles), vwriteSTD(klon,nlevSTD,nfiles))
476      ALLOCATE(wwriteSTD(klon,nlevSTD,nfiles), phiwriteSTD(klon,nlevSTD,nfiles))
477      ALLOCATE(qwriteSTD(klon,nlevSTD,nfiles), twriteSTD(klon,nlevSTD,nfiles))
478      ALLOCATE(rhwriteSTD(klon,nlevSTD,nfiles))
479
480! ug et d'autres encore:
481      ALLOCATE(wdtrainA(klon,klev),wdtrainM(klon,klev))
482      ALLOCATE(beta_prec(klon,klev))
483      ALLOCATE(rneb(klon,klev),rnebjn(klon,klev))
484
485
486      ALLOCATE (zxsnow(klon),snowhgt(klon),qsnow(klon),to_ice(klon))
487      ALLOCATE (sissnow(klon),runoff(klon),albsol3_lic(klon))
488
489
490
491END SUBROUTINE phys_local_var_init
492
493!======================================================================
494SUBROUTINE phys_local_var_end
495USE dimphy
496USE indice_sol_mod
497IMPLICIT NONE
498      deallocate(t_seri,q_seri,ql_seri,qs_seri)
499      deallocate(u_seri,v_seri)
500
501      deallocate(tr_seri)
502      deallocate(d_t_dyn,d_q_dyn)
503      deallocate(d_u_dyn,d_v_dyn)
504      deallocate(d_tr_dyn)                      !RomP
505      deallocate(d_t_con,d_q_con)
506      deallocate(d_u_con,d_v_con)
507      deallocate(d_t_wake,d_q_wake)
508      deallocate(d_t_lsc,d_q_lsc)
509      deallocate(d_ql_lsc,d_qi_lsc)
510      deallocate(d_t_ajsb,d_q_ajsb)
511      deallocate(d_t_ajs,d_q_ajs)
512      deallocate(d_u_ajs,d_v_ajs)
513      deallocate(d_t_eva,d_q_eva)
514      deallocate(d_t_lscst,d_q_lscst)
515      deallocate(d_t_lscth,d_q_lscth)
516      deallocate(plul_st,plul_th)
517      deallocate(d_t_vdf,d_q_vdf,d_t_diss)
518      deallocate(d_u_vdf,d_v_vdf)
519      deallocate(d_t_oli,d_t_oro)
520      deallocate(d_u_oli,d_v_oli)
521      deallocate(d_u_oro,d_v_oro)
522      deallocate(d_t_lif,d_t_ec)
523      deallocate(d_u_lif,d_v_lif)
524      deallocate(d_ts, d_tr)
525      deallocate(topswad_aero,solswad_aero)
526      deallocate(topswai_aero,solswai_aero)
527      deallocate(topswad0_aero,solswad0_aero)
528      ! LW additional CK
529      deallocate(toplwad_aero,sollwad_aero)
530      deallocate(toplwai_aero,sollwai_aero)
531      deallocate(toplwad0_aero,sollwad0_aero)
532      ! end
533      deallocate(topsw_aero,solsw_aero)
534      deallocate(topsw0_aero,solsw0_aero)
535      deallocate(topswcf_aero,solswcf_aero)
536      deallocate(tausum_aero)
537      deallocate(tau3d_aero)
538      deallocate(scdnc)
539      deallocate(cldncl)
540      deallocate(reffclwtop)
541      deallocate(lcc)
542      deallocate(reffclws)
543      deallocate(reffclwc)
544      deallocate(cldnvi)
545      deallocate(lcc3d)
546      deallocate(lcc3dcon)
547      deallocate(lcc3dstra)
548      deallocate(od550aer)       
549      deallocate(od865aer)
550      deallocate(absvisaer)
551      deallocate(ec550aer)
552      deallocate(od550lt1aer)
553      deallocate(sconcso4)
554      deallocate(sconcno3)
555      deallocate(sconcoa)
556      deallocate(sconcbc)
557      deallocate(sconcss)
558      deallocate(sconcdust)
559      deallocate(concso4)
560      deallocate(concno3)
561      deallocate(concoa)
562      deallocate(concbc)
563      deallocate(concss)
564      deallocate(concdust)
565      deallocate(loadso4)
566      deallocate(loadoa)
567      deallocate(loadbc)
568      deallocate(loadss)
569      deallocate(loaddust)
570      deallocate(load_tmp1)
571      deallocate(load_tmp2)
572      deallocate(load_tmp3)
573      deallocate(load_tmp4)
574      deallocate(load_tmp5)
575      deallocate(load_tmp6)
576      deallocate(load_tmp7)
577      deallocate(d_u_hin,d_v_hin,d_t_hin)
578      deallocate(d_q_ch4)
579
580!IM ajout variables CFMIP2/CMIP5
581      deallocate(topswad_aerop, solswad_aerop)
582      deallocate(topswai_aerop, solswai_aerop)
583      deallocate(topswad0_aerop, solswad0_aerop)
584      deallocate(topsw_aerop, topsw0_aerop)
585      deallocate(solsw_aerop, solsw0_aerop)
586      deallocate(topswcf_aerop, solswcf_aerop)
587
588!CK LW diagnostics
589      deallocate(toplwad_aerop, sollwad_aerop)
590      deallocate(toplwai_aerop, sollwai_aerop)
591      deallocate(toplwad0_aerop, sollwad0_aerop)
592
593! FH Ajout de celles nécessaires au phys_output_write_mod
594      DEALLOCATE(slp)
595      DEALLOCATE(ale_wake, alp_wake, bils)
596      DEALLOCATE(cdragm, cdragh, cldh, cldl)
597      DEALLOCATE(cldm, cldq, cldt, qsat2m, qsol)
598      DEALLOCATE(cldljn, cldmjn, cldhjn, cldtjn, JrNt)
599      DEALLOCATE(dthmin, evap, fder, plcl, plfc)
600      DEALLOCATE(prw, zustar, zu10m, zv10m, rh2m, s_lcl)
601      DEALLOCATE(s_pblh, s_pblt, s_therm)
602      DEALLOCATE(slab_wfbils, tpot, tpote, ue)
603      DEALLOCATE(uq, ve, vq, zxffonte)
604      DEALLOCATE(zxfqcalving, zxfluxlat, zxrugs)
605      DEALLOCATE(zxtsol, snow_lsc, zxfqfonte, zxqsurf)
606      DEALLOCATE(rain_lsc, wake_h, wbeff, zmax_th)
607      DEALLOCATE(zq2m, zt2m, weak_inversion)
608      DEALLOCATE(zt2m_min_mon, zt2m_max_mon)
609      DEALLOCATE(t2m_min_mon, t2m_max_mon)
610      DEALLOCATE(sens, flwp, fiwp)
611      DEALLOCATE(ale_bl_stat,alp_bl_conv,alp_bl_det)
612      DEALLOCATE(alp_bl_fluct_m,alp_bl_fluct_tke)
613      DEALLOCATE(alp_bl_stat, n2, s2)
614      DEALLOCATE(proba_notrig, random_notrig)
615
616      DEALLOCATE(dnwd, dnwd0)
617!      DEALLOCATE(upwd, omega, coefh)
618      DEALLOCATE(upwd, omega)
619!      DEALLOCATE(coefm, lambda_th, cldemi)
620      DEALLOCATE(lambda_th, cldemi)
621      DEALLOCATE(cldfra, cldtau, fiwc)
622      DEALLOCATE(fl, re, flwc)
623      DEALLOCATE(ref_liq, ref_ice, theta)
624      DEALLOCATE(ref_liq_pi, ref_ice_pi)
625      DEALLOCATE(zphi, wake_omg, zx_rh)
626      DEALLOCATE(pmfd, pmfu)
627
628      DEALLOCATE(t2m, fevap, fluxlat)
629      DEALLOCATE(frugs, agesno, fsollw, evap_pot)
630      DEALLOCATE(fsolsw, wfbils, wfbilo)
631
632      DEALLOCATE(pmflxr, pmflxs, prfl)
633      DEALLOCATE(psfl, fraca, Vprecip)
634      DEALLOCATE(zw2)
635
636      DEALLOCATE(fluxu, fluxv)
637      DEALLOCATE(fluxt)
638
639      DEALLOCATE(uwriteSTD, vwriteSTD)
640      DEALLOCATE(wwriteSTD, phiwriteSTD)
641      DEALLOCATE(qwriteSTD, twriteSTD, rhwriteSTD)
642
643! ug et d'autres encore:
644      DEALLOCATE(wdtrainA, wdtrainM)
645      DEALLOCATE(beta_prec)
646      DEALLOCATE(rneb)
647      DEALLOCATE (zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic)
648
649END SUBROUTINE phys_local_var_end
650
651END MODULE phys_local_var_mod
Note: See TracBrowser for help on using the repository browser.