Ignore:
Timestamp:
Nov 19, 2021, 4:58:59 PM (3 years ago)
Author:
lguez
Message:

Sync latest trunk changes to Ocean_skin

Location:
LMDZ6/branches/Ocean_skin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Ocean_skin

  • LMDZ6/branches/Ocean_skin/libf/dyn3dmem/iniacademic_loc.F90

    r3605 r4013  
    7373  LOGICAL ok_geost             ! Initialisation vent geost. ou nul
    7474  LOGICAL ok_pv                ! Polar Vortex
    75   REAL phi_pv,dphi_pv,gam_pv   ! Constantes pour polar vortex
     75  REAL phi_pv,dphi_pv,gam_pv,tetanoise   ! Constantes pour polar vortex
    7676
    7777  real zz,ran1
     
    122122  CALL inigeom
    123123  CALL inifilr
     124
     125  ! Initialize pressure and mass field if read_start=.false.
     126  IF (.NOT. read_start) THEN
     127    ! allocate global fields:
     128!    allocate(vcov_glo(ip1jm,llm))
     129    allocate(ucov_glo(ip1jmp1,llm))
     130    allocate(teta_glo(ip1jmp1,llm))
     131    allocate(ps_glo(ip1jmp1))
     132    allocate(masse_glo(ip1jmp1,llm))
     133    allocate(phis_glo(ip1jmp1))
     134
     135     ! surface pressure
     136     if (iflag_phys>2) then
     137        ! specific value for CMIP5 aqua/terra planets
     138        ! "Specify the initial dry mass to be equivalent to
     139        !  a global mean surface pressure (101325 minus 245) Pa."
     140        ps_glo(:)=101080. 
     141     else
     142        ! use reference surface pressure
     143        ps_glo(:)=preff
     144     endif
     145     
     146     ! ground geopotential
     147     phis_glo(:)=0.
     148
     149     CALL pression ( ip1jmp1, ap, bp, ps_glo, p       )
     150     if (pressure_exner) then
     151       CALL exner_hyb( ip1jmp1, ps_glo, p, pks, pk )
     152     else
     153       call exner_milieu(ip1jmp1,ps_glo,p,pks,pk)
     154     endif
     155     CALL massdair(p,masse_glo)
     156  ENDIF
     157
    124158
    125159  if (llm == 1) then
     
    172206     gam_pv=4.              ! -dT/dz vortex (in K/km)
    173207     CALL getin('gam_pv',gam_pv)
     208     tetanoise=0.005
     209     CALL getin('tetanoise',tetanoise)
    174210
    175211     ! 2. Initialize fields towards which to relax
     
    224260     ! 3. Initialize fields (if necessary)
    225261     IF (.NOT. read_start) THEN
    226        ! allocate global fields:
    227 !       allocate(vcov_glo(ip1jm,llm))
    228        allocate(ucov_glo(ip1jmp1,llm))
    229        allocate(teta_glo(ip1jmp1,llm))
    230        allocate(ps_glo(ip1jmp1))
    231        allocate(masse_glo(ip1jmp1,llm))
    232        allocate(phis_glo(ip1jmp1))
    233 
    234         ! surface pressure
    235         if (iflag_phys>2) then
    236            ! specific value for CMIP5 aqua/terra planets
    237            ! "Specify the initial dry mass to be equivalent to
    238            !  a global mean surface pressure (101325 minus 245) Pa."
    239            ps_glo(:)=101080. 
    240         else
    241            ! use reference surface pressure
    242            ps_glo(:)=preff
    243         endif
    244        
    245         ! ground geopotential
    246         phis_glo(:)=0.
    247 
    248         CALL pression ( ip1jmp1, ap, bp, ps_glo, p       )
    249         if (pressure_exner) then
    250           CALL exner_hyb( ip1jmp1, ps_glo, p, pks, pk )
    251         else
    252           call exner_milieu(ip1jmp1,ps_glo,p,pks,pk)
    253         endif
    254         CALL massdair(p,masse_glo)
    255 
    256262        ! bulk initialization of temperature
    257         teta_glo(:,:)=tetarappel(:,:)
    258 
     263        IF (iflag_phys>10000) THEN
     264        ! Particular case to impose a constant temperature T0=0.01*iflag_phys
     265           teta_glo(:,:)= 0.01*iflag_phys/(pk(:,:)/cpp)
     266        ELSE
     267           teta_glo(:,:)=tetarappel(:,:)
     268        ENDIF
    259269        ! geopotential
    260270        CALL geopot(ip1jmp1,teta_glo,pk,pks,phis_glo,phi)
     
    306316        do l=1,llm
    307317           do ij=iip2,ip1jm
    308               teta_glo(ij,l)=teta_glo(ij,l)*(1.+0.005*ran1(idum))
     318              teta_glo(ij,l)=teta_glo(ij,l)*(1.+tetanoise*ran1(idum))
    309319           enddo
    310320        enddo
Note: See TracChangeset for help on using the changeset viewer.