1 | |
---|
2 | module comgeomfi_h |
---|
3 | |
---|
4 | implicit none |
---|
5 | |
---|
6 | REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sinlon |
---|
7 | REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: coslon |
---|
8 | REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sinlat |
---|
9 | REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: coslat |
---|
10 | |
---|
11 | contains |
---|
12 | |
---|
13 | subroutine ini_comgeomfi_h(ngrid) |
---|
14 | |
---|
15 | implicit none |
---|
16 | integer,intent(in) :: ngrid ! number of atmospheric columns |
---|
17 | |
---|
18 | allocate(sinlat(ngrid)) |
---|
19 | allocate(coslat(ngrid)) |
---|
20 | allocate(sinlon(ngrid)) |
---|
21 | allocate(coslon(ngrid)) |
---|
22 | |
---|
23 | end subroutine ini_comgeomfi_h |
---|
24 | |
---|
25 | |
---|
26 | subroutine end_comgeomfi_h |
---|
27 | |
---|
28 | implicit none |
---|
29 | |
---|
30 | if (allocated(sinlat)) deallocate(sinlat) |
---|
31 | if (allocated(coslat)) deallocate(coslat) |
---|
32 | if (allocated(sinlon)) deallocate(sinlon) |
---|
33 | if (allocated(coslon)) deallocate(coslon) |
---|
34 | |
---|
35 | end subroutine end_comgeomfi_h |
---|
36 | |
---|
37 | subroutine ini_fillgeom(ngrid,plat,plon,parea) |
---|
38 | |
---|
39 | implicit none |
---|
40 | INTEGER,INTENT(IN) :: ngrid ! number of atmospheric columns |
---|
41 | REAL,INTENT(IN) :: plat(ngrid),plon(ngrid),parea(ngrid) |
---|
42 | integer :: ig |
---|
43 | |
---|
44 | DO ig=1,ngrid |
---|
45 | sinlat(ig)=sin(plat(ig)) |
---|
46 | coslat(ig)=cos(plat(ig)) |
---|
47 | sinlon(ig)=sin(plon(ig)) |
---|
48 | coslon(ig)=cos(plon(ig)) |
---|
49 | ENDDO |
---|
50 | |
---|
51 | end subroutine ini_fillgeom |
---|
52 | |
---|
53 | end module comgeomfi_h |
---|
54 | |
---|