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