/[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.40 by heimbach, Mon Jul 30 20:39:18 2001 UTC revision 1.41 by cnh, Fri Sep 21 03:54:36 2001 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4    CBOI
5    C
6    C !TITLE: MITGCM KERNEL CODE SYNOPSIS
7    C !AUTHORS: mitgcm developers ( support@mitgcm.org )
8    C !AFFILIATION: Massachussetts Institute of Technology
9    C !DATE:
10    C !INTRODUCTION: model/ subdirectory
11    C Routines in the subdirectories under model/ ( src/ and inc/ ) are most of
12    C the core routines for the baseline forms of the kernel equations in the
13    C MITgcm algorithm.
14    C Code for auxilliary equations and alternate dicretizations of the fundamental
15    C equations can be found in the pkg/ directory tree.
16    C
17    CEOI
18    
19    
20  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
21    
22    CBOP
23    
24    C     !ROUTINE: THE_MODEL_MAIN
25    
26    C     !INTERFACE:
27        SUBROUTINE THE_MODEL_MAIN(myThid)        SUBROUTINE THE_MODEL_MAIN(myThid)
 C     /==========================================================\  
 C     | SUBROUTINE THE_MODEL_MAIN                                |  
 C     | o Master controlling routine for model using the MITgcm  |  
 C     |   UV parallel wrapper.                                   |  
 C     |==========================================================|  
 C     | THE_MODEL_MAIN is invoked by the MITgcm UV parallel      |  
 C     | wrapper with a single integer argument "myThid". This    |  
 C     | variable identifies the thread number of an instance of  |  
 C     | THE_MODEL_MAIN. Each instance of THE_MODEL_MAIN works    |  
 C     | on a particular region of the models domain and          |  
 C     | synchronises with other instances as necessary. The      |  
 C     | routine has to "understand" the MITgcm parallel          |  
 C     | environment and the numerical algorithm. Editing this    |  
 C     | routine is best done with some knowledge of both aspects.|  
 C     | Notes                                                    |  
 C     | =====                                                    |  
 C     | C*P* comments indicating place holders for which code is |  
 C     |      presently being developed.                          |  
 C     \==========================================================/  
28        IMPLICIT NONE        IMPLICIT NONE
29  C  
30    C     !DESCRIPTION: \bv
31    C     *==========================================================*
32    C     | SUBROUTINE THE_MODEL_MAIN                                
33    C     | o Master controlling routine for model using the MITgcm  
34    C     |   UV parallel wrapper.                                    
35    C     *==========================================================*
36    C     | THE_MODEL_MAIN is invoked by the MITgcm UV parallel      
37    C     | wrapper with a single integer argument "myThid". This    
38    C     | variable identifies the thread number of an instance of  
39    C     | THE_MODEL_MAIN. Each instance of THE_MODEL_MAIN works    
40    C     | on a particular region of the models domain and          
41    C     | synchronises with other instances as necessary. The      
42    C     | routine has to "understand" the MITgcm parallel          
43    C     | environment and the numerical algorithm. Editing this    
44    C     | routine is best done with some knowledge of both aspects.
45    C     | Notes                                                    
46    C     | =====                                                    
47    C     | C*P* comments indicating place holders for which code is  
48    C     |      presently being developed.                          
49    C     *==========================================================*
50    C     \ev
51    
52    C     !CALLING SEQUENCE:
53    C     THE_MODEL_MAIN()
54    C       |
55    C       |
56    C       |--INITIALISE_FIXED
57    C       |   o Set model configuration (fixed arrays)
58    C       |     Topography, hydrography, timestep, grid, etc..
59    C       |
60    C       |--CTRL_UNPACK      o Derivative mode. Unpack control vector.
61    C       |
62    C       |--ADTHE_MAIN_LOOP  o Main timestepping loop for combined
63    C       |                     prognostic and reverse mode integration.
64    C       |
65    C       |--CTRL_PACK        o Derivative mode. Unpack control vector.
66    C       |
67    C       |--GRDCHK_MAIN      o Gradient check control routine.
68    C       |
69    C       |--THE_MAIN_LOOP    o Main timestepping loop for pure prognostic
70    C       |                     integration.
71    C       |
72    C       |--WRITE_CHECKPOINT o Write retsart information.
73    C       |
74    C       |--TIMER_PRINTALL   o Print out timing statistics.
75    C       |
76    C       |--COMM_STATS       o Print out communication statistics.
77    
78    C     !USES:
79  C     == Global variables ===  C     == Global variables ===
80  #include "SIZE.h"  #include "SIZE.h"
81  #include "EEPARAMS.h"  #include "EEPARAMS.h"
# Line 40  C     == Global variables === Line 91  C     == Global variables ===
91  #include "adcost.h"  #include "adcost.h"
92  #endif  #endif
93    
94    C     !INPUT/OUTPUT PARAMETERS:
95  C     == Routine arguments ==  C     == Routine arguments ==
96  C     myThid - Thread number for this instance of the routine.  C     myThid - Thread number for this instance of the routine.
97        INTEGER myThid          INTEGER myThid  
98    
99    C     !LOCAL VARIABLES:
100  C     == Local variables ==  C     == Local variables ==
101  C     Note: Under the multi-threaded model myCurrentIter and  C     Note: Under the multi-threaded model myCurrentIter and
102  C           myCurrentTime are local variables passed around as routine  C           myCurrentTime are local variables passed around as routine
# Line 54  C     myCurrentTime - Time counter for t Line 107  C     myCurrentTime - Time counter for t
107  C     myCurrentIter - Iteration counter for this thread  C     myCurrentIter - Iteration counter for this thread
108        INTEGER myCurrentIter        INTEGER myCurrentIter
109        _RL     myCurrentTime        _RL     myCurrentTime
110    CEOP
111    
112  C--   This timer encompasses the whole code  C--   This timer encompasses the whole code
113        CALL TIMER_START('ALL                [THE_MODEL_MAIN]',myThid)        CALL TIMER_START('ALL                [THE_MODEL_MAIN]',myThid)

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

  ViewVC Help
Powered by ViewVC 1.1.22