1 |
C $Header: /u/gcmpack/MITgcm/pkg/timeave/timeave_norma_1k.F,v 1.1 2001/03/06 15:47:31 jmc Exp $ |
2 |
C $Name: $ |
3 |
#include "CPP_OPTIONS.h" |
4 |
|
5 |
CStartofinterface |
6 |
SUBROUTINE TIMEAVE_NORMA_1K( fldtave, timeave, |
7 |
& bi, bj, K, myThid ) |
8 |
C /==========================================================\ |
9 |
C | SUBROUTINE TIMEAVE_NORMA_1K | |
10 |
C | o apply to 1 level of a 3D array : Normalize by | |
11 |
C | cumulated time | |
12 |
C | (replace "timeaver_final_XYZ" and use the same argments) | |
13 |
C \==========================================================/ |
14 |
IMPLICIT NONE |
15 |
|
16 |
C == Global variables === |
17 |
#include "SIZE.h" |
18 |
#include "EEPARAMS.h" |
19 |
|
20 |
C == Routine arguments == |
21 |
C myThid - Thread number for this instance of the routine. |
22 |
C timeave - time averaged |
23 |
C fldtave - time averaged Field |
24 |
INTEGER bi, bj, K, myThid |
25 |
_RL fldtave(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
26 |
_RL timeave(Nr,nSx,nSy) |
27 |
|
28 |
CEndofinterface |
29 |
|
30 |
C == Local variables == |
31 |
C i,j,k,bi,bj - Loop counters |
32 |
INTEGER i, j |
33 |
|
34 |
C DO bj = myByLo(myThid), myByHi(myThid) |
35 |
C DO bi = myBxLo(myThid), myBxHi(myThid) |
36 |
C DO k=1,Nr |
37 |
DO j=1,sNy |
38 |
DO i=1,sNx |
39 |
IF ( timeave(k,bi,bj) .NE. 0. ) THEN |
40 |
fldtave(i,j,k,bi,bj) = fldtave(i,j,k,bi,bj) / |
41 |
& timeave(k,bi,bj) |
42 |
ENDIF |
43 |
ENDDO |
44 |
ENDDO |
45 |
C ENDDO |
46 |
C ENDDO |
47 |
C ENDDO |
48 |
|
49 |
RETURN |
50 |
END |