/[MITgcm]/MITgcm_contrib/dgoldberg/depth_control_no_nsa/code/config_check.F
ViewVC logotype

Contents of /MITgcm_contrib/dgoldberg/depth_control_no_nsa/code/config_check.F

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


Revision 1.1 - (show annotations) (download)
Thu Dec 7 23:21:12 2017 UTC (7 years, 7 months ago) by dgoldberg
Branch: MAIN
CVS Tags: HEAD
test case for depth control w/out cg2d_nsa

1 C $Header: /u/gcmpack/MITgcm/model/src/config_check.F,v 1.85 2016/11/28 22:57:01 jmc Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6 #ifdef ALLOW_MOM_COMMON
7 # include "MOM_COMMON_OPTIONS.h"
8 #endif
9
10 CBOP
11 C !ROUTINE: CONFIG_CHECK
12 C !INTERFACE:
13 SUBROUTINE CONFIG_CHECK( myThid )
14 C !DESCRIPTION: \bv
15 C *=========================================================*
16 C | SUBROUTINE CONFIG_CHECK
17 C | o Check model parameter settings.
18 C *=========================================================*
19 C | This routine help to prevent the use of parameters
20 C | that are not compatible with the model configuration.
21 C *=========================================================*
22 C \ev
23
24 C !USES:
25 IMPLICIT NONE
26 C === Global variables ===
27 #include "SIZE.h"
28 #include "EEPARAMS.h"
29 #include "PARAMS.h"
30
31 C !INPUT/OUTPUT PARAMETERS:
32 C === Routine arguments ===
33 C myThid - Number of this instances of CONFIG_CHECK
34 INTEGER myThid
35 CEndOfInterface
36
37 C !LOCAL VARIABLES:
38 C == Local variables ==
39 C msgBuf :: Informational/error message buffer
40 CHARACTER*(MAX_LEN_MBUF) msgBuf
41 INTEGER errCount
42 CEOP
43
44 _BEGIN_MASTER(myThid)
45 WRITE(msgBuf,'(A)')
46 &'// ======================================================='
47 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
48 & SQUEEZE_RIGHT, myThid )
49 WRITE(msgBuf,'(A)') '// Check Model config. (CONFIG_CHECK):'
50 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
51 & SQUEEZE_RIGHT, myThid )
52 _END_MASTER(myThid)
53
54 C-- MPI + multi-threads: seems to be OK to let master-thread check & stop
55 C (as long as all procs finish cleanly by calling ALL_PROC_DIE)
56 _BEGIN_MASTER(myThid)
57 errCount = 0
58
59 C- check that CPP option is "defined" when running-flag parameter is on:
60
61 C o If diffKrFile is set, then we should make sure the corresponing
62 C code is being compiled
63 #ifndef ALLOW_3D_DIFFKR
64 IF (diffKrFile.NE.' ') THEN
65 WRITE(msgBuf,'(A)')
66 & 'CONFIG_CHECK: diffKrFile is set but never used.'
67 CALL PRINT_ERROR( msgBuf, myThid )
68 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
69 & 'Re-compile with: "#define ALLOW_3D_DIFFKR"'
70 CALL PRINT_ERROR( msgBuf, myThid )
71 errCount = errCount + 1
72 ENDIF
73 #endif
74
75 #ifndef ALLOW_SMAG_3D
76 IF ( useSmag3D ) THEN
77 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
78 & 'Cannot set useSmag3D=TRUE when compiled with'
79 CALL PRINT_ERROR( msgBuf, myThid )
80 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
81 & '"#undef ALLOW_SMAG_3D" in MOM_COMMON_OPTIONS.h'
82 CALL PRINT_ERROR( msgBuf, myThid )
83 errCount = errCount + 1
84 ENDIF
85 #endif
86
87 #ifndef ALLOW_NONHYDROSTATIC
88 IF (use3Dsolver) THEN
89 WRITE(msgBuf,'(A)')
90 & 'CONFIG_CHECK: #undef ALLOW_NONHYDROSTATIC and'
91 CALL PRINT_ERROR( msgBuf, myThid )
92 IF ( implicitIntGravWave ) WRITE(msgBuf,'(A)')
93 & 'CONFIG_CHECK: implicitIntGravWave is TRUE'
94 IF ( nonHydrostatic ) WRITE(msgBuf,'(A)')
95 & 'CONFIG_CHECK: nonHydrostatic is TRUE'
96 CALL PRINT_ERROR( msgBuf, myThid )
97 errCount = errCount + 1
98 ENDIF
99 #endif
100
101 #ifndef ALLOW_ADAMSBASHFORTH_3
102 IF ( alph_AB.NE.UNSET_RL .OR. beta_AB.NE.UNSET_RL ) THEN
103 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
104 & '#undef ALLOW_ADAMSBASHFORTH_3 but alph_AB,beta_AB'
105 CALL PRINT_ERROR( msgBuf, myThid )
106 WRITE(msgBuf,'(A,1P2E20.7)')
107 & 'CONFIG_CHECK: are set to:',alph_AB,beta_AB
108 CALL PRINT_ERROR( msgBuf, myThid )
109 errCount = errCount + 1
110 ENDIF
111 #endif
112
113 #ifndef INCLUDE_IMPLVERTADV_CODE
114 IF ( momImplVertAdv ) THEN
115 WRITE(msgBuf,'(A)')
116 & 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
117 CALL PRINT_ERROR( msgBuf, myThid )
118 WRITE(msgBuf,'(A)')
119 & 'CONFIG_CHECK: but momImplVertAdv is TRUE'
120 CALL PRINT_ERROR( msgBuf, myThid )
121 errCount = errCount + 1
122 ENDIF
123 IF ( tempImplVertAdv ) THEN
124 WRITE(msgBuf,'(A)')
125 & 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
126 CALL PRINT_ERROR( msgBuf, myThid )
127 WRITE(msgBuf,'(A)')
128 & 'CONFIG_CHECK: but tempImplVertAdv is TRUE'
129 CALL PRINT_ERROR( msgBuf, myThid )
130 errCount = errCount + 1
131 ENDIF
132 IF ( saltImplVertAdv ) THEN
133 WRITE(msgBuf,'(A)')
134 & 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
135 CALL PRINT_ERROR( msgBuf, myThid )
136 WRITE(msgBuf,'(A)')
137 & 'CONFIG_CHECK: but saltImplVertAdv is TRUE'
138 CALL PRINT_ERROR( msgBuf, myThid )
139 errCount = errCount + 1
140 ENDIF
141 IF ( dTtracerLev(1).NE.dTtracerLev(Nr) .AND. implicitDiffusion
142 & .AND. ( saltStepping .OR. tempStepping .OR. usePTRACERS )
143 & ) THEN
144 WRITE(msgBuf,'(A)')
145 & 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
146 CALL PRINT_ERROR( msgBuf, myThid )
147 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
148 & 'but implicitDiffusion=T with non-uniform dTtracerLev'
149 CALL PRINT_ERROR( msgBuf, myThid )
150 errCount = errCount + 1
151 ENDIF
152 IF ( selectImplicitDrag.GT.0 ) THEN
153 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
154 & 'Needs to compile with #define INCLUDE_IMPLVERTADV_CODE'
155 CALL PRINT_ERROR( msgBuf, myThid )
156 WRITE(msgBuf,'(A)')
157 & 'CONFIG_CHECK: to use selectImplicitDrag > 0 ==> STOP here'
158 CALL PRINT_ERROR( msgBuf, myThid )
159 errCount = errCount + 1
160 ENDIF
161 #endif
162
163 #ifndef ALLOW_SOLVE4_PS_AND_DRAG
164 IF ( selectImplicitDrag.EQ.2 ) THEN
165 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
166 & 'Needs to compile with #define ALLOW_SOLVE4_PS_AND_DRAG'
167 CALL PRINT_ERROR( msgBuf, myThid )
168 WRITE(msgBuf,'(A)')
169 & 'CONFIG_CHECK: to use selectImplicitDrag = 2 ==> STOP here'
170 CALL PRINT_ERROR( msgBuf, myThid )
171 errCount = errCount + 1
172 ENDIF
173 #endif
174
175 #ifdef ALLOW_AUTODIFF
176 IF ( momImplVertAdv ) THEN
177 WRITE(msgBuf,'(A)')
178 & 'CONFIG_CHECK: momImplVertAdv is not yet'
179 CALL PRINT_ERROR( msgBuf, myThid )
180 WRITE(msgBuf,'(A)')
181 & 'CONFIG_CHECK: supported in adjoint mode'
182 CALL PRINT_ERROR( msgBuf, myThid )
183 errCount = errCount + 1
184 ENDIF
185 IF ( selectImplicitDrag.GT.0 ) THEN
186 WRITE(msgBuf,'(A)')
187 & 'CONFIG_CHECK: selectImplicitDrag is not yet'
188 CALL PRINT_ERROR( msgBuf, myThid )
189 WRITE(msgBuf,'(A)')
190 & 'CONFIG_CHECK: supported in adjoint mode'
191 CALL PRINT_ERROR( msgBuf, myThid )
192 errCount = errCount + 1
193 ENDIF
194 #endif
195
196 C#ifdef ALLOW_DEPTH_CONTROL
197 C IF ( useOBCS ) THEN
198 C WRITE(msgBuf,'(A)')
199 C & 'CONFIG_CHECK: DEPTH_CONTROL code not compatible with OBCS'
200 C CALL PRINT_ERROR( msgBuf, myThid )
201 C errCount = errCount + 1
202 C ENDIF
203 C#endif
204
205 #ifndef EXACT_CONSERV
206 IF (exactConserv) THEN
207 WRITE(msgBuf,'(A)')
208 & 'CONFIG_CHECK: #undef EXACT_CONSERV and'
209 CALL PRINT_ERROR( msgBuf, myThid )
210 WRITE(msgBuf,'(A)')
211 & 'CONFIG_CHECK: exactConserv is TRUE'
212 CALL PRINT_ERROR( msgBuf, myThid )
213 errCount = errCount + 1
214 ENDIF
215 #endif
216
217 #ifndef NONLIN_FRSURF
218 IF (nonlinFreeSurf.NE.0) THEN
219 WRITE(msgBuf,'(A)')
220 & 'CONFIG_CHECK: #undef NONLIN_FRSURF and'
221 CALL PRINT_ERROR( msgBuf, myThid )
222 WRITE(msgBuf,'(A)')
223 & 'CONFIG_CHECK: nonlinFreeSurf is non-zero'
224 CALL PRINT_ERROR( msgBuf, myThid )
225 errCount = errCount + 1
226 ENDIF
227 #endif
228
229 #ifndef NONLIN_FRSURF
230 IF (select_rStar .NE. 0) THEN
231 WRITE(msgBuf,'(A)')
232 & 'CONFIG_CHECK: rStar is part of NonLin-FS '
233 CALL PRINT_ERROR( msgBuf, myThid )
234 WRITE(msgBuf,'(A)')
235 & 'CONFIG_CHECK: ==> set #define NONLIN_FRSURF to use it'
236 CALL PRINT_ERROR( msgBuf, myThid )
237 errCount = errCount + 1
238 ENDIF
239 #endif /* NONLIN_FRSURF */
240
241 #ifdef DISABLE_RSTAR_CODE
242 IF ( select_rStar.NE.0 ) THEN
243 WRITE(msgBuf,'(A)')
244 & 'CONFIG_CHECK: rStar code disable (DISABLE_RSTAR_CODE defined)'
245 CALL PRINT_ERROR( msgBuf, myThid )
246 WRITE(msgBuf,'(A)')
247 & 'CONFIG_CHECK: ==> set #undef DISABLE_RSTAR_CODE to use it'
248 CALL PRINT_ERROR( msgBuf, myThid )
249 errCount = errCount + 1
250 ENDIF
251 #endif /* DISABLE_RSTAR_CODE */
252
253 #ifdef DISABLE_SIGMA_CODE
254 IF ( selectSigmaCoord.NE.0 ) THEN
255 WRITE(msgBuf,'(A)')
256 & 'CONFIG_CHECK: Sigma code disable (DISABLE_SIGMA_CODE defined)'
257 CALL PRINT_ERROR( msgBuf, myThid )
258 WRITE(msgBuf,'(A)')
259 & 'CONFIG_CHECK: ==> set #undef DISABLE_SIGMA_CODE to use it'
260 CALL PRINT_ERROR( msgBuf, myThid )
261 errCount = errCount + 1
262 ENDIF
263 #endif /* DISABLE_SIGMA_CODE */
264
265 #ifdef USE_NATURAL_BCS
266 WRITE(msgBuf,'(A)')
267 & 'CONFIG_CHECK: USE_NATURAL_BCS option has been replaced'
268 CALL PRINT_ERROR( msgBuf, myThid )
269 WRITE(msgBuf,'(A)')
270 & 'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file'
271 CALL PRINT_ERROR( msgBuf, myThid )
272 errCount = errCount + 1
273 #endif
274
275 #ifndef ALLOW_ADDFLUID
276 IF ( selectAddFluid.NE.0 ) THEN
277 WRITE(msgBuf,'(A)')
278 & 'CONFIG_CHECK: #undef ALLOW_ADDFLUID (CPP_OPTIONS.h) and'
279 CALL PRINT_ERROR( msgBuf, myThid )
280 WRITE(msgBuf,'(A,I4,A)') 'CONFIG_CHECK: selectAddFluid=',
281 & selectAddFluid, ' is not zero'
282 CALL PRINT_ERROR( msgBuf, myThid )
283 errCount = errCount + 1
284 ENDIF
285 #endif /* ALLOW_ADDFLUID */
286
287 C o If pLoadFile is set, then we should make sure the corresponing
288 C code is being compiled
289 #ifndef ATMOSPHERIC_LOADING
290 IF (pLoadFile.NE.' ') THEN
291 WRITE(msgBuf,'(A)')
292 & 'CONFIG_CHECK: pLoadFile is set but you have not'
293 CALL PRINT_ERROR( msgBuf, myThid )
294 WRITE(msgBuf,'(A)')
295 & ' compiled the model with the pressure loading code.'
296 CALL PRINT_ERROR( msgBuf, myThid )
297 WRITE(msgBuf,'(A)')
298 & ' Re-compile with: "#define ATMOSPHERIC_LOADING"'
299 CALL PRINT_ERROR( msgBuf, myThid )
300 errCount = errCount + 1
301 ENDIF
302 IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN
303 WRITE(msgBuf,'(A)')
304 & 'CONFIG_CHECK: sIceLoad is computed but'
305 CALL PRINT_ERROR( msgBuf, myThid )
306 WRITE(msgBuf,'(A)')
307 & ' pressure loading code is not compiled.'
308 CALL PRINT_ERROR( msgBuf, myThid )
309 WRITE(msgBuf,'(A)')
310 & ' Re-compile with: "#define ATMOSPHERIC_LOADING"'
311 CALL PRINT_ERROR( msgBuf, myThid )
312 errCount = errCount + 1
313 ENDIF
314 #endif
315
316 C o Need to define ALLOW_GEOTHERMAL_FLUX to use geothermalFile forcing
317 #ifndef ALLOW_GEOTHERMAL_FLUX
318 IF ( geothermalFile.NE.' ' ) THEN
319 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
320 & 'geothermalFile is set but Geothermal-Flux code'
321 CALL PRINT_ERROR( msgBuf, myThid )
322 WRITE(msgBuf,'(2A)')' is not compiled.',
323 & ' Re-compile with "#define ALLOW_GEOTHERMAL_FLUX"'
324 CALL PRINT_ERROR( msgBuf, myThid )
325 errCount = errCount + 1
326 ENDIF
327 #endif /* ALLOW_GEOTHERMAL_FLUX */
328
329 #ifndef ALLOW_FRICTION_HEATING
330 IF ( addFrictionHeating ) THEN
331 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: addFrictionHeating=T',
332 & ' but FRICTIONAL_HEATING code is not compiled.'
333 CALL PRINT_ERROR( msgBuf, myThid )
334 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Re-compile with:',
335 & ' "#define ALLOW_FRICTION_HEATING" (CPP_OPTIONS.h)'
336 CALL PRINT_ERROR( msgBuf, myThid )
337 errCount = errCount + 1
338 ENDIF
339 #endif
340
341 #ifndef ALLOW_BALANCE_FLUXES
342 IF (balanceEmPmR .OR. balanceQnet) THEN
343 WRITE(msgBuf,'(A,A)')
344 & 'CONFIG_CHECK: balanceEmPmR/Qnet is set but balance code ',
345 & 'is not compiled.'
346 CALL PRINT_ERROR( msgBuf, myThid )
347 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
348 & 'Re-compile with: ALLOW_BALANCE_FLUXES defined'
349 CALL PRINT_ERROR( msgBuf, myThid )
350 errCount = errCount + 1
351 ENDIF
352 #endif
353
354 #ifndef ALLOW_BALANCE_RELAX
355 IF (balanceThetaClimRelax .OR. balanceSaltClimRelax) THEN
356 WRITE(msgBuf,'(A,A)')
357 & 'CONFIG_CHECK: balanceTheta/SaltClimRelax is set ',
358 & 'but balance code is not compiled.'
359 CALL PRINT_ERROR( msgBuf, myThid )
360 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
361 & 'Re-compile with ALLOW_BALANCE_RELAX defined'
362 CALL PRINT_ERROR( msgBuf, myThid )
363 errCount = errCount + 1
364 ENDIF
365 #endif
366
367 #ifndef ALLOW_SRCG
368 IF (useSRCGSolver) THEN
369 WRITE(msgBuf,'(A,A)')
370 & 'CONFIG_CHECK: useSRCGSolver = .TRUE., but single reduction ',
371 & 'code is not compiled.'
372 CALL PRINT_ERROR( msgBuf, myThid )
373 WRITE(msgBuf,'(A)')
374 & 'CONFIG_CHECK: Re-compile with ALLOW_SRCG defined'
375 CALL PRINT_ERROR( msgBuf, myThid )
376 errCount = errCount + 1
377 ENDIF
378 #endif /* ALLOW_SRCG */
379
380 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
381
382 C-- Check parameter consistency :
383
384 IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.
385 & ( viscC4leithD.NE.0. .OR. viscC4leith.NE.0.
386 & .OR. viscC4smag.NE.0. .OR. viscA4Grid.NE.0.
387 & .OR. viscA4D.NE.0. .OR. viscA4Z.NE.0. ) ) THEN
388 WRITE(msgBuf,'(A,A)')
389 & 'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with',
390 & ' overlap (OLx,OLy) smaller than 3'
391 CALL PRINT_ERROR( msgBuf, myThid )
392 errCount = errCount + 1
393 ENDIF
394 IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.
395 & ( viscC2leithD.NE.0. .OR. viscC4leithD.NE.0. )
396 & ) THEN
397 WRITE(msgBuf,'(A,A)')
398 & 'CONFIG_CHECK: cannot use Leith Visc.(div.part) with',
399 & ' overlap (OLx,OLy) smaller than 3'
400 CALL PRINT_ERROR( msgBuf, myThid )
401 errCount = errCount + 1
402 ENDIF
403 IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.
404 & useSmag3D .AND. useCDscheme ) THEN
405 WRITE(msgBuf,'(A,A)')
406 & 'CONFIG_CHECK: cannot use Smag-3D + CD-scheme with',
407 & ' overlap (OLx,OLy) smaller than 3'
408 CALL PRINT_ERROR( msgBuf, myThid )
409 errCount = errCount + 1
410 ENDIF
411
412 #ifndef DISCONNECTED_TILES
413 C Overlaps cannot be larger than interior tile except for special cases
414 IF ( sNx.LT.OLx ) THEN
415 #ifdef ALLOW_EXCH2
416 WRITE(msgBuf,'(A)')
417 & 'CONFIG_CHECK: sNx<OLx not allowed with ALLOW_EXCH2 defined'
418 CALL PRINT_ERROR( msgBuf, myThid )
419 errCount = errCount + 1
420 #endif /* ALLOW_EXCH2 */
421 IF ( Nx.NE.1 ) THEN
422 WRITE(msgBuf,'(A)')
423 & 'CONFIG_CHECK: sNx<OLx not allowed unless Nx=1'
424 CALL PRINT_ERROR( msgBuf, myThid )
425 errCount = errCount + 1
426 ENDIF
427 ENDIF
428 IF ( sNy.LT.OLy ) THEN
429 #ifdef ALLOW_EXCH2
430 WRITE(msgBuf,'(A)')
431 & 'CONFIG_CHECK: sNy<OLy not allowed with ALLOW_EXCH2 defined'
432 CALL PRINT_ERROR( msgBuf, myThid )
433 errCount = errCount + 1
434 #endif /* ALLOW_EXCH2 */
435 IF ( Ny.NE.1 ) THEN
436 WRITE(msgBuf,'(A)')
437 & 'CONFIG_CHECK: sNy<OLy not allowed unless Ny=1'
438 CALL PRINT_ERROR( msgBuf, myThid )
439 errCount = errCount + 1
440 ENDIF
441 ENDIF
442 #endif /* ndef DISCONNECTED_TILES */
443
444 C-- Gravity vertical profile limitations:
445 IF ( usingPCoords .AND. gravityFile .NE. ' ' ) THEN
446 WRITE(msgBuf,'(A,A)') 'CONFIG_CHECK: Variable gravity',
447 & ' not yet implemented for P-coordinate'
448 CALL PRINT_ERROR( msgBuf, myThid )
449 errCount = errCount + 1
450 ENDIF
451 IF ( select_rStar.NE.0 .AND. gravityFile .NE. ' ' ) THEN
452 WRITE(msgBuf,'(A,A)') 'CONFIG_CHECK: Variable gravity',
453 & ' not yet implemented with rStar'
454 CALL PRINT_ERROR( msgBuf, myThid )
455 errCount = errCount + 1
456 ENDIF
457
458 C-- Deep-Atmosphere & Anelastic limitations:
459 IF ( deepAtmosphere .AND.
460 & useRealFreshWaterFlux .AND. usingPCoords ) THEN
461 WRITE(msgBuf,'(A,A)')
462 & 'CONFIG_CHECK: Deep-Atmosphere not yet implemented with',
463 & ' real-Fresh-Water option in P-coordinate'
464 CALL PRINT_ERROR( msgBuf, myThid )
465 errCount = errCount + 1
466 ENDIF
467 IF ( select_rStar.NE.0 .AND.
468 & ( deepAtmosphere .OR.
469 & usingZCoords.AND.rhoRefFile .NE. ' ' ) ) THEN
470 WRITE(msgBuf,'(A,A)')
471 & 'CONFIG_CHECK: Deep-Atmosphere or Anelastic',
472 & ' not yet implemented with rStar'
473 CALL PRINT_ERROR( msgBuf, myThid )
474 errCount = errCount + 1
475 ENDIF
476
477 C-- Free-surface related limitations:
478 IF ( cg2dUseMinResSol.LT.0 .OR. cg2dUseMinResSol.GT.1 ) THEN
479 WRITE(msgBuf,'(A,I10,A)')
480 & 'CONFIG_CHECK: cg2dUseMinResSol set to unvalid value(=',
481 & cg2dUseMinResSol, ')'
482 CALL PRINT_ERROR( msgBuf, myThid )
483 errCount = errCount + 1
484 ENDIF
485
486 IF ( rigidLid .AND. implicitFreeSurface ) THEN
487 WRITE(msgBuf,'(A,A)')
488 & 'CONFIG_CHECK: Cannot select both implicitFreeSurface',
489 & ' and rigidLid.'
490 CALL PRINT_ERROR( msgBuf, myThid )
491 errCount = errCount + 1
492 ENDIF
493
494 IF (rigidLid .AND. exactConserv) THEN
495 WRITE(msgBuf,'(A)')
496 & 'CONFIG_CHECK: exactConserv not compatible with'
497 CALL PRINT_ERROR( msgBuf, myThid )
498 WRITE(msgBuf,'(A)')
499 & 'CONFIG_CHECK: rigidLid (meaningless in that case)'
500 CALL PRINT_ERROR( msgBuf, myThid )
501 errCount = errCount + 1
502 ENDIF
503
504 IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN
505 WRITE(msgBuf,'(A)')
506 & 'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.'
507 CALL PRINT_ERROR( msgBuf, myThid )
508 WRITE(msgBuf,'(A)')
509 & 'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'
510 CALL PRINT_ERROR( msgBuf, myThid )
511 errCount = errCount + 1
512 ENDIF
513
514 IF (rigidLid .AND. useRealFreshWaterFlux) THEN
515 WRITE(msgBuf,'(A)')
516 & 'CONFIG_CHECK: useRealFreshWaterFlux not compatible with'
517 CALL PRINT_ERROR( msgBuf, myThid )
518 WRITE(msgBuf,'(A)')
519 & 'CONFIG_CHECK: rigidLid (meaningless in that case)'
520 CALL PRINT_ERROR( msgBuf, myThid )
521 errCount = errCount + 1
522 ENDIF
523
524 IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN
525 WRITE(msgBuf,'(A)')
526 & 'CONFIG_CHECK: nonlinFreeSurf cannot be used'
527 CALL PRINT_ERROR( msgBuf, myThid )
528 WRITE(msgBuf,'(A)')
529 & 'CONFIG_CHECK: without exactConserv'
530 CALL PRINT_ERROR( msgBuf, myThid )
531 errCount = errCount + 1
532 ENDIF
533
534 IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN
535 WRITE(msgBuf,'(A)')
536 & 'CONFIG_CHECK: r* Coordinate cannot be used'
537 CALL PRINT_ERROR( msgBuf, myThid )
538 WRITE(msgBuf,'(A)')
539 & 'CONFIG_CHECK: without exactConserv'
540 CALL PRINT_ERROR( msgBuf, myThid )
541 errCount = errCount + 1
542 ENDIF
543
544 IF ( select_rStar.GE.1 .AND. nonlinFreeSurf.LE.0 ) THEN
545 WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: r* Coordinate',
546 & ' (select_rStar=', select_rStar, ' ) cannot be used'
547 CALL PRINT_ERROR( msgBuf, myThid )
548 WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: ',
549 & ' with Linear FreeSurf (nonlinFreeSurf=', nonlinFreeSurf,' )'
550 CALL PRINT_ERROR( msgBuf, myThid )
551 errCount = errCount + 1
552 ENDIF
553 IF ( select_rStar.EQ.2 .AND. nonlinFreeSurf.NE.4 ) THEN
554 C- not consistent to account for the slope of the coordinate when
555 C ignoring the variations of level-thickness in PhiHyd calculation;
556 C for now, issue a warning (but might change the code later on):
557 WRITE(msgBuf,'(2A,I3)') '** WARNING ** CONFIG_CHECK: ',
558 & 'select_rStar=2 not right with nonlinFreeSurf=', nonlinFreeSurf
559 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
560 & SQUEEZE_RIGHT, myThid )
561 ENDIF
562
563 IF ( selectSigmaCoord.NE.0 ) THEN
564 IF ( fluidIsWater ) THEN
565 WRITE(msgBuf,'(A)')
566 & 'CONFIG_CHECK: Sigma-Coords not yet coded for Oceanic set-up'
567 CALL PRINT_ERROR( msgBuf, myThid )
568 errCount = errCount + 1
569 ENDIF
570 IF ( nonlinFreeSurf.LE.0 ) THEN
571 WRITE(msgBuf,'(A)')
572 & 'CONFIG_CHECK: Sigma-Coords not coded for Lin-FreeSurf'
573 CALL PRINT_ERROR( msgBuf, myThid )
574 errCount = errCount + 1
575 ENDIF
576 IF (select_rStar.NE.0 ) THEN
577 WRITE(msgBuf,'(A)')
578 & 'CONFIG_CHECK: Sigma-Coords and rStar are not compatible'
579 CALL PRINT_ERROR( msgBuf, myThid )
580 errCount = errCount + 1
581 ENDIF
582 WRITE(msgBuf,'(A)')
583 & 'CONFIG_CHECK: Sigma-Coords code neither complete nor tested'
584 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
585 & SQUEEZE_RIGHT, myThid )
586 ENDIF
587
588 C- note : not implemented in checkpoint48b but it is done now (since 01-28-03)
589 c IF (select_rStar.GT.0 .AND. useOBCS ) THEN
590 c STOP 'ABNORMAL END: S/R CONFIG_CHECK'
591 c ENDIF
592
593 IF ( nonlinFreeSurf.NE.0 .AND.
594 & deltaTFreeSurf.NE.dTtracerLev(1) ) THEN
595 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
596 & 'nonlinFreeSurf might cause problems'
597 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
598 & SQUEEZE_RIGHT, myThid )
599 WRITE(msgBuf,'(2A)') '** WARNING ** ',
600 & 'with different FreeSurf & Tracer time-steps'
601 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
602 & SQUEEZE_RIGHT, myThid )
603 ENDIF
604
605 IF ( useRealFreshWaterFlux .AND. exactConserv
606 & .AND. implicDiv2DFlow.EQ.0. _d 0
607 & .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN
608 WRITE(msgBuf,'(A)')
609 & 'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:'
610 CALL PRINT_ERROR( msgBuf, myThid )
611 WRITE(msgBuf,'(A)')
612 & 'CONFIG_CHECK: restart not implemented in this config'
613 CALL PRINT_ERROR( msgBuf, myThid )
614 errCount = errCount + 1
615 ENDIF
616
617 IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv
618 & .AND. implicDiv2DFlow.NE.1. ) THEN
619 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
620 & 'RealFreshWater & implicDiv2DFlow < 1'
621 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
622 & SQUEEZE_RIGHT, myThid )
623 WRITE(msgBuf,'(2A)') '** WARNING ** works better',
624 & ' with exactConserv=.T. (+ #define EXACT_CONSERV)'
625 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
626 & SQUEEZE_RIGHT, myThid )
627 ENDIF
628
629 #ifdef EXACT_CONSERV
630 IF (useRealFreshWaterFlux .AND. .NOT.exactConserv
631 & .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN
632 WRITE(msgBuf,'(A)')
633 & 'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP'
634 CALL PRINT_ERROR( msgBuf, myThid )
635 WRITE(msgBuf,'(A)')
636 & 'CONFIG_CHECK: requires exactConserv=T'
637 CALL PRINT_ERROR( msgBuf, myThid )
638 errCount = errCount + 1
639 ENDIF
640 #else
641 IF (useRealFreshWaterFlux
642 & .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN
643 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
644 & 'E-P effects on wVel are not included'
645 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
646 & SQUEEZE_RIGHT, myThid )
647 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
648 & '==> use #define EXACT_CONSERV to fix it'
649 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
650 & SQUEEZE_RIGHT, myThid )
651 ENDIF
652 #endif /* EXACT_CONSERV */
653
654 IF ( selectAddFluid.LT.-1 .OR. selectAddFluid.GT.2 ) THEN
655 WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: selectAddFluid=',
656 & selectAddFluid, ' not allowed'
657 CALL PRINT_ERROR( msgBuf, myThid )
658 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
659 & 'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)'
660 CALL PRINT_ERROR( msgBuf, myThid )
661 errCount = errCount + 1
662 ENDIF
663 IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN
664 WRITE(msgBuf,'(A)')
665 & 'CONFIG_CHECK: selectAddFluid > 0 not compatible with'
666 CALL PRINT_ERROR( msgBuf, myThid )
667 WRITE(msgBuf,'(A)')
668 & 'CONFIG_CHECK: rigidLid (meaningless in that case)'
669 CALL PRINT_ERROR( msgBuf, myThid )
670 errCount = errCount + 1
671 ENDIF
672 IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN
673 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
674 & 'synchronous time-stepping =>'
675 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
676 & SQUEEZE_RIGHT, myThid )
677 WRITE(msgBuf,'(2A)') '** WARNING ** ',
678 & '1 time-step mismatch in AddFluid effects on T & S'
679 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
680 & SQUEEZE_RIGHT, myThid )
681 ENDIF
682
683 C-- Pressure calculation and pressure gradient:
684 #ifndef INCLUDE_PHIHYD_CALCULATION_CODE
685 IF ( momPressureForcing .OR. storePhiHyd4Phys ) THEN
686 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
687 & 'missing code to calculate pressure (totPhiHyd)'
688 CALL PRINT_ERROR( msgBuf, myThid )
689 errCount = errCount + 1
690 ENDIF
691 #endif /* INCLUDE_PHIHYD_CALCULATION_CODE */
692 IF ( storePhiHyd4Phys .AND. .NOT.momStepping ) THEN
693 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
694 & 'storePhiHyd4Phys = TRUE but pressure is not computed'
695 CALL PRINT_ERROR( msgBuf, myThid )
696 errCount = errCount + 1
697 ENDIF
698
699 C-- Non-hydrostatic and 3-D solver related limitations:
700 IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN
701 WRITE(msgBuf,'(A)')
702 & 'CONFIG_CHECK: nonlinFreeSurf not yet implemented'
703 CALL PRINT_ERROR( msgBuf, myThid )
704 WRITE(msgBuf,'(A)')
705 & 'CONFIG_CHECK: in nonHydrostatic code'
706 CALL PRINT_ERROR( msgBuf, myThid )
707 errCount = errCount + 1
708 ENDIF
709
710 IF ( implicitNHPress*implicSurfPress*implicDiv2DFlow.NE.1.
711 & .AND. implicitIntGravWave ) THEN
712 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: implicitIntGravWave',
713 & ' NOT SAFE with non-fully implicit solver'
714 CALL PRINT_ERROR( msgBuf, myThid )
715 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: To by-pass this',
716 & 'STOP, comment this test and re-compile config_check'
717 CALL PRINT_ERROR( msgBuf, myThid )
718 errCount = errCount + 1
719 ENDIF
720 IF ( implicitNHPress*implicSurfPress*implicDiv2DFlow.EQ.0.
721 & .AND. nonHydrostatic ) THEN
722 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
723 & 'Needs non-zero implicit factors (i.e., implicitNHPress,'
724 CALL PRINT_ERROR( msgBuf, myThid )
725 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
726 & ' implicSurfPress & implicDiv2DFlow) to run nonHydrostatic'
727 CALL PRINT_ERROR( msgBuf, myThid )
728 errCount = errCount + 1
729 ENDIF
730 IF ( nonHydrostatic .AND. .NOT.exactConserv
731 & .AND. implicDiv2DFlow.NE.1. ) THEN
732 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Needs exactConserv=T',
733 & ' for nonHydrostatic with implicDiv2DFlow < 1'
734 CALL PRINT_ERROR( msgBuf, myThid )
735 errCount = errCount + 1
736 ENDIF
737 IF ( nonHydrostatic .AND.
738 & implicitNHPress.NE.implicSurfPress ) THEN
739 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
740 & 'nonHydrostatic might cause problems with'
741 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
742 & SQUEEZE_RIGHT, myThid )
743 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
744 & 'different implicitNHPress & implicSurfPress'
745 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
746 & SQUEEZE_RIGHT, myThid )
747 ENDIF
748
749 IF ( selectImplicitDrag.EQ.2 .AND. use3Dsolver ) THEN
750 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: selectImplicitDrag=2',
751 & ' not compatible with 3-D Press. solver'
752 CALL PRINT_ERROR( msgBuf, myThid )
753 errCount = errCount + 1
754 ENDIF
755
756 IF ( implicitViscosity .AND. use3Dsolver ) THEN
757 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
758 & 'Implicit viscosity applies to provisional u,vVel'
759 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
760 & SQUEEZE_RIGHT, myThid )
761 WRITE(msgBuf,'(2A)') '** WARNING ** => not consistent with',
762 & ' final vertical shear (after appling 3-D solver solution'
763 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
764 & SQUEEZE_RIGHT, myThid )
765 ENDIF
766 IF ( implicitViscosity .AND. nonHydrostatic ) THEN
767 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
768 & 'Implicit viscosity not implemented in CALC_GW'
769 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
770 & SQUEEZE_RIGHT, myThid )
771 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
772 & 'Explicit viscosity might become unstable if too large'
773 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
774 & SQUEEZE_RIGHT, myThid )
775 ENDIF
776
777 C-- Momentum related limitations:
778 IF ( vectorInvariantMomentum.AND.momStepping ) THEN
779 IF ( highOrderVorticity.AND.upwindVorticity ) THEN
780 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
781 & '"highOrderVorticity" conflicts with "upwindVorticity"'
782 CALL PRINT_ERROR( msgBuf, myThid )
783 errCount = errCount + 1
784 ENDIF
785 ENDIF
786 IF ( .NOT.vectorInvariantMomentum .AND. momAdvection ) THEN
787 IF ( usingCurvilinearGrid ) THEN
788 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
789 & 'missing metric-terms for CurvilinearGrid'
790 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
791 & SQUEEZE_RIGHT, myThid )
792 ENDIF
793 IF ( hasWetCSCorners ) THEN
794 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momAdvection ',
795 & 'in flux-form is wrong on CubedSphere grid (corners)'
796 CALL PRINT_ERROR( msgBuf, myThid )
797 errCount = errCount + 1
798 ENDIF
799 ENDIF
800 IF ( selectCoriMap.LT.0 .OR. selectCoriMap.GT.3 ) THEN
801 WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ',
802 & 'Invalid option: selectCoriMap=', selectCoriMap
803 CALL PRINT_ERROR( msgBuf, myThid )
804 errCount = errCount + 1
805 ENDIF
806 IF ( selectBotDragQuadr.LT.-1 .OR. selectBotDragQuadr.GT.2 ) THEN
807 WRITE(msgBuf,'(2A,I8,A)') 'CONFIG_CHECK: ',
808 & 'selectBotDragQuadr=', selectBotDragQuadr,
809 & ' not valid (-1,0,1,2)'
810 CALL PRINT_ERROR( msgBuf, myThid )
811 errCount = errCount + 1
812 ENDIF
813 IF ( useSmag3D .AND.
814 & ( usingPCoords .OR. deepAtmosphere .OR. selectSigmaCoord.NE.0
815 & .OR. rhoRefFile.NE.' ' .OR. hasWetCSCorners )
816 & ) THEN
817 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
818 & 'Smag-3D not yet implemented for this set-up'
819 CALL PRINT_ERROR( msgBuf, myThid )
820 errCount = errCount + 1
821 ENDIF
822
823 IF ( momStepping .AND. .NOT.useCDscheme
824 & .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN
825 C- jmc: since useCDscheme is a new [04-13-03] flag (default=F),
826 C put this WARNING to stress that even if CD-scheme parameters
827 C (tauCD,rCD) are set, CD-scheme is not used without useCDscheme=T
828 C- and STOP if using mom_fluxform (following Chris advise).
829 C- jmc: but ultimately, this block can/will be removed.
830 IF ( vectorInvariantMomentum ) THEN
831 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
832 & 'CD-scheme is OFF but params(tauCD,rCD) are set'
833 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
834 & SQUEEZE_RIGHT, myThid )
835 WRITE(msgBuf,'(3A)') '** WARNING ** to turn ON CD-scheme:',
836 & ' => "useCDscheme=.TRUE." in "data", namelist PARM01'
837 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
838 & SQUEEZE_RIGHT, myThid )
839 ELSE
840 WRITE(msgBuf,'(A)')
841 & 'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set'
842 CALL PRINT_ERROR( msgBuf, myThid )
843 WRITE(msgBuf,'(2A)')
844 & 'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',
845 & ' in "data", namelist PARM01'
846 CALL PRINT_ERROR( msgBuf, myThid )
847 errCount = errCount + 1
848 ENDIF
849 ENDIF
850
851 IF ( useCDscheme .AND. hasWetCSCorners ) THEN
852 WRITE(msgBuf,'(2A)')
853 & 'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'
854 CALL PRINT_ERROR( msgBuf, myThid )
855 errCount = errCount + 1
856 ENDIF
857 IF ( useCDscheme .AND. momImplVertAdv ) THEN
858 WRITE(msgBuf,'(2A)')'CONFIG_CHECK: ',
859 & 'Implicit Vert. Advect. not coded for CD-scheme velocity'
860 CALL PRINT_ERROR( msgBuf, myThid )
861 errCount = errCount + 1
862 ENDIF
863 IF ( useCDscheme .AND. selectImplicitDrag.GT.0 ) THEN
864 WRITE(msgBuf,'(2A)')'CONFIG_CHECK: ',
865 & 'Implicit (bottom) drag not coded for CD-scheme velocity'
866 CALL PRINT_ERROR( msgBuf, myThid )
867 errCount = errCount + 1
868 ENDIF
869
870 C-- Time-stepping limitations
871 IF ( implicitIntGravWave .AND. staggerTimeStep ) THEN
872 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: staggerTimeStep',
873 & ' incompatible with implicitIntGravWave'
874 CALL PRINT_ERROR( msgBuf, myThid )
875 errCount = errCount + 1
876 ENDIF
877 IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN
878 WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=',
879 & momForcingOutAB, ' not allowed'
880 CALL PRINT_ERROR( msgBuf, myThid )
881 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',
882 & 'should be =1 (Out of AB) or =0 (In AB)'
883 CALL PRINT_ERROR( msgBuf, myThid )
884 errCount = errCount + 1
885 ENDIF
886 IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN
887 WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',
888 & tracForcingOutAB, ' not allowed'
889 CALL PRINT_ERROR( msgBuf, myThid )
890 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',
891 & 'should be =1 (Out of AB) or =0 (In AB)'
892 CALL PRINT_ERROR( msgBuf, myThid )
893 errCount = errCount + 1
894 ENDIF
895 IF ( selectImplicitDrag.LT.0 .OR. selectImplicitDrag.GT.2 ) THEN
896 WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ',
897 & 'Invalid option: selectImplicitDrag=', selectImplicitDrag
898 CALL PRINT_ERROR( msgBuf, myThid )
899 errCount = errCount + 1
900 ENDIF
901 IF ( selectImplicitDrag.EQ.1 ) THEN
902 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: selectImplicitDrag=1',
903 & ' not yet available'
904 CALL PRINT_ERROR( msgBuf, myThid )
905 errCount = errCount + 1
906 ENDIF
907
908 C-- Grid limitations:
909 IF ( rotateGrid ) THEN
910 IF ( .NOT. usingSphericalPolarGrid ) THEN
911 WRITE(msgBuf,'(2A)')
912 & 'CONFIG_CHECK: specifying Euler angles makes only ',
913 & 'sense with usingSphericalGrid=.TRUE.'
914 CALL PRINT_ERROR( msgBuf, myThid )
915 errCount = errCount + 1
916 ENDIF
917 IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN
918 WRITE(msgBuf,'(2A)')
919 & 'CONFIG_CHECK: specifying Euler angles will probably ',
920 & 'not work with pkgs FLT, ZONAL_FLT, ECCO'
921 CALL PRINT_ERROR( msgBuf, myThid )
922 errCount = errCount + 1
923 ENDIF
924 ENDIF
925
926 C-- Packages conflict
927 IF ( useMATRIX .AND. useGCHEM ) THEN
928 WRITE(msgBuf,'(2A)')
929 & 'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'
930 CALL PRINT_ERROR( msgBuf, myThid )
931 errCount = errCount + 1
932 ENDIF
933
934 IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN
935 WRITE(msgBuf,'(2A)')
936 & 'CONFIG_CHECK: cannot set useMATRIX without ',
937 & 'setting usePTRACERS'
938 CALL PRINT_ERROR( msgBuf, myThid )
939 errCount = errCount + 1
940 ENDIF
941
942 IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN
943 WRITE(msgBuf,'(2A)')
944 & 'CONFIG_CHECK: cannot set allowFreezing',
945 & ' with pkgs SEAICE or THSICE'
946 CALL PRINT_ERROR( msgBuf, myThid )
947 errCount = errCount + 1
948 ENDIF
949
950 IF ( errCount.GE.1 ) THEN
951 WRITE(msgBuf,'(A,I3,A)')
952 & 'CONFIG_CHECK: detected', errCount,' fatal error(s)'
953 CALL PRINT_ERROR( msgBuf, myThid )
954 CALL ALL_PROC_DIE( 0 )
955 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
956 ENDIF
957 _END_MASTER(myThid)
958
959 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
960
961 _BEGIN_MASTER(myThid)
962 WRITE(msgBuf,'(A)') '// CONFIG_CHECK : Normal End'
963 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
964 & SQUEEZE_RIGHT, myThid )
965 WRITE(msgBuf,'(A)')
966 &'// ======================================================='
967 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
968 & SQUEEZE_RIGHT, myThid )
969 WRITE(msgBuf,'(A)') ' '
970 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
971 & SQUEEZE_RIGHT, myThid )
972 _END_MASTER(myThid)
973
974 RETURN
975 END

  ViewVC Help
Powered by ViewVC 1.1.22