/[MITgcm]/MITgcm_contrib/sannino/OASIS_3.0_Coupler/code/packages_init_variables.F
ViewVC logotype

Contents of /MITgcm_contrib/sannino/OASIS_3.0_Coupler/code/packages_init_variables.F

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


Revision 1.1 - (show annotations) (download)
Thu Jul 20 21:08:16 2006 UTC (19 years ago) by sannino
Branch: MAIN
CVS Tags: HEAD
o Adding OASIS package
o Adding grid refinement package

1 C $Header: /u/gcmpack/MITgcm/model/src/packages_init_variables.F,v 1.48 2006/05/06 14:33:25 heimbach Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "AD_CONFIG.h"
6 #include "CPP_OPTIONS.h"
7
8 CBOP
9 C !ROUTINE: PACKAGES_INIT_VARIABLES
10 C !INTERFACE:
11 SUBROUTINE PACKAGES_INIT_VARIABLES( myThid )
12
13 C !DESCRIPTION: \bv
14 C *==========================================================*
15 C | SUBROUTINE PACKAGES_INIT_VARIABLES
16 C | o Does initialisation of package-related variable data
17 C *==========================================================*
18 C \ev
19
20 C !CALLING SEQUENCE:
21 C PACKAGES_INIT_VARIABLES
22 C |
23 C |-- CD_CODE_INI_VARS
24 C |
25 C |-- GMREDI_INIT
26 C |
27 C |-- KPP_INIT
28 C |-- KPP_OPEN_DIAGS
29 C |
30 C |-- PP81_INIT
31 C |
32 C |-- MY82_INIT
33 C |
34 C |-- GGL90_INIT
35 C |
36 C |-- SEAICE_INIT
37 C |
38 C |-- OBCS_INIT_VARIABLES
39 C |
40 C |-- PTRACERS_INIT
41 C |
42 C |-- LAND_INI_VARS
43 C |
44 C |-- CTRL_MAP_INI
45 C |
46 C |-- EXF_INIT
47 C |
48 C |-- INI_FORCING
49 C |
50 C |-- ECCO_INIT
51 C |
52 C |-- COST_INIT
53 C |
54 C |-- BULKF_INIT
55 C |
56 C |-- THSICE_INI_VARS
57 C |
58 C |-- CPL_INI_VARS
59 C |
60 C |-- NESTING_SON_INIT
61 C |
62 C |-- NESTING_FATHER_INIT
63 C |
64 C |-- OASIS_INITC
65 C
66
67
68
69 C !USES:
70 IMPLICIT NONE
71 C === Global variables ===
72 #include "SIZE.h"
73 #include "EEPARAMS.h"
74 #include "PARAMS.h"
75 cgmoOASIS(
76 #ifdef ALLOW_OASIS
77 #include "OASIS.h"
78 #endif
79 cgmOASIS)
80
81 #ifdef ALLOW_AUTODIFF_TAMC
82 # include "DYNVARS.h"
83 # include "tamc.h"
84 # include "tamc_keys.h"
85 #endif
86
87 C !INPUT/OUTPUT PARAMETERS:
88 C === Routine arguments ===
89 C myThid - Number of this instances
90 INTEGER myThid
91 CEOP
92
93 #ifdef ALLOW_DEBUG
94 IF (debugMode)
95 & CALL DEBUG_ENTER('PACKAGES_INIT_VARIABLES',myThid)
96 #endif
97
98 #ifdef ALLOW_DIAGNOSTICS
99 IF ( useDiagnostics ) THEN
100 CALL DIAGNOSTICS_INIT_VARIA( myThid )
101 ENDIF
102 #endif
103
104 #ifdef ALLOW_CD_CODE
105 C-- Initialize CD_CODE variables:
106 C- note(jmc): before packaging CD_CODE, was done within ini_fields (=called before),
107 C therefore call CD-ini-vars before others pkg.
108 #ifdef ALLOW_DEBUG
109 IF (debugMode) CALL DEBUG_CALL('CD_CODE_INI',myThid)
110 #endif
111 IF (useCDscheme) CALL CD_CODE_INI_VARS( myThid )
112 #endif
113
114 #ifdef ALLOW_GMREDI
115 C-- Initialize GM/Redi parameterization
116 #ifdef ALLOW_DEBUG
117 IF (debugMode) CALL DEBUG_CALL('CD_CODE_INI',myThid)
118 #endif
119 IF (useGMRedi) CALL GMREDI_INIT( myThid )
120 #endif
121
122 #ifdef ALLOW_KPP
123 C-- Initialize KPP vertical mixing scheme.
124 IF (useKPP) THEN
125 #ifdef ALLOW_DEBUG
126 IF (debugMode)
127 & CALL DEBUG_CALL('KPP_INIT + KPP_OPEN_DIAGS',myThid)
128 #endif
129 CALL KPP_INIT( myThid )
130 CALL KPP_OPEN_DIAGS( myThid )
131 ENDIF
132 #endif
133
134 #ifdef ALLOW_PP81
135 C-- Initialize PP81 vertical mixing scheme.
136 IF (usePP81) THEN
137 #ifdef ALLOW_DEBUG
138 IF (debugMode) CALL DEBUG_CALL('PP81_INIT',myThid)
139 #endif
140 CALL PP81_INIT( myThid )
141 ENDIF
142 #endif
143
144 #ifdef ALLOW_MY82
145 C-- Initialize MY82 vertical mixing scheme.
146 IF (useMY82) THEN
147 CALL MY82_INIT( myThid )
148 ENDIF
149 #endif
150
151 #ifdef ALLOW_GGL90
152 C-- Initialize GGL90 vertical mixing scheme.
153 IF (useGGL90) THEN
154 #ifdef ALLOW_DEBUG
155 IF (debugMode) CALL DEBUG_CALL('GGL90_INIT',myThid)
156 #endif
157 CALL GGL90_INIT( myThid )
158 ENDIF
159 #endif
160
161 #ifdef ALLOW_SEAICE
162 C-- Initialize SEAICE model.
163 #ifdef ALLOW_DEBUG
164 IF (debugMode) CALL DEBUG_CALL('SEAICE_INIT',myThid)
165 #endif
166 IF (useSEAICE) CALL SEAICE_INIT( myThid )
167 #endif
168
169 cph-- moved further down
170 cph#ifdef ALLOW_OBCS
171 cphC-- Open boundaries data
172 cph IF (useOBCS) THEN
173 cph CALL OBCS_INIT_VARIABLES( myThid )
174 cph ENDIF
175 cph#endif
176
177 #ifdef ALLOW_PTRACERS
178 # ifndef ALLOW_AUTODIFF_TAMC
179 IF ( usePTRACERS ) THEN
180 # endif
181 #ifdef ALLOW_DEBUG
182 IF (debugMode) CALL DEBUG_CALL('PTRACERS_INIT',myThid)
183 #endif
184 CALL PTRACERS_INIT( mythid )
185 #ifdef ALLOW_GCHEM
186 # ifndef ALLOW_AUTODIFF_TAMC
187 IF (useGCHEM) THEN
188 # endif
189 CALL GCHEM_INIT_VARI( mythid )
190 # ifndef ALLOW_AUTODIFF_TAMC
191 ENDIF
192 # endif
193 #endif
194 # ifndef ALLOW_AUTODIFF_TAMC
195 ENDIF
196 # endif
197 #endif
198
199 #ifdef ALLOW_LAND
200 #ifdef ALLOW_DEBUG
201 IF (debugMode) CALL DEBUG_CALL('LAND_INI_VARS',myThid)
202 #endif
203 IF ( useLAND ) CALL LAND_INI_VARS( mythid )
204 #endif
205
206 #ifdef ALLOW_AUTODIFF
207 CADJ STORE theta = tapelev_init, key = 1
208 c-- Initialise auxiliary xx_ fields
209 CALL CTRL_INIT_VARIABLES ( mythid )
210 c-- Map the control variables onto the model state.
211 # ifdef ALLOW_ECCO
212 CALL CTRL_MAP_INI_ECCO( mythid )
213 # else
214 CALL CTRL_MAP_INI( mythid )
215 # endif
216 _BARRIER
217 #endif
218
219 #ifdef ALLOW_EXF
220 #ifdef ALLOW_DEBUG
221 IF (debugMode) CALL DEBUG_CALL('EXF_INIT',myThid)
222 #endif
223 CALL EXF_INIT( mythid )
224 #endif
225
226 #ifdef ALLOW_DEBUG
227 IF (debugMode) CALL DEBUG_CALL('INI_FORCING',myThid)
228 #endif
229 CALL INI_FORCING( mythid )
230
231 #ifdef ALLOW_EBM
232 # ifdef ALLOW_AUTODIFF
233 CADJ STORE theta = tapelev_init, key = 1
234 # endif
235 IF (useEBM) CALL EBM_INI_VARS( mythid )
236 #endif
237
238 #ifdef ALLOW_COST
239 c-- Initialise the cost function.
240 ceh3 needs an IF ( useCOST ) THEN
241 CALL COST_INIT_VARIA( mythid )
242 _BARRIER
243 #endif
244
245 #ifdef ALLOW_PROFILES
246 c-- Initialise the cost function.
247 CALL PROFILES_INIT_VARIA( mythid )
248 _BARRIER
249 #endif
250
251 #ifdef ALLOW_OBCS
252 C-- Open boundaries data
253 #ifdef ALLOW_DEBUG
254 IF (debugMode) CALL DEBUG_CALL('OBCS_INIT_VARIABLES',myThid)
255 #endif
256 IF (useOBCS) CALL OBCS_INIT_VARIABLES( myThid )
257 #endif
258
259 #ifdef ALLOW_BULK_FORCE
260 IF (useBulkForce) CALL BULKF_INIT( mythid)
261 #endif
262
263 #ifdef ALLOW_THSICE
264 #ifdef ALLOW_DEBUG
265 IF (debugMode) CALL DEBUG_CALL('THSICE_INI_VARS',myThid)
266 #endif
267 IF (useThSIce) CALL THSICE_INI_VARS( mythid)
268 #endif
269
270 #ifdef COMPONENT_MODULE
271 #ifdef ALLOW_DEBUG
272 IF (debugMode) CALL DEBUG_CALL('CPL_INI_VARS',myThid)
273 #endif
274 IF (useCoupler) CALL CPL_INI_VARS( mythid )
275 #endif
276
277 #ifdef ALLOW_FIZHI
278 C Initialize FIZHI state variables
279 #ifdef ALLOW_DEBUG
280 IF (debugMode) CALL DEBUG_CALL('FIZHI_INIT_VARS',myThid)
281 #endif
282 IF (useFIZHI) CALL FIZHI_INIT_VARS( mythid)
283 #endif
284
285 #ifdef ALLOW_MATRIX
286 #ifdef ALLOW_DEBUG
287 IF (debugMode) CALL DEBUG_CALL('MATRIX_INIT',myThid)
288 #endif
289 IF ( useMATRIX ) CALL MATRIX_INIT( myThid )
290 #endif
291
292 #ifdef ALLOW_DEBUG
293 IF (debugMode)
294 & CALL DEBUG_LEAVE('PACKAGES_INIT_VARIABLES',myThid)
295 #endif
296
297
298
299 cgmNESTING(
300 #ifdef ALLOW_NESTING_SON
301 C-- Initialize NESTING in SON configuration
302 IF (useNESTING_SON) THEN
303 #ifdef ALLOW_DEBUG
304 IF (debugMode)
305 & CALL DEBUG_CALL('NESTING_SON_INIT',myThid)
306 #endif
307 CALL NESTING_SON_INIT( myThid )
308 ENDIF
309 #endif
310 C
311 #ifdef ALLOW_NESTING_FATHER
312 C-- Initialize NESTING in FATHER configuration
313 IF (useNESTING_FATHER) THEN
314 #ifdef ALLOW_DEBUG
315 IF (debugMode)
316 & CALL DEBUG_CALL('NESTING_FATHER_INIT',myThid)
317 #endif
318 CALL NESTING_FATHER_INIT( myThid )
319 ENDIF
320 #endif
321 cgmNESTING)
322
323 cgmOASIS(
324 #ifdef ALLOW_OASIS
325 C-- Initialize OASIS coupler
326 IF (useOASIS) THEN
327 #ifdef ALLOW_DEBUG
328 IF (debugMode)
329 & CALL DEBUG_CALL('OASIS_INIT',myThid)
330 #endif
331 ENDIF
332 #endif
333 cgmOASIS)
334
335
336 RETURN
337 END

  ViewVC Help
Powered by ViewVC 1.1.22