Changeset 2786 for LMDZ5/trunk/libf


Ignore:
Timestamp:
Jan 30, 2017, 11:24:47 AM (8 years ago)
Author:
Ehouarn Millour
Message:

Further convergence with planetary models:

  • move vertical_layers_mod.F90 to phy_common and call init_vertical_layers in inigeomphy_mod
  • add aps and bps (mid-layer coordinates) to vertical_layers_mod.F90
  • same adaptations for the 1D case

EM

Location:
LMDZ5/trunk/libf
Files:
1 deleted
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/dyn3d_common/disvert.F90

    r2603 r2786  
    1010  use new_unit_m, only: new_unit
    1111  use assert_m, only: assert
    12   USE comvert_mod, ONLY: ap, bp, nivsigs, nivsig, dpres, presnivs, &
    13                          pa, preff, scaleheight
     12  USE comvert_mod, ONLY: ap, bp, aps, bps, nivsigs, nivsig, dpres, presnivs, &
     13                         pseudoalt, pa, preff, scaleheight
    1414  USE logic_mod, ONLY: ok_strato
    1515
     
    346346  DO l = 1, llm
    347347     dpres(l) = bp(l) - bp(l+1)
     348     aps(l) =  0.5 *( ap(l) +ap(l+1))
     349     bps(l) =  0.5 *( bp(l) +bp(l+1))
    348350     presnivs(l) = 0.5 *( ap(l)+bp(l)*preff + ap(l+1)+bp(l+1)*preff )
     351     pseudoalt(l) = log(preff/presnivs(l))*scaleheight
    349352     write(lunout, *)'PRESNIVS(', l, ')=', presnivs(l), ' Z ~ ', &
    350           log(preff/presnivs(l))*scaleheight &
     353          pseudoalt(l) &
    351354          , ' DZ ~ ', scaleheight*log((ap(l)+bp(l)*preff)/ &
    352355          max(ap(l+1)+bp(l+1)*preff, 1.e-10))
  • LMDZ5/trunk/libf/dynphy_lonlat/inigeomphy_mod.F90

    r2588 r2786  
    2424  USE mod_interface_dyn_phys, ONLY :  init_interface_dyn_phys
    2525  USE nrtype, ONLY: pi
     26  USE comvert_mod, ONLY: preff, ap, bp, aps, bps, presnivs, &
     27                         scaleheight, pseudoalt
     28  USE vertical_layers_mod, ONLY: init_vertical_layers
    2629  IMPLICIT NONE
    2730
     
    216219                     airefi,cufi,cvfi)
    217220
     221  ! copy over preff , ap(), bp(), etc
     222  CALL init_vertical_layers(nlayer,preff,scaleheight, &
     223                            ap,bp,aps,bps,presnivs,pseudoalt)
     224
    218225!$OMP END PARALLEL
    219226
  • LMDZ5/trunk/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90

    r2656 r2786  
    1212                     prad,pg,pr,pcpp,iflag_phys)
    1313  USE dimphy, ONLY: init_dimphy
    14   USE comvert_mod, ONLY: preff, ap, bp, presnivs, scaleheight, pseudoalt
    1514  USE inigeomphy_mod, ONLY: inigeomphy
    1615  USE mod_grid_phy_lmdz, ONLY: nbp_lon,nbp_lat,nbp_lev,klon_glo ! number of atmospheric columns (on full grid)
     
    110109!$OMP COPYIN(annee_ref, day_ini, day_ref, start_time)
    111110
    112   ! copy over preff , ap(), bp(), etc
    113   CALL init_vertical_layers(nlayer,preff,scaleheight, &
    114                             ap,bp,presnivs,pseudoalt)
    115 
    116111  ! Initialize physical constants in physics:
    117112  CALL inifis(punjours,prad,pg,pr,pcpp)
  • LMDZ5/trunk/libf/dynphy_lonlat/phymar/iniphysiq_mod.F90

    r2600 r2786  
    1212                     prad,pg,pr,pcpp,iflag_phys)
    1313  USE dimphy, ONLY: init_dimphy
    14   USE comvert_mod, ONLY: preff, ap, bp, presnivs, scaleheight, pseudoalt
    1514  USE inigeomphy_mod, ONLY: inigeomphy
    1615  USE vertical_layers_mod, ONLY : init_vertical_layers
     
    7170!$OMP PARALLEL
    7271
    73   ! copy over preff , ap(), bp(), etc
    74   CALL init_vertical_layers(nlayer,preff,scaleheight, &
    75                             ap,bp,presnivs,pseudoalt)
    76 
    7772  ! Initialize tracer names, numbers, etc. for physics
    7873  CALL init_infotrac_phy(nqtot)
  • LMDZ5/trunk/libf/phy_common/vertical_layers_mod.F90

    r2784 r2786  
    99   REAL,SAVE,ALLOCATABLE :: bp(:) ! hybrid (sigma contribution) coordinate
    1010                                  ! at layer interfaces (Pa)
     11   REAL,SAVE,ALLOCATABLE :: aps(:) ! hybrid (pressure contribution) coordinate
     12                                   ! at mid-layer (Pa)
     13   REAL,SAVE,ALLOCATABLE :: bps(:) ! hybrid (sigma contribution) coordinate
     14                                   ! at mid-layer
    1115   REAL,SAVE,ALLOCATABLE :: presnivs(:) ! reference pressure at mid-layer (Pa),
    1216                                        ! based on preff, ap and bp
     
    1418                                         ! based on preff and scaleheight
    1519   
    16 !$OMP THREADPRIVATE(preff,scaleheight,ap,bp,presnivs,pseudoalt)
     20!$OMP THREADPRIVATE(preff,scaleheight,ap,bp,aps,bps,presnivs,pseudoalt)
    1721
    1822
     
    2024
    2125  SUBROUTINE init_vertical_layers(nlayer,preff_,scaleheight_,ap_,bp_,&
    22                                  presnivs_, pseudoalt_)
     26                                 aps_,bps_,presnivs_, pseudoalt_)
    2327    IMPLICIT NONE
    2428    INTEGER,INTENT(IN) :: nlayer ! number of atmospheric layers
     
    2731    REAL,INTENT(IN)    :: ap_(nlayer+1) ! hybrid coordinate at interfaces
    2832    REAL,INTENT(IN)    :: bp_(nlayer+1) ! hybrid coordinate at interfaces
     33    REAL,INTENT(IN)    :: aps_(nlayer) ! hybrid coordinate at mid-layer
     34    REAL,INTENT(IN)    :: bps_(nlayer) ! hybrid coordinate at mid-layer
    2935    REAL,INTENT(IN)    :: presnivs_(nlayer) ! Appproximative pressure of atm. layers (Pa)
    3036    REAL,INTENT(IN)    :: pseudoalt_(nlayer) ! pseudo-altitude of atm. layers (km)
     
    3238    ALLOCATE(ap(nlayer+1))
    3339    ALLOCATE(bp(nlayer+1))
     40    ALLOCATE(aps(nlayer))
     41    ALLOCATE(bps(nlayer))
    3442    ALLOCATE(presnivs(nlayer))
    3543    ALLOCATE(pseudoalt(nlayer))
     
    3947    ap(:) = ap_(:)
    4048    bp(:) = bp_(:)
     49    aps(:) = aps_(:)
     50    bps(:) = bps_(:)
    4151    presnivs(:) = presnivs_(:)
    4252    pseudoalt(:) = pseudoalt_(:)
  • LMDZ5/trunk/libf/phylmd/dyn1d/lmdz1d.F90

    r2716 r2786  
    4040   USE physiq_mod, ONLY: physiq
    4141   USE comvert_mod, ONLY: presnivs, ap, bp, dpres,nivsig, nivsigs, pa, &
    42                           preff
     42                          preff, aps, bps, pseudoalt, scaleheight
     43   USE vertical_layers_mod, ONLY: init_vertical_layers
    4344   USE temps_mod, ONLY: annee_ref, calend, day_end, day_ini, day_ref, &
    4445                        itau_dyn, itau_phy, start_time
     
    634635        call disvert0(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig)
    635636        print *,'On utilise disvert0'
     637        aps(1:llm)=0.5*(ap(1:llm)+ap(2:llm+1))
     638        bps(1:llm)=0.5*(bp(1:llm)+bp(2:llm+1))
     639        scaleheight=8.
     640        pseudoalt(1:llm)=-scaleheight*log(presnivs(1:llm)/preff)
    636641      ELSE
    637642        call disvert()
     
    641646      ENDIF
    642647      ! initialize ap,bp, etc. in vertical_layers_mod
     648      CALL init_vertical_layers(llm,preff,scaleheight, &
     649                                ap,bp,aps,bps,presnivs,pseudoalt)
     650
    643651      sig_s=presnivs/preff
    644652      plev =ap+bp*psurf
Note: See TracChangeset for help on using the changeset viewer.