/[MITgcm]/MITgcm/model/src/config_check.F
ViewVC logotype

Contents of /MITgcm/model/src/config_check.F

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


Revision 1.49 - (show annotations) (download)
Mon Apr 7 21:15:06 2008 UTC (16 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint60, checkpoint61, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint61b, checkpoint61a
Changes since 1.48: +15 -4 lines
print a message to std-output (since calling order has changed)

1 C $Header: /u/gcmpack/MITgcm/model/src/config_check.F,v 1.48 2008/04/05 21:24:08 jmc Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6
7 CBOP
8 C !ROUTINE: CONFIG_CHECK
9 C !INTERFACE:
10 SUBROUTINE CONFIG_CHECK( myThid )
11 C !DESCRIPTION: \bv
12 C *=========================================================*
13 C | SUBROUTINE CONFIG_CHECK
14 C | o Check model parameter settings.
15 C *=========================================================*
16 C | This routine help to prevent the use of parameters
17 C | that are not compatible with the model configuration.
18 C *=========================================================*
19 C \ev
20
21 C !USES:
22 IMPLICIT NONE
23 C === Global variables ===
24 #include "SIZE.h"
25 #include "EEPARAMS.h"
26 #include "PARAMS.h"
27 c #include "GRID.h"
28
29 C !INPUT/OUTPUT PARAMETERS:
30 C === Routine arguments ===
31 C myThid - Number of this instances of CONFIG_CHECK
32 INTEGER myThid
33 CEndOfInterface
34
35 C !LOCAL VARIABLES:
36 C == Local variables ==
37 C msgBuf :: Informational/error meesage buffer
38 CHARACTER*(MAX_LEN_MBUF) msgBuf
39 CEOP
40
41 C- check that CPP option is "defined" when running-flag parameter is on:
42
43 C o If diffKrFile is set, then we should make sure the corresponing
44 C code is being compiled
45 #if !(defined ALLOW_3D_DIFFKR || \
46 (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL)))
47 IF (diffKrFile.NE.' ') THEN
48 WRITE(msgBuf,'(A)')
49 & 'CONFIG_CHECK: diffKrFile is set but never used.'
50 CALL PRINT_ERROR( msgBuf , myThid)
51 WRITE(msgBuf,'(A)')
52 & 'Re-compile with: #define ALLOW_3D_DIFFKR'
53 CALL PRINT_ERROR( msgBuf , myThid)
54 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
55 ENDIF
56 #endif
57
58 #ifndef ALLOW_NONHYDROSTATIC
59 IF (use3Dsolver) THEN
60 WRITE(msgBuf,'(A)')
61 & 'CONFIG_CHECK: #undef ALLOW_NONHYDROSTATIC and'
62 CALL PRINT_ERROR( msgBuf , myThid)
63 IF ( implicitIntGravWave ) WRITE(msgBuf,'(A)')
64 & 'CONFIG_CHECK: implicitIntGravWave is TRUE'
65 IF ( nonHydrostatic ) WRITE(msgBuf,'(A)')
66 & 'CONFIG_CHECK: nonHydrostatic is TRUE'
67 CALL PRINT_ERROR( msgBuf , myThid)
68 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
69 ENDIF
70 #endif
71
72 #ifndef ALLOW_ADAMSBASHFORTH_3
73 IF ( alph_AB.NE.UNSET_RL .OR. beta_AB.NE.UNSET_RL ) THEN
74 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
75 & '#undef ALLOW_ADAMSBASHFORTH_3 but alph_AB,beta_AB'
76 CALL PRINT_ERROR( msgBuf , myThid)
77 WRITE(msgBuf,'(A,1P2E20.7)')
78 & 'CONFIG_CHECK: are set to:',alph_AB,beta_AB
79 CALL PRINT_ERROR( msgBuf , myThid)
80 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
81 ENDIF
82 #endif
83
84 #ifndef INCLUDE_IMPLVERTADV_CODE
85 IF ( momImplVertAdv ) THEN
86 WRITE(msgBuf,'(A)')
87 & 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
88 CALL PRINT_ERROR( msgBuf , myThid)
89 WRITE(msgBuf,'(A)')
90 & 'CONFIG_CHECK: but momImplVertAdv is TRUE'
91 CALL PRINT_ERROR( msgBuf , myThid)
92 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
93 ENDIF
94 IF ( tempImplVertAdv ) THEN
95 WRITE(msgBuf,'(A)')
96 & 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
97 CALL PRINT_ERROR( msgBuf , myThid)
98 WRITE(msgBuf,'(A)')
99 & 'CONFIG_CHECK: but tempImplVertAdv is TRUE'
100 CALL PRINT_ERROR( msgBuf , myThid)
101 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
102 ENDIF
103 IF ( saltImplVertAdv ) THEN
104 WRITE(msgBuf,'(A)')
105 & 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
106 CALL PRINT_ERROR( msgBuf , myThid)
107 WRITE(msgBuf,'(A)')
108 & 'CONFIG_CHECK: but saltImplVertAdv is TRUE'
109 CALL PRINT_ERROR( msgBuf , myThid)
110 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
111 ENDIF
112 IF ( dTtracerLev(1).NE.dTtracerLev(Nr) .AND. implicitDiffusion
113 & .AND. ( saltStepping .OR. tempStepping .OR. usePTRACERS )
114 & ) THEN
115 WRITE(msgBuf,'(A)')
116 & 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
117 CALL PRINT_ERROR( msgBuf , myThid)
118 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
119 & 'but implicitDiffusion=T with non-uniform dTtracerLev'
120 CALL PRINT_ERROR( msgBuf , myThid)
121 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
122 ENDIF
123 #endif
124
125 #ifndef EXACT_CONSERV
126 IF (exactConserv) THEN
127 WRITE(msgBuf,'(A)')
128 & 'CONFIG_CHECK: #undef EXACT_CONSERV and'
129 CALL PRINT_ERROR( msgBuf , myThid)
130 WRITE(msgBuf,'(A)')
131 & 'CONFIG_CHECK: exactConserv is TRUE'
132 CALL PRINT_ERROR( msgBuf , myThid)
133 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
134 ENDIF
135 #endif
136
137 #ifndef NONLIN_FRSURF
138 IF (nonlinFreeSurf.NE.0) THEN
139 WRITE(msgBuf,'(A)')
140 & 'CONFIG_CHECK: #undef NONLIN_FRSURF and'
141 CALL PRINT_ERROR( msgBuf , myThid)
142 WRITE(msgBuf,'(A)')
143 & 'CONFIG_CHECK: nonlinFreeSurf is non-zero'
144 CALL PRINT_ERROR( msgBuf , myThid)
145 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
146 ENDIF
147 #endif
148
149 #ifndef NONLIN_FRSURF
150 IF (select_rStar .NE. 0) THEN
151 WRITE(msgBuf,'(A)')
152 & 'CONFIG_CHECK: rStar is part of NonLin-FS '
153 CALL PRINT_ERROR( msgBuf, myThid)
154 WRITE(msgBuf,'(A)')
155 & 'CONFIG_CHECK: ==> use #define NONLIN_FRSURF to use it'
156 CALL PRINT_ERROR( msgBuf, myThid)
157 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
158 ENDIF
159 #endif /* NONLIN_FRSURF */
160
161 #ifdef USE_NATURAL_BCS
162 WRITE(msgBuf,'(A)')
163 & 'CONFIG_CHECK: USE_NATURAL_BCS option has been replaced'
164 CALL PRINT_ERROR( msgBuf , myThid)
165 WRITE(msgBuf,'(A)')
166 & 'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file'
167 CALL PRINT_ERROR( msgBuf , myThid)
168 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
169 #endif
170
171 C o If pLoadFile is set, then we should make sure the corresponing
172 C code is being compiled
173 #ifndef ATMOSPHERIC_LOADING
174 IF (pLoadFile.NE.' ') THEN
175 WRITE(msgBuf,'(A)')
176 & 'CONFIG_CHECK: pLoadFile is set but you have not'
177 CALL PRINT_ERROR( msgBuf , myThid)
178 WRITE(msgBuf,'(A)')
179 & 'compiled the model with the pressure loading code.'
180 CALL PRINT_ERROR( msgBuf , myThid)
181 WRITE(msgBuf,'(A)')
182 & 'Re-compile with: #define ATMOSPHERIC_LOADING'
183 CALL PRINT_ERROR( msgBuf , myThid)
184 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
185 ENDIF
186 IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN
187 WRITE(msgBuf,'(A)')
188 & 'CONFIG_CHECK: sIceLoad is computed but'
189 CALL PRINT_ERROR( msgBuf , myThid)
190 WRITE(msgBuf,'(A)')
191 & 'pressure loading code is not compiled.'
192 CALL PRINT_ERROR( msgBuf , myThid)
193 WRITE(msgBuf,'(A)')
194 & 'Re-compile with: #define ATMOSPHERIC_LOADING'
195 CALL PRINT_ERROR( msgBuf , myThid)
196 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
197 ENDIF
198 #endif
199
200 #ifndef ALLOW_BALANCE_FLUXES
201 IF (balanceEmPmR .OR. balanceQnet) THEN
202 WRITE(msgBuf,'(A,A)')
203 & 'CONFIG_CHECK: balanceEmPmR/Qnet is set but balance code ',
204 & 'is not compiled.'
205 CALL PRINT_ERROR( msgBuf , 1)
206 WRITE(msgBuf,'(A)')
207 & 'Re-compile with ALLOW_BALANCE_FLUXES defined'
208 CALL PRINT_ERROR( msgBuf , 1)
209 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
210 ENDIF
211 #endif
212
213 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
214
215 C-- Check parameter consistency :
216
217 IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND.
218 & ( viscC4leithD.NE.0. .OR. viscC4leith.NE.0.
219 & .OR. viscC4smag.NE.0. .OR. viscA4Grid.NE.0.
220 & .OR. viscA4D.NE.0. .OR. viscA4Z.NE.0. ) ) THEN
221 WRITE(msgBuf,'(A,A)')
222 & 'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with',
223 & ' overlap (Olx,Oly) smaller than 3'
224 CALL PRINT_ERROR( msgBuf , myThid)
225 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
226 ENDIF
227 IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND.
228 & ( viscC2leithD.NE.0. .OR. viscC4leithD.NE.0. )
229 & ) THEN
230 WRITE(msgBuf,'(A,A)')
231 & 'CONFIG_CHECK: cannot use Leith Visc.(div.part) with',
232 & ' overlap (Olx,Oly) smaller than 3'
233 CALL PRINT_ERROR( msgBuf , myThid)
234 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
235 ENDIF
236
237 C-- Deep-Atmosphere & Anelastic limitations:
238 IF ( deepAtmosphere .AND.
239 & useRealFreshWaterFlux .AND. usingPCoords ) THEN
240 WRITE(msgBuf,'(A,A)')
241 & 'CONFIG_CHECK: Deep-Atmosphere not yet implemented with',
242 & ' real-Fresh-Water option in P-coordinate'
243 CALL PRINT_ERROR( msgBuf , myThid)
244 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
245 ENDIF
246 IF ( select_rStar.NE.0 .AND.
247 & ( deepAtmosphere .OR.
248 & usingZCoords.AND.rhoRefFile .NE. ' ' ) ) THEN
249 WRITE(msgBuf,'(A,A)')
250 & 'CONFIG_CHECK: Deep-Atmosphere or Anelastic',
251 & ' not yet implemented with rStar'
252 CALL PRINT_ERROR( msgBuf , myThid)
253 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
254 ENDIF
255 IF ( vectorInvariantMomentum .AND.
256 & ( deepAtmosphere .OR.
257 & usingZCoords.AND.rhoRefFile .NE. ' ' ) ) THEN
258 WRITE(msgBuf,'(A,A)')
259 & 'CONFIG_CHECK: Deep-Atmosphere or Anelastic',
260 & ' not yet implemented in Vector-Invariant momentum code'
261 CALL PRINT_ERROR( msgBuf , myThid)
262 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
263 ENDIF
264
265 C-- Free-surface related limitations:
266 IF ( rigidLid .AND. implicitFreeSurface ) THEN
267 WRITE(msgBuf,'(A,A)')
268 & 'CONFIG_CHECK: Cannot select both implicitFreeSurface',
269 & ' and rigidLid.'
270 CALL PRINT_ERROR( msgBuf , myThid)
271 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
272 ENDIF
273
274 IF (rigidLid .AND. exactConserv) THEN
275 WRITE(msgBuf,'(A)')
276 & 'CONFIG_CHECK: exactConserv not compatible with'
277 CALL PRINT_ERROR( msgBuf , myThid)
278 WRITE(msgBuf,'(A)')
279 & 'CONFIG_CHECK: rigidLid (meaningless in that case)'
280 CALL PRINT_ERROR( msgBuf , myThid)
281 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
282 ENDIF
283
284 IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN
285 WRITE(msgBuf,'(A)')
286 & 'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.'
287 CALL PRINT_ERROR( msgBuf , myThid)
288 WRITE(msgBuf,'(A)')
289 & 'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'
290 CALL PRINT_ERROR( msgBuf , myThid)
291 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
292 ENDIF
293
294 IF (rigidLid .AND. useRealFreshWaterFlux) THEN
295 WRITE(msgBuf,'(A)')
296 & 'CONFIG_CHECK: useRealFreshWaterFlux not compatible with'
297 CALL PRINT_ERROR( msgBuf , myThid)
298 WRITE(msgBuf,'(A)')
299 & 'CONFIG_CHECK: rigidLid (meaningless in that case)'
300 CALL PRINT_ERROR( msgBuf , myThid)
301 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
302 ENDIF
303
304 IF ( (implicSurfPress.NE.1. .OR. implicDiv2DFlow.NE.1.)
305 & .AND. nonHydrostatic ) THEN
306 WRITE(msgBuf,'(A,A)') 'CONFIG_CHECK: nonHydrostatic',
307 & ' NOT SAFE with non-fully implicit Barotropic solver'
308 CALL PRINT_ERROR( msgBuf , myThid)
309 WRITE(msgBuf,'(A,A)') 'CONFIG_CHECK: To by-pass this',
310 & 'STOP, comment this test and re-compile config_check'
311 CALL PRINT_ERROR( msgBuf , myThid)
312 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
313 ENDIF
314
315 IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN
316 WRITE(msgBuf,'(A)')
317 & 'CONFIG_CHECK: nonlinFreeSurf cannot be used'
318 CALL PRINT_ERROR( msgBuf , myThid)
319 WRITE(msgBuf,'(A)')
320 & 'CONFIG_CHECK: without exactConserv'
321 CALL PRINT_ERROR( msgBuf , myThid)
322 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
323 ENDIF
324
325 IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN
326 WRITE(msgBuf,'(A)')
327 & 'CONFIG_CHECK: r* Coordinate cannot be used'
328 CALL PRINT_ERROR( msgBuf , myThid)
329 WRITE(msgBuf,'(A)')
330 & 'CONFIG_CHECK: without exactConserv'
331 CALL PRINT_ERROR( msgBuf , myThid)
332 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
333 ENDIF
334
335 C- note : not implemented in checkpoint48b but it's done now (since 01-28-03)
336 c IF (select_rStar.GT.0 .AND. useOBCS ) THEN
337 c WRITE(msgBuf,'(A)')
338 c & 'CONFIG_CHECK: r* Coordinate not yet implemented'
339 c CALL PRINT_ERROR( msgBuf , 1)
340 c WRITE(msgBuf,'(A)')
341 c & 'CONFIG_CHECK: in OBC package'
342 c CALL PRINT_ERROR( msgBuf , 1)
343 c STOP 'ABNORMAL END: S/R CONFIG_CHECK'
344 c ENDIF
345
346 c IF (nonlinFreeSurf.NE.0 .AND. nonHydrostatic) THEN
347 IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN
348 WRITE(msgBuf,'(A)')
349 & 'CONFIG_CHECK: nonlinFreeSurf not yet implemented'
350 CALL PRINT_ERROR( msgBuf , myThid)
351 WRITE(msgBuf,'(A)')
352 & 'CONFIG_CHECK: in nonHydrostatic code'
353 CALL PRINT_ERROR( msgBuf , myThid)
354 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
355 ENDIF
356
357 IF ( nonlinFreeSurf.NE.0 .AND.
358 & deltaTfreesurf.NE.dTtracerLev(1) ) THEN
359 WRITE(msgBuf,'(A)')
360 & 'CONFIG_CHECK: WARNING: nonlinFreeSurf might cause problems'
361 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
362 & SQUEEZE_RIGHT , myThid)
363 WRITE(msgBuf,'(A)')
364 & 'CONFIG_CHECK: with different FreeSurf & Tracer time-steps'
365 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
366 & SQUEEZE_RIGHT , myThid)
367 ENDIF
368
369 IF ( useRealFreshWaterFlux .AND. exactConserv
370 & .AND. implicDiv2DFlow.EQ.0. _d 0
371 & .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN
372 WRITE(msgBuf,'(A)')
373 & 'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:'
374 CALL PRINT_ERROR( msgBuf , myThid)
375 WRITE(msgBuf,'(A)')
376 & 'CONFIG_CHECK: restart not implemented in this config'
377 CALL PRINT_ERROR( msgBuf , myThid)
378 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
379 ENDIF
380
381 IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv
382 & .AND. implicDiv2DFlow.NE.1. ) THEN
383 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: **WARNNING** ',
384 & 'RealFreshWater & implicDiv2DFlow < 1'
385 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
386 & SQUEEZE_RIGHT , myThid)
387 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: works better',
388 & ' with exactConserv=.T. (+ #define EXACT_CONSERV)'
389 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
390 & SQUEEZE_RIGHT , myThid)
391 ENDIF
392
393 #ifdef EXACT_CONSERV
394 IF (useRealFreshWaterFlux .AND. .NOT.exactConserv
395 & .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN
396 WRITE(msgBuf,'(A)')
397 & 'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP'
398 CALL PRINT_ERROR( msgBuf , myThid)
399 WRITE(msgBuf,'(A)')
400 & 'CONFIG_CHECK: requires exactConserv=T'
401 CALL PRINT_ERROR( msgBuf , myThid)
402 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
403 ENDIF
404 #else
405 IF (useRealFreshWaterFlux
406 & .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN
407 WRITE(msgBuf,'(A)')
408 & 'CONFIG_CHECK: E-P effects on wVel are not included'
409 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
410 & SQUEEZE_RIGHT , myThid)
411 WRITE(msgBuf,'(A)')
412 & 'CONFIG_CHECK: ==> use #define EXACT_CONSERV to fix it'
413 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
414 & SQUEEZE_RIGHT , myThid)
415 ENDIF
416 #endif /* EXACT_CONSERV */
417
418 C-- Momentum related limitations:
419 IF ( vectorInvariantMomentum.AND.momStepping ) THEN
420 IF ( highOrderVorticity.AND.upwindVorticity ) THEN
421 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
422 & '"highOrderVorticity" conflicts with "upwindVorticity"'
423 CALL PRINT_ERROR( msgBuf , myThid)
424 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
425 ENDIF
426 ENDIF
427
428 IF (.NOT.useCDscheme .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN
429 C- jmc: since useCDscheme is a new [04-13-03] flag (default=F),
430 C put this WARNING to stress that even if CD-scheme parameters
431 C (tauCD,rCD) are set, CD-scheme is not used without useCDscheme=T
432 C- and STOP if using mom_fluxform (following Chris advise).
433 C- jmc: but ultimately, this block can/will be removed.
434 IF (.NOT.vectorInvariantMomentum.AND.momStepping) THEN
435 WRITE(msgBuf,'(A)')
436 & 'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set'
437 CALL PRINT_ERROR( msgBuf , myThid)
438 WRITE(msgBuf,'(2A)')
439 & 'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',
440 & ' in "data", namelist PARM01'
441 CALL PRINT_ERROR( msgBuf , myThid)
442 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
443 ENDIF
444 WRITE(msgBuf,'(2A)') '**WARNNING** ',
445 & 'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set'
446 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
447 & SQUEEZE_RIGHT , myThid)
448 WRITE(msgBuf,'(2A)')
449 & 'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',
450 & ' in "data", namelist PARM01'
451 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
452 & SQUEEZE_RIGHT , myThid)
453 ENDIF
454
455 IF ( useCDscheme .AND. useCubedSphereExchange ) THEN
456 WRITE(msgBuf,'(2A)')
457 & 'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'
458 CALL PRINT_ERROR( msgBuf , myThid)
459 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
460 ENDIF
461
462 C-- Time-stepping limitations
463 IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN
464 WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=',
465 & momForcingOutAB, ' not allowed'
466 CALL PRINT_ERROR( msgBuf , myThid)
467 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',
468 & 'should be =1 (Out of AB) or =0 (In AB)'
469 CALL PRINT_ERROR( msgBuf , myThid)
470 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
471 ENDIF
472 IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN
473 WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',
474 & tracForcingOutAB, ' not allowed'
475 CALL PRINT_ERROR( msgBuf , myThid)
476 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',
477 & 'should be =1 (Out of AB) or =0 (In AB)'
478 CALL PRINT_ERROR( msgBuf , myThid)
479 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
480 ENDIF
481
482 C-- Grid limitations:
483 IF ( rotateGrid ) THEN
484 IF ( .NOT. usingSphericalPolarGrid ) THEN
485 WRITE(msgBuf,'(2A)')
486 & 'CONFIG_CHECK: specifying Euler angles makes only ',
487 & 'sense with usingSphericalGrid=.TRUE.'
488 CALL PRINT_ERROR( msgBuf , myThid)
489 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
490 ENDIF
491 IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN
492 WRITE(msgBuf,'(2A)')
493 & 'CONFIG_CHECK: specifying Euler angles will probably ',
494 & 'not work with pkgs FLT, ZONAL_FLT, ECCO'
495 CALL PRINT_ERROR( msgBuf , myThid)
496 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
497 ENDIF
498 #ifdef ALLOW_PROFILES
499 WRITE(msgBuf,'(2A)')
500 & 'CONFIG_CHECK: specifying Euler angles will probably ',
501 & 'not work with pkg profiles'
502 CALL PRINT_ERROR( msgBuf , myThid)
503 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
504 #endif /* ALLOW_PROFILES */
505 ENDIF
506
507 C-- Packages conflict
508 IF ( useMATRIX .AND. useGCHEM ) THEN
509 WRITE(msgBuf,'(2A)')
510 & 'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'
511 CALL PRINT_ERROR( msgBuf , myThid)
512 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
513 ENDIF
514
515 IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN
516 WRITE(msgBuf,'(2A)')
517 & 'CONFIG_CHECK: cannot set useMATRIX without ',
518 & 'setting usePTRACERS'
519 CALL PRINT_ERROR( msgBuf , myThid)
520 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
521 ENDIF
522
523 WRITE(msgBuf,'(A)')
524 &'// ======================================================='
525 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
526 & SQUEEZE_RIGHT, myThid )
527 WRITE(msgBuf,'(A)') '// CONFIG_CHECK : Normal End'
528 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
529 & SQUEEZE_RIGHT, myThid )
530 WRITE(msgBuf,'(A)')
531 &'// ======================================================='
532 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
533 & SQUEEZE_RIGHT, myThid )
534 WRITE(msgBuf,'(A)') ' '
535 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
536 & SQUEEZE_RIGHT, myThid )
537
538 RETURN
539 END

  ViewVC Help
Powered by ViewVC 1.1.22