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
RevLine 
[1047]1
2       module comgeomfi_h
3
4       implicit none
5
[1224]6       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sinlon
7       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: coslon
8       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sinlat
9       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: coslat
[1047]10
[2578]11!$OMP THREADPRIVATE(sinlon,coslon,sinlat,coslat)
12
[1224]13       contains
14
15         subroutine ini_comgeomfi_h(ngrid)
16
17         implicit none
18         integer,intent(in) :: ngrid ! number of atmospheric columns
19
[1233]20         allocate(sinlat(ngrid))
21         allocate(coslat(ngrid))
22         allocate(sinlon(ngrid))
23         allocate(coslon(ngrid))
[1224]24
25         end subroutine ini_comgeomfi_h
26
[1770]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
[1233]39         subroutine ini_fillgeom(ngrid,plat,plon,parea)
[1224]40
41         implicit none
[1233]42         INTEGER,INTENT(IN) :: ngrid ! number of atmospheric columns
43         REAL,INTENT(IN) :: plat(ngrid),plon(ngrid),parea(ngrid)
[1224]44         integer :: ig
45
46         DO ig=1,ngrid
[1541]47            sinlat(ig)=sin(plat(ig))
48            coslat(ig)=cos(plat(ig))
49            sinlon(ig)=sin(plon(ig))
50            coslon(ig)=cos(plon(ig))
[1224]51         ENDDO
52
[1233]53         end subroutine ini_fillgeom
54
[1047]55       end module comgeomfi_h
56
Note: See TracBrowser for help on using the repository browser.