vertical_layers_mod.f90 Source File


Files dependent on this one

sourcefile~~vertical_layers_mod.f90~~AfferentGraph sourcefile~vertical_layers_mod.f90 vertical_layers_mod.f90 sourcefile~acama_gwd_rando_m.f90 acama_gwd_rando_m.f90 sourcefile~acama_gwd_rando_m.f90->sourcefile~vertical_layers_mod.f90 sourcefile~acama_gwd_rando_m.f90~2 acama_gwd_rando_m.f90 sourcefile~acama_gwd_rando_m.f90~2->sourcefile~vertical_layers_mod.f90 sourcefile~iophys.f90 iophys.F90 sourcefile~iophys.f90->sourcefile~vertical_layers_mod.f90 sourcefile~flott_gwd_rando_m.f90~2 flott_gwd_rando_m.f90 sourcefile~flott_gwd_rando_m.f90~2->sourcefile~vertical_layers_mod.f90 sourcefile~inigeomphy_mod.f90~2 inigeomphy_mod.f90 sourcefile~inigeomphy_mod.f90~2->sourcefile~vertical_layers_mod.f90 sourcefile~physiq_mod.f90 physiq_mod.F90 sourcefile~physiq_mod.f90->sourcefile~vertical_layers_mod.f90 sourcefile~physiq_mod.f90->sourcefile~acama_gwd_rando_m.f90 sourcefile~flott_gwd_rando_m.f90 flott_gwd_rando_m.f90 sourcefile~physiq_mod.f90->sourcefile~flott_gwd_rando_m.f90 sourcefile~phys_output_write_mod.f90 phys_output_write_mod.F90 sourcefile~physiq_mod.f90->sourcefile~phys_output_write_mod.f90 sourcefile~phys_output_mod.f90 phys_output_mod.F90 sourcefile~physiq_mod.f90->sourcefile~phys_output_mod.f90 sourcefile~tropopause_m.f90 tropopause_m.f90 sourcefile~physiq_mod.f90->sourcefile~tropopause_m.f90 sourcefile~diag_slp.f90 diag_slp.f90 sourcefile~physiq_mod.f90->sourcefile~diag_slp.f90 sourcefile~inigeomphy_mod.f90 inigeomphy_mod.f90 sourcefile~inigeomphy_mod.f90->sourcefile~vertical_layers_mod.f90 sourcefile~suphec.f90 suphec.F90 sourcefile~suphec.f90->sourcefile~vertical_layers_mod.f90 sourcefile~phys_output_mod.f90~2 phys_output_mod.F90 sourcefile~phys_output_mod.f90~2->sourcefile~vertical_layers_mod.f90 sourcefile~phys_output_mod.f90~2->sourcefile~phys_output_write_mod.f90 sourcefile~suphec.f90~2 suphec.F90 sourcefile~suphec.f90~2->sourcefile~vertical_layers_mod.f90 sourcefile~flott_gwd_rando_m.f90->sourcefile~vertical_layers_mod.f90 sourcefile~phys_output_write_mod.f90->sourcefile~vertical_layers_mod.f90 sourcefile~tropopause_m.f90~2 tropopause_m.f90 sourcefile~tropopause_m.f90~2->sourcefile~vertical_layers_mod.f90 sourcefile~physiq_mod.f90~2 physiq_mod.F90 sourcefile~physiq_mod.f90~2->sourcefile~vertical_layers_mod.f90 sourcefile~physiq_mod.f90~2->sourcefile~acama_gwd_rando_m.f90 sourcefile~physiq_mod.f90~2->sourcefile~flott_gwd_rando_m.f90 sourcefile~physiq_mod.f90~2->sourcefile~phys_output_write_mod.f90 sourcefile~physiq_mod.f90~2->sourcefile~phys_output_mod.f90 sourcefile~physiq_mod.f90~2->sourcefile~tropopause_m.f90 sourcefile~physiq_mod.f90~2->sourcefile~diag_slp.f90 sourcefile~test_disvert_m.f90 test_disvert_m.f90 sourcefile~test_disvert_m.f90->sourcefile~vertical_layers_mod.f90 sourcefile~phys_output_mod.f90->sourcefile~vertical_layers_mod.f90 sourcefile~phys_output_mod.f90->sourcefile~phys_output_write_mod.f90 sourcefile~tropopause_m.f90->sourcefile~vertical_layers_mod.f90 sourcefile~iophys.f90~2 iophys.F90 sourcefile~iophys.f90~2->sourcefile~vertical_layers_mod.f90 sourcefile~iniphysiq_mod.f90 iniphysiq_mod.f90 sourcefile~iniphysiq_mod.f90->sourcefile~vertical_layers_mod.f90 sourcefile~iniphysiq_mod.f90->sourcefile~inigeomphy_mod.f90 sourcefile~iniphysiq_mod.f90~2 iniphysiq_mod.F90 sourcefile~iniphysiq_mod.f90~2->sourcefile~vertical_layers_mod.f90 sourcefile~iniphysiq_mod.f90~2->sourcefile~inigeomphy_mod.f90 sourcefile~phys_output_write_mod.f90~2 phys_output_write_mod.F90 sourcefile~phys_output_write_mod.f90~2->sourcefile~vertical_layers_mod.f90 sourcefile~old_lmdz1d.f90 old_lmdz1d.f90 sourcefile~old_lmdz1d.f90->sourcefile~physiq_mod.f90 sourcefile~old_lmdz1d.f90->sourcefile~iniphysiq_mod.f90 sourcefile~diag_slp.f90->sourcefile~phys_output_write_mod.f90 sourcefile~diag_slp.f90~2 diag_slp.f90 sourcefile~diag_slp.f90~2->sourcefile~phys_output_write_mod.f90 sourcefile~recmwf_aero.f90 recmwf_aero.F90 sourcefile~recmwf_aero.f90->sourcefile~phys_output_mod.f90 sourcefile~callphysiq_mod.f90 callphysiq_mod.f90 sourcefile~callphysiq_mod.f90->sourcefile~physiq_mod.f90 sourcefile~sw_aeroar4.f90 sw_aeroAR4.f90 sourcefile~sw_aeroar4.f90->sourcefile~phys_output_mod.f90 sourcefile~gcm.f90 gcm.F90 sourcefile~gcm.f90->sourcefile~iniphysiq_mod.f90 sourcefile~replay3d.f90 replay3d.f90 sourcefile~replay3d.f90->sourcefile~inigeomphy_mod.f90 sourcefile~replay3d.f90->sourcefile~iniphysiq_mod.f90 sourcefile~ce0l.f90 ce0l.F90 sourcefile~ce0l.f90->sourcefile~test_disvert_m.f90 sourcefile~ce0l.f90->sourcefile~iniphysiq_mod.f90 sourcefile~sw_aeroar4.f90~2 sw_aeroAR4.f90 sourcefile~sw_aeroar4.f90~2->sourcefile~phys_output_mod.f90 sourcefile~recmwf_aero.f90~2 recmwf_aero.F90 sourcefile~recmwf_aero.f90~2->sourcefile~phys_output_mod.f90 sourcefile~callphysiq_mod.f90~2 callphysiq_mod.f90 sourcefile~callphysiq_mod.f90~2->sourcefile~physiq_mod.f90 sourcefile~replay1d.f90 replay1d.f90 sourcefile~replay1d.f90->sourcefile~inigeomphy_mod.f90 sourcefile~scm.f90 scm.f90 sourcefile~scm.f90->sourcefile~physiq_mod.f90 sourcefile~scm.f90->sourcefile~iniphysiq_mod.f90 sourcefile~calfis.f90 calfis.f90 sourcefile~calfis.f90->sourcefile~callphysiq_mod.f90

