LMDZ
geometry_mod.F90
Go to the documentation of this file.
2 
3 ! Store informations concerning the local (to MPI/OpenMP core) geometry
4 
5  REAL,SAVE,ALLOCATABLE :: longitude(:) ! longitude of the cell (rad)
6 !$OMP THREADPRIVATE(longitude)
7 
8  REAL,SAVE,ALLOCATABLE :: latitude(:)! latitude of the cell (rad)
9 !$OMP THREADPRIVATE(latitude)
10 
11  REAL,SAVE,ALLOCATABLE :: longitude_deg(:) ! longitude of the cell (degree)
12 !$OMP THREADPRIVATE(longitude_deg)
13 
14  REAL,SAVE,ALLOCATABLE :: latitude_deg(:)! latitude of the cell (degree)
15 !$OMP THREADPRIVATE(latitude_deg)
16 
17  REAL,SAVE,ALLOCATABLE :: boundslon(:,:) ! boundaries of the cell (rad)
18 !$OMP THREADPRIVATE(boundslon)
19 
20  REAL,SAVE,ALLOCATABLE :: boundslat(:,:) ! boundaries of the cell (rad)
21 !$OMP THREADPRIVATE(boundslat)
22 
23  REAL,SAVE,ALLOCATABLE :: dx(:) ! resolution of longitude cell (valid only for 2D grid)
24 !$OMP THREADPRIVATE(dx)
25 
26  REAL,SAVE,ALLOCATABLE :: dy(:) ! resolution of latitude cell (valid only for 2D grid)
27 !$OMP THREADPRIVATE(dy)
28 
29  REAL,SAVE,ALLOCATABLE :: cell_area(:) ! area of the cell
30 !$OMP THREADPRIVATE(cell_area)
31 
32 
33 CONTAINS
34 
35  SUBROUTINE init_geometry(klon,longitude_,latitude_, &
36  boundslon_,boundslat_, &
37  cell_area_,dx_,dy_)
39  USE nrtype, ONLY : pi
40  IMPLICIT NONE
41  INTEGER,INTENT(IN) :: klon ! number of columns for this MPI/OpenMP domain
42  REAL,INTENT(IN) :: longitude_(klon)
43  REAL,INTENT(IN) :: latitude_(klon)
44  REAL,INTENT(IN) :: boundslon_(klon,nvertex)
45  REAL,INTENT(IN) :: boundslat_(klon,nvertex)
46  REAL,INTENT(IN) :: cell_area_(klon)
47  REAL,OPTIONAL,INTENT(IN) :: dx_(klon)
48  REAL,OPTIONAL,INTENT(IN) :: dy_(klon)
49 
50  ALLOCATE(longitude(klon))
51  ALLOCATE(latitude(klon))
52  ALLOCATE(longitude_deg(klon))
53  ALLOCATE(latitude_deg(klon))
54  ALLOCATE(boundslon(klon,nvertex))
55  ALLOCATE(boundslat(klon,nvertex))
56  ALLOCATE(cell_area(klon))
57  IF (PRESENT(dx_)) ALLOCATE(dx(klon))
58  IF (PRESENT(dy_))ALLOCATE(dy(klon))
59 
60  longitude(:) = longitude_(:)
61  latitude(:) = latitude_(:)
62  longitude_deg(:) = longitude(:)*180./pi
63  latitude_deg(:) = latitude(:)*180./pi
64  boundslon(:,:) = boundslon_(:,:)
65  boundslat(:,:) = boundslat_(:,:)
66  cell_area(:) = cell_area_(:)
67  IF (PRESENT(dx_)) dx(:) = dx_(:)
68  IF (PRESENT(dy_)) dy(:) = dy_(:)
69 
70  END SUBROUTINE init_geometry
71 
72 
73 END MODULE geometry_mod
74 
real, dimension(:), allocatable, save dx
real, dimension(:,:), allocatable, save boundslat
real, dimension(:), allocatable, save longitude
Definition: geometry_mod.F90:5
real, dimension(:), allocatable, save latitude_deg
!$Id mode_top_bound COMMON comconstr && pi
Definition: comconst.h:7
real, dimension(:), allocatable, save dy
Definition: nrtype.F90:1
real, dimension(:,:), allocatable, save boundslon
subroutine init_geometry(klon, longitude_, latitude_, boundslon_, boundslat_, cell_area_, dx_, dy_)
real, dimension(:), allocatable, save longitude_deg
real, dimension(:), allocatable, save cell_area
real, dimension(:), allocatable, save latitude
Definition: geometry_mod.F90:8