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

Last change on this file since 1635 was 1541, checked in by emillour, 9 years ago

Mars GCM:

  • fix for 1D in writediagfi to enable writing at "ecritphy" rate.
  • removed iniprint.h from phymars/dyn1d since it is in "misc"
  • Some code cleanup in anticipation of future updates:
    • changed variable names in comgeomphy.F90: give them more explicit names: rlond => longitude , rlatd => latitude, airephy => cell_area, cuphy => dx , cvphy => dy
    • removed long(), lati() and area() from comgeomfi_h.F90, use longitude(), latitude() and cell_are() from comgeomphy.F90 instead

EM

File size: 1.7 KB
Line 
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         subroutine ini_fillgeom(ngrid,plat,plon,parea)
34
35         implicit none
36         INTEGER,INTENT(IN) :: ngrid ! number of atmospheric columns
37         REAL,INTENT(IN) :: plat(ngrid),plon(ngrid),parea(ngrid)
38         EXTERNAL SSUM
39         REAL SSUM
40         integer :: ig
41
42         ! fill "comgeomfi_h" data
43!         call SCOPY(ngrid,plon,1,long,1)
44!         call SCOPY(ngrid,plat,1,lati,1)
45!         call SCOPY(ngrid,parea,1,area,1)
46!         totarea=SSUM(ngrid,area,1)
47         DO ig=1,ngrid
48            sinlat(ig)=sin(plat(ig))
49            coslat(ig)=cos(plat(ig))
50            sinlon(ig)=sin(plon(ig))
51            coslon(ig)=cos(plon(ig))
52         ENDDO
53
54         end subroutine ini_fillgeom
55
56       end module comgeomfi_h
57
Note: See TracBrowser for help on using the repository browser.