source: dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/comgeomphy.F90 @ 3825

Last change on this file since 3825 was 3825, checked in by ymipsl, 10 years ago

Reorganize geometry and grid modules. Prepare physics for unstructutured grid support. Simplify initialization of physics from dynamic.
Compiled only with dynd3dmem, but not tested for moment.

YM

File size: 2.7 KB
Line 
1module comgeomphy
2!   real,save,allocatable :: airephy(:) => transfered in geometry_mod (area)
3!   real,save,allocatable :: cuphy(:) => transfered in regular_lonlat_mod : dlon_reg
4!   real,save,allocatable :: cvphy(:) => transfered in regular_lonlat_mod : dlat_reg
5!   real,save,allocatable :: rlatd(:) => transfered in geometry_mod (longitude)
6!   real,save,allocatable :: rlond(:) => transfered in geometry_mod (latitude)
7!!$OMP THREADPRIVATE(airephy,rlatd,rlond)
8   ! general (over global grid) latitudes and longitudes:
9   ! useful for outputs
10!   real,save,allocatable :: rlonv(:) ! longitudes (rad)           => transfered in regular_lonlat_mod
11!   real,save,allocatable :: rlonu(:) ! longitude boundaries (rad) => transfered in regular_lonlat_mod
12!   real,save,allocatable :: rlatu(:) ! latitudes (rad)            => transfered in regular_lonlat_mod
13!   real,save,allocatable :: rlatv(:) ! latitude boundaries (rad)  => transfered in regular_lonlat_mod
14!!$OMP THREADPRIVATE(rlonv,rlonu,rlatu,rlatv)
15
16   ! vertical grid
17!   real,save :: preff  ! reference surface pressure (Pa)
18!   real,save,allocatable :: ap(:)        => transfered in vertical_mod
19!   real,save,allocatable :: bp(:)        => transfered in vertical_mod
20!   real,save,allocatable :: presnivs(:)  => transfered in vertical_mod
21!   real,save,allocatable :: pseudoalt(:) => transfered in vertical_mod
22!!$OMP THREADPRIVATE(preff,ap,bp,presnivs,pseudoalt)
23
24contains
25 
26  subroutine InitComgeomphy(klon_omp)
27    implicit none
28    integer,intent(in) :: klon_omp ! number of columns (on local omp grid)
29 
30!    allocate(airephy(klon_omp))
31!    allocate(rlatd(klon_omp))
32!    allocate(rlond(klon_omp))
33
34  end subroutine InitComgeomphy
35 
36  subroutine initcomgeomphy_horiz(iim,jjm)
37    IMPLICIT NONE
38    integer,intent(in) :: iim
39    integer,intent(in) :: jjm
40   
41   
42  end subroutine initcomgeomphy_horiz
43 
44  subroutine initcomgeomphy_vert(nlayer,preff_dyn,ap_dyn,bp_dyn,&
45                                 presnivs_dyn,pseudoalt_dyn)
46    IMPLICIT NONE
47    integer,intent(in) :: nlayer ! number of atmospheric layers
48    real,intent(in) :: preff_dyn ! reference surface pressure (Pa)
49    real,intent(in) :: ap_dyn(nlayer+1) ! hybrid coordinate at interfaces
50    real,intent(in) :: bp_dyn(nlayer+1) ! hybrid coordinate at interfaces
51    real,intent(in) :: presnivs_dyn(nlayer) ! Appproximative pressure of atm. layers (Pa)
52    real,intent(in) :: pseudoalt_dyn(nlayer) ! pseudo-altitude of atm. layers (km)
53 
54!    allocate(ap(nlayer+1))
55!    allocate(bp(nlayer+1))
56!    allocate(presnivs(nlayer))
57!    allocate(pseudoalt(nlayer))
58
59!    preff=preff_dyn
60!    ap(:)=ap_dyn(:)
61!    bp(:)=bp_dyn(:)
62!    presnivs(:)=presnivs_dyn(:)
63!    pseudoalt(:)=pseudoalt_dyn(:)
64
65  end subroutine initcomgeomphy_vert
66
67end module comgeomphy
Note: See TracBrowser for help on using the repository browser.