source: LMDZ4/trunk/libf/phylmd/phys_state_var_mod.F90 @ 1408

Last change on this file since 1408 was 1403, checked in by Laurent Fairhead, 14 years ago

Merged LMDZ4V5.0-dev branch changes r1292:r1399 to trunk.

Validation:
Validation consisted in compiling the HEAD revision of the trunk,
LMDZ4V5.0-dev branch and the merged sources and running different
configurations on local and SX8 machines comparing results.

Local machine: bench configuration, 32x24x11, gfortran

  • IPSLCM5A configuration (comparison between trunk and merged sources):
    • numerical convergence on dynamical fields over 3 days
    • start files are equivalent (except for RN and PB fields)
    • daily history files equivalent
  • MH07 configuration, new physics package (comparison between LMDZ4V5.0-dev branch and merged sources):
    • numerical convergence on dynamical fields over 3 days
    • start files are equivalent (except for RN and PB fields)
    • daily history files equivalent

SX8 machine (brodie), 96x95x39 on 4 processors:

  • IPSLCM5A configuration:
    • start files are equivalent (except for RN and PB fields)
    • monthly history files equivalent
  • MH07 configuration:
    • start files are equivalent (except for RN and PB fields)
    • monthly history files equivalent

Changes to the makegcm and create_make_gcm scripts to take into account
main programs in F90 files


Fusion de la branche LMDZ4V5.0-dev (r1292:r1399) au tronc principal

Validation:
La validation a consisté à compiler la HEAD de le trunk et de la banche
LMDZ4V5.0-dev et les sources fusionnées et de faire tourner le modéle selon
différentes configurations en local et sur SX8 et de comparer les résultats

En local: 32x24x11, config bench/gfortran

  • pour une config IPSLCM5A (comparaison tronc/fusion):
    • convergence numérique sur les champs dynamiques après 3 jours
    • restart et restartphy égaux (à part sur RN et Pb)
    • fichiers histoire égaux
  • pour une config nlle physique (MH07) (comparaison LMDZ4v5.0-dev/fusion):
    • convergence numérique sur les champs dynamiques après 3 jours
    • restart et restartphy égaux
    • fichiers histoire équivalents

Sur brodie, 96x95x39 sur 4 proc:

  • pour une config IPSLCM5A:
    • restart et restartphy égaux (à part sur RN et PB)
    • pas de différence dans les fichiers histmth.nc
  • pour une config MH07
    • restart et restartphy égaux (à part sur RN et PB)
    • pas de différence dans les fichiers histmth.nc

