Ignore:
Timestamp:
Nov 21, 2019, 4:43:45 PM (5 years ago)
Author:
lguez
Message:

Merge revisions 3427:3600 of trunk into branch Ocean_skin

Location:
LMDZ6/branches/Ocean_skin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Ocean_skin

  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_state_var_mod.F90

    r3458 r3605  
    1818      INTEGER, SAVE :: radpas  ! radiation is called every "radpas" step
    1919      INTEGER, SAVE :: cvpas   ! convection is called every "cvpas" step
    20       INTEGER, SAVE :: cvpas_0 ! reference value for cvpas
     20      INTEGER, SAVE :: cvpas_0 = 1 ! reference value for cvpas
    2121      INTEGER, SAVE :: wkpas   ! wake scheme is called every "wkpas" step
    2222      REAL, PARAMETER :: missing_val_nf90=nf90_fill_real
     
    2525!$OMP THREADPRIVATE(cvpas_0)
    2626!$OMP THREADPRIVATE(wkpas)
    27       REAL, SAVE :: dtime, solaire_etat0
    28 !$OMP THREADPRIVATE(dtime, solaire_etat0)
     27      REAL, SAVE :: phys_tstep=0, solaire_etat0
     28!$OMP THREADPRIVATE(phys_tstep, solaire_etat0)
    2929
    3030      REAL, ALLOCATABLE, SAVE :: pctsrf(:,:)
     
    202202      REAL,ALLOCATABLE,SAVE :: ema_pcb(:), ema_pct(:)
    203203!$OMP THREADPRIVATE(ema_pcb,ema_pct)
    204       REAL,ALLOCATABLE,SAVE :: Ma(:,:)        ! undilute upward mass flux
     204      REAL,ALLOCATABLE,SAVE :: Mipsh(:,:)     ! mass flux shed from  adiab. ascents
     205!$OMP THREADPRIVATE(Mipsh)
     206      REAL,ALLOCATABLE,SAVE :: Ma(:,:)       ! undilute upward mass flux
    205207!$OMP THREADPRIVATE(Ma)
    206208      REAL,ALLOCATABLE,SAVE :: qcondc(:,:)    ! in-cld water content from convect
     
    286288      REAL,ALLOCATABLE,SAVE :: total_rain(:), nday_rain(:) 
    287289!$OMP THREADPRIVATE(total_rain,nday_rain)
     290      REAL,ALLOCATABLE,SAVE :: paire_ter(:)
     291!$OMP THREADPRIVATE(paire_ter)
    288292! albsol1: albedo du sol total pour SW visible
    289293! albsol2: albedo du sol total pour SW proche IR
     
    312316! toplwdown : downward CS LW flux at TOA
    313317! toplwdownclr : downward CS LW flux at TOA
     318! heat_volc : chauffage solaire du au volcanisme
     319! cool_volc : refroidissement infrarouge du au volcanisme
    314320      REAL,ALLOCATABLE,SAVE :: clwcon0(:,:),rnebcon0(:,:)
    315321!$OMP THREADPRIVATE(clwcon0,rnebcon0)
     
    322328      REAL,ALLOCATABLE,SAVE :: cool0(:,:)
    323329!$OMP THREADPRIVATE(cool0)
     330      REAL,ALLOCATABLE,SAVE :: heat_volc(:,:)   
     331!$OMP THREADPRIVATE(heat_volc)
     332      REAL,ALLOCATABLE,SAVE :: cool_volc(:,:)
     333!$OMP THREADPRIVATE(cool_volc)
    324334      REAL,ALLOCATABLE,SAVE :: topsw(:), toplw(:)
    325335!$OMP THREADPRIVATE(topsw,toplw)
     
    417427      ! tendencies on wind due to gravity waves
    418428
     429      LOGICAL,SAVE :: is_initialized=.FALSE.
     430!$OMP THREADPRIVATE(is_initialized)   
     431
    419432      ! Ocean-atmosphere interface, subskin ocean and near-surface ocean:
    420433     
     
    452465include "clesphys.h"
    453466
     467      IF (is_initialized) RETURN
     468      is_initialized=.TRUE.
    454469      ALLOCATE(pctsrf(klon,nbsrf))
    455470      ALLOCATE(ftsol(klon,nbsrf))
     
    467482      ALLOCATE(snow_fall(klon))
    468483      ALLOCATE(solsw(klon), sollw(klon))
     484      sollw=0.0
    469485      ALLOCATE(radsol(klon))
    470486      ALLOCATE(swradcorr(klon))
     
    542558      ALLOCATE(ema_pcb(klon), ema_pct(klon))
    543559!
     560      ALLOCATE(Mipsh(klon,klev))
    544561      ALLOCATE(Ma(klon,klev))
    545562      ALLOCATE(qcondc(klon,klev))
     
    551568      ALLOCATE(ale_wake(klon))
    552569      ALLOCATE(ale_bl_stat(klon))
     570      ale_bl_stat(:)=0
    553571      ALLOCATE(Alp_bl(klon))
    554572      ALLOCATE(lalim_conv(klon))
     
    556574      ALLOCATE(wake_deltat(klon,klev), wake_deltaq(klon,klev))
    557575      ALLOCATE(wake_s(klon), awake_dens(klon), wake_dens(klon))
     576      awake_dens = 0.
    558577      ALLOCATE(wake_Cstar(klon))
    559578      ALLOCATE(wake_pe(klon), wake_fip(klon))
     
    564583      ALLOCATE(pfrac_1nucl(klon,klev))
    565584      ALLOCATE(total_rain(klon), nday_rain(klon))
     585      ALLOCATE(paire_ter(klon))
    566586      ALLOCATE(albsol1(klon), albsol2(klon))
    567587!albedo SB >>>
     
    579599      ALLOCATE(heat(klon,klev), heat0(klon,klev))
    580600      ALLOCATE(cool(klon,klev), cool0(klon,klev))
     601      ALLOCATE(heat_volc(klon,klev), cool_volc(klon,klev))
    581602      ALLOCATE(topsw(klon), toplw(klon))
    582603      ALLOCATE(sollwdown(klon), sollwdownclr(klon))
     604      sollwdown = 0.
    583605      ALLOCATE(toplwdown(klon), toplwdownclr(klon))
    584606      ALLOCATE(topsw0(klon),toplw0(klon),solsw0(klon),sollw0(klon))
     607      sollw0 = 0.
    585608      ALLOCATE(albpla(klon))
    586609!IM ajout variables CFMIP2/CMIP5
     
    619642      ALLOCATE(ale_bl_trig(klon))
    620643!!! fin nrlmd le 10/04/2012
    621       if (ok_gwd_rando) allocate(du_gwd_rando(klon, klev))
    622       if (.not. ok_hines .and. ok_gwd_rando) allocate(du_gwd_front(klon, klev))
    623 
     644      IF (ok_gwd_rando) THEN
     645        allocate(du_gwd_rando(klon, klev))
     646        du_gwd_rando(:,:)=0.
     647      ENDIF
     648      IF (.not. ok_hines .and. ok_gwd_rando) THEN
     649        ALLOCATE(du_gwd_front(klon, klev))
     650        du_gwd_front(:,:) = 0 !ym missing init   
     651      ENDIF
    624652      if (activate_ocean_skin >= 1) ALLOCATE(ds_ns(klon), dt_ns(klon))
    625653
     
    693721      deallocate(ema_cbmf)
    694722      deallocate(ema_pcb, ema_pct)
    695       deallocate(Ma, qcondc)
     723      deallocate(Mipsh, Ma, qcondc)
    696724      deallocate(wd, sigd)
    697725      deallocate(cin, ALE, ALP)
     
    710738      deallocate(pfrac_1nucl)
    711739      deallocate(total_rain, nday_rain)
     740      deallocate(paire_ter)
    712741      deallocate(albsol1, albsol2)
    713742!albedo SB >>>
     
    718747      deallocate(heat, heat0)
    719748      deallocate(cool, cool0)
     749      deallocate(heat_volc, cool_volc)
    720750      deallocate(topsw, toplw)
    721751      deallocate(sollwdown, sollwdownclr)
     
    757787      deallocate(ale_bl_trig)
    758788!!! fin nrlmd le 10/04/2012
     789
    759790      if (activate_ocean_skin >= 1) deALLOCATE(ds_ns, dt_ns)
    760791
     792      is_initialized=.FALSE.
     793     
    761794END SUBROUTINE phys_state_var_end
    762795
Note: See TracChangeset for help on using the changeset viewer.