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 |
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) |
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 *==========================================================* |
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 |
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 |
& ( |
& ( |
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 |
|
|
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 |
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 |
|
|
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 |