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