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

Last change on this file since 1957 was 1943, checked in by idelkadi, 11 years ago

Changes concerinng the Hourdin et al. 2002 version of the thermals and
Ayotte cases

calltherm.F90


call to thermcell_2002 modified :
1) iflag_thermals changed from 1 to >= 1000 ; iflag_thermals-1000
controls sub options.
2) thermals w and fraction in output files.

hbtm.F


Singularity in the 1/heat dependency of the Monin Obukov length L when
heat=0. Since 1/L is used rather than L, it is preferable to compute
directly L. There is a dependency in 1/u* then which is treated with a
threshold value.
(+ some cleaning in the syntax).

lmdz1d.F


If nday<0, -nday is used as the total number of time steps of the
simulation.
The option with imposed wtsurf and wqsurf read in lmdz1d.def was not
active anymore.
< IF(.NOT.ok_flux_surf) THEN
changed to

IF(.NOT.ok_flux_surf.or.max(abs(wtsurf),abs(wqsurf))>0.) THEN

before

fsens=-wtsurf*rcpd*rho(1)
flat=-wqsurf*rlvtt*rho(1)

phys_output_write.F90 et phys_local_var_mod.F90


Removing the d_u_ajsb contribution to duthe (same for dv).
Those tendencies are not computed by the model ...
< zx_tmp_fi3d(1:klon,1:klev)=d_u_ajs(1:klon,1:klev)/pdtphys - &
< d_u_ajsb(1:klon,1:klev)/pdtphys
---

zx_tmp_fi3d(1:klon,1:klev)=d_u_ajs(1:klon,1:klev)/pdtphys

! d_u_ajsb(1:klon,1:klev)/pdtphys

thermcell_dq.F90, thermcell_main.F90


Some cleaning

thermcell_old.F


Control by iflag_thermals >= 1000
wa_moy and fraca in outputs
+ cleaning

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