1 | |
---|
2 | module comgeomfi_h |
---|
3 | |
---|
4 | implicit none |
---|
5 | |
---|
6 | ! These arrays are allocated in phys_state_var_init |
---|
7 | ! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: long ! longitudes (rad) |
---|
8 | ! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: lati ! latitudes (rad) |
---|
9 | ! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: area ! mesh area (m2) |
---|
10 | ! REAL,SAVE :: totarea |
---|
11 | REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sinlon |
---|
12 | REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: coslon |
---|
13 | REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sinlat |
---|
14 | REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: coslat |
---|
15 | |
---|
16 | contains |
---|
17 | |
---|
18 | subroutine ini_comgeomfi_h(ngrid) |
---|
19 | |
---|
20 | implicit none |
---|
21 | integer,intent(in) :: ngrid ! number of atmospheric columns |
---|
22 | |
---|
23 | ! allocate(lati(ngrid)) |
---|
24 | ! allocate(long(ngrid)) |
---|
25 | ! allocate(area(ngrid)) |
---|
26 | allocate(sinlat(ngrid)) |
---|
27 | allocate(coslat(ngrid)) |
---|
28 | allocate(sinlon(ngrid)) |
---|
29 | allocate(coslon(ngrid)) |
---|
30 | |
---|
31 | end subroutine ini_comgeomfi_h |
---|
32 | |
---|
33 | |
---|
34 | subroutine end_comgeomfi_h |
---|
35 | |
---|
36 | implicit none |
---|
37 | |
---|
38 | if (allocated(sinlat)) deallocate(sinlat) |
---|
39 | if (allocated(coslat)) deallocate(coslat) |
---|
40 | if (allocated(sinlon)) deallocate(sinlon) |
---|
41 | if (allocated(coslon)) deallocate(coslon) |
---|
42 | |
---|
43 | end subroutine end_comgeomfi_h |
---|
44 | |
---|
45 | subroutine ini_fillgeom(ngrid,plat,plon,parea) |
---|
46 | |
---|
47 | implicit none |
---|
48 | INTEGER,INTENT(IN) :: ngrid ! number of atmospheric columns |
---|
49 | REAL,INTENT(IN) :: plat(ngrid),plon(ngrid),parea(ngrid) |
---|
50 | EXTERNAL SSUM |
---|
51 | REAL SSUM |
---|
52 | integer :: ig |
---|
53 | |
---|
54 | ! fill "comgeomfi_h" data |
---|
55 | ! call SCOPY(ngrid,plon,1,long,1) |
---|
56 | ! call SCOPY(ngrid,plat,1,lati,1) |
---|
57 | ! call SCOPY(ngrid,parea,1,area,1) |
---|
58 | ! totarea=SSUM(ngrid,area,1) |
---|
59 | DO ig=1,ngrid |
---|
60 | sinlat(ig)=sin(plat(ig)) |
---|
61 | coslat(ig)=cos(plat(ig)) |
---|
62 | sinlon(ig)=sin(plon(ig)) |
---|
63 | coslon(ig)=cos(plon(ig)) |
---|
64 | ENDDO |
---|
65 | |
---|
66 | end subroutine ini_fillgeom |
---|
67 | |
---|
68 | end module comgeomfi_h |
---|
69 | |
---|