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