source: LMDZ6/trunk/libf/phy_common/geometry_mod.F90 @ 3667

Last change on this file since 3667 was 3435, checked in by Laurent Fairhead, 6 years ago

"Historic" :-) commit merging the physics branch used for DYNAMICO with the LMDZ trunk.
The same physics branch can now be used seamlessly with the traditional lon-lat LMDZ
dynamical core and DYNAMICO.
Testing consisted in running a lon-lat LMDZ bucket simulation with the NPv6.1 physics package
with the original trunk sources and the merged sources. Tests were succesful in the sense that
numeric continuity was preserved in the restart files from both simulation. Further tests
included running both versions of the physics codes for one year in a LMDZOR setting in which
the restart files also came out identical.

Caution:

  • as the physics package now manages unstructured grids, grid information needs to be transmitted

to the surface scheme ORCHIDEE. This means that the interface defined in surf_land_orchidee_mod.F90
is only compatible with ORCHIDEE version orchidee2.1 and later versions. If previous versions of
ORCHIDEE need to be used, the CPP key ORCHIDEE_NOUNSTRUCT needs to be set at compilation time.
This is done automatically if makelmdz/makelmdz_fcm are called with the veget orchidee2.0 switch

  • due to a limitation in XIOS, the time at which limit conditions will be read in by DYNAMICO will be

delayed by one physic timestep with respect to the time it is read in by the lon-lat model. This is caused
by the line

IF (MOD(itime-1, lmt_pas) == 0 .OR. (jour_lu /= jour .AND. grid_type /= unstructured)) THEN ! time to read

in limit_read_mod.F90

Work still needed on COSP integration and XML files for DYNAMICO

EM, YM, LF

File size: 2.7 KB
Line 
1MODULE geometry_mod
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  INTEGER,SAVE,ALLOCATABLE :: ind_cell_glo(:)      ! global indice of a local cell
33!$OMP THREADPRIVATE(ind_cell_glo)
34
35CONTAINS
36
37  SUBROUTINE init_geometry(klon,longitude_,latitude_, &
38                           boundslon_,boundslat_, &
39                           cell_area_,ind_cell_glo_,dx_,dy_)
40  USE mod_grid_phy_lmdz, ONLY: nvertex
41  USE nrtype, ONLY : PI
42  IMPLICIT NONE
43    INTEGER,INTENT(IN) :: klon ! number of columns for this MPI/OpenMP domain
44    REAL,INTENT(IN) :: longitude_(klon)
45    REAL,INTENT(IN) :: latitude_(klon)
46    REAL,INTENT(IN) :: boundslon_(klon,nvertex)
47    REAL,INTENT(IN) :: boundslat_(klon,nvertex)
48    REAL,INTENT(IN) :: cell_area_(klon)
49    INTEGER,OPTIONAL,INTENT(IN) :: ind_cell_glo_(klon)
50    REAL,OPTIONAL,INTENT(IN) :: dx_(klon)
51    REAL,OPTIONAL,INTENT(IN) :: dy_(klon)
52   
53    ALLOCATE(longitude(klon))
54    ALLOCATE(latitude(klon))
55    ALLOCATE(longitude_deg(klon))
56    ALLOCATE(latitude_deg(klon))
57    ALLOCATE(boundslon(klon,nvertex))
58    ALLOCATE(boundslat(klon,nvertex))
59    ALLOCATE(cell_area(klon))
60    IF (PRESENT(ind_cell_glo_)) ALLOCATE(ind_cell_glo(klon))
61    IF (PRESENT(dx_)) ALLOCATE(dx(klon))
62    IF (PRESENT(dy_))ALLOCATE(dy(klon))
63   
64    longitude(:) = longitude_(:)
65    latitude(:) = latitude_(:)
66    longitude_deg(:) = longitude(:)*180./PI
67    latitude_deg(:) = latitude(:)*180./PI
68    boundslon(:,:) = boundslon_(:,:)
69    boundslat(:,:) = boundslat_(:,:)
70    cell_area(:) = cell_area_(:)
71    IF (PRESENT(ind_cell_glo_)) ind_cell_glo(:) = ind_cell_glo_(:)
72    IF (PRESENT(dx_)) dx(:) = dx_(:)
73    IF (PRESENT(dy_)) dy(:) = dy_(:)
74   
75  END SUBROUTINE init_geometry
76
77
78END MODULE geometry_mod
79
Note: See TracBrowser for help on using the repository browser.