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

Last change on this file since 2201 was 2181, checked in by jyg, 10 years ago

1/ Update of the loop on sub-surfaces in pbl_surface_mod.F90 : all initializations
are removed from the loop and put before the loop.
2/ The possibility of nudging RH, T, u, and v is added in lmdz1d.F90 (and in
1DUTILS.h).

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