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

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

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

revision 1.31 by heimbach, Fri Jun 27 01:51:10 2003 UTC revision 1.39 by molod, Thu Feb 26 02:25:01 2004 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4    #include "PACKAGES_CONFIG.h"
5  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
6    
7  CBOP  CBOP
8  C     !ROUTINE: DO_THE_MODEL_IO  C     !ROUTINE: DO_THE_MODEL_IO
9  C     !INTERFACE:  C     !INTERFACE:
10        SUBROUTINE DO_THE_MODEL_IO(myCurrentTime, myIter, myThid)        SUBROUTINE DO_THE_MODEL_IO( myTime, myIter, myThid )
11  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
12  C     *==========================================================*  C     *==========================================================*
13  C     | SUBROUTINE DO_THE_MODEL_IO                                  C     | SUBROUTINE DO_THE_MODEL_IO                                
# Line 35  C     == Global variables === Line 36  C     == Global variables ===
36  #include "EEPARAMS.h"  #include "EEPARAMS.h"
37  #include "PARAMS.h"  #include "PARAMS.h"
38  #include "DYNVARS.h"  #include "DYNVARS.h"
 cswdblk --- add ---  
 #ifdef ALLOW_BULK_FORCE  
 #include "BULKF.h"  
 #include "FFIELDS.h"  
 #endif  
 cswdblk -- end add ---  
 cswdice -- add ---  
 #ifdef ALLOW_THERM_SEAICE  
 #include "ICE.h"  
 #include "ICE_DIAGS.h"  
 #endif  
 cswdice -- end add ---  
   
39    
40    
41        LOGICAL  DIFFERENT_MULTIPLE        LOGICAL  DIFFERENT_MULTIPLE
# Line 57  C     !INPUT/OUTPUT PARAMETERS: Line 45  C     !INPUT/OUTPUT PARAMETERS:
45  C     == Routine arguments ==  C     == Routine arguments ==
46  C     myThid - Thread number for this instance of the routine.  C     myThid - Thread number for this instance of the routine.
47  C     myIter - Iteration number  C     myIter - Iteration number
48  C     myCurrentTime - Current time of simulation ( s )  C     myTime - Current time of simulation ( s )
49        INTEGER myThid        INTEGER myThid
50        INTEGER myIter        INTEGER myIter
51        _RL    myCurrentTime        _RL     myTime
52    
53  CEOP  CEOP
54    
55  C--   Generaly only thread 1 does IO here. It can not start until  C--   Generaly only thread 1 does IO here. It can not start until
56  C--   all threads fields are ready.  C--   all threads fields are ready.
57        IF (        IF (debugMode) THEN
58       &  DIFFERENT_MULTIPLE(dumpFreq,myCurrentTime,         IF ( DIFFERENT_MULTIPLE(dumpFreq,myTime, myTime-deltaTClock)
59       &                     myCurrentTime-deltaTClock)       &    ) THEN
      & ) THEN  
60    
61         _BARRIER         _BARRIER
62    
        IF (debugMode) THEN  
63  C--    Write "text-plots" of certain fields  C--    Write "text-plots" of certain fields
64         CALL PLOT_FIELD_XYZRL( uVel , 'Current uVel  ' ,         CALL PLOT_FIELD_XYZRL( uVel , 'Current uVel  ' ,
65       &                        Nr, myIter, myThid )       &                        Nr, myIter, myThid )
# Line 83  C--    Write "text-plots" of certain fie Line 69  C--    Write "text-plots" of certain fie
69       &                        Nr, myIter, myThid )       &                        Nr, myIter, myThid )
70         CALL PLOT_FIELD_XYRL( etaN  , 'Current etaN  ' ,         CALL PLOT_FIELD_XYRL( etaN  , 'Current etaN  ' ,
71       &                        myIter, myThid )       &                        myIter, myThid )
        ENDIF  
72    
73           ENDIF
74        ENDIF        ENDIF
75    
76  C--   Write model state to binary file  C--   Write model state to binary file
77        CALL WRITE_STATE( myCurrentTime, myIter, myThid )        CALL WRITE_STATE( myTime, myIter, myThid )
78    
79  #ifdef ALLOW_TIMEAVE  #ifdef ALLOW_TIMEAVE
80  C--   Do time averages  C--   Do time averages
81        IF (taveFreq.GT.0.) THEN        IF (taveFreq.GT.0. .AND. myIter.NE.nIter0 ) THEN
82         CALL TIMEAVE_STATV_WRITE( myCurrentTime, myIter, myThid )         CALL TIMEAVE_STATV_WRITE( myTime, myIter, myThid )
 cswdptr -- add ---  
83  #ifdef ALLOW_PTRACERS  #ifdef ALLOW_PTRACERS
84         CALL PTRACERS_STATV_WRITE( myCurrentTime, myIter, myThid )         IF ( usePTRACERS )
85         & CALL PTRACERS_STATV_WRITE( myTime, myIter, myThid )
86  #endif  #endif
 cswdptr -- end add ---  
