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

Annotation of /MITgcm/pkg/timeave/timeave_norma_2v.F

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


Revision 1.1 - (hide annotations) (download)
Sun Nov 23 01:23:18 2003 UTC (20 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: branch-netcdf, checkpoint52b_post, checkpoint52c_post
low level S/R used to compute the area-weighted time average.

1 jmc 1.1 C $Header: $
2     C $Name: $
3     #include "TIMEAVE_OPTIONS.h"
4    
5     CStartofinterface
6     SUBROUTINE TIMEAVE_NORMA_2V(
7     U fldtave,
8     I cumulWeight, Ksize,
9     I bi, bj, myThid )
10     C /==========================================================\
11     C | SUBROUTINE TIMEAVE_NORMA_2V |
12     C | o Get average of field : Normalize by cumulated weight |
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_cumul - cumulated time for average
23     C fldtave - time averaged Field
24     C Ksize - 3rd dimension of local array (fldtave)
25     INTEGER bi, bj, Ksize, myThid
26     _RL fldtave(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Ksize,nSx,nSy)
27     _RL cumulWeight(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Ksize,nSx,nSy)
28    
29     CEndofinterface
30    
31     C == Local variables ==
32     C i,j,k,bi,bj - Loop counters
33     INTEGER i, j, k
34    
35     C DO bj = myByLo(myThid), myByHi(myThid)
36     C DO bi = myBxLo(myThid), myBxHi(myThid)
37     DO k=1,Ksize
38     DO j=1,sNy
39     DO i=1,sNx
40     IF ( cumulWeight(i,j,k,bi,bj) .GT. 0. _d 0 ) THEN
41     fldtave(i,j,k,bi,bj) = fldtave(i,j,k,bi,bj)
42     & / cumulWeight(i,j,k,bi,bj)
43     ENDIF
44     ENDDO
45     ENDDO
46     ENDDO
47     C ENDDO
48     C ENDDO
49    
50     RETURN
51     END

  ViewVC Help
Powered by ViewVC 1.1.22