1 | subroutine ineofdump |
---|
2 | |
---|
3 | c._. subroutine ineofdump(long, lati) |
---|
4 | |
---|
5 | implicit none |
---|
6 | c |
---|
7 | c Initialise dumping of profiles for EOF calculations |
---|
8 | c |
---|
9 | #include "dimensions.h" |
---|
10 | #include "dimphys.h" |
---|
11 | #include "comvert.h" |
---|
12 | #include "comcstfi.h" |
---|
13 | #include "comgeomfi.h" |
---|
14 | c |
---|
15 | c._.#include "param2" |
---|
16 | c._.#include "bats" |
---|
17 | c._.#include "outcon" |
---|
18 | c._.#include "phycmn" |
---|
19 | c |
---|
20 | #include "eofdump.h" |
---|
21 | c |
---|
22 | c._. real*4 long(cols,rows) |
---|
23 | c._. 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 | |
---|
34 | c |
---|
35 | c Set frequency for dumping at once per day |
---|
36 | c |
---|
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' |
---|
40 | c |
---|
41 | c Header |
---|
42 | c |
---|
43 | open(uehead,file='profiles.hdr',form='formatted') |
---|
44 | c._. write(uehead,*) rntape, kstart, ktotal, itspd, kphysic, refday |
---|
45 | write(uehead,*) 0.E+0,0,0,ieofs,1,0 |
---|
46 | c._. write(uehead,*) cols, rows, npgrid, nl |
---|
47 | write(uehead,*) iim,npgrid/iim,npgrid,nlayermx |
---|
48 | |
---|
49 | c._. do i=1,cols,eofskip |
---|
50 | c._. do j=1+eofskip/2,rows,eofskip |
---|
51 | c._. write(uehead,*) long(i,j)*180./pi, lati(i,j)*180./pi |
---|
52 | c._. enddo |
---|
53 | c._. 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 |
---|
60 | c 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) |
---|
67 | c |
---|
68 | c Main profile file |
---|
69 | c |
---|
70 | open(uedata,file='profiles.dat',form='unformatted') |
---|
71 | end |
---|