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

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

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

revision 1.14 by jmc, Mon Jun 5 18:17:22 2006 UTC revision 1.15 by jmc, Tue Aug 21 16:09:31 2007 UTC
# Line 50  c     INTEGER newIter Line 50  c     INTEGER newIter
50        INTEGER nInterval        INTEGER nInterval
51        _RL     xInterval        _RL     xInterval
52        LOGICAL dBugFlag        LOGICAL dBugFlag
53          INTEGER dBugUnit
54  #ifdef ALLOW_FIZHI  #ifdef ALLOW_FIZHI
55        LOGICAL alarm2, alarm2next        LOGICAL alarm2, alarm2next
56        CHARACTER *9 tagname        CHARACTER *9 tagname
# Line 61  c     INTEGER newIter Line 62  c     INTEGER newIter
62  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
63    
64        dBugFlag = debugLevel.GT.debLevB .AND. myThid.EQ.1        dBugFlag = debugLevel.GT.debLevB .AND. myThid.EQ.1
65          dBugUnit = errorMessageUnit
66    
67  c     newIter = 1 + myIter  c     newIter = 1 + myIter
68        DO n = 1,nlists        DO n = 1,nlists
# Line 118  C--    Select diagnostics list that uses Line 120  C--    Select diagnostics list that uses
120    
121  C-     check future value of pdiag:  C-     check future value of pdiag:
122          IF (dBugFlag.AND.pdiag(n,1,1).NE.nInterval)          IF (dBugFlag.AND.pdiag(n,1,1).NE.nInterval)
123       &    WRITE(0,'(A,I8,3(A,I3),F17.6)') 'DIAG_SWITCH_ONOFF: at it=',       &    WRITE(dBugUnit,'(A,I8,3(A,I3),F17.6)')
124       &      myIter, ', list:', n, ' switch',       &     'DIAG_SWITCH_ONOFF: at it=', myIter, ', list:', n,
125       &      pdiag(n,1,1),' ->', nInterval, xInterval       &     ' switch', pdiag(n,1,1),' ->', nInterval, xInterval
126          IF ( nInterval.LT.0 .OR. nInterval.GE.averageCycle(n) ) THEN          IF ( nInterval.LT.0 .OR. nInterval.GE.averageCycle(n) ) THEN
127            WRITE(msgBuf,'(2A,I2,A,I4)') 'DIAGNOSTICS_SWITCH_ONOFF:',            WRITE(msgBuf,'(2A,I2,A,I4)') 'DIAGNOSTICS_SWITCH_ONOFF:',
128       &       ' error setting pdiag(n=',n,') to:', nInterval       &       ' error setting pdiag(n=',n,') to:', nInterval
# Line 172  C--     switch ON diagnostics of output- Line 174  C--     switch ON diagnostics of output-
174               IF (iSp.GT.0) THEN               IF (iSp.GT.0) THEN
175                 nd = jSdiag(m,n)                 nd = jSdiag(m,n)
176                 IF (dBugFlag.AND.qSdiag(0,0,iSp,bi,bj).NE. 0.)                 IF (dBugFlag.AND.qSdiag(0,0,iSp,bi,bj).NE. 0.)
177       &          WRITE(0,'(I8,I4,3A,1PE10.3,A,I3)') myIter,       &          WRITE(dBugUnit,'(A,I8,A,I4,3A,1PE10.3,A,I3)')
178       &           nd,' ',cdiag(nd),' :',qSdiag(0,0,iSp,bi,bj),' ->', 0       &           'DIAG_SWITCH_ONOFF: at it=', myIter, ' diag:', nd,
179         &           ' ',cdiag(nd),' :',qSdiag(0,0,iSp,bi,bj),' ->', 0
180                 qSdiag(0,0,iSp,bi,bj) = 0.                 qSdiag(0,0,iSp,bi,bj) = 0.
181               ENDIF               ENDIF
182              ENDDO              ENDDO
# Line 184  C--     switch OFF diagnostics of output Line 187  C--     switch OFF diagnostics of output
187               IF (iSp.GT.0) THEN               IF (iSp.GT.0) THEN
188                 nd = jSdiag(m,n)                 nd = jSdiag(m,n)
189                 IF (dBugFlag.AND.qSdiag(0,0,iSp,bi,bj).NE.-1.)                 IF (dBugFlag.AND.qSdiag(0,0,iSp,bi,bj).NE.-1.)
190       &          WRITE(0,'(I8,I4,3A,1PE10.3,A,I3)') myIter,       &          WRITE(dBugUnit,'(A,I8,A,I4,3A,1PE10.3,A,I3)')
191       &           nd,' ',cdiag(nd),' :',qSdiag(0,0,iSp,bi,bj),' ->',-1       &           'DIAG_SWITCH_ONOFF: at it=', myIter, ' diag:', nd,
192         &           ' ',cdiag(nd),' :',qSdiag(0,0,iSp,bi,bj),' ->', -1
193                 qSdiag(0,0,iSp,bi,bj) = -1.                 qSdiag(0,0,iSp,bi,bj) = -1.
194               ENDIF               ENDIF
195              ENDDO              ENDDO

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.22