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

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

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

revision 1.9 by jmc, Sun Feb 6 23:19:02 2005 UTC revision 1.10 by dimitri, Sun Feb 20 11:46:25 2005 UTC
# Line 30  c =============== Line 30  c ===============
30        INTEGER   n        INTEGER   n
31        INTEGER   myItM1, wrIter        INTEGER   myItM1, wrIter
32        LOGICAL   dump2fileNow        LOGICAL   dump2fileNow
33          INTEGER thisdate(4), prevdate(4)
34          _RL     freqSec
35    
36        IF ( myIter.NE.nIter0 ) THEN        IF ( myIter.NE.nIter0 ) THEN
37          myItM1 = myIter - 1          myItM1 = myIter - 1
# Line 38  C*************************************** Line 40  C***************************************
40  C***   Check to see IF its time for Diagnostic Output                ***  C***   Check to see IF its time for Diagnostic Output                ***
41  C***********************************************************************  C***********************************************************************
42    
43    #ifdef ALLOW_CAL
44            IF ( calendarDumps ) THEN
45    C-    Determine calendar dates for this and previous time step.
46               call cal_GetDate(myiter  ,mytime            ,thisdate,mythid)
47               call cal_GetDate(myiter-1,mytime-deltaTClock,prevdate,mythid)
48            ENDIF
49    #endif
50    
51          DO n = 1,nlists          DO n = 1,nlists
52            IF ( freq(n).LT.0 ) THEN            IF ( freq(n).LT.0 ) THEN
53              dump2fileNow = MOD(myItM1,-freq(n)) .EQ. INT(-freq(n)/2)              dump2fileNow = MOD(myItM1,-freq(n)) .EQ. INT(-freq(n)/2)
# Line 51  C       state-variable time-step: Line 61  C       state-variable time-step:
61              dump2fileNow = MOD(myIter,freq(n)) .EQ. 0              dump2fileNow = MOD(myIter,freq(n)) .EQ. 0
62              wrIter = myIter              wrIter = myIter
63            ENDIF            ENDIF
64    
65    #ifdef ALLOW_CAL
66              freqSec = freq(n) * deltaTClock
67              IF ( calendarDumps .AND. (
68         &     ( freqSec.GE. 2592000 .AND. freqSec.LE. 2678400 ) .OR.
69         &     ( freqSec.GE.31104000 .AND. freqSec.LE.31968000 )) THEN
70    C--   Convert approximate months (30-31 days) and years (360-372 days)
71    C     to exact calendar months and years.
72               dump2fileNow = .FALSE
73    C-    Monthly freqSec:
74               IF( freqSec.GE. 2592000 .AND. freqSec.LE. 2678400 .AND.
75         &        thisdate-prevdate.GT.50   ) dump2fileNow = .TRUE.
76    C-    Yearly  freqSec:
77               IF( freqSec.GE.31104000 .AND. freqSec.LE.31968000 .AND.
78         &        thisdate-prevdate.GT.5000 ) dump2fileNow = .TRUE.
79              ENDIF
80    #endif
81    
82            IF ( dump2fileNow ) THEN            IF ( dump2fileNow ) THEN
83              CALL DIAGNOSTICS_OUT(n,wrIter,myThid)              CALL DIAGNOSTICS_OUT(n,wrIter,myThid)
84            ENDIF            ENDIF

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

  ViewVC Help
Powered by ViewVC 1.1.22