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

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

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

revision 1.18 by edhill, Thu Jan 15 04:31:24 2004 UTC revision 1.49 by jmc, Fri Sep 5 20:15:28 2008 UTC
# Line 7  C $Name$ Line 7  C $Name$
7  CBOP  CBOP
8  C     !ROUTINE: INITIALISE_FIXED  C     !ROUTINE: INITIALISE_FIXED
9  C     !INTERFACE:  C     !INTERFACE:
10        SUBROUTINE INITIALISE_FIXED(myThid)        SUBROUTINE INITIALISE_FIXED( myThid )
11    
12  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
13  C     *==========================================================*  C     *==========================================================*
14  C     | SUBROUTINE INITIALISE_FIXED                                C     | SUBROUTINE INITIALISE_FIXED
15  C     | o Routine for setting fixed model arrays such as            C     | o Routine for setting fixed model arrays such as
16  C     |   topography, grid, solver matrices, etc.                  C     |   topography, grid, solver matrices, etc.
17  C     *==========================================================*  C     *==========================================================*
18  C     | INITIALISE_FIXED is invoked at the start of the model to    C     | INITIALISE_FIXED is invoked at the start of the model to
19  C     | set fixed model arrays. It reads data from an input file    C     | set fixed model arrays. It reads data from an input file
20  C     | and from various binary files.                              C     | and from various binary files.
21  C     | Each thread invokes an instance of this routine as does    C     | Each thread invokes an instance of this routine as does
22  C     | each process in a multi-process parallel environment like  C     | each process in a multi-process parallel environment like
23  C     | MPI.                                                        C     | MPI.
24  C     *==========================================================*  C     *==========================================================*
25  C     \ev  C     \ev
26    
# Line 29  C     INITIALISE_FIXED Line 29  C     INITIALISE_FIXED
29  C      |  C      |
30  C      |-- INI_PARMS  C      |-- INI_PARMS
31  C      |  C      |
32    C      |-- PACKAGES_BOOT
33    C      |
34    C      |-- PACKAGES_READPARMS
35    C      | |
36    C      | | - MNC_INIT + MNC_CW_INIT
37    C      | |
38    C      | | - ${PKG}_READPARMS
39    C      |
40    C      |-- SET_PARMS
41    C      |
42    C      |-- INI_MODEL_IO
43    C      |
44  C      |-- MON_INIT  C      |-- MON_INIT
45  C      |  C      |
46  C      |-- INI_GRID  C      |-- INI_GRID
47  C      |  C      |
48    C      |-- LOAD_REF_FILES
49    C      |
50  C      |-- INI_EOS  C      |-- INI_EOS
51  C      |  C      |
52  C      |-- INI_DEPTHS  C      |-- SET_REF_STATE
53  C      |  C      |
54  C      |-- INI_MASKS_ETC  C      |-- SET_GRID_FACTORS
55  C      |  C      |
56  C      |-- PACKAGES_BOOT  C      |-- INI_DEPTHS
57  C      |  C      |
58  C      |-- PACKAGES_READPARMS  C      |-- INI_MASKS_ETC
59  C      |  C      |
60  C      |-- PACKAGES_INIT_FIXED  C      |-- PACKAGES_INIT_FIXED
61  C      |  C      |
 C      |-- PACKAGES_CHECK  
 C      |  
62  C      |-- INI_LINEAR_PHSURF  C      |-- INI_LINEAR_PHSURF
63  C      |  C      |
64  C      |-- INI_CORI  C      |-- INI_CORI
# Line 55  C      |-- INI_CG2D Line 67  C      |-- INI_CG2D
67  C      |  C      |
68  C      |-- INI_CG3D  C      |-- INI_CG3D
69  C      |  C      |
70    C      |-- CONFIG_SUMMARY
71    C      |
72    C      |-- PACKAGES_CHECK
73    C      |
74  C      |-- CONFIG_CHECK  C      |-- CONFIG_CHECK
75  C      |  C      |
76  C      |-- CONFIG_SUMMARY  C      |-- WRITE_GRID
77  C      |  C      |
78  C      |-- MNC_W_GRIDINFO  C      |-- CPL_EXCH_CONFIGS
79    
80  C     !USES:  C     !USES:
81        IMPLICIT NONE        IMPLICIT NONE
# Line 73  C     == Routine arguments == Line 89  C     == Routine arguments ==
89        INTEGER myThid        INTEGER myThid
90  CEOP  CEOP
91    
92    C-    here is a way to deliberately break the barrier syncronization
93    C     by adding a BARRIER on thread XXX only ; Used to test BAR_CHECK.
94    c     IF ( myThid.EQ.XXX ) THEN
95    c       _BARRIER
96    c       CALL SYSTEM('sleep 1')
97    c     ENDIF
98    C--   Check barrier synchronization:
99          CALL BAR_CHECK( 2, myThid )
100    
101  C--   Set model parameters.  C--   Set model parameters.
102  C     Parameters are set to defaults and then updates are read from  C     Parameters are set to defaults and then updates are read from
103  C     an input file called data.  C     an input file called data.
104        CALL INI_PARMS( myThid )        CALL INI_PARMS( myThid )
105        _BARRIER  
106    C--   Configure packages
107          CALL PACKAGES_BOOT( myThid )
108    
109    C--   Read configuration parameters for packages
110          CALL PACKAGES_READPARMS( myThid )
111    
112    C--   Set (or reset) parameters (at this point, know which packages are used);
113    C     after this call, main model parameters are not supposed to be modified.
114          CALL SET_PARMS( myThid )
115    
116    C--   Write units/set precision/etc for I/O of variables/arrays belonging
117    C     to the core dynamical model
118          CALL INI_MODEL_IO( myThid )
119    
120  #ifdef ALLOW_MONITOR  #ifdef ALLOW_MONITOR
121  C--   Initialise MONITOR I/O streams so we can report config. info  C--   Initialise MONITOR I/O streams so we can report config. info
122        CALL MON_INIT( myThid )        CALL MON_INIT( myThid )
       _BARRIER  
