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

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

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

revision 1.8 by jmc, Mon Aug 6 16:54:40 2012 UTC revision 1.10 by jmc, Fri Mar 24 23:26:10 2017 UTC
# Line 52  C     permPickup :: Flag indicating whet Line 52  C     permPickup :: Flag indicating whet
52  C                       be written.  C                       be written.
53  C     tempPickup :: Flag indicating if it is time to write a non-permanent  C     tempPickup :: Flag indicating if it is time to write a non-permanent
54  C                       pickup (that will be permanent if permPickup=T)  C                       pickup (that will be permanent if permPickup=T)
55  C     fn         :: Temp. for building file name string.  C     suffix     :: pickup-name suffix
56  C     msgBuf     :: message buffer  C     msgBuf     :: message buffer
57        LOGICAL permPickup, tempPickup        LOGICAL permPickup, tempPickup
58        CHARACTER*(MAX_LEN_FNAM) fn        CHARACTER*(10) suffix
59        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
60    
61        permPickup = .FALSE.        permPickup = .FALSE.
# Line 78  C     msgBuf     :: message buffer Line 78  C     msgBuf     :: message buffer
78    
79        IF ( (modelEnd.AND.writePickupAtEnd)        IF ( (modelEnd.AND.writePickupAtEnd)
80       &     .OR. permPickup .OR. tempPickup ) THEN       &     .OR. permPickup .OR. tempPickup ) THEN
81  C--   this is time to write pickup files  C--   This is time to write pickup files
82    
83  C-    write a pickup for each package which need it to restart  C-    Create suffix to pass on to main & package pickup routines
84            IF ( permPickup .AND. rwSuffixType.EQ.0 ) THEN
85              WRITE(suffix,'(I10.10)') myIter
86            ELSEIF ( permPickup ) THEN
87              CALL RW_GET_SUFFIX( suffix, myTime, myIter, myThid )
88            ELSE
89              WRITE(suffix,'(A)') checkPtSuff(nCheckLev)
90            ENDIF
91    
92    C-    Write a pickup for each package which need it to restart
93          CALL PACKAGES_WRITE_PICKUP(          CALL PACKAGES_WRITE_PICKUP(
94       I                permPickup, myTime, myIter, myThid )       I                permPickup, suffix, myTime, myIter, myThid )
95    
96  C-    write main model pickup  C-    Write main model pickup
97          IF ( .NOT.useOffLine ) THEN          IF ( .NOT.useOffLine .OR. nonlinFreeSurf.GT.0 ) THEN
98             CALL WRITE_PICKUP(             CALL WRITE_PICKUP(
99       I                permPickup, myTime, myIter, myThid )       I                permPickup, suffix, myTime, myIter, myThid )
100          ENDIF          ENDIF
101    
102          _BEGIN_MASTER(myThid)          _BEGIN_MASTER(myThid)
 C-    Write suffix for stdout information  
         IF ( permPickup ) THEN  
           WRITE(fn,'(I10.10)') myIter  
         ELSE  
           WRITE(fn,'(A)') checkPtSuff(nCheckLev)  
         ENDIF  
   
103  C-    Write information to stdout so there is a record that  C-    Write information to stdout so there is a record that
104  C     writing the pickup was completed  C     writing the pickup was completed
105          WRITE(msgBuf,'(A11,I10,1X,A10)')          WRITE(msgBuf,'(A11,I10,1X,A10)')
106       &     "%CHECKPOINT ",myIter,fn       &     "%CHECKPOINT ", myIter, suffix
107          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
108       &                    SQUEEZE_RIGHT, myThid )       &                    SQUEEZE_RIGHT, myThid )
109    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.22