/[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.8 by adcroft, Wed Jul 15 22:13:21 1998 UTC revision 1.14 by adcroft, Mon Mar 27 22:25:44 2000 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2    
3  #include "CPP_EEOPTIONS.h"  #include "CPP_OPTIONS.h"
4    
5        SUBROUTINE DO_THE_MODEL_IO(myCurrentTime, myIter, myThid)        SUBROUTINE DO_THE_MODEL_IO(myCurrentTime, myIter, myThid)
6  C     /==========================================================\  C     /==========================================================\
# Line 13  C     | to lump everything together and Line 13  C     | to lump everything together and
13  C     | and updating of forcing terms in a single place.         |  C     | and updating of forcing terms in a single place.         |
14  C     | The approach to IO used here is that writes are only     |  C     | The approach to IO used here is that writes are only     |
15  C     | performed by thread 1 and that a process only writes out |  C     | performed by thread 1 and that a process only writes out |
16  C     | its data ( since it doen't know about anyone elses data!)|  C     | its data ( it does not know about anyone elses data!)    |
17  C     | Reading on the other hand is assumed to be from a file   |  C     | Reading on the other hand is assumed to be from a file   |
18  C     | containing all the data for all the processes. Only the  |  C     | containing all the data for all the processes. Only the  |
19  C     | portion of data of interest to this process is actually  |  C     | portion of data of interest to this process is actually  |
20  C     | loaded. To work well this assumes the existence of some  |  C     | loaded. To work well this assumes the existence of some  |
21  C     | reliable tool to join datasets together at the end of a  |  C     | reliable tool to join datasets together at the end of a  |
22  C     | run.                                                     |  C     | run - see joinds.p                                       |
 C     | Notes                                                    |  
 C     | =====                                                    |  
 C     | We allow thread 2-nThreads to continue whilst thread 1   |  
 C     | does IO. The assumption is that the other threads won't  |  
 C     | do anything to update their interior regions before      |  
 C     | thread 1 has finished writing them out.                  |  
23  C     \==========================================================/  C     \==========================================================/
24          IMPLICIT NONE
25    
26  C     == Global variables ===  C     == Global variables ===
27  #include "SIZE.h"  #include "SIZE.h"
# Line 34  C     == Global variables === Line 29  C     == Global variables ===
29  #include "PARAMS.h"  #include "PARAMS.h"
30  #include "DYNVARS.h"  #include "DYNVARS.h"
31  #include "CG2D.h"  #include "CG2D.h"
32    #ifdef ALLOW_KPP
33    #include "KPPMIX.h"
34    #endif
35    
36        LOGICAL  DIFFERENT_MULTIPLE        LOGICAL  DIFFERENT_MULTIPLE
37        EXTERNAL DIFFERENT_MULTIPLE        EXTERNAL DIFFERENT_MULTIPLE
# Line 44  C     myIter - Iteration number Line 42  C     myIter - Iteration number
42  C     myCurrentTime - Current time of simulation ( s )  C     myCurrentTime - Current time of simulation ( s )
43        INTEGER myThid        INTEGER myThid
44        INTEGER myIter        INTEGER myIter
45        REAL    myCurrentTime        _RL    myCurrentTime
46    
47  C     == Local variables ==  C     == Local variables ==
 C     suff - Hold suffix part of a filename  
       CHARACTER*(MAX_LEN_FNAM) suff  
         
48    
49  C--   Generaly only thread 1 does IO here. It can't start until everyone's  C--   Generaly only thread 1 does IO here. It can not start until
50  C--   fields are ready.  C--   all threads fields are ready.
51        IF (        IF (
52       &  DIFFERENT_MULTIPLE(dumpFreq,myCurrentTime,myCurrentTime-deltaTClock)       &  DIFFERENT_MULTIPLE(dumpFreq,myCurrentTime,
53         &                     myCurrentTime-deltaTClock)
54       & ) THEN       & ) THEN
55    
56         _BARRIER         _BARRIER
57    
58  C--    Write "text-plots" of certain fields  C--    Write "text-plots" of certain fields
59         CALL PLOT_FIELD_XYZRL( uVel , 'Current uVel  ' , Nz, myIter, myThid )         CALL PLOT_FIELD_XYZRL( uVel , 'Current uVel  ' ,
60         CALL PLOT_FIELD_XYZRL( vVel , 'Current vVel  ' , Nz, myIter, myThid )       &                        Nr, myIter, myThid )
61         CALL PLOT_FIELD_XYZRL( theta, 'Current theta ' , Nz, myIter, myThid )         CALL PLOT_FIELD_XYZRL( vVel , 'Current vVel  ' ,
62         CALL PLOT_FIELD_XYRL( cg2d_x, 'Current cg2d_x ' , myIter, myThid )       &                        Nr, myIter, myThid )
63           CALL PLOT_FIELD_XYZRL( theta, 'Current theta ' ,
64         &                        Nr, myIter, myThid )
65           CALL PLOT_FIELD_XYRL( cg2d_x, 'Current cg2d_x ' ,
66         &                        myIter, myThid )
67    
68    #ifdef ALLOW_KPP
69           IF (KPPmixingMaps) THEN
70            CALL PLOT_FIELD_XYRL  ( KPPhbl    , 'KPPhbl'    ,
71         &                          myIter, myThid )
72            CALL PLOT_FIELD_XYZRL ( KPPviscAz , 'KPPviscAz' ,
73         &                          Nr, myIter, myThid )
74            CALL PLOT_FIELD_XYZRL ( KPPdiffKzT, 'KPPdiffKzT',
75         &                          Nr, myIter, myThid )
76            CALL PLOT_FIELD_XYZRL ( KPPghat   , 'KPPghat'   ,
77         &                          Nr, myIter, myThid )
78           ENDIF
79    #endif
80    
81        ENDIF        ENDIF
82    

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

  ViewVC Help
Powered by ViewVC 1.1.22