123  #endif  #endif
124    
   
125  C--   Set model grid.  C--   Set model grid.
126  C     Variables defining model grid spacing are defined.  C     Variables defining model grid spacing are defined.
127        CALL INI_GRID( myThid )        CALL INI_GRID( myThid )
128        _BARRIER  
129    C--   Load reference profiles from files
130          CALL LOAD_REF_FILES( myThid )
131    
132  C--   Set equation of state parameters.  C--   Set equation of state parameters.
133        CALL INI_EOS( myThid )        CALL INI_EOS( myThid )
134        _BARRIER  
135    C--   Set reference state (vertical reference profiles)
136          CALL SET_REF_STATE( myThid )
137    
138    C--   Set remaining grid factors
139          CALL SET_GRID_FACTORS( myThid )
140    
141  C--   Initialise map of depths  C--   Initialise map of depths
142        CALL INI_DEPTHS( myThid )        CALL INI_DEPTHS( myThid )
       _BARRIER  
143    
144  C--   Derive masks, lopping factors and recipricols of quantities.  C--   Derive masks, lopping factors and recipricols of quantities.
145  C     Volumes and areas are set according to grid and depth map.  C     Volumes and areas are set according to grid and depth map.
146        CALL INI_MASKS_ETC( myThid )        CALL INI_MASKS_ETC( myThid )
       _BARRIER  
   
 C--   Configure packages  
       CALL PACKAGES_BOOT( myThid )  
147    
148  C--   Read configuration parameters for packages  C--   Synchronize all threads after setting masks and before pkgs init.
149        CALL PACKAGES_READPARMS( myThid )        _BARRIER
150    
151  C--   Call fixed data initialization phase of packages  C--   Call fixed data initialization phase of packages
152        CALL PACKAGES_INIT_FIXED( myThid )        CALL PACKAGES_INIT_FIXED( myThid )
153    
 C--   Check dependances between packages  
       CALL PACKAGES_CHECK( myThid )  
   
154  C--   Set Bo_surf => define the Linear Relation: Phi_surf(eta)  C--   Set Bo_surf => define the Linear Relation: Phi_surf(eta)
155        CALL INI_LINEAR_PHISURF( myThid )        CALL INI_LINEAR_PHISURF( myThid )
156    
# Line 127  C--   Set laplace operators for use in 2 Line 162  C--   Set laplace operators for use in 2
162    
163  #ifdef ALLOW_NONHYDROSTATIC  #ifdef ALLOW_NONHYDROSTATIC
164  C--   Set laplace operators for use in 3D conjugate gradient solver.  C--   Set laplace operators for use in 3D conjugate gradient solver.
 ceh3 needs an IF ( useNONHYDROSTATIC ) THEN  
165        CALL INI_CG3D( myThid )        CALL INI_CG3D( myThid )
166  #endif  #endif
167    
168  C--   Check parameters and model cofiguration  C--   Finally summarise the model configuration
169          CALL CONFIG_SUMMARY( myThid )
170    
171    C--   Check packages configuration (& print summary)
172          CALL PACKAGES_CHECK( myThid )
173    
174    C--   Check parameters and model configuration
175        CALL CONFIG_CHECK( myThid )        CALL CONFIG_CHECK( myThid )
176    
177  C--   Finally summarise the model cofiguration  C--   Write grid data and geometry arrays
178        CALL CONFIG_SUMMARY( myThid )        IF ( debugLevel.GE.debLevA .OR.
179         &     startTime.EQ.baseTime ) CALL WRITE_GRID( myThid )
180    
181  #ifdef COMPONENT_MODULE  #ifdef COMPONENT_MODULE
182  C--   Post component-model configuration information to coupler  C--   Post component-model configuration information to coupler
# Line 143  C     and get config. info for other com Line 184  C     and get config. info for other com
184        IF ( useCoupler ) CALL CPL_EXCH_CONFIGS( myThid )        IF ( useCoupler ) CALL CPL_EXCH_CONFIGS( myThid )
185  #endif  #endif
186    
187  #ifdef ALLOW_MNC  C--   Check barrier synchronization:
188  C     Test MNC        CALL BAR_CHECK( 3, myThid )
189        CALL MNC_INIT(myThid)  
190        CALL MNC_W_GRIDINFO(myThid, 'test')  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
 #endif  
191    
192        RETURN        RETURN
193        END        END

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.49

  ViewVC Help
Powered by ViewVC 1.1.22