source: dynamico_lmdz/simple_physics/phyparam/physics/comgeomfi.F90

Last change on this file was 4229, checked in by dubos, 5 years ago

simple_physics : beautify code

File size: 887 bytes
Line 
1MODULE comgeomfi
2  IMPLICIT NONE
3  SAVE
4
5  REAL, ALLOCATABLE :: long(:), lati(:), sinlon(:), coslon(:), sinlat(:), coslat(:)
6  INTEGER :: ngridmax, nlayermx, nsoilmx
7  !$OMP THREADPRIVATE(long,lati,sinlon,coslon,sinlat,coslat,totarea)
8  !$OMP THREADPRIVATE(ngridmax,nlayermx,nsoilmx)
9
10CONTAINS
11
12  SUBROUTINE init_comgeomfi(klon, klev, longitude, latitude)
13    INTEGER, INTENT(IN) :: klon, klev
14    REAL, INTENT(IN) :: longitude(klon), latitude(klon) ! in radians
15    ngridmax=klon
16    nlayermx=klev
17    nsoilmx=10
18    allocate(long(klon))
19    allocate(lati(klon))
20    allocate(sinlon(klon))
21    allocate(coslon(klon))
22    allocate(sinlat(klon))
23    allocate(coslat(klon))
24    long(:) = longitude(:)
25    lati(:) = latitude(:)
26    sinlat(:)=sin(lati(:))
27    coslat(:)=cos(lati(:))
28    sinlon(:)=sin(long(:))
29    coslon(:)=cos(long(:))
30  END SUBROUTINE init_comgeomfi
31
32END MODULE comgeomfi
Note: See TracBrowser for help on using the repository browser.