source: trunk/LMDZ.MARS/libf/phymars/comgeomfi_h.F90 @ 2800

Last change on this file since 2800 was 2578, checked in by romain.vande, 3 years ago

First stage of implementing Open_MP in the physic.
So far it can initialyse physic and run with all routines at .FALSE.

File size: 1.4 KB
Line 
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!$OMP THREADPRIVATE(sinlon,coslon,sinlat,coslat)
12
13       contains
14
15         subroutine ini_comgeomfi_h(ngrid)
16
17         implicit none
18         integer,intent(in) :: ngrid ! number of atmospheric columns
19
20         allocate(sinlat(ngrid))
21         allocate(coslat(ngrid))
22         allocate(sinlon(ngrid))
23         allocate(coslon(ngrid))
24
25         end subroutine ini_comgeomfi_h
26
27
28         subroutine end_comgeomfi_h
29
30         implicit none
31
32         if (allocated(sinlat)) deallocate(sinlat)
33         if (allocated(coslat)) deallocate(coslat)
34         if (allocated(sinlon)) deallocate(sinlon)
35         if (allocated(coslon)) deallocate(coslon)
36
37         end subroutine end_comgeomfi_h
38
39         subroutine ini_fillgeom(ngrid,plat,plon,parea)
40
41         implicit none
42         INTEGER,INTENT(IN) :: ngrid ! number of atmospheric columns
43         REAL,INTENT(IN) :: plat(ngrid),plon(ngrid),parea(ngrid)
44         integer :: ig
45
46         DO ig=1,ngrid
47            sinlat(ig)=sin(plat(ig))
48            coslat(ig)=cos(plat(ig))
49            sinlon(ig)=sin(plon(ig))
50            coslon(ig)=cos(plon(ig))
51         ENDDO
52
53         end subroutine ini_fillgeom
54
55       end module comgeomfi_h
56
Note: See TracBrowser for help on using the repository browser.