/[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.87 - (show annotations) (download)
Thu Nov 2 17:57:40 2017 UTC (6 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint66o, checkpoint66n, checkpoint66m, HEAD
Changes since 1.86: +26 -1 lines
new options 1) to account for true vertical distance (including hFac)
     in vertical viscous flux and diffusive flux ;
  2) to increase vertical mixing near surface and/or bottom where partial
     cell is too thin ;

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

  ViewVC Help
Powered by ViewVC 1.1.22