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

Last change on this file since 1893 was 1827, checked in by lguez, 11 years ago

Changed names of variables ema_work1 and ema_work2 to more meaningful
sig1 and w01. Same change in (re)startphy.nc. phyetat0 tries to find
old names ema_work1 and ema_work2 if new names sig1 and w01 are not
found, so the program can run with an old restartphy.nc. restartphy.nc
is modified compared to the previous SVN revision because of the change of
names but the data content is not modified (this can be checked with
max_diff_nc.sh -i).

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