/[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.21 by jmc, Mon Mar 20 15:11:18 2006 UTC revision 1.22 by jmc, Wed Aug 9 02:23:13 2006 UTC
# Line 9  CBOP Line 9  CBOP
9  C     !ROUTINE: PACKAGES_WRITE_PICKUP  C     !ROUTINE: PACKAGES_WRITE_PICKUP
10    
11  C     !INTERFACE:  C     !INTERFACE:
12        SUBROUTINE PACKAGES_WRITE_PICKUP(        SUBROUTINE PACKAGES_WRITE_PICKUP(
13       I     modelEnd,       I     modelEnd,
14       I     myTime,       I     myTime,
15       I     myIter,       I     myIter,
16       I     myThid )       I     myThid )
17    
18  C     !DESCRIPTION:  C     !DESCRIPTION:
# Line 36  C     !USES: Line 36  C     !USES:
36  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
37  C     == Routine arguments ==  C     == Routine arguments ==
38  C     modelEnd    :: Checkpoint call at end of model run.  C     modelEnd    :: Checkpoint call at end of model run.
 C     myThid :: Thread number for this instance of the routine.  
 C     myIter :: Iteration number  
39  C     myTime :: Current time of simulation ( s )  C     myTime :: Current time of simulation ( s )
40        LOGICAL modelEnd      C     myIter :: Iteration number
41        INTEGER myThid  C     myThid :: Thread number for this instance of the routine.
42        INTEGER myIter        LOGICAL modelEnd
43        _RL     myTime        _RL     myTime
44          INTEGER myIter
45          INTEGER myThid
46    
47  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
48  C     == Local variables ==  C     == Local variables ==
# Line 53  C                       checkpoint (that Line 53  C                       checkpoint (that
53  C     oldPrc :: Temp. for holding I/O precision  C     oldPrc :: Temp. for holding I/O precision
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  CEOP  CEOP
58    
59        permCheckPoint = .FALSE.        permCheckPoint = .FALSE.
# Line 80  CEOP Line 80  CEOP
80       &     ( modelEnd .AND. .NOT.(permCheckPoint.OR.tempCheckPoint) )       &     ( modelEnd .AND. .NOT.(permCheckPoint.OR.tempCheckPoint) )
81       &     ) THEN       &     ) THEN
82    
83          CALL PACKAGES_WRITE_PICKUP_NOW(          CALL PACKAGES_WRITE_PICKUP_NOW(
84       &       permCheckPoint, myTime, myIter, myThid )       &       permCheckPoint, myTime, myIter, myThid )
85    
86        ENDIF        ENDIF
# Line 94  CBOP Line 94  CBOP
94  C     !ROUTINE: PACKAGES_WRITE_PICKUP_NOW  C     !ROUTINE: PACKAGES_WRITE_PICKUP_NOW
95    
96  C     !INTERFACE:  C     !INTERFACE:
97        SUBROUTINE PACKAGES_WRITE_PICKUP_NOW(        SUBROUTINE PACKAGES_WRITE_PICKUP_NOW(
98       I     permCheckPoint,       I     permCheckPoint,
99       I     myTime,       I     myTime,
100       I     myIter,       I     myIter,
101       I     myThid )       I     myThid )
102    
103  C     !DESCRIPTION:  C     !DESCRIPTION:
# Line 113  C     !USES: Line 113  C     !USES:
113    
114  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
115  C     permCheckPoint  :: Checkpoint is permanent  C     permCheckPoint  :: Checkpoint is permanent
 C     myThid :: Thread number for this instance of the routine.  
 C     myIter :: Iteration number  
116  C     myTime :: Current time of simulation ( s )  C     myTime :: Current time of simulation ( s )
117    C     myIter :: Iteration number
118    C     myThid :: Thread number for this instance of the routine.
119        LOGICAL permCheckPoint        LOGICAL permCheckPoint
       INTEGER myThid  
       INTEGER myIter  
120        _RL     myTime        _RL     myTime
121          INTEGER myIter
122          INTEGER myThid
123    
124  C     == Common blocks ==  C     == Common blocks ==
125        COMMON /PCKP_GBLFLS/ globalFile        COMMON /PCKP_GBLFLS/ globalFile
# Line 141  C     _BEGIN_MASTER( myThid ) Line 141  C     _BEGIN_MASTER( myThid )
141    
142        prec = precFloat64        prec = precFloat64
143        lgf = globalFile        lgf = globalFile
144          
145  C     Create suffix to pass on to package pickup routines  C     Create suffix to pass on to package pickup routines
146        IF ( permCheckPoint ) THEN        IF ( permCheckPoint ) THEN
147          WRITE(fn,'(I10.10)') myIter          WRITE(fn,'(I10.10)') myIter
# Line 163  C     SPK 4/9/01: Open boundary checkpoi Line 163  C     SPK 4/9/01: Open boundary checkpoi
163       &       prec, lgf, permCheckPoint, myIter, myThid)       &       prec, lgf, permCheckPoint, myIter, myThid)
164        ENDIF        ENDIF
165  #endif  /* ALLOW_OBCS */  #endif  /* ALLOW_OBCS */
166          
167  #ifdef  ALLOW_SEAICE  #ifdef  ALLOW_SEAICE
168        IF ( useSEAICE ) THEN        IF ( useSEAICE ) THEN
169          CALL SEAICE_WRITE_PICKUP(          CALL SEAICE_WRITE_PICKUP(
# Line 224  C     Write pickup file for diagnostics Line 224  C     Write pickup file for diagnostics
224        ENDIF        ENDIF
225  #endif  /* ALLOW_GGL90 */  #endif  /* ALLOW_GGL90 */
226    
 C     _END_MASTER( myThid )  
       _BARRIER  
   
227  #ifdef ALLOW_PTRACERS  #ifdef ALLOW_PTRACERS
228  C     Write restart file for passive tracers  C     Write restart file for passive tracers
229        IF (usePTRACERS) THEN        IF (usePTRACERS) THEN
230          CALL PTRACERS_WRITE_CHECKPOINT(permCheckPoint,          CALL PTRACERS_WRITE_CHECKPOINT(permCheckPoint,
231       &       fn,myIter,myTime,myThid)       &       fn,myIter,myTime,myThid)
232        ENDIF        ENDIF
233  #endif /* ALLOW_PTRACERS */  #endif /* ALLOW_PTRACERS */
234    
235    C     _END_MASTER( myThid )
236          _BARRIER
237    
238  #ifdef ALLOW_OFFLINE  #ifdef ALLOW_OFFLINE
239  C     This is quick fix for A/B checkpoints since the main model  C     This is quick fix for A/B checkpoints since the main model
240  C     checkpoint routine will not be called in OFFLINE mode and will  C     checkpoint routine will not be called in OFFLINE mode and will
241  C     thus not have the chance to set the alternating A/B suffix  C     thus not have the chance to set the alternating A/B suffix
242        IF ( .NOT. permCheckPoint ) THEN        IF ( .NOT. permCheckPoint ) THEN
243            _BEGIN_MASTER( myThid )
244          nCheckLev = MOD(nCheckLev, maxNoChkptLev)+1          nCheckLev = MOD(nCheckLev, maxNoChkptLev)+1
245            _END_MASTER( myThid )
246        ENDIF        ENDIF
247  #endif /* ALLOW_OFFLINE */  #endif /* ALLOW_OFFLINE */
248    

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.22