87        ENDIF        ENDIF
88  #endif  #endif
89    
90    #ifdef ALLOW_FIZHI
91          if(useFIZHI) call fizhi_write_state( myTime, myIter, myThid )
92    #endif
93    
94  #ifdef ALLOW_AIM  #ifdef ALLOW_AIM
95  C--   Do AIM time averages  C--   Do AIM time averages
96        IF (useAIM)        IF ( useAIM )
97       &  CALL AIM_WRITE_TAVE( myCurrentTime, myIter, myThid )       &  CALL AIM_WRITE_TAVE( myTime, myIter, myThid )
98  #endif                                                              #endif                                                            
99  #ifdef ALLOW_LAND  #ifdef ALLOW_LAND
100  C--   Do LAND time averages  C--   Do LAND time averages
101        IF (useLAND)        IF ( useLAND )
102       &  CALL LAND_WRITE_TAVE( myCurrentTime, myIter, myThid )       &  CALL LAND_WRITE_TAVE( myTime, myIter, myThid )
103  #endif                                                              #endif                                                            
104    
105  #ifdef ALLOW_OBCS  #ifdef ALLOW_OBCS
106        IF (useOBCS)        IF (useOBCS .AND. myIter.NE.nIter0 )
107       & CALL OBCS_DIAGS( myCurrentTime, myIter, myThid )       & CALL OBCS_DIAGS( myTime, myIter, myThid )
108  #endif  #endif
109    
110  #ifdef ALLOW_GMREDI  #ifdef ALLOW_GMREDI
111  C--   Do KPP diagnostics.  C--   Do KPP diagnostics.
112        IF (useGMRedi)        IF (useGMRedi .AND. myIter.NE.nIter0 )
113       & CALL GMREDI_DIAGS( myCurrentTime, myIter, myThid )       & CALL GMREDI_DIAGS( myTime, myIter, myThid )
114  #endif  #endif
115    
116  #ifdef ALLOW_KPP  #ifdef ALLOW_KPP
117  C--   Do KPP diagnostics.  C--   Do KPP diagnostics.
118        IF (useKPP)        IF (useKPP .AND. myIter.NE.nIter0 )
119       & CALL KPP_DO_DIAGS( myCurrentTime, myIter, myThid )       & CALL KPP_DO_DIAGS( myTime, myIter, myThid )
120  #endif  #endif
121    
122  #ifdef ALLOW_SBO  #ifdef ALLOW_SBO
123  C--   Do SBO diagnostics.  C--   Do SBO diagnostics.
124        IF (useSBO) THEN        IF (useSBO .AND. myIter.NE.nIter0 ) THEN
125           CALL SBO_CALC ( myCurrentTime, myIter, myThid )           CALL SBO_CALC ( myTime, myIter, myThid )
126           CALL SBO_DIAGS( myCurrentTime, myIter, myThid )           CALL SBO_DIAGS( myTime, myIter, myThid )
127        ENDIF        ENDIF
128  #endif  #endif
129    
 cswdblk ---  add ---  
130  #ifdef ALLOW_BULK_FORCE  #ifdef ALLOW_BULK_FORCE
131  C--   Do bulkf diagnostics.  C--   Do bulkf diagnostics.
132        IF (useBulkforce)        IF (useBulkForce .AND. myIter.NE.nIter0 )
133       & CALL BULKF_DIAGS( myCurrentTime, myIter, myThid )       & CALL BULKF_DIAGS( myTime, myIter, myThid )
134  #endif  #endif
 cswdblk -- end add ---  
135    
136  cswdice ---  add ---  #ifdef ALLOW_THSICE
 #ifdef ALLOW_THERM_SEAICE  
137  C--   Do seaice diagnostics.  C--   Do seaice diagnostics.
138        IF (useThermSeaice)        IF (useThSIce)
139       & CALL ICE_DIAGS( myCurrentTime, myIter, myThid )       & CALL THSICE_DIAGS( myTime, myIter, myThid )
140  #endif  #endif
 cswdice -- end add ---  
141    
142  cswdptr ---  add ---  cswdptr ---  add ---
143  #ifdef ALLOW_GCHEM  #ifdef ALLOW_GCHEM
144    ceh3 ???  why is one package depending upon another here?
145  C--   Do ptracer diagnostics.  C--   Do ptracer diagnostics.
146        IF (usePTRACERS)        IF (usePTRACERS)
147       & CALL GCHEM_DIAGS( myCurrentTime, myIter, myThid )       & CALL GCHEM_DIAGS( myTime, myIter, myThid )
148  #endif  #endif
149  cswdptr -- end add ---  cswdptr -- end add ---
150    
151    #ifdef COMPONENT_MODULE
152          IF ( useCoupler )
153         &  CALL CPL_WRITE_DIAGS( myTime, myIter, myThid )
154    #endif
155    
156    #ifdef ALLOW_DIAGNOSTICS
157          IF ( usediagnostics ) call diagnostics_write (myThid, myIter)
158    #endif
159    
160        RETURN        RETURN
161        END        END
   

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.39

  ViewVC Help
Powered by ViewVC 1.1.22