/[MITgcm]/MITgcm_contrib/rpa_layers/modsrc/packages_init_variables.F
ViewVC logotype

Contents of /MITgcm_contrib/rpa_layers/modsrc/packages_init_variables.F

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


Revision 1.2 - (show annotations) (download)
Wed Sep 16 18:06:39 2009 UTC (14 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +7 -8 lines
minor changes in ordering calls (just for convenience)

1 C $Header: /u/gcmpack/MITgcm_contrib/rpa_layers/modsrc/packages_init_variables.F,v 1.1 2009/09/15 19:46:38 rpa 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 |-- DIAGNOSTICS_INIT_VARIA
24 C |
25 C |-- GAD_GAD_INIT_VARIA
26 C |
27 C |-- CD_CODE_INI_VARS
28 C |
29 C |-- GMREDI_INIT
30 C |
31 C |-- DWNSLP_INIT_VARIA
32 C |
33 C |-- KPP_INIT_VARIA
34 C |
35 C |-- PP81_INIT_VARIA
36 C |
37 C |-- MY82_INIT_VARIA
38 C |
39 C |-- GGL90_INIT_VARIA
40 C |
41 C |-- SEAICE_INIT_VARIA
42 C |
43 C |-- SHELFICE_INIT_VARIA
44 C |
45 C |-- PTRACERS_INIT_VARIA
46 C |
47 C |-- GCHEM_INIT_VARI
48 C |
49 C |-- LAND_INI_VARS
50 C |
51 C |-- CTRL_INIT_VARIABLES
52 C |-- CTRL_MAP_INI_ECCO
53 C |-- CTRL_MAP_INI
54 C |
55 C |-- EXF_INIT
56 C |
57 C |-- EBM_INI_VARS
58 C |
59 C |-- COST_INIT_VARIA
60 C |
61 C |-- PROFILES_INIT_VARIA
62 C |
63 C |-- FLT_INIT_VARIA
64 C |
65 C |-- OBCS_INIT_VARIABLES
66 C |
67 C |-- BULKF_INIT_VARIA
68 C |
69 C |-- THSICE_INI_VARS
70 C |
71 C |-- CPL_INI_VARS
72 C |
73 C |-- ATM2D_INIT_VARS
74 C |
75 C |-- FIZHI_INI_VARS
76 C |
77 C |-- MATRIX_INIT
78 C |
79 C |-- RBCS_INIT_VARIA
80 C |
81 C |-- REGRID_INIT_VARIA
82 C |
83 C |-- LAYERS_INIT_VARIA
84 C |
85 C |-- SALT_PLUME_INIT_VARIA
86 C |
87 C |-- CHEAPAML_INIT_VARIA
88 C |
89 C |-- MYPACKAGE_INIT_VARIA
90
91 C !USES:
92 IMPLICIT NONE
93 C === Global variables ===
94 #include "SIZE.h"
95 #include "EEPARAMS.h"
96 #include "PARAMS.h"
97 #ifdef ALLOW_AUTODIFF_TAMC
98 # include "DYNVARS.h"
99 # include "tamc.h"
100 # include "tamc_keys.h"
101 #endif
102
103 C !INPUT/OUTPUT PARAMETERS:
104 C === Routine arguments ===
105 C myThid - Number of this instances
106 INTEGER myThid
107 CEOP
108
109 #ifdef ALLOW_DEBUG
110 IF (debugMode)
111 & CALL DEBUG_ENTER('PACKAGES_INIT_VARIABLES',myThid)
112 #endif /* ALLOW_DEBUG */
113
114 #ifdef ALLOW_DIAGNOSTICS
115 IF ( useDiagnostics ) THEN
116 CALL DIAGNOSTICS_INIT_VARIA( myThid )
117 ENDIF
118 #endif /* ALLOW_DIAGNOSTICS */
119
120 #ifdef ALLOW_GENERIC_ADVDIFF
121 IF ( useGAD ) THEN
122 # ifdef ALLOW_DEBUG
123 IF (debugMode) CALL DEBUG_CALL('GAD_INIT_VARIA',myThid)
124 # endif
125 CALL GAD_INIT_VARIA( myThid )
126 ENDIF
127 #endif /* ALLOW_GENERIC_ADVDIFF */
128
129 #ifdef ALLOW_CD_CODE
130 C-- Initialize CD_CODE variables:
131 C- note(jmc): before packaging CD_CODE, was done within ini_fields (=called before),
132 C therefore call CD-ini-vars before others pkg.
133 IF (useCDscheme) THEN
134 # ifdef ALLOW_DEBUG
135 IF (debugMode) CALL DEBUG_CALL('CD_CODE_INI_VARS',myThid)
136 # endif
137 CALL CD_CODE_INI_VARS( myThid )
138 ENDIF
139 #endif /* ALLOW_CD_CODE */
140
141 #ifdef ALLOW_GMREDI
142 C-- Initialize GM/Redi parameterization
143 IF (useGMRedi) THEN
144 # ifdef ALLOW_DEBUG
145 IF (debugMode) CALL DEBUG_CALL('GMREDI_INIT',myThid)
146 # endif
147 CALL GMREDI_INIT( myThid )
148 ENDIF
149 #endif /* ALLOW_GMREDI */
150
151 #ifdef ALLOW_DOWN_SLOPE
152 IF ( useDOWN_SLOPE ) THEN
153 CALL DWNSLP_INIT_VARIA( myThid )
154 ENDIF
155 #endif /* ALLOW_DOWN_SLOPE */
156
157 #ifdef ALLOW_KPP
158 C-- Initialize KPP vertical mixing scheme.
159 IF (useKPP) THEN
160 # ifdef ALLOW_DEBUG
161 IF (debugMode) CALL DEBUG_CALL('KPP_INIT_VARIA',myThid)
162 # endif
163 CALL KPP_INIT_VARIA( myThid )
164 ENDIF
165 #endif /* ALLOW_KPP */
166
167 #ifdef ALLOW_PP81
168 C-- Initialize PP81 vertical mixing scheme.
169 IF (usePP81) THEN
170 # ifdef ALLOW_DEBUG
171 IF (debugMode) CALL DEBUG_CALL('PP81_INIT_VARIA',myThid)
172 # endif
173 CALL PP81_INIT_VARIA( myThid )
174 ENDIF
175 #endif /* ALLOW_PP81 */
176
177 #ifdef ALLOW_MY82
178 C-- Initialize MY82 vertical mixing scheme.
179 IF (useMY82) THEN
180 CALL MY82_INIT_VARIA( myThid )
181 ENDIF
182 #endif /* ALLOW_MY82 */
183
184 #ifdef ALLOW_GGL90
185 C-- Initialize GGL90 vertical mixing scheme.
186 IF (useGGL90) THEN
187 #ifdef ALLOW_DEBUG
188 IF (debugMode) CALL DEBUG_CALL('GGL90_INIT_VARIA',myThid)
189 #endif
190 CALL GGL90_INIT_VARIA( myThid )
191 ENDIF
192 #endif /* ALLOW_GGL90 */
193
194 #ifdef ALLOW_SEAICE
195 C-- Initialize SEAICE model.
196 cph# ifndef ALLOW_AUTODIFF_TAMC
197 IF (useSEAICE) THEN
198 cph# endif
199 # ifdef ALLOW_DEBUG
200 IF (debugMode) CALL DEBUG_CALL('SEAICE_INIT_VARIA',myThid)
201 # endif
202 CALL SEAICE_INIT_VARIA( myThid )
203 cph# ifndef ALLOW_AUTODIFF_TAMC
204 ENDIF
205 cph# endif
206 #endif /* ALLOW_SEAICE */
207
208 #ifdef ALLOW_SHELFICE
209 IF (useShelfIce) THEN
210 # ifdef ALLOW_DEBUG
211 IF (debugMode) CALL DEBUG_CALL('SHELFICE_INIT_VARIA',myThid)
212 # endif
213 CALL SHELFICE_INIT_VARIA( myThid )
214 ENDIF
215 #endif /* ALLOW_SHELFICE */
216
217 cph-- moved further down
218 cph#ifdef ALLOW_OBCS
219 cphC-- Open boundaries data
220 cph IF (useOBCS) THEN
221 cph CALL OBCS_INIT_VARIABLES( myThid )
222 cph ENDIF
223 cph#endif
224
225 #ifdef ALLOW_PTRACERS
226 # ifndef ALLOW_AUTODIFF_TAMC
227 IF ( usePTRACERS ) THEN
228 # endif
229 # ifdef ALLOW_DEBUG
230 IF (debugMode) CALL DEBUG_CALL('PTRACERS_INIT_VARIA',myThid)
231 # endif
232 CALL PTRACERS_INIT_VARIA( myThid )
233 # ifdef ALLOW_LONGSTEP
234 # ifdef ALLOW_DEBUG
235 IF (debugMode) CALL DEBUG_CALL('LONGSTEP_INIT_VARIA',myThid)
236 # endif
237 CALL LONGSTEP_INIT_VARIA( myThid )
238 # endif /* ALLOW_LONGSTEP */
239 # ifndef ALLOW_AUTODIFF_TAMC
240 ENDIF
241 # endif
242 #endif /* ALLOW_PTRACERS */
243
244 #ifdef ALLOW_GCHEM
245 # ifndef ALLOW_AUTODIFF_TAMC
246 IF (useGCHEM) THEN
247 # endif
248 CALL GCHEM_INIT_VARI( myThid )
249 # ifndef ALLOW_AUTODIFF_TAMC
250 ENDIF
251 # endif
252 #endif /* ALLOW_GCHEM */
253
254 #ifdef ALLOW_LAND
255 IF ( useLAND ) THEN
256 # ifdef ALLOW_DEBUG
257 IF (debugMode) CALL DEBUG_CALL('LAND_INI_VARS',myThid)
258 # endif
259 CALL LAND_INI_VARS( myThid )
260 ENDIF
261 #endif /* ALLOW_LAND */
262
263 #ifdef ALLOW_SMOOTH
264 CALL SMOOTH_INIT_VARIA(myThid)
265 #endif /* ALLOW_SMOOTH */
266
267 #ifdef ALLOW_AUTODIFF
268 CADJ STORE theta = tapelev_init, key = 1
269 c-- Initialise auxiliary xx_ fields
270 IF (debugMode) CALL DEBUG_CALL('CTRL_INIT_VARIABLES',myThid)
271 CALL CTRL_INIT_VARIABLES ( myThid )
272 c-- Map the control variables onto the model state.
273 # ifdef ALLOW_ECCO
274 IF (debugMode) CALL DEBUG_CALL('CTRL_MAP_INI_ECCO',myThid)
275 CALL CTRL_MAP_INI_ECCO( myThid )
276 # else
277 IF (debugMode) CALL DEBUG_CALL('CTRL_MAP_INI',myThid)
278 CALL CTRL_MAP_INI( myThid )
279 # endif
280 _BARRIER
281 #endif /* ALLOW_AUTODIFF */
282
283 #ifdef ALLOW_EXF
284 IF (useEXF) THEN
285 # ifdef ALLOW_DEBUG
286 IF (debugMode) CALL DEBUG_CALL('EXF_INIT',myThid)
287 # endif
288 CALL EXF_INIT( myThid )
289 ENDIF
290 #endif /* ALLOW_EXF */
291
292 #ifdef ALLOW_EBM
293 # ifdef ALLOW_AUTODIFF
294 CADJ STORE theta = tapelev_init, key = 1
295 # endif
296 IF (useEBM) THEN
297 CALL EBM_INI_VARS( myThid )
298 ENDIF
299 #endif /* ALLOW_EBM */
300
301 #ifdef ALLOW_COST
302 c-- Initialise the cost function.
303 ceh3 needs an IF ( useCOST ) THEN
304 CALL COST_INIT_VARIA( myThid )
305 _BARRIER
306 #endif /* ALLOW_COST */
307
308 #ifdef ALLOW_PROFILES
309 c-- Initialise the cost function.
310 CALL PROFILES_INIT_VARIA( myThid )
311 _BARRIER
312 #endif /* ALLOW_PROFILES */
313
314 #ifdef ALLOW_FLT
315 c-- Initialise float position
316 IF ( useFLT ) THEN
317 CALL FLT_INIT_VARIA( myThid )
318 ENDIF
319 #endif /* ALLOW_FLT */
320
321 #ifdef ALLOW_OBCS
322 C-- Open boundaries data
323 IF (useOBCS) THEN
324 # ifdef ALLOW_DEBUG
325 IF (debugMode) CALL DEBUG_CALL('OBCS_INIT_VARIABLES',myThid)
326 # endif
327 CALL OBCS_INIT_VARIABLES( myThid )
328 ENDIF
329 #endif /* ALLOW_OBCS */
330
331 #ifdef ALLOW_BULK_FORCE
332 IF (useBulkForce) THEN
333 CALL BULKF_INIT_VARIA( myThid )
334 ENDIF
335 #endif /* ALLOW_BULK_FORCE */
336
337 #ifdef ALLOW_THSICE
338 IF (useThSIce) THEN
339 # ifdef ALLOW_DEBUG
340 IF (debugMode) CALL DEBUG_CALL('THSICE_INI_VARS',myThid)
341 # endif
342 CALL THSICE_INI_VARS( myThid)
343 ENDIF
344 #endif /* ALLOW_THSICE */
345
346 #ifdef COMPONENT_MODULE
347 IF (useCoupler) THEN
348 # ifdef ALLOW_DEBUG
349 IF (debugMode) CALL DEBUG_CALL('CPL_INI_VARS',myThid)
350 # endif
351 CALL CPL_INI_VARS( myThid )
352 ENDIF
353 #endif /* COMPONENT_MODULE */
354
355 #ifdef ALLOW_ATM2D
356 IF (useAtm2d) THEN
357 # ifdef ALLOW_DEBUG
358 IF (debugMode) CALL DEBUG_CALL('ATM2D_INIT_VARS',myThid)
359 # endif
360 CALL ATM2D_INIT_VARS( myThid )
361 ENDIF
362 #endif /* ALLOW_ATM2D */
363
364 #ifdef ALLOW_FIZHI
365 C Initialize FIZHI state variables
366 IF (useFIZHI) THEN
367 # ifdef ALLOW_DEBUG
368 IF (debugMode) CALL DEBUG_CALL('FIZHI_INIT_VARS',myThid)
369 # endif
370 CALL FIZHI_INIT_VARS( myThid )
371 ENDIF
372 #endif /* ALLOW_FIZHI */
373
374 #ifdef ALLOW_MATRIX
375 IF ( useMATRIX ) THEN
376 # ifdef ALLOW_DEBUG
377 IF (debugMode) CALL DEBUG_CALL('MATRIX_INIT',myThid)
378 # endif
379 CALL MATRIX_INIT( myThid )
380 ENDIF
381 #endif /* ALLOW_MATRIX */
382
383 #ifdef ALLOW_RBCS
384 IF ( useRBCS ) THEN
385 CALL RBCS_INIT_VARIA( myThid )
386 ENDIF
387 #endif /* ALLOW_RBCS */
388
389 #ifdef ALLOW_REGRID
390 IF ( useREGRID ) THEN
391 CALL REGRID_INIT_VARIA( myThid )
392 ENDIF
393 #endif /* ALLOW_REGRID */
394
395 #ifdef ALLOW_LAYERS
396 IF ( useLayers ) CALL LAYERS_INIT_VARIA( myThid )
397 #endif /* ALLOW_LAYERS */
398
399 #ifdef ALLOW_SALT_PLUME
400 IF ( useSALT_PLUME ) THEN
401 CALL SALT_PLUME_INIT_VARIA( myThid )
402 ENDIF
403 #endif /* ALLOW_SALT_PLUME */
404
405 #ifdef ALLOW_CHEAPAML
406 IF (useCheapAML) THEN
407 CALL CHEAPAML_INIT_VARIA( myThid )
408 ENDIF
409 #endif /* ALLOW_CHEAPAML */
410
411 #ifdef ALLOW_MYPACKAGE
412 IF ( useMYPACKAGE ) THEN
413 CALL MYPACKAGE_INIT_VARIA( myThid )
414 ENDIF
415 #endif /* ALLOW_MYPACKAGE */
416
417 #ifdef ALLOW_DEBUG
418 IF (debugMode)
419 & CALL DEBUG_LEAVE('PACKAGES_INIT_VARIABLES',myThid)
420 #endif /* ALLOW_DEBUG */
421
422 RETURN
423 END

  ViewVC Help
Powered by ViewVC 1.1.22