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

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

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

revision 1.14 by cnh, Wed Sep 26 18:09:14 2001 UTC revision 1.15 by adcroft, Mon Mar 4 17:26:40 2002 UTC
# Line 154  c        CALL MDSREADFIELD(fn,prec,'RL', Line 154  c        CALL MDSREADFIELD(fn,prec,'RL',
154          ENDIF          ENDIF
155  #endif  #endif
156    
157    C Create suffix to pass on to package pickup routines
158            WRITE(fn,'(I10.10)') myIter
159    
160  C SPK 4/9/01: Open boundary checkpointing  C SPK 4/9/01: Open boundary checkpointing
161  #ifdef  ALLOW_OBCS  #ifdef  ALLOW_OBCS
162          IF (useOBCS) THEN          IF (useOBCS) THEN
# Line 169  C       Reset default IO precision Line 172  C       Reset default IO precision
172         _END_MASTER( myThid )         _END_MASTER( myThid )
173         _BARRIER         _BARRIER
174    
175    #ifdef ALLOW_PTRACERS
176    C Write restart file for passive tracers
177           IF (usePTRACERS) THEN
178             CALL PTRACERS_READ_CHECKPOINT(myIter,myThid)
179           ENDIF
180    #endif /* ALLOW_PTRACERS */
181    
182  C--    Fill in edge regions  C--    Fill in edge regions
183        CALL EXCH_UV_XYZ_RL(uVel,vVel,.TRUE.,myThid)        CALL EXCH_UV_XYZ_RL(uVel,vVel,.TRUE.,myThid)
184        CALL EXCH_UV_XYZ_RL(gU,gV,.TRUE.,myThid)        CALL EXCH_UV_XYZ_RL(gU,gV,.TRUE.,myThid)
# Line 214  c        _EXCH_XYZ_R8(gWNM1 , myThid ) Line 224  c        _EXCH_XYZ_R8(gWNM1 , myThid )
224  CBOP  CBOP
225  C     !ROUTINE: WRITE_CHECKPOINT  C     !ROUTINE: WRITE_CHECKPOINT
226  C     !INTERFACE:  C     !INTERFACE:
227        SUBROUTINE WRITE_CHECKPOINT ( modelEnd, myCurrentTime,        SUBROUTINE WRITE_CHECKPOINT ( modelEnd, myTime,
228       &                              myIter, myThid )       &                              myIter, myThid )
229  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
230  C     *==========================================================*  C     *==========================================================*
# Line 257  C     == Routine arguments == Line 267  C     == Routine arguments ==
267  C     modelEnd    :: Checkpoint call at end of model run.  C     modelEnd    :: Checkpoint call at end of model run.
268  C     myThid :: Thread number for this instance of the routine.  C     myThid :: Thread number for this instance of the routine.
269  C     myIter :: Iteration number  C     myIter :: Iteration number
270  C     myCurrentTime :: Current time of simulation ( s )  C     myTime :: Current time of simulation ( s )
271        LOGICAL modelEnd            LOGICAL modelEnd    
272        INTEGER myThid        INTEGER myThid
273        INTEGER myIter        INTEGER myIter
274        _RL     myCurrentTime        _RL     myTime
275    
276  C     == Common blocks ==  C     == Common blocks ==
277        COMMON /PCKP_GBLFLS/ globalFile        COMMON /PCKP_GBLFLS/ globalFile
# Line 283  CEOP Line 293  CEOP
293    
294        permCheckPoint = .FALSE.        permCheckPoint = .FALSE.
295        permCheckPoint=        permCheckPoint=
296       & DIFFERENT_MULTIPLE(pChkptFreq,myCurrentTime,       & DIFFERENT_MULTIPLE(pChkptFreq,myTime,
297       &                    myCurrentTime-deltaTClock)       &                    myTime-deltaTClock)
298    
299        IF (        IF (
300       &    (.NOT. modelEnd .AND. (       &    (.NOT. modelEnd .AND. (
301       &     permCheckPoint       &     permCheckPoint
302       &     .OR.       &     .OR.
303       &     DIFFERENT_MULTIPLE(chkptFreq,       &     DIFFERENT_MULTIPLE(chkptFreq,
304       &    myCurrentTime,myCurrentTime-deltaTClock)       &    myTime,myTime-deltaTClock)
305       &     )       &     ) .AND. myIter.NE.nIter0
306       &    )       &    )
307       &     .OR.       &     .OR.
308       &    (       &    (
# Line 301  CEOP Line 311  CEOP
311       &     permCheckPoint       &     permCheckPoint
312       &     .AND. .NOT.       &     .AND. .NOT.
313       &     DIFFERENT_MULTIPLE(chkptFreq,       &     DIFFERENT_MULTIPLE(chkptFreq,
314       &    myCurrentTime,myCurrentTime-deltaTClock)       &    myTime,myTime-deltaTClock)
315       &    )       &    )
316       & ) THEN       & ) THEN
317    
# Line 405  c        CALL MDSWRITEFIELD(fn,prec,lgf, Line 415  c        CALL MDSWRITEFIELD(fn,prec,lgf,
415          ENDIF          ENDIF
416  #endif  #endif
417    
418    C Create suffix to pass on to package pickup routines
419             IF ( permCheckPoint ) THEN
420              WRITE(fn,'(I10.10)') myIter
421             ELSE
422              WRITE(fn,'(A)') checkPtSuff(nCheckLev)
423             ENDIF
424    
425  #ifdef  ALLOW_OBCS  #ifdef  ALLOW_OBCS
426  C SPK 4/9/01: Open boundary checkpointing  C SPK 4/9/01: Open boundary checkpointing
427          IF (useOBCS) THEN          IF (useOBCS) THEN
# Line 416  C SPK 4/9/01: Open boundary checkpointin Line 433  C SPK 4/9/01: Open boundary checkpointin
433  #ifdef ALLOW_FLT  #ifdef ALLOW_FLT
434  C--     Write restart file for floats  C--     Write restart file for floats
435          IF (useFLT) THEN          IF (useFLT) THEN
436            CALL FLT_RESTART(myCurrentTime, myIter, myThid)            CALL FLT_RESTART(myTime, myIter, myThid)
437          ENDIF          ENDIF
438  #endif  #endif
439    
# Line 432  C--     Reset binary precision Line 449  C--     Reset binary precision
449         _END_MASTER( myThid )         _END_MASTER( myThid )
450         _BARRIER         _BARRIER
451    
452    #ifdef ALLOW_PTRACERS
453    C Write restart file for passive tracers
454           IF (usePTRACERS) THEN
455             CALL PTRACERS_WRITE_CHECKPOINT(fn,myIter,myTime,myThid)
456           ENDIF
457    #endif /* ALLOW_PTRACERS */
458    
459        ENDIF        ENDIF
460    
461        RETURN        RETURN

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

  ViewVC Help
Powered by ViewVC 1.1.22