/[MITgcm]/MITgcm/pkg/timeave/timeave_normaliz.F
ViewVC logotype

Contents of /MITgcm/pkg/timeave/timeave_normaliz.F

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


Revision 1.5 - (show annotations) (download)
Sun Jan 3 20:46:12 2010 UTC (14 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62c, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint63g, checkpoint64, checkpoint63, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint62b, checkpoint64q, checkpoint64p, checkpoint64r, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint62d
Changes since 1.4: +35 -28 lines
- change size of cumulated-time array (was previously always Nr),
  now assumed to be equal to number of levels of averaged field.

1 C $Header: /u/gcmpack/MITgcm/pkg/timeave/timeave_normaliz.F,v 1.4 2009/09/16 15:44:04 jmc Exp $
2 C $Name: $
3 #include "CPP_EEOPTIONS.h"
4
5 CBOP
6 C !ROUTINE: TIMEAVE_NORMALIZ(
7 C !INTERFACE:
8 SUBROUTINE TIMEAVE_NORMALIZ(
9 U fldtave,
10 I cumulTime, kSize, bi, bj, myThid )
11
12 C !DESCRIPTION: \bv
13 C *==========================================================*
14 C | SUBROUTINE TIMEAVE_NORMALIZ
15 C | o Get average of field : Normalize by cumulated time.
16 C *==========================================================*
17 C \ev
18
19 C !USES:
20 IMPLICIT NONE
21
22 C === Global variables ===
23 #include "SIZE.h"
24 #include "EEPARAMS.h"
25
26 C !INPUT/OUTPUT PARAMETERS:
27 C fldtave :: time averaged Field
28 C cumulTime :: cumulated time for average
29 C kSize :: 3rd dimension of both averaged field AND cumulated time arrays
30 C bi, bj :: tile indices
31 C myThid :: my Thread Id number
32 INTEGER kSize
33 _RL fldtave(1-OLx:sNx+OLx,1-OLy:sNy+OLy,kSize,nSx,nSy)
34 _RL cumulTime(kSize,nSx,nSy)
35 INTEGER bi, bj
36 INTEGER myThid
37
38 C !LOCAL VARIABLES:
39 C i, j, k :: Loop counters
40 INTEGER i, j, k
41 CEOP
42
43 C DO bj = myByLo(myThid), myByHi(myThid)
44 C DO bi = myBxLo(myThid), myBxHi(myThid)
45 DO k=1,kSize
46 IF ( cumulTime(k,bi,bj) .NE. 0. ) THEN
47 DO j=1,sNy
48 DO i=1,sNx
49 fldtave(i,j,k,bi,bj) = fldtave(i,j,k,bi,bj)
50 & / cumulTime(k,bi,bj)
51 ENDDO
52 ENDDO
53 ENDIF
54 ENDDO
55 C ENDDO
56 C ENDDO
57
58 RETURN
59 END

  ViewVC Help
Powered by ViewVC 1.1.22