1 |
C $Header: /u/gcmpack/MITgcm/model/src/initialise_fixed.F,v 1.31 2004/07/06 01:58:41 edhill 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 |-- MNC_INIT + MNC_CW_INIT |
33 |
C | |
34 |
C |-- MON_INIT |
35 |
C | |
36 |
C |-- INI_GRID |
37 |
C | |
38 |
C |-- INI_EOS |
39 |
C | |
40 |
C |-- INI_DEPTHS |
41 |
C | |
42 |
C |-- INI_MASKS_ETC |
43 |
C | |
44 |
C |-- PACKAGES_BOOT |
45 |
C | |
46 |
C |-- PACKAGES_READPARMS |
47 |
C | |
48 |
C |-- PACKAGES_INIT_FIXED |
49 |
C | |
50 |
C |-- PACKAGES_CHECK |
51 |
C | |
52 |
C |-- INI_LINEAR_PHSURF |
53 |
C | |
54 |
C |-- INI_CORI |
55 |
C | |
56 |
C |-- INI_CG2D |
57 |
C | |
58 |
C |-- INI_CG3D |
59 |
C | |
60 |
C |-- CONFIG_CHECK |
61 |
C | |
62 |
C |-- CONFIG_SUMMARY |
63 |
|
64 |
C !USES: |
65 |
IMPLICIT NONE |
66 |
C == Global variables == |
67 |
#include "SIZE.h" |
68 |
#include "EEPARAMS.h" |
69 |
#include "PARAMS.h" |
70 |
|
71 |
C !INPUT/OUTPUT PARAMETERS: |
72 |
C == Routine arguments == |
73 |
INTEGER myThid |
74 |
CEOP |
75 |
|
76 |
C-- Set model parameters. |
77 |
C Parameters are set to defaults and then updates are read from |
78 |
C an input file called data. |
79 |
CALL INI_PARMS( myThid ) |
80 |
_BARRIER |
81 |
|
82 |
#ifdef ALLOW_MNC |
83 |
C Initialize MNC look-up tables |
84 |
IF (useMNC) THEN |
85 |
CALL MNC_INIT(myThid) |
86 |
CALL MNC_CW_INIT(sNx,sNy,OLx,OLy,nSx,nSy,nPx,nPy, |
87 |
& Nr,myThid) |
88 |
IF ( mnc_echo_gvtypes ) THEN |
89 |
CALL MNC_CW_DUMP( myThid ) |
90 |
ENDIF |
91 |
ENDIF |
92 |
#endif |
93 |
|
94 |
#ifdef ALLOW_MONITOR |
95 |
C-- Initialise MONITOR I/O streams so we can report config. info |
96 |
CALL MON_INIT( myThid ) |
97 |
_BARRIER |
98 |
#endif |
99 |
|
100 |
C-- Set model grid. |
101 |
C Variables defining model grid spacing are defined. |
102 |
CALL INI_GRID( myThid ) |
103 |
_BARRIER |
104 |
|
105 |
C-- Set equation of state parameters. |
106 |
CALL INI_EOS( myThid ) |
107 |
_BARRIER |
108 |
|
109 |
C-- Initialise map of depths |
110 |
CALL INI_DEPTHS( myThid ) |
111 |
_BARRIER |
112 |
|
113 |
C-- Derive masks, lopping factors and recipricols of quantities. |
114 |
C Volumes and areas are set according to grid and depth map. |
115 |
CALL INI_MASKS_ETC( myThid ) |
116 |
_BARRIER |
117 |
|
118 |
C-- Configure packages |
119 |
CALL PACKAGES_BOOT( myThid ) |
120 |
|
121 |
C-- Read configuration parameters for packages |
122 |
CALL PACKAGES_READPARMS( myThid ) |
123 |
|
124 |
C-- Call fixed data initialization phase of packages |
125 |
CALL PACKAGES_INIT_FIXED( myThid ) |
126 |
|
127 |
C-- Check dependances between packages |
128 |
CALL PACKAGES_CHECK( myThid ) |
129 |
|
130 |
C-- Set Bo_surf => define the Linear Relation: Phi_surf(eta) |
131 |
CALL INI_LINEAR_PHISURF( myThid ) |
132 |
|
133 |
C-- Set coriolis operators |
134 |
CALL INI_CORI( myThid ) |
135 |
|
136 |
C-- Set laplace operators for use in 2D conjugate gradient solver. |
137 |
CALL INI_CG2D( myThid ) |
138 |
|
139 |
#ifdef ALLOW_NONHYDROSTATIC |
140 |
C-- Set laplace operators for use in 3D conjugate gradient solver. |
141 |
ceh3 needs an IF ( useNONHYDROSTATIC ) THEN |
142 |
CALL INI_CG3D( myThid ) |
143 |
#endif |
144 |
|
145 |
C-- Check parameters and model cofiguration |
146 |
CALL CONFIG_CHECK( myThid ) |
147 |
|
148 |
C-- Finally summarise the model cofiguration |
149 |
CALL CONFIG_SUMMARY( myThid ) |
150 |
|
151 |
C-- Write units/set precision/etc for I/O of variables/arrays belonging |
152 |
C to the core dynamical model |
153 |
CALL INI_MODEL_IO( myThid ) |
154 |
|
155 |
C-- Write grid data and geometry arrays |
156 |
CALL WRITE_GRID( myThid ) |
157 |
|
158 |
#ifdef COMPONENT_MODULE |
159 |
C-- Post component-model configuration information to coupler |
160 |
C and get config. info for other component(s). |
161 |
IF ( useCoupler ) CALL CPL_EXCH_CONFIGS( myThid ) |
162 |
#endif |
163 |
|
164 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
165 |
|
166 |
RETURN |
167 |
END |