1 | subroutine eofdump(ngrid,nlayer,u,v,t,rho,ps) |
---|
2 | |
---|
3 | cccc subroutine eofdump(cols,rows,nlayer,u,v,t,p) |
---|
4 | |
---|
5 | implicit none |
---|
6 | c |
---|
7 | c Dumps profiles for calculation of variability EOFs |
---|
8 | c Modified to include rho, FF 09/2004 |
---|
9 | c |
---|
10 | #include "dimensions.h" |
---|
11 | #include "dimphys.h" |
---|
12 | #include "eofdump.h" |
---|
13 | c |
---|
14 | c._. integer cols |
---|
15 | c._. integer rows |
---|
16 | |
---|
17 | integer ngrid |
---|
18 | integer nlayer |
---|
19 | real*4 u(ngrid,nlayer) |
---|
20 | real*4 v(ngrid,nlayer) |
---|
21 | real*4 t(ngrid,nlayer) |
---|
22 | real*4 rho(ngrid,nlayer) |
---|
23 | real*4 ps(ngrid) |
---|
24 | integer count |
---|
25 | data count /0/ |
---|
26 | save count |
---|
27 | integer i,j,l, ig |
---|
28 | |
---|
29 | LOGICAL firstcall |
---|
30 | SAVE firstcall |
---|
31 | DATA firstcall/.true./ |
---|
32 | |
---|
33 | c------------------------------------------------------- |
---|
34 | c Initialization at first call: |
---|
35 | c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
36 | IF (firstcall) THEN |
---|
37 | write(*,*) 'CALL ineofdump' |
---|
38 | CALL ineofdump |
---|
39 | firstcall=.false. |
---|
40 | END IF |
---|
41 | |
---|
42 | c------------------------------------------------------- |
---|
43 | c Dumps every ieofs physics timesteps |
---|
44 | c |
---|
45 | if ((ieofs.gt.0).and.(mod(count,ieofs).eq.0)) then |
---|
46 | |
---|
47 | do i=1,iim,eofskip |
---|
48 | do j=1+eofskip/2,jjm+1,eofskip |
---|
49 | ig = 1+ (j-2)*iim +i |
---|
50 | write(uedata) (u(ig,l),l=1,nlayer) |
---|
51 | write(uedata) (v(ig,l),l=1,nlayer) |
---|
52 | write(uedata) (t(ig,l),l=1,nlayer) |
---|
53 | write(uedata) (rho(ig,l),l=1,nlayer) |
---|
54 | write(uedata) ps(ig) |
---|
55 | enddo |
---|
56 | enddo |
---|
57 | endif |
---|
58 | count=count+1 |
---|
59 | return |
---|
60 | end |
---|