source: trunk/LMDZ.MARS/libf/phymars/ineofdump.F @ 308

Last change on this file since 308 was 38, checked in by emillour, 14 years ago

Ajout du modè Martien (mon LMDZ.MARS.BETA, du 28/01/2011) dans le rértoire mars, pour pouvoir suivre plus facilement les modifs.
EM

File size: 1.7 KB
Line 
1      subroutine ineofdump
2
3c._.  subroutine ineofdump(long, lati)
4
5      implicit none
6c
7c     Initialise dumping of profiles for EOF calculations
8c
9#include "dimensions.h"
10#include "dimphys.h"
11#include "comvert.h"
12#include "comcstfi.h"
13#include "comgeomfi.h"
14c
15c._.#include "param2"
16c._.#include "bats"
17c._.#include "outcon"
18c._.#include "phycmn"
19c
20#include "eofdump.h"
21c
22c._.      real*4 long(cols,rows)
23c._.      real*4 lati(cols,rows)
24      integer ig,i,j,l   
25      logical firstcall
26      save firstcall
27
28      data firstcall/.true./
29
30      if (firstcall) then
31         firstcall=.false.
32      endif
33
34c
35c     Set frequency for dumping at once per day
36c
37      ieofs=nint(daysec/dtphys)
38      if (abs(float(ieofs)-daysec/dtphys).gt.1.e-8*daysec)
39     :   stop'In ineofdump:  1 day .ne. n physics timesteps'
40c
41c     Header
42c
43      open(uehead,file='profiles.hdr',form='formatted')
44c._.  write(uehead,*) rntape, kstart, ktotal, itspd, kphysic, refday
45      write(uehead,*) 0.E+0,0,0,ieofs,1,0
46c._.  write(uehead,*) cols, rows, npgrid, nl
47      write(uehead,*) iim,npgrid/iim,npgrid,nlayermx
48
49c._.  do i=1,cols,eofskip
50c._.    do j=1+eofskip/2,rows,eofskip
51c._.      write(uehead,*) long(i,j)*180./pi, lati(i,j)*180./pi
52c._.    enddo
53c._.  enddo
54      do i=1,iim,eofskip
55        do j=1+eofskip/2,jjm+1,eofskip   
56          ig = 1+ (j-2)*iim +i
57          if(j.eq.1) stop 'Problem in ineofdump.F'
58          if(j.eq.jjm+1) stop 'Problem in ineofdump.F'
59          write(uehead,*) long(ig)*180./pi, lati(ig)*180./pi
60c         write(*,*) 'eof grid j=',j,' lat= ', lati(ig)*180./pi
61        enddo
62      enddo
63
64      write(uehead,*) aps
65      write(uehead,*) bps
66      close(uehead)
67c
68c     Main profile file
69c
70      open(uedata,file='profiles.dat',form='unformatted')
71      end
Note: See TracBrowser for help on using the repository browser.