/[MITgcm]/MITgcm/diags/src/timeaver_final_xyz.F
ViewVC logotype

Contents of /MITgcm/diags/src/timeaver_final_xyz.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.6 - (show annotations) (download)
Wed Jun 21 19:28:02 2000 UTC (24 years ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint30, checkpoint29, checkpoint31
Changes since 1.5: +5 -3 lines
Add "if" to avoid potential divide by zero.

1 #include "CPP_EEOPTIONS.h"
2
3 CStartofinterface
4 SUBROUTINE TIMEAVER_FINAL_XYZ( fldtave, timeave,
5 & bi, bj, K, myThid )
6 C /==========================================================\
7 C | SUBROUTINE TIMEAVER_FINAL_XY |
8 C | o Get final average of field |
9 C \==========================================================/
10 IMPLICIT NONE
11
12 C == Global variables ===
13 #include "SIZE.h"
14 #include "EEPARAMS.h"
15
16 C == Routine arguments ==
17 C myThid - Thread number for this instance of the routine.
18 C timeave - time averaged
19 C fldtave - time averaged Field
20 INTEGER bi, bj, K, myThid
21 _RL fldtave(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
22 _RL timeave(Nr,nSx,nSy)
23
24 CEndofinterface
25
26 C == Local variables ==
27 C i,j,k,bi,bj - Loop counters
28 INTEGER i, j
29
30 C DO bj = myByLo(myThid), myByHi(myThid)
31 C DO bi = myBxLo(myThid), myBxHi(myThid)
32 C DO k=1,Nr
33 IF (timeave(k,bi,bj).NE.0.) THEN
34 DO j=1,sNy
35 DO i=1,sNx
36 fldtave(i,j,k,bi,bj) = fldtave(i,j,k,bi,bj) /
37 & timeave(k,bi,bj)
38 ENDDO
39 ENDDO
40 ENDIF
41 C ENDDO
42 C ENDDO
43 C ENDDO
44
45 RETURN
46 END

  ViewVC Help
Powered by ViewVC 1.1.22