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

Last change on this file since 2231 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
RevLine 
[1403]1!
2! $Id: phys_state_var_mod.F90 2227 2015-03-12 11:07:43Z oboucher $
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)
[2227]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
[909]40      REAL, ALLOCATABLE, SAVE :: rain_fall(:), snow_fall(:)
[967]41!$OMP THREADPRIVATE( rain_fall, snow_fall)
[909]42      REAL, ALLOCATABLE, SAVE :: solsw(:), sollw(:)
[967]43!$OMP THREADPRIVATE(solsw, sollw)
[909]44      REAL, ALLOCATABLE, SAVE :: radsol(:)
[967]45!$OMP THREADPRIVATE(radsol)
46
[909]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(:)
[967]52!$OMP THREADPRIVATE(zmea, zstd, zsig, zgam)
[909]53      REAL, ALLOCATABLE, SAVE :: zthe(:), zpic(:), zval(:)
[967]54!$OMP THREADPRIVATE(zthe, zpic, zval)
[909]55!     REAL tabcntr0(100)
56      REAL, ALLOCATABLE, SAVE :: rugoro(:)
[967]57!$OMP THREADPRIVATE(rugoro)
[909]58      REAL, ALLOCATABLE, SAVE :: t_ancien(:,:), q_ancien(:,:)
[967]59!$OMP THREADPRIVATE(t_ancien, q_ancien)
[1054]60      REAL, ALLOCATABLE, SAVE :: u_ancien(:,:), v_ancien(:,:)
61!$OMP THREADPRIVATE(u_ancien, v_ancien)
[1742]62!!! RomP >>>
63      REAL, ALLOCATABLE, SAVE :: tr_ancien(:,:,:)
64!$OMP THREADPRIVATE(tr_ancien)
65!!! RomP <<<
[909]66      LOGICAL, SAVE :: ancien_ok
[967]67!$OMP THREADPRIVATE(ancien_ok)
[909]68      REAL, ALLOCATABLE, SAVE :: clwcon(:,:),rnebcon(:,:)
[967]69!$OMP THREADPRIVATE(clwcon,rnebcon)
[2205]70      REAL, ALLOCATABLE, SAVE :: qtc_cv(:,:),sigt_cv(:,:)
71!$OMP THREADPRIVATE(qtc_cv,sigt_cv)
[909]72      REAL, ALLOCATABLE, SAVE :: ratqs(:,:)
[967]73!$OMP THREADPRIVATE(ratqs)
[909]74      REAL, ALLOCATABLE, SAVE :: pbl_tke(:,:,:) ! turb kinetic energy
[1761]75      REAL, ALLOCATABLE, SAVE :: coefh(:,:,:) ! Kz enthalpie
76      REAL, ALLOCATABLE, SAVE :: coefm(:,:,:) ! Kz momentum
77!$OMP THREADPRIVATE(pbl_tke, coefh,coefm)
[2159]78!nrlmd<
79      REAL, ALLOCATABLE, SAVE :: delta_tsurf(:,:) ! Surface temperature difference inside-outside cold pool
80!$OMP THREADPRIVATE(delta_tsurf)
81!>nrlmd
[927]82      REAL, ALLOCATABLE, SAVE :: zmax0(:), f0(:) !
[967]83!$OMP THREADPRIVATE(zmax0,f0)
[1827]84      REAL, ALLOCATABLE, SAVE :: sig1(:,:), w01(:,:)
85!$OMP THREADPRIVATE(sig1,w01)
[942]86      REAL, ALLOCATABLE, SAVE :: entr_therm(:,:), fm_therm(:,:)
[967]87!$OMP THREADPRIVATE(entr_therm,fm_therm)
[952]88      REAL, ALLOCATABLE, SAVE :: detr_therm(:,:)
[967]89!$OMP THREADPRIVATE(detr_therm)
[952]90!IM 150408
91!     pour phsystoke avec thermiques
92      REAL,ALLOCATABLE,SAVE :: clwcon0th(:,:),rnebcon0th(:,:)
[967]93!$OMP THREADPRIVATE(clwcon0th,rnebcon0th)
[952]94! radiation outputs
95      REAL,ALLOCATABLE,SAVE :: swdn0(:,:), swdn(:,:)
[967]96!$OMP THREADPRIVATE(swdn0,swdn)
[952]97      REAL,ALLOCATABLE,SAVE :: swup0(:,:), swup(:,:)
[967]98!$OMP THREADPRIVATE(swup0,swup)
[952]99      REAL,ALLOCATABLE,SAVE :: SWdn200clr(:), SWdn200(:)
[967]100!$OMP THREADPRIVATE(SWdn200clr,SWdn200)
[952]101      REAL,ALLOCATABLE,SAVE :: SWup200clr(:), SWup200(:)
[967]102!$OMP THREADPRIVATE(SWup200clr,SWup200)
[952]103      REAL,ALLOCATABLE,SAVE :: lwdn0(:,:), lwdn(:,:)
[967]104!$OMP THREADPRIVATE(lwdn0,lwdn)
[952]105      REAL,ALLOCATABLE,SAVE :: lwup0(:,:), lwup(:,:)
[967]106!$OMP THREADPRIVATE(lwup0,lwup)
[952]107      REAL,ALLOCATABLE,SAVE :: LWdn200clr(:), LWdn200(:)
[967]108!$OMP THREADPRIVATE(LWdn200clr,LWdn200)
[952]109      REAL,ALLOCATABLE,SAVE :: LWup200clr(:), LWup200(:)
[967]110!$OMP THREADPRIVATE(LWup200clr,LWup200)
[952]111      REAL,ALLOCATABLE,SAVE :: LWdnTOA(:), LWdnTOAclr(:)
[967]112!$OMP THREADPRIVATE(LWdnTOA,LWdnTOAclr)
[952]113! pressure level
114      REAL,ALLOCATABLE,SAVE :: tsumSTD(:,:,:)
[967]115!$OMP THREADPRIVATE(tsumSTD)
[952]116      REAL,ALLOCATABLE,SAVE :: usumSTD(:,:,:), vsumSTD(:,:,:)
[967]117!$OMP THREADPRIVATE(usumSTD,vsumSTD)
[952]118      REAL,ALLOCATABLE,SAVE :: wsumSTD(:,:,:), phisumSTD(:,:,:)
[967]119!$OMP THREADPRIVATE(wsumSTD,phisumSTD)
[952]120      REAL,ALLOCATABLE,SAVE :: qsumSTD(:,:,:), rhsumSTD(:,:,:)
[967]121!$OMP THREADPRIVATE(qsumSTD,rhsumSTD)
[952]122      REAL,ALLOCATABLE,SAVE :: tnondef(:,:,:)
[967]123!$OMP THREADPRIVATE(tnondef)
[952]124      REAL,ALLOCATABLE,SAVE :: uvsumSTD(:,:,:)
[967]125!$OMP THREADPRIVATE(uvsumSTD)
[952]126      REAL,ALLOCATABLE,SAVE :: vqsumSTD(:,:,:)
[967]127!$OMP THREADPRIVATE(vqsumSTD)
[952]128      REAL,ALLOCATABLE,SAVE :: vTsumSTD(:,:,:)
[967]129!$OMP THREADPRIVATE(vTsumSTD)
[952]130      REAL,ALLOCATABLE,SAVE :: wqsumSTD(:,:,:)
[967]131!$OMP THREADPRIVATE(wqsumSTD)
[952]132      REAL,ALLOCATABLE,SAVE :: vphisumSTD(:,:,:)
[967]133!$OMP THREADPRIVATE(vphisumSTD)
[952]134      REAL,ALLOCATABLE,SAVE :: wTsumSTD(:,:,:)
[967]135!$OMP THREADPRIVATE(wTsumSTD)
[952]136      REAL,ALLOCATABLE,SAVE :: u2sumSTD(:,:,:)
[967]137!$OMP THREADPRIVATE(u2sumSTD)
[952]138      REAL,ALLOCATABLE,SAVE :: v2sumSTD(:,:,:)
[967]139!$OMP THREADPRIVATE(v2sumSTD)
[952]140      REAL,ALLOCATABLE,SAVE :: T2sumSTD(:,:,:)
[967]141!$OMP THREADPRIVATE(T2sumSTD)
[1398]142      REAL,ALLOCATABLE,SAVE :: O3sumSTD(:,:,:), O3daysumSTD(:,:,:)
143!$OMP THREADPRIVATE(O3sumSTD,O3daysumSTD)
[1352]144!IM begin
145      REAL,ALLOCATABLE,SAVE :: wlevSTD(:,:), ulevSTD(:,:), vlevSTD(:,:)
[1362]146!$OMP THREADPRIVATE(wlevSTD,ulevSTD,vlevSTD)
[1352]147      REAL,ALLOCATABLE,SAVE :: tlevSTD(:,:), qlevSTD(:,:), rhlevSTD(:,:)
[1362]148!$OMP THREADPRIVATE(tlevSTD,qlevSTD,rhlevSTD)
[1352]149      REAL,ALLOCATABLE,SAVE :: philevSTD(:,:)
[1362]150!$OMP THREADPRIVATE(philevSTD)
[1352]151      REAL,ALLOCATABLE,SAVE :: uvSTD(:,:)
[1362]152!$OMP THREADPRIVATE(uvSTD)
[1352]153      REAL,ALLOCATABLE,SAVE :: vqSTD(:,:)
[1362]154!$OMP THREADPRIVATE(vqSTD)
[1352]155      REAL,ALLOCATABLE,SAVE :: vTSTD(:,:)
[1362]156!$OMP THREADPRIVATE(vTSTD)
[1352]157      REAL,ALLOCATABLE,SAVE :: wqSTD(:,:)
[1362]158!$OMP THREADPRIVATE(wqSTD)
[1352]159      REAL,ALLOCATABLE,SAVE :: vphiSTD(:,:)
[1362]160!$OMP THREADPRIVATE(vphiSTD)
[1352]161      REAL,ALLOCATABLE,SAVE :: wTSTD(:,:)
[1362]162!$OMP THREADPRIVATE(wTSTD)
[1352]163      REAL,ALLOCATABLE,SAVE :: u2STD(:,:)
[1362]164!$OMP THREADPRIVATE(u2STD)
[1352]165      REAL,ALLOCATABLE,SAVE :: v2STD(:,:)
[1362]166!$OMP THREADPRIVATE(v2STD)
[1352]167      REAL,ALLOCATABLE,SAVE :: T2STD(:,:)
[1362]168!$OMP THREADPRIVATE(T2STD)
[1398]169      REAL,ALLOCATABLE,SAVE :: O3STD(:,:), O3daySTD(:,:)
170!$OMP THREADPRIVATE(O3STD,O3daySTD)
[1352]171!IM end
[952]172      INTEGER,ALLOCATABLE,SAVE :: seed_old(:,:)
[967]173!$OMP THREADPRIVATE(seed_old)
[952]174      REAL,ALLOCATABLE,SAVE :: zuthe(:),zvthe(:)
[967]175!$OMP THREADPRIVATE(zuthe,zvthe)
[952]176      REAL,ALLOCATABLE,SAVE :: alb_neig(:)
[967]177!$OMP THREADPRIVATE(alb_neig)
[952]178!cloud base mass flux
[1398]179      REAL,ALLOCATABLE,SAVE :: ema_cbmf(:)
180!$OMP THREADPRIVATE(ema_cbmf)
[952]181!cloud base pressure & cloud top pressure
182      REAL,ALLOCATABLE,SAVE :: ema_pcb(:), ema_pct(:)
[967]183!$OMP THREADPRIVATE(ema_pcb,ema_pct)
[952]184      REAL,ALLOCATABLE,SAVE :: Ma(:,:)        ! undilute upward mass flux
[967]185!$OMP THREADPRIVATE(Ma)
[952]186      REAL,ALLOCATABLE,SAVE :: qcondc(:,:)    ! in-cld water content from convect
[967]187!$OMP THREADPRIVATE(qcondc)
[952]188      REAL,ALLOCATABLE,SAVE :: wd(:) ! sb
[967]189!$OMP THREADPRIVATE(wd)
[952]190      REAL,ALLOCATABLE,SAVE :: sigd(:)
[967]191!$OMP THREADPRIVATE(sigd)
[952]192!
193      REAL,ALLOCATABLE,SAVE :: cin(:)
[967]194!$OMP THREADPRIVATE(cin)
[952]195! ftd : differential heating between wake and environment
196      REAL,ALLOCATABLE,SAVE :: ftd(:,:)
[967]197!$OMP THREADPRIVATE(ftd)
[952]198! fqd : differential moistening between wake and environment
199      REAL,ALLOCATABLE,SAVE :: fqd(:,:)     
[967]200!$OMP THREADPRIVATE(fqd)
[952]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(:)
[967]206!$OMP THREADPRIVATE(ALE)
[952]207!ALP : Puissance  disponible pour soulevement
208      REAL,ALLOCATABLE,SAVE :: ALP(:)
[967]209!$OMP THREADPRIVATE(ALP)
[952]210!
211! nouvelles variables pour le couplage convection-couche limite
212      REAL,ALLOCATABLE,SAVE :: Ale_bl(:)
[967]213!$OMP THREADPRIVATE(Ale_bl)
[952]214      REAL,ALLOCATABLE,SAVE :: Alp_bl(:)
[967]215!$OMP THREADPRIVATE(Alp_bl)
[952]216      INTEGER,ALLOCATABLE,SAVE :: lalim_conv(:)
[967]217!$OMP THREADPRIVATE(lalim_conv)
[952]218      REAL,ALLOCATABLE,SAVE :: wght_th(:,:)
[967]219!$OMP THREADPRIVATE(wght_th)
[952]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
[1403]226! wake_pe     : wake potential energy - WAPE
[952]227! wake_fip    : Gust Front Impinging power - ALP
228! dt_wake, dq_wake: LS tendencies due to wake
229      REAL,ALLOCATABLE,SAVE :: wake_deltat(:,:)
[967]230!$OMP THREADPRIVATE(wake_deltat)
[952]231      REAL,ALLOCATABLE,SAVE :: wake_deltaq(:,:)
[967]232!$OMP THREADPRIVATE(wake_deltaq)
[952]233      REAL,ALLOCATABLE,SAVE :: wake_Cstar(:)
[967]234!$OMP THREADPRIVATE(wake_Cstar)
[952]235      REAL,ALLOCATABLE,SAVE :: wake_s(:)
[967]236!$OMP THREADPRIVATE(wake_s)
[1403]237      REAL,ALLOCATABLE,SAVE :: wake_pe(:)
238!$OMP THREADPRIVATE(wake_pe)
[952]239      REAL,ALLOCATABLE,SAVE :: wake_fip(:)
[967]240!$OMP THREADPRIVATE(wake_fip)
[952]241      REAL,ALLOCATABLE,SAVE :: dt_wake(:,:)
[967]242!$OMP THREADPRIVATE(dt_wake)
[952]243      REAL,ALLOCATABLE,SAVE :: dq_wake(:,:)
[967]244!$OMP THREADPRIVATE(dq_wake)
[952]245!
[2159]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!
[952]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(:,:)
[967]258!$OMP THREADPRIVATE(pfrac_impa,pfrac_nucl)
[952]259      REAL,ALLOCATABLE,SAVE :: pfrac_1nucl(:,:)
[967]260!$OMP THREADPRIVATE(pfrac_1nucl)
[952]261!
262      REAL,ALLOCATABLE,SAVE :: total_rain(:), nday_rain(:) 
[967]263!$OMP THREADPRIVATE(total_rain,nday_rain)
[952]264      REAL,ALLOCATABLE,SAVE :: paire_ter(:)
[967]265!$OMP THREADPRIVATE(paire_ter)
[952]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(:)
[967]269!$OMP THREADPRIVATE(albsol1,albsol2)
[1279]270
[2227]271!albedo SB >>>
272      REAL,ALLOCATABLE,SAVE :: albsol_dif(:,:),albsol_dir(:,:)
273!$OMP THREADPRIVATE(albsol_dif,albsol_dir)
274!albedo SB <<<
275
276
[1279]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
[952]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(:,:)
[967]293!$OMP THREADPRIVATE(clwcon0,rnebcon0)
[952]294      REAL,ALLOCATABLE,SAVE :: heat(:,:)   
[967]295!$OMP THREADPRIVATE(heat)
[952]296      REAL,ALLOCATABLE,SAVE :: heat0(:,:)
[967]297!$OMP THREADPRIVATE(heat0)
[952]298      REAL,ALLOCATABLE,SAVE :: cool(:,:)
[967]299!$OMP THREADPRIVATE(cool)
[952]300      REAL,ALLOCATABLE,SAVE :: cool0(:,:)
[967]301!$OMP THREADPRIVATE(cool0)
[952]302      REAL,ALLOCATABLE,SAVE :: topsw(:), toplw(:)
[967]303!$OMP THREADPRIVATE(topsw,toplw)
[952]304      REAL,ALLOCATABLE,SAVE :: sollwdown(:)
[967]305!$OMP THREADPRIVATE(sollwdown)
[952]306      REAL,ALLOCATABLE,SAVE :: sollwdownclr(:)
[967]307!$OMP THREADPRIVATE(sollwdownclr)
[952]308      REAL,ALLOCATABLE,SAVE :: toplwdown(:)
[967]309!$OMP THREADPRIVATE(toplwdown)
[952]310      REAL,ALLOCATABLE,SAVE :: toplwdownclr(:)
[967]311!$OMP THREADPRIVATE(toplwdownclr)
[952]312      REAL,ALLOCATABLE,SAVE :: topsw0(:),toplw0(:),solsw0(:),sollw0(:)
[967]313!$OMP THREADPRIVATE(topsw0,toplw0,solsw0,sollw0)
[952]314      REAL,ALLOCATABLE,SAVE :: albpla(:)
[967]315!$OMP THREADPRIVATE(albpla)
[1539]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
[952]340! pbase : cloud base pressure
341! bbase : cloud base buoyancy
342      REAL,ALLOCATABLE,SAVE :: cape(:)
[967]343!$OMP THREADPRIVATE(cape)
[952]344      REAL,ALLOCATABLE,SAVE :: pbase(:)
[967]345!$OMP THREADPRIVATE(pbase)
[952]346      REAL,ALLOCATABLE,SAVE :: bbase(:)
[967]347!$OMP THREADPRIVATE(bbase)
[952]348!
349      REAL,SAVE,ALLOCATABLE :: zqasc(:,:)
[967]350!$OMP THREADPRIVATE( zqasc)
[952]351      INTEGER,ALLOCATABLE,SAVE :: ibas_con(:), itop_con(:)
[967]352!$OMP THREADPRIVATE(ibas_con,itop_con)
[952]353      REAL,SAVE,ALLOCATABLE :: rain_con(:)
[967]354!$OMP THREADPRIVATE(rain_con)
[952]355      REAL,SAVE,ALLOCATABLE :: snow_con(:)
[967]356!$OMP THREADPRIVATE(snow_con)
[952]357!
358      REAL,SAVE,ALLOCATABLE :: rlonPOS(:)
[967]359!$OMP THREADPRIVATE(rlonPOS)
[952]360      REAL,SAVE,ALLOCATABLE :: newsst(:)
[967]361!$OMP THREADPRIVATE(newsst)
[1813]362      REAL,SAVE,ALLOCATABLE :: ustar(:,:),u10m(:,:), v10m(:,:),wstar(:,:)
363!$OMP THREADPRIVATE(ustar,u10m,v10m,wstar)
[952]364!
365! ok_ade=T -ADE=topswad-topsw
366! ok_aie=T ->
367!       ok_ade=T -AIE=topswai-topswad
[1279]368!       ok_ade=F -AIE=topswai-topsw
[952]369!
370!topswad, solswad : Aerosol direct effect
371      REAL,SAVE,ALLOCATABLE :: topswad(:), solswad(:)
[967]372!$OMP THREADPRIVATE(topswad,solswad)
[952]373!topswai, solswai : Aerosol indirect effect
374      REAL,SAVE,ALLOCATABLE :: topswai(:), solswai(:)
[967]375!$OMP THREADPRIVATE(topswai,solswai)
[959]376
[1279]377      REAL,SAVE,ALLOCATABLE :: tau_aero(:,:,:,:), piz_aero(:,:,:,:), cg_aero(:,:,:,:)
378!$OMP THREADPRIVATE(tau_aero, piz_aero, cg_aero)
[2146]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)
[952]383      REAL,SAVE,ALLOCATABLE :: ccm(:,:,:)
[967]384!$OMP THREADPRIVATE(ccm)
[952]385
[1638]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
[1938]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
[909]395CONTAINS
396
397!======================================================================
[1279]398SUBROUTINE phys_state_var_init(read_climoz)
[1785]399USE dimphy
[1403]400USE control_mod
[1785]401USE aero_mod
402USE infotrac, ONLY : nbtr
403USE indice_sol_mod
[909]404IMPLICIT NONE
[1279]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
[1938]414include "clesphys.h"
[952]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))
[2227]420!albedo SB >>>
421      ALLOCATE(falb_dir(klon,nsw,nbsrf),falb_dif(klon,nsw,nbsrf))
422      ALLOCATE(chl_con(klon))
423!albedo SB <<<
[952]424      ALLOCATE(rain_fall(klon))
425      ALLOCATE(snow_fall(klon))
[909]426      ALLOCATE(solsw(klon), sollw(klon))
[952]427      ALLOCATE(radsol(klon))
428      ALLOCATE(zmea(klon), zstd(klon), zsig(klon), zgam(klon))
429      ALLOCATE(zthe(klon), zpic(klon), zval(klon))
[909]430
[952]431      ALLOCATE(rugoro(klon))
432      ALLOCATE(t_ancien(klon,klev), q_ancien(klon,klev))
[1054]433      ALLOCATE(u_ancien(klon,klev), v_ancien(klon,klev))
[1742]434!!! Rom P >>>
435      ALLOCATE(tr_ancien(klon,klev,nbtr))
436!!! Rom P <<<
[952]437      ALLOCATE(clwcon(klon,klev),rnebcon(klon,klev))
[2205]438      ALLOCATE(qtc_cv(klon,klev),sigt_cv(klon,klev))
[952]439      ALLOCATE(ratqs(klon,klev))
[1761]440      ALLOCATE(pbl_tke(klon,klev+1,nbsrf+1))
[2159]441!nrlmd<
442      ALLOCATE(delta_tsurf(klon,nbsrf))
443!>nrlmd
[1761]444      ALLOCATE(coefh(klon,klev+1,nbsrf+1))
445      ALLOCATE(coefm(klon,klev+1,nbsrf+1))
[927]446      ALLOCATE(zmax0(klon), f0(klon))
[1827]447      ALLOCATE(sig1(klon,klev), w01(klon,klev))
[942]448      ALLOCATE(entr_therm(klon,klev), fm_therm(klon,klev+1))
[952]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))
[1398]477      ALLOCATE(O3sumSTD(klon,nlevSTD,nout))
478      ALLOCATE(O3daysumSTD(klon,nlevSTD,nout))
[1352]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))
[1398]488      ALLOCATE(O3STD(klon,nlevSTD))
489      ALLOCATE(O3daySTD(klon,nlevSTD))
[1352]490!IM end
[952]491      ALLOCATE(seed_old(klon,napisccp))
492      ALLOCATE(zuthe(klon),zvthe(klon))
493      ALLOCATE(alb_neig(klon))
494!cloud base mass flux
[1398]495      ALLOCATE(ema_cbmf(klon))
[952]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))
[1403]510      ALLOCATE(wake_Cstar(klon), wake_s(klon))
511      ALLOCATE(wake_pe(klon), wake_fip(klon))
[952]512      ALLOCATE(dt_wake(klon,klev), dq_wake(klon,klev))
[2159]513!jyg<
[2181]514      ALLOCATE(wake_delta_pbl_TKE(klon,klev+1,nbsrf+1))
[2159]515!>jyg
[952]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))
[2227]521!albedo SB >>>
522      ALLOCATE(albsol_dir(klon,nsw),albsol_dif(klon,nsw))
523!albedo SB <<<
[1279]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     
[952]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))
[1539]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
[952]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))
[1813]561      ALLOCATE(ustar(klon,nbsrf),u10m(klon,nbsrf), v10m(klon,nbsrf),wstar(klon,nbsrf+1))
[952]562      ALLOCATE(topswad(klon), solswad(klon))
563      ALLOCATE(topswai(klon), solswai(klon))
[1279]564      ALLOCATE(tau_aero(klon,klev,naero_grp,nbands),piz_aero(klon,klev,naero_grp,nbands),cg_aero(klon,klev,naero_grp,nbands))
[2146]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))
[1279]569      ALLOCATE(ccm(klon,klev,nbands))
[959]570
[1638]571!!! nrlmd le 10/04/2012
572      ALLOCATE(ale_bl_trig(klon))
573!!! fin nrlmd le 10/04/2012
[1938]574      if (ok_gwd_rando) allocate(du_gwd_rando(klon, klev), &
575           dv_gwd_rando(klon, klev))
[1638]576
[909]577END SUBROUTINE phys_state_var_init
578
579!======================================================================
580SUBROUTINE phys_state_var_end
[1785]581USE dimphy
582USE control_mod
583USE indice_sol_mod
[909]584IMPLICIT NONE
[1938]585include "clesphys.h"
[909]586
[952]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)
[2205]592      deallocate(qtc_cv,sigt_cv)
[1054]593      deallocate(        u_ancien, v_ancien                 )
[1742]594      deallocate(        tr_ancien)                           !RomP
[1761]595      deallocate(ratqs, pbl_tke,coefh,coefm)
[2159]596!nrlmd<
597      deallocate(delta_tsurf)
598!>nrlmd
[952]599      deallocate(zmax0, f0)
[1827]600      deallocate(sig1, w01)
[952]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)
[970]619      deallocate(qsumSTD, rhsumSTD)
[952]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)
[1398]629      deallocate(O3sumSTD)
630      deallocate(O3daysumSTD)
[1352]631!IM beg
632      deallocate(wlevSTD,ulevSTD,vlevSTD,tlevSTD,qlevSTD,rhlevSTD,philevSTD)
[1398]633      deallocate(uvSTD,vqSTD,vTSTD,wqSTD,vphiSTD,wTSTD,u2STD,v2STD,T2STD,O3STD,O3daySTD)
[1352]634!IM end
[952]635      deallocate(seed_old)
636      deallocate(zuthe, zvthe)
637      deallocate(alb_neig)
[1398]638      deallocate(ema_cbmf)
[952]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)
[1403]647      deallocate(wake_Cstar, wake_s, wake_pe, wake_fip)
[952]648      deallocate(dt_wake, dq_wake)
[2159]649!jyg<
650      deallocate(wake_delta_pbl_TKE)
651!>jyg
[952]652      deallocate(pfrac_impa, pfrac_nucl)
653      deallocate(pfrac_1nucl)
654      deallocate(total_rain, nday_rain)
655      deallocate(paire_ter)
656      deallocate(albsol1, albsol2)
[2227]657!albedo SB >>>
658      deallocate(albsol_dir,albsol_dif,falb_dir,falb_dif,chl_con)
659!albedo SB <<<
[952]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)
[1539]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)
[952]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)
[1813]689      deallocate(ustar,u10m, v10m,wstar)
[952]690      deallocate(topswad, solswad)
691      deallocate(topswai, solswai)
[1279]692      deallocate(tau_aero,piz_aero,cg_aero)
[2146]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)
[952]695      deallocate(ccm)
[1938]696      if (ok_gwd_rando) deallocate(du_gwd_rando, dv_gwd_rando)
[959]697       
[1638]698!!! nrlmd le 10/04/2012
699      deallocate(ale_bl_trig)
700!!! fin nrlmd le 10/04/2012
701
[909]702END SUBROUTINE phys_state_var_end
703
704      END MODULE phys_state_var_mod
Note: See TracBrowser for help on using the repository browser.