1 | MODULE regular_lonlat_mod |
---|
2 | |
---|
3 | |
---|
4 | INTEGER, PARAMETER :: north_east=1 ! boundaries of regular lontlat |
---|
5 | INTEGER, PARAMETER :: north_west=2 ! boundaries of regular lontlat |
---|
6 | INTEGER, PARAMETER :: south_west=3 ! boundaries of regular lontlat |
---|
7 | INTEGER, PARAMETER :: south_east=4 ! boundaries of regular lontlat |
---|
8 | INTEGER, PARAMETER :: east=1 ! boundaries of regular lontlat |
---|
9 | INTEGER, PARAMETER :: west=2 ! boundaries of regular lontlat |
---|
10 | INTEGER, PARAMETER :: north=1 ! boundaries of regular lontlat |
---|
11 | INTEGER, PARAMETER :: south=2 ! boundaries of regular lontlat |
---|
12 | |
---|
13 | ! Global definition, shared by all threads |
---|
14 | ! Do not set threadprivate directives |
---|
15 | |
---|
16 | REAL,SAVE,ALLOCATABLE :: lon_reg(:) ! value of longitude cell (rad) |
---|
17 | |
---|
18 | REAL,SAVE,ALLOCATABLE :: lat_reg(:) ! value of longitude cell (rad) |
---|
19 | |
---|
20 | REAL,SAVE,ALLOCATABLE :: boundslon_reg(:,:) ! value of boundaries cell (1=>east, 2=>west)(rad) |
---|
21 | |
---|
22 | REAL,SAVE,ALLOCATABLE :: boundslat_reg(:,:) ! value of longitude cell (1=>north, 2=>south)(rad) |
---|
23 | |
---|
24 | |
---|
25 | CONTAINS |
---|
26 | |
---|
27 | SUBROUTINE init_regular_lonlat(nbp_lon, nbp_lat, lon_reg_, lat_reg_, boundslon_reg_, boundslat_reg_) |
---|
28 | IMPLICIT NONE |
---|
29 | INTEGER,INTENT(IN) :: nbp_lon |
---|
30 | INTEGER,INTENT(IN) :: nbp_lat |
---|
31 | REAL, INTENT(IN) :: lon_reg_(nbp_lon) |
---|
32 | REAL, INTENT(IN) :: lat_reg_(nbp_lat) |
---|
33 | REAL, INTENT(IN) :: boundslon_reg_(nbp_lon,2) |
---|
34 | REAL, INTENT(IN) :: boundslat_reg_(nbp_lat,2) |
---|
35 | |
---|
36 | |
---|
37 | ALLOCATE(lon_reg(nbp_lon)) |
---|
38 | lon_reg(:)=lon_reg_(:) |
---|
39 | |
---|
40 | ALLOCATE(lat_reg(nbp_lat)) |
---|
41 | lat_reg(:)=lat_reg_(:) |
---|
42 | |
---|
43 | ALLOCATE(boundslon_reg(nbp_lon,2)) |
---|
44 | boundslon_reg(:,:)=boundslon_reg_(:,:) |
---|
45 | |
---|
46 | ALLOCATE(boundslat_reg(nbp_lat,2)) |
---|
47 | boundslat_reg(:,:)=boundslat_reg_(:,:) |
---|
48 | |
---|
49 | |
---|
50 | END SUBROUTINE init_regular_lonlat |
---|
51 | |
---|
52 | END MODULE regular_lonlat_mod |
---|