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

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

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

revision 1.7 by jmc, Tue Jun 21 18:00:15 2011 UTC revision 1.9 by jmc, Fri Jul 1 18:26:54 2011 UTC
# Line 50  C     == Local variables == Line 50  C     == Local variables ==
50        LOGICAL diagIsPP, flagD, flagP, flagM        LOGICAL diagIsPP, flagD, flagP, flagM
51    
52        CHARACTER*10 gcode        CHARACTER*10 gcode
53        CHARACTER*18 tmpMsg        CHARACTER*12 tmpMsg
54        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
55    
56  C **********************************************************************  C **********************************************************************
# Line 102  C---  Set pointer if not already set, ot Line 102  C---  Set pointer if not already set, ot
102        ENDIF        ENDIF
103        gcode   = gdiag(nn)(1:10)        gcode   = gdiag(nn)(1:10)
104        IF ( flagD ) THEN        IF ( flagD ) THEN
         idiag(mId,listId) = ndiagmx + 1  
105          IF ( diagIsPP ) THEN          IF ( diagIsPP ) THEN
106    C-      Add this diag with negative idiag pointer (since those 2 diags
107    C        share the same pointer and "nn" will get the positive pointer).
108              idiag(mId,listId) = -(ndiagmx+1)
109  C-      Also add "nn" to the Active list  C-      Also add "nn" to the Active list
110            k = nActive(listId) + 1            k = nActive(listId) + 1
111            IF ( k.LE.numperList ) THEN            IF ( k.LE.numperList ) THEN
# Line 112  C-      Also add "nn" to the Active list Line 114  C-      Also add "nn" to the Active list
114              flds (k,listId) = cdiag(nn)              flds (k,listId) = cdiag(nn)
115            ENDIF            ENDIF
116            nActive(listId) = k            nActive(listId) = k
117            ELSE
118              idiag(mId,listId) = ndiagmx + 1
119          ENDIF          ENDIF
120          ndiagmx = ndiagmx + kdiag(nn)*averageCycle(listId)          ndiagmx = ndiagmx + kdiag(nn)*averageCycle(listId)
121          IF ( ndiagmx.GT.numDiags ) THEN          IF ( ndiagmx.GT.numDiags ) THEN
# Line 125  C-      Also add "nn" to the Active list Line 129  C-      Also add "nn" to the Active list
129           CALL PRINT_MESSAGE(msgBuf, stdUnit, SQUEEZE_RIGHT, myThid)           CALL PRINT_MESSAGE(msgBuf, stdUnit, SQUEEZE_RIGHT, myThid)
130          ENDIF          ENDIF
131        ELSE        ELSE
132          WRITE(msgBuf,'(A,I6,1X,2A)') '- NOTE - SETDIAG: Diagnostic #',          tmpMsg = ' Diagnostic '
133       &        nn, cdiag(nn), ' is already set'          WRITE(msgBuf,'(3A,I6,1X,2A)') '- NOTE - SETDIAG: ',tmpMsg,
134         &           ' #', nn, cdiag(nn), ' is already set'
135          CALL PRINT_MESSAGE(msgBuf, stdUnit, SQUEEZE_RIGHT, myThid)          CALL PRINT_MESSAGE(msgBuf, stdUnit, SQUEEZE_RIGHT, myThid)
136        ENDIF        ENDIF
137    
# Line 136  C---  Check for Counter Diagnostic Line 141  C---  Check for Counter Diagnostic
141        mate = 0        mate = 0
142    
143  C-    if Post-Processed diag, activate 2nd components of vector field  C-    if Post-Processed diag, activate 2nd components of vector field
144        tmpMsg = ' Vector-mate Diag.'        tmpMsg = ' Vector-mate'
145        IF ( diagIsPP .AND. gcode(5:5).NE.'P' .AND.        IF ( diagIsPP .AND. gcode(5:5).NE.'P' .AND.
146       &    (gcode(1:1).EQ.'U' .OR. gcode(1:1).EQ.'V') ) mate = hdiag(nn)       &    (gcode(1:1).EQ.'U' .OR. gcode(1:1).EQ.'V') ) mate = hdiag(nn)
147  C-    activate mate if this is a Counter Diagnostic  C-    activate mate if this is a Counter Diagnostic
148        IF ( gcode(5:5).EQ.'C') THEN        IF ( gcode(5:5).EQ.'C') THEN
149          mate = hdiag(nn)          mate = hdiag(nn)
150          tmpMsg = 'Counter Diagnostic'          tmpMsg = 'Counter-mate'
151        ENDIF        ENDIF
152    
153        IF ( mate.GT.0 ) THEN        IF ( mate.GT.0 ) THEN

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.22