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

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

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


Revision 1.50 - (show annotations) (download)
Wed Jul 8 22:10:01 2009 UTC (14 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.49: +6 -14 lines
move MNC & MONITOR initialisation calls to INI_MODEL_IO

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

  ViewVC Help
Powered by ViewVC 1.1.22