/[MITgcm]/MITgcm/pkg/diagnostics/diagnostics_utils.F
ViewVC logotype

Diff of /MITgcm/pkg/diagnostics/diagnostics_utils.F

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

revision 1.27 by jmc, Tue Nov 18 21:41:06 2008 UTC revision 1.28 by jmc, Sun Jan 25 17:00:20 2009 UTC
# Line 150  C     !LOCAL VARIABLES: Line 150  C     !LOCAL VARIABLES:
150  C ===============  C ===============
151        INTEGER m, n        INTEGER m, n
152        INTEGER bi, bj        INTEGER bi, bj
153        INTEGER ipt        INTEGER ipt, ndId
154  c     CHARACTER*(MAX_LEN_MBUF) msgBuf  c     CHARACTER*(MAX_LEN_MBUF) msgBuf
155    
156          IF ( biArg.EQ.0 .AND. bjArg.EQ.0 ) THEN
157            bi = myBxLo(myThid)
158            bj = myByLo(myThid)
159          ELSE
160            bi = MIN(biArg,nSx)
161            bj = MIN(bjArg,nSy)
162          ENDIF
163    
164  C--   Run through list of active diagnostics to find which counter  C--   Run through list of active diagnostics to find which counter
165  C     to increment (needs to be a valid & active diagnostic-counter)  C     to increment (needs to be a valid & active diagnostic-counter)
166        DO n=1,nlists        DO n=1,nlists
167         DO m=1,nActive(n)         DO m=1,nActive(n)
168          IF ( chardiag.EQ.flds(m,n) .AND. idiag(m,n).GT.0 ) THEN          IF ( chardiag.EQ.flds(m,n) .AND. idiag(m,n).GT.0 ) THEN
169           ipt = idiag(m,n)           ipt = idiag(m,n)
170           IF (ndiag(ipt,1,1).GE.0) THEN           IF (ndiag(ipt,bi,bj).GE.0) THEN
171              ndId = jdiag(m,n)
172              ipt = ipt + pdiag(n,bi,bj)*kdiag(ndId)
173  C-    Increment the counter for the diagnostic  C-    Increment the counter for the diagnostic
174            IF ( biArg.EQ.0 .AND. bjArg.EQ.0 ) THEN            IF ( biArg.EQ.0 .AND. bjArg.EQ.0 ) THEN
175             DO bj=myByLo(myThid), myByHi(myThid)             DO bj=myByLo(myThid), myByHi(myThid)
# Line 168  C-    Increment the counter for the diag Line 178  C-    Increment the counter for the diag
178              ENDDO              ENDDO
179             ENDDO             ENDDO
180            ELSE            ELSE
              bi = MIN(biArg,nSx)  
              bj = MIN(bjArg,nSy)  
181               ndiag(ipt,bi,bj) = ndiag(ipt,bi,bj) + 1               ndiag(ipt,bi,bj) = ndiag(ipt,bi,bj) + 1
182            ENDIF            ENDIF
183  C-    Increment is done  C-    Increment is done

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

  ViewVC Help
Powered by ViewVC 1.1.22