/[MITgcm]/MITgcm/model/src/packages_write_pickup.F
ViewVC logotype

Diff of /MITgcm/model/src/packages_write_pickup.F

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

revision 1.11 by edhill, Sun Feb 20 04:31:54 2005 UTC revision 1.15 by edhill, Thu Jun 9 16:38:24 2005 UTC
# Line 54  C     oldPrc :: Temp. for holding I/O pr Line 54  C     oldPrc :: Temp. for holding I/O pr
54  C     fn     :: Temp. for building file name string.  C     fn     :: Temp. for building file name string.
55  C     lgf    :: Flag to indicate whether to use global file mode.  C     lgf    :: Flag to indicate whether to use global file mode.
56        LOGICAL permCheckPoint, tempCheckPoint          LOGICAL permCheckPoint, tempCheckPoint  
57          INTEGER thisdate(4), prevdate(4)
58  CEOP  CEOP
59    
60        permCheckPoint = .FALSE.        permCheckPoint = .FALSE.
61        tempCheckPoint = .FALSE.        tempCheckPoint = .FALSE.
62        permCheckPoint=        permCheckPoint=
63       &     DIFFERENT_MULTIPLE(pChkptFreq,myTime,myTime-deltaTClock)       &     DIFFERENT_MULTIPLE(pChkptFreq,myTime,deltaTClock)
64        tempCheckPoint=        tempCheckPoint=
65       &     DIFFERENT_MULTIPLE( ChkptFreq,myTime,myTime-deltaTClock)       &     DIFFERENT_MULTIPLE( ChkptFreq,myTime,deltaTClock)
66          
67    #ifdef ALLOW_CAL
68          IF ( calendarDumps ) THEN
69    C--   Convert approximate months (30-31 days) and years (360-372 days)
70    C     to exact calendar months and years.
71    C-    First determine calendar dates for this and previous time step.
72             call cal_GetDate( myiter  ,mytime            ,thisdate,mythid )
73             call cal_GetDate( myiter-1,mytime-deltaTClock,prevdate,mythid )
74    C-    Monthly pChkptFreq:
75             IF( pChkptFreq.GE. 2592000 .AND. pChkptFreq.LE. 2678400 ) THEN
76                permCheckPoint = .FALSE.
77                IF((thisdate(1)-prevdate(1)) .GT. 50  )permCheckPoint=.TRUE.
78             ENDIF
79    C-    Yearly  pChkptFreq:
80             IF( pChkptFreq.GE.31104000 .AND. pChkptFreq.LE.31968000 ) THEN
81                permCheckPoint = .FALSE.
82                IF((thisdate(1)-prevdate(1)) .GT. 5000)permCheckPoint=.TRUE.
83             ENDIF
84    C-    Monthly  ChkptFreq:
85             IF(  ChkptFreq.GE. 2592000 .AND.  ChkptFreq.LE. 2678400 ) THEN
86                tempCheckPoint = .FALSE.
87                IF((thisdate(1)-prevdate(1)) .GT. 50  )tempCheckPoint=.TRUE.
88             ENDIF
89    C-    Yearly   ChkptFreq:
90             IF(  ChkptFreq.GE.31104000 .AND.  ChkptFreq.LE.31968000 ) THEN
91                tempCheckPoint = .FALSE.
92                IF((thisdate(1)-prevdate(1)) .GT. 5000)tempCheckPoint=.TRUE.
93             ENDIF
94          ENDIF
95    #endif
96    
97        IF (        IF (
98       &     ( .NOT.modelEnd .AND. (permCheckPoint.OR.tempCheckPoint) )       &     ( .NOT.modelEnd .AND. (permCheckPoint.OR.tempCheckPoint) )
99       &     .OR.       &     .OR.
# Line 211  C     Write pickup file for diagnostics Line 242  C     Write pickup file for diagnostics
242        ENDIF        ENDIF
243  #endif  /* ALLOW_GGL90 */  #endif  /* ALLOW_GGL90 */
244    
245         _END_MASTER( myThid )        _END_MASTER( myThid )
246         _BARRIER        _BARRIER
247    
248  #ifdef ALLOW_PTRACERS  #ifdef ALLOW_PTRACERS
249  C      Write restart file for passive tracers  C     Write restart file for passive tracers
250         IF (usePTRACERS) THEN        IF (usePTRACERS) THEN
251           CALL PTRACERS_WRITE_CHECKPOINT(fn,myIter,myTime,myThid)          CALL PTRACERS_WRITE_CHECKPOINT(fn,myIter,myTime,myThid)
252         ENDIF        ENDIF
253  #endif /* ALLOW_PTRACERS */  #endif /* ALLOW_PTRACERS */
254    
255    #ifdef ALLOW_OFFLINE
256    C     This is quick fix for A/B checkpoints since the main model
257    C     checkpoint routine will not be called in OFFLINE mode and will
258    C     thus not have the chance to set the alternating A/B suffix
259          IF ( .NOT. permCheckPoint ) THEN
260            nCheckLev = MOD(nCheckLev, maxNoChkptLev)+1
261          ENDIF
262    #endif /* ALLOW_OFFLINE */
263    
264        RETURN        RETURN
265        END        END
266    

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

  ViewVC Help
Powered by ViewVC 1.1.22