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

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

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

revision 1.11 by cnh, Mon Jun 15 05:13:56 1998 UTC revision 1.15 by adcroft, Mon Jun 22 15:26:26 1998 UTC
# Line 86  C     == Global variables === Line 86  C     == Global variables ===
86  #include "PARAMS.h"  #include "PARAMS.h"
87  #include "CG2D.h"  #include "CG2D.h"
88  #include "DYNVARS.h"  #include "DYNVARS.h"
89    #include "AVER.h"
90    
91  C     == Routine arguments ==  C     == Routine arguments ==
92  C     myThid - Thread number for this instance of the routine.  C     myThid - Thread number for this instance of the routine.
# Line 108  C--   Set model initial conditions Line 109  C--   Set model initial conditions
109        myCurrentTime = startTime        myCurrentTime = startTime
110        myCurrentIter = nIter0        myCurrentIter = nIter0
111    
112    C--   Dump for start state
113          CALL WRITE_STATE( .TRUE., myCurrentTime, myCurrentIter, myThid )
114    
115  C--   Begin time stepping loop  C--   Begin time stepping loop
116        DO I=1, nTimeSteps        DO I=1, nTimeSteps
117    
# Line 117  C--    Load forcing/external data fields Line 121  C--    Load forcing/external data fields
121  C--    Step forward fields and calculate time tendency terms  C--    Step forward fields and calculate time tendency terms
122         CALL DYNAMICS( myCurrentTime, myCurrentIter, myThid )         CALL DYNAMICS( myCurrentTime, myCurrentIter, myThid )
123    
124    C--    Do time averages
125           IF (taveFreq.GT.0.) THEN
126             CALL DO_TIME_AVERAGES( myCurrentTime, myCurrentIter, myThid )
127           ENDIF
128    
129  C--    Do IO if needed.  C--    Do IO if needed.
130  C      Note:  C      Note:
131  C      =====  C      =====
# Line 139  C--    Do "blocking" sends and receives Line 148  C--    Do "blocking" sends and receives
148  C--    Save state for restarts  C--    Save state for restarts
149  C      Note:  C      Note:
150  C      =====  C      =====
151  C      Because of the ordereing of the timestepping code and  C      Because of the ordering of the timestepping code and
152  C      tendency term code at end of loop model arrays hold  C      tendency term code at end of loop model arrays hold
153  C      U,V,T,S  at "time-level" N but gu, gv, gs, gt, guNM1,...  C      U,V,T,S  at "time-level" N but gu, gv, gs, gt, guNM1,...
154  C      at "time-level" N+1/2 (guNM1 at "time-level" N+1/2 is  C      at "time-level" N+1/2 (guNM1 at "time-level" N+1/2 is
# Line 153  C      at time level 1 Line 162  C      at time level 1
162    
163        ENDDO        ENDDO
164    
165  C--   Dump for end state and final checkpoint  C--   Final checkpoint (incase the in-loop checkpoint was missed)
       CALL WRITE_STATE( myCurrentTime, myCurrentIter, myThid )  
166        CALL WRITE_CHECKPOINT( .TRUE., myCurrentTime, myCurrentIter, myThid )        CALL WRITE_CHECKPOINT( .TRUE., myCurrentTime, myCurrentIter, myThid )
167    
168    C--   Step-forward U/V/Theta/Salt for purposes of final I/O dump
169          CALL DYNAMICS( myCurrentTime, myCurrentIter, myThid )
170    
171    C--   Do time averages
172          IF (taveFreq.GT.0.) THEN
173            CALL DO_TIME_AVERAGES( myCurrentTime, myCurrentIter, myThid )
174          ENDIF
175    
176    C--   Dump for end state
177          CALL WRITE_STATE( .FALSE., myCurrentTime, myCurrentIter, myThid )
178    
179    
180        RETURN        RETURN
181        END        END

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

  ViewVC Help
Powered by ViewVC 1.1.22