Changement sur makegcm et create_make-gcm pour pouvoir prendre en compte des
programmes principaux en *F90

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 20.5 KB
Line 
1!
2! $Id: phys_state_var_mod.F90 1403 2010-07-01 09:02:53Z fairhead $
3!
4      MODULE phys_state_var_mod
5! Variables sauvegardees pour le startphy.nc
6!======================================================================
7!
8!
9!======================================================================
10! Declaration des variables
11      USE dimphy
12      INTEGER, PARAMETER :: nlevSTD=17
13      INTEGER, PARAMETER :: nlevSTD8=8
14      INTEGER, PARAMETER :: nlevSTD3=3
15      INTEGER, PARAMETER :: nout=3
16      INTEGER, PARAMETER :: napisccp=1
17      INTEGER, SAVE :: radpas
18!$OMP THREADPRIVATE(radpas)
19      REAL, SAVE :: dtime, solaire_etat0
20!$OMP THREADPRIVATE(dtime, solaire_etat0)
21
22      REAL, ALLOCATABLE, SAVE :: rlat(:), rlon(:), pctsrf(:,:)
23!$OMP THREADPRIVATE(rlat, rlon, pctsrf)
24      REAL, ALLOCATABLE, SAVE :: ftsol(:,:)
25!$OMP THREADPRIVATE(ftsol)
26!      character(len=6), SAVE :: ocean
27!!!!!!$OMP THREADPRIVATE(ocean)
28!      logical, SAVE :: ok_veget
29!!!!!!$OMP THREADPRIVATE(ok_veget)
30      REAL, ALLOCATABLE, SAVE :: falb1(:,:), falb2(:,:)
31!$OMP THREADPRIVATE(falb1, falb2)
32      REAL, ALLOCATABLE, SAVE :: rain_fall(:), snow_fall(:)
33!$OMP THREADPRIVATE( rain_fall, snow_fall)
34      REAL, ALLOCATABLE, SAVE :: solsw(:), sollw(:)
35!$OMP THREADPRIVATE(solsw, sollw)
36      REAL, ALLOCATABLE, SAVE :: radsol(:)
37!$OMP THREADPRIVATE(radsol)
38
39!clesphy0 param physiq
40!
41! Parametres de l'Orographie a l'Echelle Sous-Maille (OESM):
42!
43      REAL, ALLOCATABLE, SAVE :: zmea(:), zstd(:), zsig(:), zgam(:)
44!$OMP THREADPRIVATE(zmea, zstd, zsig, zgam)
45      REAL, ALLOCATABLE, SAVE :: zthe(:), zpic(:), zval(:)
46!$OMP THREADPRIVATE(zthe, zpic, zval)
47!     REAL tabcntr0(100)
48      REAL, ALLOCATABLE, SAVE :: rugoro(:)
49!$OMP THREADPRIVATE(rugoro)
50      REAL, ALLOCATABLE, SAVE :: t_ancien(:,:), q_ancien(:,:)
51!$OMP THREADPRIVATE(t_ancien, q_ancien)
52      REAL, ALLOCATABLE, SAVE :: u_ancien(:,:), v_ancien(:,:)
53!$OMP THREADPRIVATE(u_ancien, v_ancien)
54      LOGICAL, SAVE :: ancien_ok
55!$OMP THREADPRIVATE(ancien_ok)
56      REAL, ALLOCATABLE, SAVE :: clwcon(:,:),rnebcon(:,:)
57!$OMP THREADPRIVATE(clwcon,rnebcon)
58      REAL, ALLOCATABLE, SAVE :: ratqs(:,:)
59!$OMP THREADPRIVATE(ratqs)
60      REAL, ALLOCATABLE, SAVE :: pbl_tke(:,:,:) ! turb kinetic energy
61!$OMP THREADPRIVATE(pbl_tke)
62      REAL, ALLOCATABLE, SAVE :: zmax0(:), f0(:) !
63!$OMP THREADPRIVATE(zmax0,f0)
64      REAL, ALLOCATABLE, SAVE :: ema_work1(:,:), ema_work2(:,:)
65!$OMP THREADPRIVATE(ema_work1,ema_work2)
66      REAL, ALLOCATABLE, SAVE :: entr_therm(:,:), fm_therm(:,:)
67!$OMP THREADPRIVATE(entr_therm,fm_therm)
68      REAL, ALLOCATABLE, SAVE :: detr_therm(:,:)
69!$OMP THREADPRIVATE(detr_therm)
70!IM 150408
71!     pour phsystoke avec thermiques
72      REAL,ALLOCATABLE,SAVE :: clwcon0th(:,:),rnebcon0th(:,:)
73!$OMP THREADPRIVATE(clwcon0th,rnebcon0th)
74! radiation outputs
75      REAL,ALLOCATABLE,SAVE :: swdn0(:,:), swdn(:,:)
76!$OMP THREADPRIVATE(swdn0,swdn)
77      REAL,ALLOCATABLE,SAVE :: swup0(:,:), swup(:,:)
78!$OMP THREADPRIVATE(swup0,swup)
79      REAL,ALLOCATABLE,SAVE :: SWdn200clr(:), SWdn200(:)
80!$OMP THREADPRIVATE(SWdn200clr,SWdn200)
81      REAL,ALLOCATABLE,SAVE :: SWup200clr(:), SWup200(:)
82!$OMP THREADPRIVATE(SWup200clr,SWup200)
83      REAL,ALLOCATABLE,SAVE :: lwdn0(:,:), lwdn(:,:)
84!$OMP THREADPRIVATE(lwdn0,lwdn)
85      REAL,ALLOCATABLE,SAVE :: lwup0(:,:), lwup(:,:)
86!$OMP THREADPRIVATE(lwup0,lwup)
87      REAL,ALLOCATABLE,SAVE :: LWdn200clr(:), LWdn200(:)
88!$OMP THREADPRIVATE(LWdn200clr,LWdn200)
89      REAL,ALLOCATABLE,SAVE :: LWup200clr(:), LWup200(:)
90!$OMP THREADPRIVATE(LWup200clr,LWup200)
91      REAL,ALLOCATABLE,SAVE :: LWdnTOA(:), LWdnTOAclr(:)
92!$OMP THREADPRIVATE(LWdnTOA,LWdnTOAclr)
93! pressure level
94      REAL,ALLOCATABLE,SAVE :: tsumSTD(:,:,:)
95!$OMP THREADPRIVATE(tsumSTD)
96      REAL,ALLOCATABLE,SAVE :: usumSTD(:,:,:), vsumSTD(:,:,:)
97!$OMP THREADPRIVATE(usumSTD,vsumSTD)
98      REAL,ALLOCATABLE,SAVE :: wsumSTD(:,:,:), phisumSTD(:,:,:)
99!$OMP THREADPRIVATE(wsumSTD,phisumSTD)
100      REAL,ALLOCATABLE,SAVE :: qsumSTD(:,:,:), rhsumSTD(:,:,:)
101!$OMP THREADPRIVATE(qsumSTD,rhsumSTD)
102      REAL,ALLOCATABLE,SAVE :: tnondef(:,:,:)
103!$OMP THREADPRIVATE(tnondef)
104      REAL,ALLOCATABLE,SAVE :: uvsumSTD(:,:,:)
105!$OMP THREADPRIVATE(uvsumSTD)
106      REAL,ALLOCATABLE,SAVE :: vqsumSTD(:,:,:)
107!$OMP THREADPRIVATE(vqsumSTD)
108      REAL,ALLOCATABLE,SAVE :: vTsumSTD(:,:,:)
109!$OMP THREADPRIVATE(vTsumSTD)
110      REAL,ALLOCATABLE,SAVE :: wqsumSTD(:,:,:)
111!$OMP THREADPRIVATE(wqsumSTD)
112      REAL,ALLOCATABLE,SAVE :: vphisumSTD(:,:,:)
113!$OMP THREADPRIVATE(vphisumSTD)
114      REAL,ALLOCATABLE,SAVE :: wTsumSTD(:,:,:)
115!$OMP THREADPRIVATE(wTsumSTD)
116      REAL,ALLOCATABLE,SAVE :: u2sumSTD(:,:,:)
117!$OMP THREADPRIVATE(u2sumSTD)
118      REAL,ALLOCATABLE,SAVE :: v2sumSTD(:,:,:)
119!$OMP THREADPRIVATE(v2sumSTD)
120      REAL,ALLOCATABLE,SAVE :: T2sumSTD(:,:,:)
121!$OMP THREADPRIVATE(T2sumSTD)
122      REAL,ALLOCATABLE,SAVE :: O3sumSTD(:,:,:), O3daysumSTD(:,:,:)
123!$OMP THREADPRIVATE(O3sumSTD,O3daysumSTD)
124!IM begin
125      REAL,ALLOCATABLE,SAVE :: wlevSTD(:,:), ulevSTD(:,:), vlevSTD(:,:)
126!$OMP THREADPRIVATE(wlevSTD,ulevSTD,vlevSTD)
127      REAL,ALLOCATABLE,SAVE :: tlevSTD(:,:), qlevSTD(:,:), rhlevSTD(:,:)
128!$OMP THREADPRIVATE(tlevSTD,qlevSTD,rhlevSTD)
129      REAL,ALLOCATABLE,SAVE :: philevSTD(:,:)
130!$OMP THREADPRIVATE(philevSTD)
131      REAL,ALLOCATABLE,SAVE :: uvSTD(:,:)
132!$OMP THREADPRIVATE(uvSTD)
133      REAL,ALLOCATABLE,SAVE :: vqSTD(:,:)
134!$OMP THREADPRIVATE(vqSTD)
135      REAL,ALLOCATABLE,SAVE :: vTSTD(:,:)
136!$OMP THREADPRIVATE(vTSTD)
137      REAL,ALLOCATABLE,SAVE :: wqSTD(:,:)
138!$OMP THREADPRIVATE(wqSTD)
139      REAL,ALLOCATABLE,SAVE :: vphiSTD(:,:)
140!$OMP THREADPRIVATE(vphiSTD)
141      REAL,ALLOCATABLE,SAVE :: wTSTD(:,:)
142!$OMP THREADPRIVATE(wTSTD)
143      REAL,ALLOCATABLE,SAVE :: u2STD(:,:)
144!$OMP THREADPRIVATE(u2STD)
145      REAL,ALLOCATABLE,SAVE :: v2STD(:,:)
146!$OMP THREADPRIVATE(v2STD)
147      REAL,ALLOCATABLE,SAVE :: T2STD(:,:)
148!$OMP THREADPRIVATE(T2STD)
149      REAL,ALLOCATABLE,SAVE :: O3STD(:,:), O3daySTD(:,:)
150!$OMP THREADPRIVATE(O3STD,O3daySTD)
151!IM end
152      INTEGER,ALLOCATABLE,SAVE :: seed_old(:,:)
153!$OMP THREADPRIVATE(seed_old)
154      REAL,ALLOCATABLE,SAVE :: zuthe(:),zvthe(:)
155!$OMP THREADPRIVATE(zuthe,zvthe)
156      REAL,ALLOCATABLE,SAVE :: alb_neig(:)
157!$OMP THREADPRIVATE(alb_neig)
158!cloud base mass flux
159      REAL,ALLOCATABLE,SAVE :: ema_cbmf(:)
160!$OMP THREADPRIVATE(ema_cbmf)
161!cloud base pressure & cloud top pressure
162      REAL,ALLOCATABLE,SAVE :: ema_pcb(:), ema_pct(:)
163!$OMP THREADPRIVATE(ema_pcb,ema_pct)
164      REAL,ALLOCATABLE,SAVE :: Ma(:,:)        ! undilute upward mass flux
165!$OMP THREADPRIVATE(Ma)
166      REAL,ALLOCATABLE,SAVE :: qcondc(:,:)    ! in-cld water content from convect
167!$OMP THREADPRIVATE(qcondc)
168      REAL,ALLOCATABLE,SAVE :: wd(:) ! sb
169!$OMP THREADPRIVATE(wd)
170      REAL,ALLOCATABLE,SAVE :: sigd(:)
171!$OMP THREADPRIVATE(sigd)
172!
173      REAL,ALLOCATABLE,SAVE :: cin(:)
174!$OMP THREADPRIVATE(cin)
175! ftd : differential heating between wake and environment
176      REAL,ALLOCATABLE,SAVE :: ftd(:,:)
177!$OMP THREADPRIVATE(ftd)
178! fqd : differential moistening between wake and environment
179      REAL,ALLOCATABLE,SAVE :: fqd(:,:)     
180!$OMP THREADPRIVATE(fqd)
181!34EK
182! -- Variables de controle de ALE et ALP
183!ALE : Energie disponible pour soulevement : utilisee par la
184!      convection d'Emanuel pour le declenchement et la regulation
185      REAL,ALLOCATABLE,SAVE :: ALE(:)
186!$OMP THREADPRIVATE(ALE)
187!ALP : Puissance  disponible pour soulevement
188      REAL,ALLOCATABLE,SAVE :: ALP(:)
189!$OMP THREADPRIVATE(ALP)
190!
191! nouvelles variables pour le couplage convection-couche limite
192      REAL,ALLOCATABLE,SAVE :: Ale_bl(:)
193!$OMP THREADPRIVATE(Ale_bl)
194      REAL,ALLOCATABLE,SAVE :: Alp_bl(:)
195!$OMP THREADPRIVATE(Alp_bl)
196      INTEGER,ALLOCATABLE,SAVE :: lalim_conv(:)
197!$OMP THREADPRIVATE(lalim_conv)
198      REAL,ALLOCATABLE,SAVE :: wght_th(:,:)
199!$OMP THREADPRIVATE(wght_th)
200!
201! variables de la wake
202! wake_deltat : ecart de temperature avec la zone non perturbee
203! wake_deltaq : ecart d'humidite avec la zone non perturbee
204! wake_Cstar  : vitesse d'etalement de la poche
205! wake_s      : fraction surfacique occupee par la poche froide
206! wake_pe     : wake potential energy - WAPE
207! wake_fip    : Gust Front Impinging power - ALP
208! dt_wake, dq_wake: LS tendencies due to wake
209      REAL,ALLOCATABLE,SAVE :: wake_deltat(:,:)
210!$OMP THREADPRIVATE(wake_deltat)
211      REAL,ALLOCATABLE,SAVE :: wake_deltaq(:,:)
212!$OMP THREADPRIVATE(wake_deltaq)
213      REAL,ALLOCATABLE,SAVE :: wake_Cstar(:)
214!$OMP THREADPRIVATE(wake_Cstar)
215      REAL,ALLOCATABLE,SAVE :: wake_s(:)
216!$OMP THREADPRIVATE(wake_s)
217      REAL,ALLOCATABLE,SAVE :: wake_pe(:)
218!$OMP THREADPRIVATE(wake_pe)
219      REAL,ALLOCATABLE,SAVE :: wake_fip(:)
220!$OMP THREADPRIVATE(wake_fip)
221      REAL,ALLOCATABLE,SAVE :: dt_wake(:,:)
222!$OMP THREADPRIVATE(dt_wake)
223      REAL,ALLOCATABLE,SAVE :: dq_wake(:,:)
224!$OMP THREADPRIVATE(dq_wake)
225!
226! pfrac_impa : Produits des coefs lessivage impaction
227! pfrac_nucl : Produits des coefs lessivage nucleation
228! pfrac_1nucl: Produits des coefs lessi nucl (alpha = 1)
229      REAL,ALLOCATABLE,SAVE :: pfrac_impa(:,:), pfrac_nucl(:,:)
230!$OMP THREADPRIVATE(pfrac_impa,pfrac_nucl)
231      REAL,ALLOCATABLE,SAVE :: pfrac_1nucl(:,:)
232!$OMP THREADPRIVATE(pfrac_1nucl)
233!
234      REAL,ALLOCATABLE,SAVE :: total_rain(:), nday_rain(:) 
235!$OMP THREADPRIVATE(total_rain,nday_rain)
236      REAL,ALLOCATABLE,SAVE :: paire_ter(:)
237!$OMP THREADPRIVATE(paire_ter)
238! albsol1: albedo du sol total pour SW visible
239! albsol2: albedo du sol total pour SW proche IR
240      REAL,ALLOCATABLE,SAVE :: albsol1(:), albsol2(:)
241!$OMP THREADPRIVATE(albsol1,albsol2)
242
243      REAL, ALLOCATABLE, SAVE:: wo(:, :, :)
244      ! column-density of ozone in a layer, in kilo-Dobsons
245      ! Third dimension has size 1 or 2.
246      ! "wo(:, :, 1)" is for the average day-night field,
247      ! "wo(:, :, 2)" is for daylight time.
248      !$OMP THREADPRIVATE(wo)
249
250! heat : chauffage solaire
251! heat0: chauffage solaire ciel clair
252! cool : refroidissement infrarouge
253! cool0 : refroidissement infrarouge ciel clair
254! sollwdown : downward LW flux at surface
255! sollwdownclr : downward CS LW flux at surface
256! toplwdown : downward CS LW flux at TOA
257! toplwdownclr : downward CS LW flux at TOA
258      REAL,ALLOCATABLE,SAVE :: clwcon0(:,:),rnebcon0(:,:)
259!$OMP THREADPRIVATE(clwcon0,rnebcon0)
260      REAL,ALLOCATABLE,SAVE :: heat(:,:)   
261!$OMP THREADPRIVATE(heat)
262      REAL,ALLOCATABLE,SAVE :: heat0(:,:)
263!$OMP THREADPRIVATE(heat0)
264      REAL,ALLOCATABLE,SAVE :: cool(:,:)
265!$OMP THREADPRIVATE(cool)
266      REAL,ALLOCATABLE,SAVE :: cool0(:,:)
267!$OMP THREADPRIVATE(cool0)
268      REAL,ALLOCATABLE,SAVE :: topsw(:), toplw(:)
269!$OMP THREADPRIVATE(topsw,toplw)
270      REAL,ALLOCATABLE,SAVE :: sollwdown(:)
271!$OMP THREADPRIVATE(sollwdown)
272      REAL,ALLOCATABLE,SAVE :: sollwdownclr(:)
273!$OMP THREADPRIVATE(sollwdownclr)
274      REAL,ALLOCATABLE,SAVE :: toplwdown(:)
275!$OMP THREADPRIVATE(toplwdown)
276      REAL,ALLOCATABLE,SAVE :: toplwdownclr(:)
277!$OMP THREADPRIVATE(toplwdownclr)
278      REAL,ALLOCATABLE,SAVE :: topsw0(:),toplw0(:),solsw0(:),sollw0(:)
279!$OMP THREADPRIVATE(topsw0,toplw0,solsw0,sollw0)
280      REAL,ALLOCATABLE,SAVE :: albpla(:)
281!$OMP THREADPRIVATE(albpla)
282! pbase : cloud base pressure
283! bbase : cloud base buoyancy
284      REAL,ALLOCATABLE,SAVE :: cape(:)
285!$OMP THREADPRIVATE(cape)
286      REAL,ALLOCATABLE,SAVE :: pbase(:)
287!$OMP THREADPRIVATE(pbase)
288      REAL,ALLOCATABLE,SAVE :: bbase(:)
289!$OMP THREADPRIVATE(bbase)
290!
291      REAL,SAVE,ALLOCATABLE :: zqasc(:,:)
292!$OMP THREADPRIVATE( zqasc)
293      INTEGER,ALLOCATABLE,SAVE :: ibas_con(:), itop_con(:)
294!$OMP THREADPRIVATE(ibas_con,itop_con)
295      REAL,SAVE,ALLOCATABLE :: rain_con(:)
296!$OMP THREADPRIVATE(rain_con)
297      REAL,SAVE,ALLOCATABLE :: snow_con(:)
298!$OMP THREADPRIVATE(snow_con)
299!
300      REAL,SAVE,ALLOCATABLE :: rlonPOS(:)
301!$OMP THREADPRIVATE(rlonPOS)
302      REAL,SAVE,ALLOCATABLE :: newsst(:)
303!$OMP THREADPRIVATE(newsst)
304      REAL,SAVE,ALLOCATABLE :: u10m(:,:), v10m(:,:)
305!$OMP THREADPRIVATE(u10m,v10m)
306!
307! ok_ade=T -ADE=topswad-topsw
308! ok_aie=T ->
309!       ok_ade=T -AIE=topswai-topswad
310!       ok_ade=F -AIE=topswai-topsw
311!
312!topswad, solswad : Aerosol direct effect
313      REAL,SAVE,ALLOCATABLE :: topswad(:), solswad(:)
314!$OMP THREADPRIVATE(topswad,solswad)
315!topswai, solswai : Aerosol indirect effect
316      REAL,SAVE,ALLOCATABLE :: topswai(:), solswai(:)
317!$OMP THREADPRIVATE(topswai,solswai)
318
319      REAL,SAVE,ALLOCATABLE :: tau_aero(:,:,:,:), piz_aero(:,:,:,:), cg_aero(:,:,:,:)
320!$OMP THREADPRIVATE(tau_aero, piz_aero, cg_aero)
321      REAL,SAVE,ALLOCATABLE :: ccm(:,:,:)
322!$OMP THREADPRIVATE(ccm)
323
324CONTAINS
325
326!======================================================================
327SUBROUTINE phys_state_var_init(read_climoz)
328use dimphy
329USE control_mod
330use aero_mod
331IMPLICIT NONE
332
333integer, intent(in)::  read_climoz
334! read ozone climatology
335! Allowed values are 0, 1 and 2
336! 0: do not read an ozone climatology
337! 1: read a single ozone climatology that will be used day and night
338! 2: read two ozone climatologies, the average day and night
339! climatology and the daylight climatology
340
341#include "indicesol.h"
342      ALLOCATE(rlat(klon), rlon(klon))
343      ALLOCATE(pctsrf(klon,nbsrf))
344      ALLOCATE(ftsol(klon,nbsrf))
345      ALLOCATE(falb1(klon,nbsrf))
346      ALLOCATE(falb2(klon,nbsrf))
347      ALLOCATE(rain_fall(klon))
348      ALLOCATE(snow_fall(klon))
349      ALLOCATE(solsw(klon), sollw(klon))
350      ALLOCATE(radsol(klon))
351      ALLOCATE(zmea(klon), zstd(klon), zsig(klon), zgam(klon))
352      ALLOCATE(zthe(klon), zpic(klon), zval(klon))
353
354      ALLOCATE(rugoro(klon))
355      ALLOCATE(t_ancien(klon,klev), q_ancien(klon,klev))
356      ALLOCATE(u_ancien(klon,klev), v_ancien(klon,klev))
357      ALLOCATE(clwcon(klon,klev),rnebcon(klon,klev))
358      ALLOCATE(ratqs(klon,klev))
359      ALLOCATE(pbl_tke(klon,klev+1,nbsrf))
360      ALLOCATE(zmax0(klon), f0(klon))
361      ALLOCATE(ema_work1(klon,klev), ema_work2(klon,klev))
362      ALLOCATE(entr_therm(klon,klev), fm_therm(klon,klev+1))
363      ALLOCATE(detr_therm(klon,klev))
364!     pour phsystoke avec thermiques
365      ALLOCATE(clwcon0th(klon,klev),rnebcon0th(klon,klev))
366! radiation outputs
367      ALLOCATE(swdn0(klon,klevp1), swdn(klon,klevp1))
368      ALLOCATE(swup0(klon,klevp1), swup(klon,klevp1))
369      ALLOCATE(lwdn0(klon,klevp1), lwdn(klon,klevp1))
370      ALLOCATE(lwup0(klon,klevp1), lwup(klon,klevp1))
371      ALLOCATE(SWdn200clr(klon), SWdn200(klon))
372      ALLOCATE(SWup200clr(klon), SWup200(klon))
373      ALLOCATE(LWdn200clr(klon), LWdn200(klon))
374      ALLOCATE(LWup200clr(klon), LWup200(klon))
375      ALLOCATE(LWdnTOA(klon), LWdnTOAclr(klon))
376! pressure level
377      ALLOCATE(tsumSTD(klon,nlevSTD,nout))
378      ALLOCATE(usumSTD(klon,nlevSTD,nout), vsumSTD(klon,nlevSTD,nout))
379      ALLOCATE(wsumSTD(klon,nlevSTD,nout), phisumSTD(klon,nlevSTD,nout))
380      ALLOCATE(qsumSTD(klon,nlevSTD,nout), rhsumSTD(klon,nlevSTD,nout))
381      ALLOCATE(tnondef(klon,nlevSTD,nout))
382      ALLOCATE(uvsumSTD(klon,nlevSTD,nout))
383      ALLOCATE(vqsumSTD(klon,nlevSTD,nout))
384      ALLOCATE(vTsumSTD(klon,nlevSTD,nout))
385      ALLOCATE(wqsumSTD(klon,nlevSTD,nout))
386      ALLOCATE(vphisumSTD(klon,nlevSTD,nout))
387      ALLOCATE(wTsumSTD(klon,nlevSTD,nout))
388      ALLOCATE(u2sumSTD(klon,nlevSTD,nout))
389      ALLOCATE(v2sumSTD(klon,nlevSTD,nout))
390      ALLOCATE(T2sumSTD(klon,nlevSTD,nout))
391      ALLOCATE(O3sumSTD(klon,nlevSTD,nout))
392      ALLOCATE(O3daysumSTD(klon,nlevSTD,nout))
393!IM beg
394      ALLOCATE(wlevSTD(klon,nlevSTD), ulevSTD(klon,nlevSTD), vlevSTD(klon,nlevSTD))
395      ALLOCATE(tlevSTD(klon,nlevSTD), qlevSTD(klon,nlevSTD), rhlevSTD(klon,nlevSTD))
396      ALLOCATE(philevSTD(klon,nlevSTD))
397      ALLOCATE(uvSTD(klon,nlevSTD),vqSTD(klon,nlevSTD))
398      ALLOCATE(vTSTD(klon,nlevSTD),wqSTD(klon,nlevSTD))
399      ALLOCATE(vphiSTD(klon,nlevSTD),wTSTD(klon,nlevSTD))
400      ALLOCATE(u2STD(klon,nlevSTD),v2STD(klon,nlevSTD))
401      ALLOCATE(T2STD(klon,nlevSTD))
402      ALLOCATE(O3STD(klon,nlevSTD))
403      ALLOCATE(O3daySTD(klon,nlevSTD))
404!IM end
405      ALLOCATE(seed_old(klon,napisccp))
406      ALLOCATE(zuthe(klon),zvthe(klon))
407      ALLOCATE(alb_neig(klon))
408!cloud base mass flux
409      ALLOCATE(ema_cbmf(klon))
410!cloud base pressure & cloud top pressure
411      ALLOCATE(ema_pcb(klon), ema_pct(klon))
412!
413      ALLOCATE(Ma(klon,klev))
414      ALLOCATE(qcondc(klon,klev))
415      ALLOCATE(wd(klon))
416      ALLOCATE(sigd(klon))
417      ALLOCATE(cin(klon), ALE(klon), ALP(klon))
418      ALLOCATE(ftd(klon,klev), fqd(klon,klev))
419      ALLOCATE(Ale_bl(klon))
420      ALLOCATE(Alp_bl(klon))
421      ALLOCATE(lalim_conv(klon))
422      ALLOCATE(wght_th(klon,klev))
423      ALLOCATE(wake_deltat(klon,klev), wake_deltaq(klon,klev))
424      ALLOCATE(wake_Cstar(klon), wake_s(klon))
425      ALLOCATE(wake_pe(klon), wake_fip(klon))
426      ALLOCATE(dt_wake(klon,klev), dq_wake(klon,klev))
427      ALLOCATE(pfrac_impa(klon,klev), pfrac_nucl(klon,klev))
428      ALLOCATE(pfrac_1nucl(klon,klev))
429      ALLOCATE(total_rain(klon), nday_rain(klon))
430      ALLOCATE(paire_ter(klon))
431      ALLOCATE(albsol1(klon), albsol2(klon))
432
433      if (read_climoz <= 1) then
434         ALLOCATE(wo(klon,klev, 1))
435      else
436         ! read_climoz == 2
437         ALLOCATE(wo(klon,klev, 2))
438      end if
439     
440      ALLOCATE(clwcon0(klon,klev),rnebcon0(klon,klev))
441      ALLOCATE(heat(klon,klev), heat0(klon,klev))
442      ALLOCATE(cool(klon,klev), cool0(klon,klev))
443      ALLOCATE(topsw(klon), toplw(klon))
444      ALLOCATE(sollwdown(klon), sollwdownclr(klon))
445      ALLOCATE(toplwdown(klon), toplwdownclr(klon))
446      ALLOCATE(topsw0(klon),toplw0(klon),solsw0(klon),sollw0(klon))
447      ALLOCATE(albpla(klon))
448      ALLOCATE(cape(klon))
449      ALLOCATE(pbase(klon),bbase(klon))
450      ALLOCATE(zqasc(klon,klev))
451      ALLOCATE(ibas_con(klon), itop_con(klon))
452      ALLOCATE(rain_con(klon), snow_con(klon))
453      ALLOCATE(rlonPOS(klon))
454      ALLOCATE(newsst(klon))
455      ALLOCATE(u10m(klon,nbsrf), v10m(klon,nbsrf))
456      ALLOCATE(topswad(klon), solswad(klon))
457      ALLOCATE(topswai(klon), solswai(klon))
458      ALLOCATE(tau_aero(klon,klev,naero_grp,nbands),piz_aero(klon,klev,naero_grp,nbands),cg_aero(klon,klev,naero_grp,nbands))
459      ALLOCATE(ccm(klon,klev,nbands))
460
461END SUBROUTINE phys_state_var_init
462
463!======================================================================
464SUBROUTINE phys_state_var_end
465use dimphy
466use control_mod
467IMPLICIT NONE
468#include "indicesol.h"
469
470      deallocate(rlat, rlon, pctsrf, ftsol, falb1, falb2)
471      deallocate(rain_fall, snow_fall, solsw, sollw, radsol)
472      deallocate(zmea, zstd, zsig, zgam)
473      deallocate(zthe, zpic, zval)
474      deallocate(rugoro, t_ancien, q_ancien, clwcon, rnebcon)
475      deallocate(        u_ancien, v_ancien                 )
476      deallocate(ratqs, pbl_tke)
477      deallocate(zmax0, f0)
478      deallocate(ema_work1, ema_work2)
479      deallocate(entr_therm, fm_therm)
480      deallocate(detr_therm)
481      deallocate(clwcon0th, rnebcon0th)
482! radiation outputs
483      deallocate(swdn0, swdn)
484      deallocate(swup0, swup)
485      deallocate(lwdn0, lwdn)
486      deallocate(lwup0, lwup)
487      deallocate(SWdn200clr, SWdn200)
488      deallocate(SWup200clr, SWup200)
489      deallocate(LWdn200clr, LWdn200)
490      deallocate(LWup200clr, LWup200)
491      deallocate(LWdnTOA, LWdnTOAclr)
492! pressure level
493      deallocate(tsumSTD)
494      deallocate(usumSTD, vsumSTD)
495      deallocate(wsumSTD, phisumSTD)
496      deallocate(tnondef)
497      deallocate(qsumSTD, rhsumSTD)
498      deallocate(uvsumSTD)
499      deallocate(vqsumSTD)
500      deallocate(vTsumSTD)
501      deallocate(wqsumSTD)
502      deallocate(vphisumSTD)
503      deallocate(wTsumSTD)
504      deallocate(u2sumSTD)
505      deallocate(v2sumSTD)
506      deallocate(T2sumSTD)
507      deallocate(O3sumSTD)
508      deallocate(O3daysumSTD)
509!IM beg
510      deallocate(wlevSTD,ulevSTD,vlevSTD,tlevSTD,qlevSTD,rhlevSTD,philevSTD)
511      deallocate(uvSTD,vqSTD,vTSTD,wqSTD,vphiSTD,wTSTD,u2STD,v2STD,T2STD,O3STD,O3daySTD)
512!IM end
513      deallocate(seed_old)
514      deallocate(zuthe, zvthe)
515      deallocate(alb_neig)
516      deallocate(ema_cbmf)
517      deallocate(ema_pcb, ema_pct)
518      deallocate(Ma, qcondc)
519      deallocate(wd, sigd)
520      deallocate(cin, ALE, ALP)
521      deallocate(ftd, fqd)
522      deallocate(Ale_bl, Alp_bl)
523      deallocate(lalim_conv, wght_th)
524      deallocate(wake_deltat, wake_deltaq)
525      deallocate(wake_Cstar, wake_s, wake_pe, wake_fip)
526      deallocate(dt_wake, dq_wake)
527      deallocate(pfrac_impa, pfrac_nucl)
528      deallocate(pfrac_1nucl)
529      deallocate(total_rain, nday_rain)
530      deallocate(paire_ter)
531      deallocate(albsol1, albsol2)
532      deallocate(wo)
533      deallocate(clwcon0,rnebcon0)
534      deallocate(heat, heat0)
535      deallocate(cool, cool0)
536      deallocate(topsw, toplw)
537      deallocate(sollwdown, sollwdownclr)
538      deallocate(toplwdown, toplwdownclr)
539      deallocate(topsw0,toplw0,solsw0,sollw0)
540      deallocate(albpla)
541      deallocate(cape)
542      deallocate(pbase,bbase)
543      deallocate(zqasc)
544      deallocate(ibas_con, itop_con)
545      deallocate(rain_con, snow_con)
546      deallocate(rlonPOS)
547      deallocate(newsst)
548      deallocate(u10m, v10m)
549      deallocate(topswad, solswad)
550      deallocate(topswai, solswai)
551      deallocate(tau_aero,piz_aero,cg_aero)
552      deallocate(ccm)
553       
554END SUBROUTINE phys_state_var_end
555
556      END MODULE phys_state_var_mod
Note: See TracBrowser for help on using the repository browser.