source: LMDZ5/trunk/libf/phylmd/phys_state_var_mod.F90 @ 2237

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

New ocean albedo.

To activate the new scheme, put iflag_albedo=1 in physiq.def

To activate chlorophyll concentration effect on albedo,
put ok_chlorophyll=y in def file

and download file named chlorophyll.nc
chlorophyll.nc has the same dimension as the model grid with 12 months data,
(i=lon, j=lat, L=1:12) and can be degraded from the original file of dimension
i=1:4320 , j=1:2160 , L=1:12
ada:/workgpfs/rech/psl/rpsl949/clima/chlor_seasonal_clim_seawifs.nc

For 96X96 resolution, chlorophyll.nc file is in
ada:/workgpfs/rech/psl/rpsl949/clima/chlorophyll.nc

  1. Baek
  • 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: 25.9 KB
Line 
1!
2! $Id: phys_state_var_mod.F90 2227 2015-03-12 11:07:43Z fhourdin $
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
33!albedo SB >>>
34      REAL, ALLOCATABLE, SAVE :: falb_dif(:,:,:), falb_dir(:,:,:)
35      real, allocatable, save :: chl_con(:)
36!$OMP THREADPRIVATE(falb_dir,falb_dif,chl_con)
37!albedo SB <<<
38
39
40      REAL, ALLOCATABLE, SAVE :: rain_fall(:), snow_fall(:)
41!$OMP THREADPRIVATE( rain_fall, snow_fall)
42      REAL, ALLOCATABLE, SAVE :: solsw(:), sollw(:)
43!$OMP THREADPRIVATE(solsw, sollw)
44      REAL, ALLOCATABLE, SAVE :: radsol(:)
45!$OMP THREADPRIVATE(radsol)
46
47!clesphy0 param physiq
48!
49! Parametres de l'Orographie a l'Echelle Sous-Maille (OESM):
50!
51      REAL, ALLOCATABLE, SAVE :: zmea(:), zstd(:), zsig(:), zgam(:)
52!$OMP THREADPRIVATE(zmea, zstd, zsig, zgam)
53      REAL, ALLOCATABLE, SAVE :: zthe(:), zpic(:), zval(:)
54!$OMP THREADPRIVATE(zthe, zpic, zval)
55!     REAL tabcntr0(100)
56      REAL, ALLOCATABLE, SAVE :: rugoro(:)
57!$OMP THREADPRIVATE(rugoro)
58      REAL, ALLOCATABLE, SAVE :: t_ancien(:,:), q_ancien(:,:)
59!$OMP THREADPRIVATE(t_ancien, q_ancien)
60      REAL, ALLOCATABLE, SAVE :: u_ancien(:,:), v_ancien(:,:)
61!$OMP THREADPRIVATE(u_ancien, v_ancien)
62!!! RomP >>>
63      REAL, ALLOCATABLE, SAVE :: tr_ancien(:,:,:)
64!$OMP THREADPRIVATE(tr_ancien)
65!!! RomP <<<
66      LOGICAL, SAVE :: ancien_ok
67!$OMP THREADPRIVATE(ancien_ok)
68      REAL, ALLOCATABLE, SAVE :: clwcon(:,:),rnebcon(:,:)
69!$OMP THREADPRIVATE(clwcon,rnebcon)
70      REAL, ALLOCATABLE, SAVE :: qtc_cv(:,:),sigt_cv(:,:)
71!$OMP THREADPRIVATE(qtc_cv,sigt_cv)
72      REAL, ALLOCATABLE, SAVE :: ratqs(:,:)
73!$OMP THREADPRIVATE(ratqs)
74      REAL, ALLOCATABLE, SAVE :: pbl_tke(:,:,:) ! turb kinetic energy
75      REAL, ALLOCATABLE, SAVE :: coefh(:,:,:) ! Kz enthalpie
76      REAL, ALLOCATABLE, SAVE :: coefm(:,:,:) ! Kz momentum
77!$OMP THREADPRIVATE(pbl_tke, coefh,coefm)
78!nrlmd<
79      REAL, ALLOCATABLE, SAVE :: delta_tsurf(:,:) ! Surface temperature difference inside-outside cold pool
80!$OMP THREADPRIVATE(delta_tsurf)
81!>nrlmd
82      REAL, ALLOCATABLE, SAVE :: zmax0(:), f0(:) !
83!$OMP THREADPRIVATE(zmax0,f0)
84      REAL, ALLOCATABLE, SAVE :: sig1(:,:), w01(:,:)
85!$OMP THREADPRIVATE(sig1,w01)
86      REAL, ALLOCATABLE, SAVE :: entr_therm(:,:), fm_therm(:,:)
87!$OMP THREADPRIVATE(entr_therm,fm_therm)
88      REAL, ALLOCATABLE, SAVE :: detr_therm(:,:)
89!$OMP THREADPRIVATE(detr_therm)
90!IM 150408
91!     pour phsystoke avec thermiques
92      REAL,ALLOCATABLE,SAVE :: clwcon0th(:,:),rnebcon0th(:,:)
93!$OMP THREADPRIVATE(clwcon0th,rnebcon0th)
94! radiation outputs
95      REAL,ALLOCATABLE,SAVE :: swdn0(:,:), swdn(:,:)
96!$OMP THREADPRIVATE(swdn0,swdn)
97      REAL,ALLOCATABLE,SAVE :: swup0(:,:), swup(:,:)
98!$OMP THREADPRIVATE(swup0,swup)
99      REAL,ALLOCATABLE,SAVE :: SWdn200clr(:), SWdn200(:)
100!$OMP THREADPRIVATE(SWdn200clr,SWdn200)
101      REAL,ALLOCATABLE,SAVE :: SWup200clr(:), SWup200(:)
102!$OMP THREADPRIVATE(SWup200clr,SWup200)
103      REAL,ALLOCATABLE,SAVE :: lwdn0(:,:), lwdn(:,:)
104!$OMP THREADPRIVATE(lwdn0,lwdn)
105      REAL,ALLOCATABLE,SAVE :: lwup0(:,:), lwup(:,:)
106!$OMP THREADPRIVATE(lwup0,lwup)
107      REAL,ALLOCATABLE,SAVE :: LWdn200clr(:), LWdn200(:)
108!$OMP THREADPRIVATE(LWdn200clr,LWdn200)
109      REAL,ALLOCATABLE,SAVE :: LWup200clr(:), LWup200(:)
110!$OMP THREADPRIVATE(LWup200clr,LWup200)
111      REAL,ALLOCATABLE,SAVE :: LWdnTOA(:), LWdnTOAclr(:)
112!$OMP THREADPRIVATE(LWdnTOA,LWdnTOAclr)
113! pressure level
114      REAL,ALLOCATABLE,SAVE :: tsumSTD(:,:,:)
115!$OMP THREADPRIVATE(tsumSTD)
116      REAL,ALLOCATABLE,SAVE :: usumSTD(:,:,:), vsumSTD(:,:,:)
117!$OMP THREADPRIVATE(usumSTD,vsumSTD)
118      REAL,ALLOCATABLE,SAVE :: wsumSTD(:,:,:), phisumSTD(:,:,:)
119!$OMP THREADPRIVATE(wsumSTD,phisumSTD)
120      REAL,ALLOCATABLE,SAVE :: qsumSTD(:,:,:), rhsumSTD(:,:,:)
121!$OMP THREADPRIVATE(qsumSTD,rhsumSTD)
122      REAL,ALLOCATABLE,SAVE :: tnondef(:,:,:)
123!$OMP THREADPRIVATE(tnondef)
124      REAL,ALLOCATABLE,SAVE :: uvsumSTD(:,:,:)
125!$OMP THREADPRIVATE(uvsumSTD)
126      REAL,ALLOCATABLE,SAVE :: vqsumSTD(:,:,:)
127!$OMP THREADPRIVATE(vqsumSTD)
128      REAL,ALLOCATABLE,SAVE :: vTsumSTD(:,:,:)
129!$OMP THREADPRIVATE(vTsumSTD)
130      REAL,ALLOCATABLE,SAVE :: wqsumSTD(:,:,:)
131!$OMP THREADPRIVATE(wqsumSTD)
132      REAL,ALLOCATABLE,SAVE :: vphisumSTD(:,:,:)
133!$OMP THREADPRIVATE(vphisumSTD)
134      REAL,ALLOCATABLE,SAVE :: wTsumSTD(:,:,:)
135!$OMP THREADPRIVATE(wTsumSTD)
136      REAL,ALLOCATABLE,SAVE :: u2sumSTD(:,:,:)
137!$OMP THREADPRIVATE(u2sumSTD)
138      REAL,ALLOCATABLE,SAVE :: v2sumSTD(:,:,:)
139!$OMP THREADPRIVATE(v2sumSTD)
140      REAL,ALLOCATABLE,SAVE :: T2sumSTD(:,:,:)
141!$OMP THREADPRIVATE(T2sumSTD)
142      REAL,ALLOCATABLE,SAVE :: O3sumSTD(:,:,:), O3daysumSTD(:,:,:)
143!$OMP THREADPRIVATE(O3sumSTD,O3daysumSTD)
144!IM begin
145      REAL,ALLOCATABLE,SAVE :: wlevSTD(:,:), ulevSTD(:,:), vlevSTD(:,:)
146!$OMP THREADPRIVATE(wlevSTD,ulevSTD,vlevSTD)
147      REAL,ALLOCATABLE,SAVE :: tlevSTD(:,:), qlevSTD(:,:), rhlevSTD(:,:)
148!$OMP THREADPRIVATE(tlevSTD,qlevSTD,rhlevSTD)
149      REAL,ALLOCATABLE,SAVE :: philevSTD(:,:)
150!$OMP THREADPRIVATE(philevSTD)
151      REAL,ALLOCATABLE,SAVE :: uvSTD(:,:)
152!$OMP THREADPRIVATE(uvSTD)
153      REAL,ALLOCATABLE,SAVE :: vqSTD(:,:)
154!$OMP THREADPRIVATE(vqSTD)
155      REAL,ALLOCATABLE,SAVE :: vTSTD(:,:)
156!$OMP THREADPRIVATE(vTSTD)
157      REAL,ALLOCATABLE,SAVE :: wqSTD(:,:)
158!$OMP THREADPRIVATE(wqSTD)
159      REAL,ALLOCATABLE,SAVE :: vphiSTD(:,:)
160!$OMP THREADPRIVATE(vphiSTD)
161      REAL,ALLOCATABLE,SAVE :: wTSTD(:,:)
162!$OMP THREADPRIVATE(wTSTD)
163      REAL,ALLOCATABLE,SAVE :: u2STD(:,:)
164!$OMP THREADPRIVATE(u2STD)
165      REAL,ALLOCATABLE,SAVE :: v2STD(:,:)
166!$OMP THREADPRIVATE(v2STD)
167      REAL,ALLOCATABLE,SAVE :: T2STD(:,:)
168!$OMP THREADPRIVATE(T2STD)
169      REAL,ALLOCATABLE,SAVE :: O3STD(:,:), O3daySTD(:,:)
170!$OMP THREADPRIVATE(O3STD,O3daySTD)
171!IM end
172      INTEGER,ALLOCATABLE,SAVE :: seed_old(:,:)
173!$OMP THREADPRIVATE(seed_old)
174      REAL,ALLOCATABLE,SAVE :: zuthe(:),zvthe(:)
175!$OMP THREADPRIVATE(zuthe,zvthe)
176      REAL,ALLOCATABLE,SAVE :: alb_neig(:)
177!$OMP THREADPRIVATE(alb_neig)
178!cloud base mass flux
179      REAL,ALLOCATABLE,SAVE :: ema_cbmf(:)
180!$OMP THREADPRIVATE(ema_cbmf)
181!cloud base pressure & cloud top pressure
182      REAL,ALLOCATABLE,SAVE :: ema_pcb(:), ema_pct(:)
183!$OMP THREADPRIVATE(ema_pcb,ema_pct)
184      REAL,ALLOCATABLE,SAVE :: Ma(:,:)        ! undilute upward mass flux
185!$OMP THREADPRIVATE(Ma)
186      REAL,ALLOCATABLE,SAVE :: qcondc(:,:)    ! in-cld water content from convect
187!$OMP THREADPRIVATE(qcondc)
188      REAL,ALLOCATABLE,SAVE :: wd(:) ! sb
189!$OMP THREADPRIVATE(wd)
190      REAL,ALLOCATABLE,SAVE :: sigd(:)
191!$OMP THREADPRIVATE(sigd)
192!
193      REAL,ALLOCATABLE,SAVE :: cin(:)
194!$OMP THREADPRIVATE(cin)
195! ftd : differential heating between wake and environment
196      REAL,ALLOCATABLE,SAVE :: ftd(:,:)
197!$OMP THREADPRIVATE(ftd)
198! fqd : differential moistening between wake and environment
199      REAL,ALLOCATABLE,SAVE :: fqd(:,:)     
200!$OMP THREADPRIVATE(fqd)
201!34EK
202! -- Variables de controle de ALE et ALP
203!ALE : Energie disponible pour soulevement : utilisee par la
204!      convection d'Emanuel pour le declenchement et la regulation
205      REAL,ALLOCATABLE,SAVE :: ALE(:)
206!$OMP THREADPRIVATE(ALE)
207!ALP : Puissance  disponible pour soulevement
208      REAL,ALLOCATABLE,SAVE :: ALP(:)
209!$OMP THREADPRIVATE(ALP)
210!
211! nouvelles variables pour le couplage convection-couche limite
212      REAL,ALLOCATABLE,SAVE :: Ale_bl(:)
213!$OMP THREADPRIVATE(Ale_bl)
214      REAL,ALLOCATABLE,SAVE :: Alp_bl(:)
215!$OMP THREADPRIVATE(Alp_bl)
216      INTEGER,ALLOCATABLE,SAVE :: lalim_conv(:)
217!$OMP THREADPRIVATE(lalim_conv)
218      REAL,ALLOCATABLE,SAVE :: wght_th(:,:)
219!$OMP THREADPRIVATE(wght_th)
220!
221! variables de la wake
222! wake_deltat : ecart de temperature avec la zone non perturbee
223! wake_deltaq : ecart d'humidite avec la zone non perturbee
224! wake_Cstar  : vitesse d'etalement de la poche
225! wake_s      : fraction surfacique occupee par la poche froide
226! wake_pe     : wake potential energy - WAPE
227! wake_fip    : Gust Front Impinging power - ALP
228! dt_wake, dq_wake: LS tendencies due to wake
229      REAL,ALLOCATABLE,SAVE :: wake_deltat(:,:)
230!$OMP THREADPRIVATE(wake_deltat)
231      REAL,ALLOCATABLE,SAVE :: wake_deltaq(:,:)
232!$OMP THREADPRIVATE(wake_deltaq)
233      REAL,ALLOCATABLE,SAVE :: wake_Cstar(:)
234!$OMP THREADPRIVATE(wake_Cstar)
235      REAL,ALLOCATABLE,SAVE :: wake_s(:)
236!$OMP THREADPRIVATE(wake_s)
237      REAL,ALLOCATABLE,SAVE :: wake_pe(:)
238!$OMP THREADPRIVATE(wake_pe)
239      REAL,ALLOCATABLE,SAVE :: wake_fip(:)
240!$OMP THREADPRIVATE(wake_fip)
241      REAL,ALLOCATABLE,SAVE :: dt_wake(:,:)
242!$OMP THREADPRIVATE(dt_wake)
243      REAL,ALLOCATABLE,SAVE :: dq_wake(:,:)
244!$OMP THREADPRIVATE(dq_wake)
245!
246!jyg<
247! variables related to the spitting of the PBL between wake and
248! off-wake regions.
249! wake_delta_pbl_TKE : difference TKE_w - TKE_x
250      REAL,ALLOCATABLE,SAVE :: wake_delta_pbl_TKE(:,:,:)
251!$OMP THREADPRIVATE(wake_delta_pbl_TKE)
252!>jyg
253!
254! pfrac_impa : Produits des coefs lessivage impaction
255! pfrac_nucl : Produits des coefs lessivage nucleation
256! pfrac_1nucl: Produits des coefs lessi nucl (alpha = 1)
257      REAL,ALLOCATABLE,SAVE :: pfrac_impa(:,:), pfrac_nucl(:,:)
258!$OMP THREADPRIVATE(pfrac_impa,pfrac_nucl)
259      REAL,ALLOCATABLE,SAVE :: pfrac_1nucl(:,:)
260!$OMP THREADPRIVATE(pfrac_1nucl)
261!
262      REAL,ALLOCATABLE,SAVE :: total_rain(:), nday_rain(:) 
263!$OMP THREADPRIVATE(total_rain,nday_rain)
264      REAL,ALLOCATABLE,SAVE :: paire_ter(:)
265!$OMP THREADPRIVATE(paire_ter)
266! albsol1: albedo du sol total pour SW visible
267! albsol2: albedo du sol total pour SW proche IR
268      REAL,ALLOCATABLE,SAVE :: albsol1(:), albsol2(:)
269!$OMP THREADPRIVATE(albsol1,albsol2)
270
271!albedo SB >>>
272      REAL,ALLOCATABLE,SAVE :: albsol_dif(:,:),albsol_dir(:,:)
273!$OMP THREADPRIVATE(albsol_dif,albsol_dir)
274!albedo SB <<<
275
276
277      REAL, ALLOCATABLE, SAVE:: wo(:, :, :)
278      ! column-density of ozone in a layer, in kilo-Dobsons
279      ! Third dimension has size 1 or 2.
280      ! "wo(:, :, 1)" is for the average day-night field,
281      ! "wo(:, :, 2)" is for daylight time.
282      !$OMP THREADPRIVATE(wo)
283
284! heat : chauffage solaire
285! heat0: chauffage solaire ciel clair
286! cool : refroidissement infrarouge
287! cool0 : refroidissement infrarouge ciel clair
288! sollwdown : downward LW flux at surface
289! sollwdownclr : downward CS LW flux at surface
290! toplwdown : downward CS LW flux at TOA
291! toplwdownclr : downward CS LW flux at TOA
292      REAL,ALLOCATABLE,SAVE :: clwcon0(:,:),rnebcon0(:,:)
293!$OMP THREADPRIVATE(clwcon0,rnebcon0)
294      REAL,ALLOCATABLE,SAVE :: heat(:,:)   
295!$OMP THREADPRIVATE(heat)
296      REAL,ALLOCATABLE,SAVE :: heat0(:,:)
297!$OMP THREADPRIVATE(heat0)
298      REAL,ALLOCATABLE,SAVE :: cool(:,:)
299!$OMP THREADPRIVATE(cool)
300      REAL,ALLOCATABLE,SAVE :: cool0(:,:)
301!$OMP THREADPRIVATE(cool0)
302      REAL,ALLOCATABLE,SAVE :: topsw(:), toplw(:)
303!$OMP THREADPRIVATE(topsw,toplw)
304      REAL,ALLOCATABLE,SAVE :: sollwdown(:)
305!$OMP THREADPRIVATE(sollwdown)
306      REAL,ALLOCATABLE,SAVE :: sollwdownclr(:)
307!$OMP THREADPRIVATE(sollwdownclr)
308      REAL,ALLOCATABLE,SAVE :: toplwdown(:)
309!$OMP THREADPRIVATE(toplwdown)
310      REAL,ALLOCATABLE,SAVE :: toplwdownclr(:)
311!$OMP THREADPRIVATE(toplwdownclr)
312      REAL,ALLOCATABLE,SAVE :: topsw0(:),toplw0(:),solsw0(:),sollw0(:)
313!$OMP THREADPRIVATE(topsw0,toplw0,solsw0,sollw0)
314      REAL,ALLOCATABLE,SAVE :: albpla(:)
315!$OMP THREADPRIVATE(albpla)
316
317!IM ajout variables CFMIP2/CMIP5
318      REAL,ALLOCATABLE,SAVE :: heatp(:,:), coolp(:,:)
319!$OMP THREADPRIVATE(heatp, coolp)
320      REAL,ALLOCATABLE,SAVE :: heat0p(:,:), cool0p(:,:)
321!$OMP THREADPRIVATE(heat0p, cool0p)
322      REAL,ALLOCATABLE,SAVE :: radsolp(:), topswp(:), toplwp(:)
323!$OMP THREADPRIVATE(radsolp, topswp, toplwp)
324      REAL,ALLOCATABLE,SAVE :: albplap(:)
325!$OMP THREADPRIVATE(albplap)
326      REAL,ALLOCATABLE,SAVE :: solswp(:), sollwp(:)
327!$OMP THREADPRIVATE(solswp, sollwp)
328      REAL,ALLOCATABLE,SAVE :: sollwdownp(:)
329!$OMP THREADPRIVATE(sollwdownp)
330      REAL,ALLOCATABLE,SAVE :: topsw0p(:),toplw0p(:)
331      REAL,ALLOCATABLE,SAVE :: solsw0p(:),sollw0p(:)
332!$OMP THREADPRIVATE(topsw0p,toplw0p,solsw0p,sollw0p)
333      REAL,ALLOCATABLE,SAVE :: lwdn0p(:,:), lwdnp(:,:)
334      REAL,ALLOCATABLE,SAVE :: lwup0p(:,:), lwupp(:,:)
335!$OMP THREADPRIVATE(lwdn0p, lwdnp, lwup0p, lwupp)
336      REAL,ALLOCATABLE,SAVE :: swdn0p(:,:), swdnp(:,:)
337      REAL,ALLOCATABLE,SAVE :: swup0p(:,:), swupp(:,:)
338!$OMP THREADPRIVATE(swdn0p, swdnp, swup0p, swupp)
339
340! pbase : cloud base pressure
341! bbase : cloud base buoyancy
342      REAL,ALLOCATABLE,SAVE :: cape(:)
343!$OMP THREADPRIVATE(cape)
344      REAL,ALLOCATABLE,SAVE :: pbase(:)
345!$OMP THREADPRIVATE(pbase)
346      REAL,ALLOCATABLE,SAVE :: bbase(:)
347!$OMP THREADPRIVATE(bbase)
348!
349      REAL,SAVE,ALLOCATABLE :: zqasc(:,:)
350!$OMP THREADPRIVATE( zqasc)
351      INTEGER,ALLOCATABLE,SAVE :: ibas_con(:), itop_con(:)
352!$OMP THREADPRIVATE(ibas_con,itop_con)
353      REAL,SAVE,ALLOCATABLE :: rain_con(:)
354!$OMP THREADPRIVATE(rain_con)
355      REAL,SAVE,ALLOCATABLE :: snow_con(:)
356!$OMP THREADPRIVATE(snow_con)
357!
358      REAL,SAVE,ALLOCATABLE :: rlonPOS(:)
359!$OMP THREADPRIVATE(rlonPOS)
360      REAL,SAVE,ALLOCATABLE :: newsst(:)
361!$OMP THREADPRIVATE(newsst)
362      REAL,SAVE,ALLOCATABLE :: ustar(:,:),u10m(:,:), v10m(:,:),wstar(:,:)
363!$OMP THREADPRIVATE(ustar,u10m,v10m,wstar)
364!
365! ok_ade=T -ADE=topswad-topsw
366! ok_aie=T ->
367!       ok_ade=T -AIE=topswai-topswad
368!       ok_ade=F -AIE=topswai-topsw
369!
370!topswad, solswad : Aerosol direct effect
371      REAL,SAVE,ALLOCATABLE :: topswad(:), solswad(:)
372!$OMP THREADPRIVATE(topswad,solswad)
373!topswai, solswai : Aerosol indirect effect
374      REAL,SAVE,ALLOCATABLE :: topswai(:), solswai(:)
375!$OMP THREADPRIVATE(topswai,solswai)
376
377      REAL,SAVE,ALLOCATABLE :: tau_aero(:,:,:,:), piz_aero(:,:,:,:), cg_aero(:,:,:,:)
378!$OMP THREADPRIVATE(tau_aero, piz_aero, cg_aero)
379      REAL,SAVE,ALLOCATABLE :: tau_aero_sw_rrtm(:,:,:,:), piz_aero_sw_rrtm(:,:,:,:), cg_aero_sw_rrtm(:,:,:,:)
380!$OMP THREADPRIVATE(tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm)
381      REAL,SAVE,ALLOCATABLE :: tau_aero_lw_rrtm(:,:,:,:), piz_aero_lw_rrtm(:,:,:,:), cg_aero_lw_rrtm(:,:,:,:)
382!$OMP THREADPRIVATE(tau_aero_lw_rrtm, piz_aero_lw_rrtm, cg_aero_lw_rrtm)
383      REAL,SAVE,ALLOCATABLE :: ccm(:,:,:)
384!$OMP THREADPRIVATE(ccm)
385
386!!! nrlmd le 10/04/2012
387      REAL,SAVE,ALLOCATABLE :: ale_bl_trig(:)
388!$OMP THREADPRIVATE(ale_bl_trig)
389!!! fin nrlmd le 10/04/2012
390
391      REAL, ALLOCATABLE, SAVE:: du_gwd_rando(:, :), dv_gwd_rando(:, :)
392      !$OMP THREADPRIVATE(du_gwd_rando, dv_gwd_rando)
393      ! tendencies on wind due to gravity waves
394
395CONTAINS
396
397!======================================================================
398SUBROUTINE phys_state_var_init(read_climoz)
399USE dimphy
400USE control_mod
401USE aero_mod
402USE infotrac, ONLY : nbtr
403USE indice_sol_mod
404IMPLICIT NONE
405
406integer, intent(in)::  read_climoz
407! read ozone climatology
408! Allowed values are 0, 1 and 2
409! 0: do not read an ozone climatology
410! 1: read a single ozone climatology that will be used day and night
411! 2: read two ozone climatologies, the average day and night
412! climatology and the daylight climatology
413
414include "clesphys.h"
415      ALLOCATE(rlat(klon), rlon(klon))
416      ALLOCATE(pctsrf(klon,nbsrf))
417      ALLOCATE(ftsol(klon,nbsrf))
418      ALLOCATE(falb1(klon,nbsrf))
419      ALLOCATE(falb2(klon,nbsrf))
420!albedo SB >>>
421      ALLOCATE(falb_dir(klon,nsw,nbsrf),falb_dif(klon,nsw,nbsrf))
422      ALLOCATE(chl_con(klon))
423!albedo SB <<<
424      ALLOCATE(rain_fall(klon))
425      ALLOCATE(snow_fall(klon))
426      ALLOCATE(solsw(klon), sollw(klon))
427      ALLOCATE(radsol(klon))
428      ALLOCATE(zmea(klon), zstd(klon), zsig(klon), zgam(klon))
429      ALLOCATE(zthe(klon), zpic(klon), zval(klon))
430
431      ALLOCATE(rugoro(klon))
432      ALLOCATE(t_ancien(klon,klev), q_ancien(klon,klev))
433      ALLOCATE(u_ancien(klon,klev), v_ancien(klon,klev))
434!!! Rom P >>>
435      ALLOCATE(tr_ancien(klon,klev,nbtr))
436!!! Rom P <<<
437      ALLOCATE(clwcon(klon,klev),rnebcon(klon,klev))
438      ALLOCATE(qtc_cv(klon,klev),sigt_cv(klon,klev))
439      ALLOCATE(ratqs(klon,klev))
440      ALLOCATE(pbl_tke(klon,klev+1,nbsrf+1))
441!nrlmd<
442      ALLOCATE(delta_tsurf(klon,nbsrf))
443!>nrlmd
444      ALLOCATE(coefh(klon,klev+1,nbsrf+1))
445      ALLOCATE(coefm(klon,klev+1,nbsrf+1))
446      ALLOCATE(zmax0(klon), f0(klon))
447      ALLOCATE(sig1(klon,klev), w01(klon,klev))
448      ALLOCATE(entr_therm(klon,klev), fm_therm(klon,klev+1))
449      ALLOCATE(detr_therm(klon,klev))
450!     pour phsystoke avec thermiques
451      ALLOCATE(clwcon0th(klon,klev),rnebcon0th(klon,klev))
452! radiation outputs
453      ALLOCATE(swdn0(klon,klevp1), swdn(klon,klevp1))
454      ALLOCATE(swup0(klon,klevp1), swup(klon,klevp1))
455      ALLOCATE(lwdn0(klon,klevp1), lwdn(klon,klevp1))
456      ALLOCATE(lwup0(klon,klevp1), lwup(klon,klevp1))
457      ALLOCATE(SWdn200clr(klon), SWdn200(klon))
458      ALLOCATE(SWup200clr(klon), SWup200(klon))
459      ALLOCATE(LWdn200clr(klon), LWdn200(klon))
460      ALLOCATE(LWup200clr(klon), LWup200(klon))
461      ALLOCATE(LWdnTOA(klon), LWdnTOAclr(klon))
462! pressure level
463      ALLOCATE(tsumSTD(klon,nlevSTD,nout))
464      ALLOCATE(usumSTD(klon,nlevSTD,nout), vsumSTD(klon,nlevSTD,nout))
465      ALLOCATE(wsumSTD(klon,nlevSTD,nout), phisumSTD(klon,nlevSTD,nout))
466      ALLOCATE(qsumSTD(klon,nlevSTD,nout), rhsumSTD(klon,nlevSTD,nout))
467      ALLOCATE(tnondef(klon,nlevSTD,nout))
468      ALLOCATE(uvsumSTD(klon,nlevSTD,nout))
469      ALLOCATE(vqsumSTD(klon,nlevSTD,nout))
470      ALLOCATE(vTsumSTD(klon,nlevSTD,nout))
471      ALLOCATE(wqsumSTD(klon,nlevSTD,nout))
472      ALLOCATE(vphisumSTD(klon,nlevSTD,nout))
473      ALLOCATE(wTsumSTD(klon,nlevSTD,nout))
474      ALLOCATE(u2sumSTD(klon,nlevSTD,nout))
475      ALLOCATE(v2sumSTD(klon,nlevSTD,nout))
476      ALLOCATE(T2sumSTD(klon,nlevSTD,nout))
477      ALLOCATE(O3sumSTD(klon,nlevSTD,nout))
478      ALLOCATE(O3daysumSTD(klon,nlevSTD,nout))
479!IM beg
480      ALLOCATE(wlevSTD(klon,nlevSTD), ulevSTD(klon,nlevSTD), vlevSTD(klon,nlevSTD))
481      ALLOCATE(tlevSTD(klon,nlevSTD), qlevSTD(klon,nlevSTD), rhlevSTD(klon,nlevSTD))
482      ALLOCATE(philevSTD(klon,nlevSTD))
483      ALLOCATE(uvSTD(klon,nlevSTD),vqSTD(klon,nlevSTD))
484      ALLOCATE(vTSTD(klon,nlevSTD),wqSTD(klon,nlevSTD))
485      ALLOCATE(vphiSTD(klon,nlevSTD),wTSTD(klon,nlevSTD))
486      ALLOCATE(u2STD(klon,nlevSTD),v2STD(klon,nlevSTD))
487      ALLOCATE(T2STD(klon,nlevSTD))
488      ALLOCATE(O3STD(klon,nlevSTD))
489      ALLOCATE(O3daySTD(klon,nlevSTD))
490!IM end
491      ALLOCATE(seed_old(klon,napisccp))
492      ALLOCATE(zuthe(klon),zvthe(klon))
493      ALLOCATE(alb_neig(klon))
494!cloud base mass flux
495      ALLOCATE(ema_cbmf(klon))
496!cloud base pressure & cloud top pressure
497      ALLOCATE(ema_pcb(klon), ema_pct(klon))
498!
499      ALLOCATE(Ma(klon,klev))
500      ALLOCATE(qcondc(klon,klev))
501      ALLOCATE(wd(klon))
502      ALLOCATE(sigd(klon))
503      ALLOCATE(cin(klon), ALE(klon), ALP(klon))
504      ALLOCATE(ftd(klon,klev), fqd(klon,klev))
505      ALLOCATE(Ale_bl(klon))
506      ALLOCATE(Alp_bl(klon))
507      ALLOCATE(lalim_conv(klon))
508      ALLOCATE(wght_th(klon,klev))
509      ALLOCATE(wake_deltat(klon,klev), wake_deltaq(klon,klev))
510      ALLOCATE(wake_Cstar(klon), wake_s(klon))
511      ALLOCATE(wake_pe(klon), wake_fip(klon))
512      ALLOCATE(dt_wake(klon,klev), dq_wake(klon,klev))
513!jyg<
514      ALLOCATE(wake_delta_pbl_TKE(klon,klev+1,nbsrf+1))
515!>jyg
516      ALLOCATE(pfrac_impa(klon,klev), pfrac_nucl(klon,klev))
517      ALLOCATE(pfrac_1nucl(klon,klev))
518      ALLOCATE(total_rain(klon), nday_rain(klon))
519      ALLOCATE(paire_ter(klon))
520      ALLOCATE(albsol1(klon), albsol2(klon))
521!albedo SB >>>
522      ALLOCATE(albsol_dir(klon,nsw),albsol_dif(klon,nsw))
523!albedo SB <<<
524
525      if (read_climoz <= 1) then
526         ALLOCATE(wo(klon,klev, 1))
527      else
528         ! read_climoz == 2
529         ALLOCATE(wo(klon,klev, 2))
530      end if
531     
532      ALLOCATE(clwcon0(klon,klev),rnebcon0(klon,klev))
533      ALLOCATE(heat(klon,klev), heat0(klon,klev))
534      ALLOCATE(cool(klon,klev), cool0(klon,klev))
535      ALLOCATE(topsw(klon), toplw(klon))
536      ALLOCATE(sollwdown(klon), sollwdownclr(klon))
537      ALLOCATE(toplwdown(klon), toplwdownclr(klon))
538      ALLOCATE(topsw0(klon),toplw0(klon),solsw0(klon),sollw0(klon))
539      ALLOCATE(albpla(klon))
540!IM ajout variables CFMIP2/CMIP5
541      ALLOCATE(heatp(klon,klev), coolp(klon,klev))
542      ALLOCATE(heat0p(klon,klev), cool0p(klon,klev))
543      ALLOCATE(radsolp(klon), topswp(klon), toplwp(klon))
544      ALLOCATE(albplap(klon))
545      ALLOCATE(solswp(klon), sollwp(klon))
546      ALLOCATE(sollwdownp(klon))
547      ALLOCATE(topsw0p(klon),toplw0p(klon))
548      ALLOCATE(solsw0p(klon),sollw0p(klon))
549      ALLOCATE(lwdn0p(klon,klevp1), lwdnp(klon,klevp1))
550      ALLOCATE(lwup0p(klon,klevp1), lwupp(klon,klevp1))
551      ALLOCATE(swdn0p(klon,klevp1), swdnp(klon,klevp1))
552      ALLOCATE(swup0p(klon,klevp1), swupp(klon,klevp1))
553
554      ALLOCATE(cape(klon))
555      ALLOCATE(pbase(klon),bbase(klon))
556      ALLOCATE(zqasc(klon,klev))
557      ALLOCATE(ibas_con(klon), itop_con(klon))
558      ALLOCATE(rain_con(klon), snow_con(klon))
559      ALLOCATE(rlonPOS(klon))
560      ALLOCATE(newsst(klon))
561      ALLOCATE(ustar(klon,nbsrf),u10m(klon,nbsrf), v10m(klon,nbsrf),wstar(klon,nbsrf+1))
562      ALLOCATE(topswad(klon), solswad(klon))
563      ALLOCATE(topswai(klon), solswai(klon))
564      ALLOCATE(tau_aero(klon,klev,naero_grp,nbands),piz_aero(klon,klev,naero_grp,nbands),cg_aero(klon,klev,naero_grp,nbands))
565      ALLOCATE(tau_aero_sw_rrtm(klon,klev,2,nbands_sw_rrtm),piz_aero_sw_rrtm(klon,klev,2,nbands_sw_rrtm))
566      ALLOCATE(cg_aero_sw_rrtm(klon,klev,2,nbands_sw_rrtm))
567      ALLOCATE(tau_aero_lw_rrtm(klon,klev,2,nbands_lw_rrtm),piz_aero_lw_rrtm(klon,klev,2,nbands_lw_rrtm))
568      ALLOCATE(cg_aero_lw_rrtm(klon,klev,2,nbands_lw_rrtm))
569      ALLOCATE(ccm(klon,klev,nbands))
570
571!!! nrlmd le 10/04/2012
572      ALLOCATE(ale_bl_trig(klon))
573!!! fin nrlmd le 10/04/2012
574      if (ok_gwd_rando) allocate(du_gwd_rando(klon, klev), &
575           dv_gwd_rando(klon, klev))
576
577END SUBROUTINE phys_state_var_init
578
579!======================================================================
580SUBROUTINE phys_state_var_end
581USE dimphy
582USE control_mod
583USE indice_sol_mod
584IMPLICIT NONE
585include "clesphys.h"
586
587      deallocate(rlat, rlon, pctsrf, ftsol, falb1, falb2)
588      deallocate(rain_fall, snow_fall, solsw, sollw, radsol)
589      deallocate(zmea, zstd, zsig, zgam)
590      deallocate(zthe, zpic, zval)
591      deallocate(rugoro, t_ancien, q_ancien, clwcon, rnebcon)
592      deallocate(qtc_cv,sigt_cv)
593      deallocate(        u_ancien, v_ancien                 )
594      deallocate(        tr_ancien)                           !RomP
595      deallocate(ratqs, pbl_tke,coefh,coefm)
596!nrlmd<
597      deallocate(delta_tsurf)
598!>nrlmd
599      deallocate(zmax0, f0)
600      deallocate(sig1, w01)
601      deallocate(entr_therm, fm_therm)
602      deallocate(detr_therm)
603      deallocate(clwcon0th, rnebcon0th)
604! radiation outputs
605      deallocate(swdn0, swdn)
606      deallocate(swup0, swup)
607      deallocate(lwdn0, lwdn)
608      deallocate(lwup0, lwup)
609      deallocate(SWdn200clr, SWdn200)
610      deallocate(SWup200clr, SWup200)
611      deallocate(LWdn200clr, LWdn200)
612      deallocate(LWup200clr, LWup200)
613      deallocate(LWdnTOA, LWdnTOAclr)
614! pressure level
615      deallocate(tsumSTD)
616      deallocate(usumSTD, vsumSTD)
617      deallocate(wsumSTD, phisumSTD)
618      deallocate(tnondef)
619      deallocate(qsumSTD, rhsumSTD)
620      deallocate(uvsumSTD)
621      deallocate(vqsumSTD)
622      deallocate(vTsumSTD)
623      deallocate(wqsumSTD)
624      deallocate(vphisumSTD)
625      deallocate(wTsumSTD)
626      deallocate(u2sumSTD)
627      deallocate(v2sumSTD)
628      deallocate(T2sumSTD)
629      deallocate(O3sumSTD)
630      deallocate(O3daysumSTD)
631!IM beg
632      deallocate(wlevSTD,ulevSTD,vlevSTD,tlevSTD,qlevSTD,rhlevSTD,philevSTD)
633      deallocate(uvSTD,vqSTD,vTSTD,wqSTD,vphiSTD,wTSTD,u2STD,v2STD,T2STD,O3STD,O3daySTD)
634!IM end
635      deallocate(seed_old)
636      deallocate(zuthe, zvthe)
637      deallocate(alb_neig)
638      deallocate(ema_cbmf)
639      deallocate(ema_pcb, ema_pct)
640      deallocate(Ma, qcondc)
641      deallocate(wd, sigd)
642      deallocate(cin, ALE, ALP)
643      deallocate(ftd, fqd)
644      deallocate(Ale_bl, Alp_bl)
645      deallocate(lalim_conv, wght_th)
646      deallocate(wake_deltat, wake_deltaq)
647      deallocate(wake_Cstar, wake_s, wake_pe, wake_fip)
648      deallocate(dt_wake, dq_wake)
649!jyg<
650      deallocate(wake_delta_pbl_TKE)
651!>jyg
652      deallocate(pfrac_impa, pfrac_nucl)
653      deallocate(pfrac_1nucl)
654      deallocate(total_rain, nday_rain)
655      deallocate(paire_ter)
656      deallocate(albsol1, albsol2)
657!albedo SB >>>
658      deallocate(albsol_dir,albsol_dif,falb_dir,falb_dif,chl_con)
659!albedo SB <<<
660      deallocate(wo)
661      deallocate(clwcon0,rnebcon0)
662      deallocate(heat, heat0)
663      deallocate(cool, cool0)
664      deallocate(topsw, toplw)
665      deallocate(sollwdown, sollwdownclr)
666      deallocate(toplwdown, toplwdownclr)
667      deallocate(topsw0,toplw0,solsw0,sollw0)
668      deallocate(albpla)
669!IM ajout variables CFMIP2/CMIP5
670      deallocate(heatp, coolp)
671      deallocate(heat0p, cool0p)
672      deallocate(radsolp, topswp, toplwp)
673      deallocate(albplap)
674      deallocate(solswp, sollwp)
675      deallocate(sollwdownp)
676      deallocate(topsw0p,toplw0p)
677      deallocate(solsw0p,sollw0p)
678      deallocate(lwdn0p, lwdnp)
679      deallocate(lwup0p, lwupp)
680      deallocate(swdn0p, swdnp)
681      deallocate(swup0p, swupp)
682      deallocate(cape)
683      deallocate(pbase,bbase)
684      deallocate(zqasc)
685      deallocate(ibas_con, itop_con)
686      deallocate(rain_con, snow_con)
687      deallocate(rlonPOS)
688      deallocate(newsst)
689      deallocate(ustar,u10m, v10m,wstar)
690      deallocate(topswad, solswad)
691      deallocate(topswai, solswai)
692      deallocate(tau_aero,piz_aero,cg_aero)
693      deallocate(tau_aero_sw_rrtm,piz_aero_sw_rrtm,cg_aero_sw_rrtm)
694      deallocate(tau_aero_lw_rrtm,piz_aero_lw_rrtm,cg_aero_lw_rrtm)
695      deallocate(ccm)
696      if (ok_gwd_rando) deallocate(du_gwd_rando, dv_gwd_rando)
697       
698!!! nrlmd le 10/04/2012
699      deallocate(ale_bl_trig)
700!!! fin nrlmd le 10/04/2012
701
702END SUBROUTINE phys_state_var_end
703
704      END MODULE phys_state_var_mod
Note: See TracBrowser for help on using the repository browser.