[2315] | 1 | ! $Id: $ |
---|
| 2 | |
---|
| 3 | MODULE vertical_layers_mod |
---|
| 4 | |
---|
| 5 | REAL,SAVE :: preff ! reference surface pressure (Pa) |
---|
| 6 | REAL,SAVE :: scaleheight ! atmospheric reference scale height (km) |
---|
| 7 | REAL,SAVE,ALLOCATABLE :: ap(:) ! hybrid (pressure contribution) coordinate |
---|
| 8 | ! at layer interfaces (Pa) |
---|
| 9 | REAL,SAVE,ALLOCATABLE :: bp(:) ! hybrid (sigma contribution) coordinate |
---|
| 10 | ! at layer interfaces (Pa) |
---|
[3629] | 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 |
---|
[2315] | 15 | REAL,SAVE,ALLOCATABLE :: presnivs(:) ! reference pressure at mid-layer (Pa), |
---|
| 16 | ! based on preff, ap and bp |
---|
| 17 | REAL,SAVE,ALLOCATABLE :: pseudoalt(:) ! pseudo-altitude of model layers (km), |
---|
| 18 | ! based on preff and scaleheight |
---|
| 19 | |
---|
[3629] | 20 | !$OMP THREADPRIVATE(preff,scaleheight,ap,bp,aps,bps,presnivs,pseudoalt) |
---|
[2315] | 21 | |
---|
[3629] | 22 | |
---|
[2315] | 23 | CONTAINS |
---|
| 24 | |
---|
| 25 | SUBROUTINE init_vertical_layers(nlayer,preff_,scaleheight_,ap_,bp_,& |
---|
[3629] | 26 | aps_,bps_,presnivs_, pseudoalt_) |
---|
[2315] | 27 | IMPLICIT NONE |
---|
| 28 | INTEGER,INTENT(IN) :: nlayer ! number of atmospheric layers |
---|
| 29 | REAL,INTENT(IN) :: preff_ ! reference surface pressure (Pa) |
---|
| 30 | REAL,INTENT(IN) :: scaleheight_ ! atmospheric scale height (km) |
---|
| 31 | REAL,INTENT(IN) :: ap_(nlayer+1) ! hybrid coordinate at interfaces |
---|
| 32 | REAL,INTENT(IN) :: bp_(nlayer+1) ! hybrid coordinate at interfaces |
---|
[3629] | 33 | REAL,INTENT(IN) :: aps_(nlayer) ! hybrid coordinate at mid-layer |
---|
| 34 | REAL,INTENT(IN) :: bps_(nlayer) ! hybrid coordinate at mid-layer |
---|
[2315] | 35 | REAL,INTENT(IN) :: presnivs_(nlayer) ! Appproximative pressure of atm. layers (Pa) |
---|
| 36 | REAL,INTENT(IN) :: pseudoalt_(nlayer) ! pseudo-altitude of atm. layers (km) |
---|
| 37 | |
---|
| 38 | ALLOCATE(ap(nlayer+1)) |
---|
| 39 | ALLOCATE(bp(nlayer+1)) |
---|
[3629] | 40 | ALLOCATE(aps(nlayer)) |
---|
| 41 | ALLOCATE(bps(nlayer)) |
---|
[2315] | 42 | ALLOCATE(presnivs(nlayer)) |
---|
| 43 | ALLOCATE(pseudoalt(nlayer)) |
---|
[3629] | 44 | |
---|
[2315] | 45 | preff = preff_ |
---|
| 46 | scaleheight=scaleheight_ |
---|
| 47 | ap(:) = ap_(:) |
---|
| 48 | bp(:) = bp_(:) |
---|
[3629] | 49 | aps(:) = aps_(:) |
---|
| 50 | bps(:) = bps_(:) |
---|
[2315] | 51 | presnivs(:) = presnivs_(:) |
---|
| 52 | pseudoalt(:) = pseudoalt_(:) |
---|
| 53 | |
---|
| 54 | END SUBROUTINE init_vertical_layers |
---|
| 55 | |
---|
| 56 | END MODULE vertical_layers_mod |
---|