/[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.51 - (show annotations) (download)
Thu Dec 17 01:28:10 2009 UTC (14 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62c, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62y, checkpoint62x, checkpoint62, checkpoint62b
Changes since 1.50: +3 -2 lines
update comments (+ typo)

1 C $Header: /u/gcmpack/MITgcm/model/src/initialise_fixed.F,v 1.50 2009/07/08 22:10:01 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_PHISURF
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 | |- ${PKG}_CHECK
72 C |
73 C |-- CONFIG_CHECK
74 C |
75 C |-- WRITE_GRID
76 C |
77 C |-- CPL_EXCH_CONFIGS
78
79 C !USES:
80 IMPLICIT NONE
81 C == Global variables ==
82 #include "SIZE.h"
83 #include "EEPARAMS.h"
84 #include "PARAMS.h"
85
86 C !INPUT/OUTPUT PARAMETERS:
87 C == Routine arguments ==
88 INTEGER myThid
89 CEOP
90
91 C- here is a way to deliberately break the barrier syncronization
92 C by adding a BARRIER on thread XXX only ; Used to test BAR_CHECK.
93 c IF ( myThid.EQ.XXX ) THEN
94 c _BARRIER
95 c CALL SYSTEM('sleep 1')
96 c ENDIF
97 C-- Check barrier synchronization:
98 CALL BAR_CHECK( 2, myThid )
99
100 C-- Set model parameters.
101 C Parameters are set to defaults and then updates are read from
102 C an input file called data.
103 CALL INI_PARMS( myThid )
104
105 C-- Configure packages
106 CALL PACKAGES_BOOT( myThid )
107
108 C-- Read configuration parameters for packages
109 CALL PACKAGES_READPARMS( myThid )
110
111 C-- Set (or reset) parameters (at this point, know which packages are used);
112 C after this call, main model parameters are not supposed to be modified.
113 CALL SET_PARMS( myThid )
114
115 C-- Write units/set precision/etc for I/O (pickup, MDS/RW, MNC, MONITOR):
116 CALL INI_MODEL_IO( myThid )
117
118 C-- Set model grid.
119 C Variables defining model grid spacing are defined.
120 CALL INI_GRID( myThid )
121
122 C-- Load reference profiles from files
123 CALL LOAD_REF_FILES( myThid )
124
125 C-- Set equation of state parameters.
126 CALL INI_EOS( myThid )
127
128 C-- Set reference state (vertical reference profiles)
129 CALL SET_REF_STATE( myThid )
130
131 C-- Set remaining grid factors
132 CALL SET_GRID_FACTORS( myThid )
133
134 C-- Initialise map of depths
135 CALL INI_DEPTHS( myThid )
136
137 C-- Derive masks, lopping factors and recipricols of quantities.
138 C Volumes and areas are set according to grid and depth map.
139 CALL INI_MASKS_ETC( myThid )
140
141 C-- Synchronize all threads after setting masks and before pkgs init.
142 _BARRIER
143
144 C-- Call fixed data initialization phase of packages
145 CALL PACKAGES_INIT_FIXED( myThid )
146
147 C-- Set Bo_surf => define the Linear Relation: Phi_surf(eta)
148 CALL INI_LINEAR_PHISURF( myThid )
149
150 C-- Set coriolis operators
151 CALL INI_CORI( myThid )
152
153 C-- Set laplace operators for use in 2D conjugate gradient solver.
154 CALL INI_CG2D( myThid )
155
156 #ifdef ALLOW_NONHYDROSTATIC
157 C-- Set laplace operators for use in 3D conjugate gradient solver.
158 CALL INI_CG3D( myThid )
159 #endif
160
161 C-- Finally summarise the model configuration
162 CALL CONFIG_SUMMARY( myThid )
163
164 C-- Check packages configuration (& print summary)
165 CALL PACKAGES_CHECK( myThid )
166
167 C-- Check parameters and model configuration
168 CALL CONFIG_CHECK( myThid )
169
170 C-- Write grid data and geometry arrays
171 IF ( debugLevel.GE.debLevA .OR.
172 & startTime.EQ.baseTime ) CALL WRITE_GRID( myThid )
173
174 #ifdef COMPONENT_MODULE
175 C-- Post component-model configuration information to coupler
176 C and get config. info for other component(s).
177 IF ( useCoupler ) CALL CPL_EXCH_CONFIGS( myThid )
178 #endif
179
180 C-- Check barrier synchronization:
181 CALL BAR_CHECK( 3, myThid )
182
183 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
184
185 RETURN
186 END

  ViewVC Help
Powered by ViewVC 1.1.22