Contents


Source Code

! $Id: $

MODULE vertical_layers_mod

   REAL,SAVE             :: preff  ! reference surface pressure (Pa)
   REAL,SAVE             :: scaleheight ! atmospheric reference scale height (km)
   REAL,SAVE,ALLOCATABLE :: ap(:) ! hybrid (pressure contribution) coordinate 
                                  ! at layer interfaces (Pa)
   REAL,SAVE,ALLOCATABLE :: bp(:) ! hybrid (sigma contribution) coordinate 
                                  ! at layer interfaces (Pa)
   REAL,SAVE,ALLOCATABLE :: aps(:) ! hybrid (pressure contribution) coordinate 
                                   ! at mid-layer (Pa)
   REAL,SAVE,ALLOCATABLE :: bps(:) ! hybrid (sigma contribution) coordinate 
                                   ! at mid-layer
   REAL,SAVE,ALLOCATABLE :: presnivs(:) ! reference pressure at mid-layer (Pa),
                                        ! based on preff, ap and bp
   REAL,SAVE,ALLOCATABLE :: presinter(:) ! reference pressure at interface (Pa),
                                        ! based on preff, ap and bp
   REAL,SAVE,ALLOCATABLE :: pseudoalt(:) ! pseudo-altitude of model layers (km),
                                         ! based on preff and scaleheight
   
!$OMP THREADPRIVATE(preff,scaleheight,ap,bp,aps,bps,presnivs,presinter,pseudoalt)


CONTAINS

  SUBROUTINE init_vertical_layers(nlayer,preff_,scaleheight_,ap_,bp_,&
                                 aps_,bps_,presnivs_, presinter_, pseudoalt_)
    IMPLICIT NONE
    INTEGER,INTENT(IN) :: nlayer ! number of atmospheric layers
    REAL,INTENT(IN)    :: preff_ ! reference surface pressure (Pa)
    REAL,INTENT(IN)    :: scaleheight_ ! atmospheric scale height (km)
    REAL,INTENT(IN)    :: ap_(nlayer+1) ! hybrid coordinate at interfaces
    REAL,INTENT(IN)    :: bp_(nlayer+1) ! hybrid coordinate at interfaces
    REAL,INTENT(IN)    :: aps_(nlayer) ! hybrid coordinate at mid-layer
    REAL,INTENT(IN)    :: bps_(nlayer) ! hybrid coordinate at mid-layer
    REAL,INTENT(IN)    :: presnivs_(nlayer) ! Appproximative pressure of atm. layers (Pa)
    REAL,INTENT(IN)    :: presinter_(nlayer+1) ! Appproximative pressure of atm. layers (Pa)
    REAL,INTENT(IN)    :: pseudoalt_(nlayer) ! pseudo-altitude of atm. layers (km)
  
    ALLOCATE(ap(nlayer+1))
    ALLOCATE(bp(nlayer+1))
    ALLOCATE(aps(nlayer))
    ALLOCATE(bps(nlayer))
    ALLOCATE(presnivs(nlayer))
    ALLOCATE(presinter(nlayer+1))
    ALLOCATE(pseudoalt(nlayer))
  
    preff = preff_
    scaleheight=scaleheight_
    ap(:) = ap_(:)
    bp(:) = bp_(:)
    aps(:) = aps_(:)
    bps(:) = bps_(:)
    presnivs(:) = presnivs_(:)
    presinter(:) = presinter_(:)
    pseudoalt(:) = pseudoalt_(:)

  END SUBROUTINE init_vertical_layers

END MODULE vertical_layers_mod