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 |
|
INTEGER thisdate(4), prevdate(4) |
|
57 |
CEOP |
CEOP |
58 |
|
|
59 |
permCheckPoint = .FALSE. |
permCheckPoint = .FALSE. |
60 |
tempCheckPoint = .FALSE. |
tempCheckPoint = .FALSE. |
61 |
permCheckPoint= |
permCheckPoint= |
62 |
& DIFFERENT_MULTIPLE(pChkptFreq,myTime,deltaTClock) |
& DIFFERENT_MULTIPLE(pChkPtFreq,myTime,deltaTClock) |
63 |
tempCheckPoint= |
tempCheckPoint= |
64 |
& DIFFERENT_MULTIPLE( ChkptFreq,myTime,deltaTClock) |
& DIFFERENT_MULTIPLE( chkPtFreq,myTime,deltaTClock) |
65 |
|
|
66 |
#ifdef ALLOW_CAL |
#ifdef ALLOW_CAL |
67 |
IF ( calendarDumps ) THEN |
IF ( useCAL ) THEN |
68 |
C-- Convert approximate months (30-31 days) and years (360-372 days) |
CALL CAL_TIME2DUMP( pChkPtFreq, deltaTClock, |
69 |
C to exact calendar months and years. |
U permCheckPoint, |
70 |
C- First determine calendar dates for this and previous time step. |
I myTime, myIter, myThid ) |
71 |
call cal_GetDate( myiter ,mytime ,thisdate,mythid ) |
CALL CAL_TIME2DUMP( chkPtFreq, deltaTClock, |
72 |
call cal_GetDate( myiter-1,mytime-deltaTClock,prevdate,mythid ) |
U tempCheckPoint, |
73 |
C- Monthly pChkptFreq: |
I myTime, myIter, myThid ) |
|
IF( pChkptFreq.GE. 2592000 .AND. pChkptFreq.LE. 2678400 ) THEN |
|
|
permCheckPoint = .FALSE. |
|
|
IF((thisdate(1)-prevdate(1)) .GT. 50 )permCheckPoint=.TRUE. |
|
|
ENDIF |
|
|
C- Yearly pChkptFreq: |
|
|
IF( pChkptFreq.GE.31104000 .AND. pChkptFreq.LE.31968000 ) THEN |
|
|
permCheckPoint = .FALSE. |
|
|
IF((thisdate(1)-prevdate(1)) .GT. 5000)permCheckPoint=.TRUE. |
|
|
ENDIF |
|
|
C- Monthly ChkptFreq: |
|
|
IF( ChkptFreq.GE. 2592000 .AND. ChkptFreq.LE. 2678400 ) THEN |
|
|
tempCheckPoint = .FALSE. |
|
|
IF((thisdate(1)-prevdate(1)) .GT. 50 )tempCheckPoint=.TRUE. |
|
|
ENDIF |
|
|
C- Yearly ChkptFreq: |
|
|
IF( ChkptFreq.GE.31104000 .AND. ChkptFreq.LE.31968000 ) THEN |
|
|
tempCheckPoint = .FALSE. |
|
|
IF((thisdate(1)-prevdate(1)) .GT. 5000)tempCheckPoint=.TRUE. |
|
|
ENDIF |
|
74 |
ENDIF |
ENDIF |
75 |
#endif |
#endif /* ALLOW_CAL */ |
76 |
|
|
77 |
IF ( |
IF ( |
78 |
& ( .NOT.modelEnd .AND. (permCheckPoint.OR.tempCheckPoint) ) |
& ( .NOT.modelEnd .AND. (permCheckPoint.OR.tempCheckPoint) ) |
137 |
|
|
138 |
C Going to really do some IO. Make everyone except master thread wait. |
C Going to really do some IO. Make everyone except master thread wait. |
139 |
_BARRIER |
_BARRIER |
140 |
_BEGIN_MASTER( myThid ) |
C _BEGIN_MASTER( myThid ) |
141 |
|
|
142 |
prec = precFloat64 |
prec = precFloat64 |
143 |
lgf = globalFile |
lgf = globalFile |
212 |
#ifdef ALLOW_DIAGNOSTICS |
#ifdef ALLOW_DIAGNOSTICS |
213 |
C Write pickup file for diagnostics package |
C Write pickup file for diagnostics package |
214 |
IF (useDiagnostics) THEN |
IF (useDiagnostics) THEN |
215 |
CALL DIAGNOSTICS_WRITE_PICKUP(fn,myTime,myIter,myThid) |
CALL DIAGNOSTICS_WRITE_PICKUP(permCheckPoint, |
216 |
|
& fn,myTime,myIter,myThid) |
217 |
ENDIF |
ENDIF |
218 |
#endif |
#endif |
219 |
|
|
224 |
ENDIF |
ENDIF |
225 |
#endif /* ALLOW_GGL90 */ |
#endif /* ALLOW_GGL90 */ |
226 |
|
|
227 |
_END_MASTER( myThid ) |
C _END_MASTER( myThid ) |
228 |
_BARRIER |
_BARRIER |
229 |
|
|
230 |
#ifdef ALLOW_PTRACERS |
#ifdef ALLOW_PTRACERS |