1 |
C $Header: /u/gcmpack/MITgcm/model/src/config_check.F,v 1.83 2016/02/15 17:59:40 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-- Gravity vertical profile limitations: |
415 |
IF ( usingPCoords .AND. gravityFile .NE. ' ' ) THEN |
416 |
WRITE(msgBuf,'(A,A)') 'CONFIG_CHECK: Variable gravity', |
417 |
& ' not yet implemented for P-coordinate' |
418 |
CALL PRINT_ERROR( msgBuf, myThid ) |
419 |
errCount = errCount + 1 |
420 |
ENDIF |
421 |
IF ( select_rStar.NE.0 .AND. gravityFile .NE. ' ' ) THEN |
422 |
WRITE(msgBuf,'(A,A)') 'CONFIG_CHECK: Variable gravity', |
423 |
& ' not yet implemented with rStar' |
424 |
CALL PRINT_ERROR( msgBuf, myThid ) |
425 |
errCount = errCount + 1 |
426 |
ENDIF |
427 |
|
428 |
C-- Deep-Atmosphere & Anelastic limitations: |
429 |
IF ( deepAtmosphere .AND. |
430 |
& useRealFreshWaterFlux .AND. usingPCoords ) THEN |
431 |
WRITE(msgBuf,'(A,A)') |
432 |
& 'CONFIG_CHECK: Deep-Atmosphere not yet implemented with', |
433 |
& ' real-Fresh-Water option in P-coordinate' |
434 |
CALL PRINT_ERROR( msgBuf, myThid ) |
435 |
errCount = errCount + 1 |
436 |
ENDIF |
437 |
IF ( select_rStar.NE.0 .AND. |
438 |
& ( deepAtmosphere .OR. |
439 |
& usingZCoords.AND.rhoRefFile .NE. ' ' ) ) THEN |
440 |
WRITE(msgBuf,'(A,A)') |
441 |
& 'CONFIG_CHECK: Deep-Atmosphere or Anelastic', |
442 |
& ' not yet implemented with rStar' |
443 |
CALL PRINT_ERROR( msgBuf, myThid ) |
444 |
errCount = errCount + 1 |
445 |
ENDIF |
446 |
|
447 |
C-- Free-surface related limitations: |
448 |
IF ( cg2dUseMinResSol.LT.0 .OR. cg2dUseMinResSol.GT.1 ) THEN |
449 |
WRITE(msgBuf,'(A,I10,A)') |
450 |
& 'CONFIG_CHECK: cg2dUseMinResSol set to unvalid value(=', |
451 |
& cg2dUseMinResSol, ')' |
452 |
CALL PRINT_ERROR( msgBuf, myThid ) |
453 |
errCount = errCount + 1 |
454 |
ENDIF |
455 |
|
456 |
IF ( rigidLid .AND. implicitFreeSurface ) THEN |
457 |
WRITE(msgBuf,'(A,A)') |
458 |
& 'CONFIG_CHECK: Cannot select both implicitFreeSurface', |
459 |
& ' and rigidLid.' |
460 |
CALL PRINT_ERROR( msgBuf, myThid ) |
461 |
errCount = errCount + 1 |
462 |
ENDIF |
463 |
|
464 |
IF (rigidLid .AND. exactConserv) THEN |
465 |
WRITE(msgBuf,'(A)') |
466 |
& 'CONFIG_CHECK: exactConserv not compatible with' |
467 |
CALL PRINT_ERROR( msgBuf, myThid ) |
468 |
WRITE(msgBuf,'(A)') |
469 |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
470 |
CALL PRINT_ERROR( msgBuf, myThid ) |
471 |
errCount = errCount + 1 |
472 |
ENDIF |
473 |
|
474 |
IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN |
475 |
WRITE(msgBuf,'(A)') |
476 |
& 'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.' |
477 |
CALL PRINT_ERROR( msgBuf, myThid ) |
478 |
WRITE(msgBuf,'(A)') |
479 |
& 'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.' |
480 |
CALL PRINT_ERROR( msgBuf, myThid ) |
481 |
errCount = errCount + 1 |
482 |
ENDIF |
483 |
|
484 |
IF (rigidLid .AND. useRealFreshWaterFlux) THEN |
485 |
WRITE(msgBuf,'(A)') |
486 |
& 'CONFIG_CHECK: useRealFreshWaterFlux not compatible with' |
487 |
CALL PRINT_ERROR( msgBuf, myThid ) |
488 |
WRITE(msgBuf,'(A)') |
489 |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
490 |
CALL PRINT_ERROR( msgBuf, myThid ) |
491 |
errCount = errCount + 1 |
492 |
ENDIF |
493 |
|
494 |
IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN |
495 |
WRITE(msgBuf,'(A)') |
496 |
& 'CONFIG_CHECK: nonlinFreeSurf cannot be used' |
497 |
CALL PRINT_ERROR( msgBuf, myThid ) |
498 |
WRITE(msgBuf,'(A)') |
499 |
& 'CONFIG_CHECK: without exactConserv' |
500 |
CALL PRINT_ERROR( msgBuf, myThid ) |
501 |
errCount = errCount + 1 |
502 |
ENDIF |
503 |
|
504 |
IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN |
505 |
WRITE(msgBuf,'(A)') |
506 |
& 'CONFIG_CHECK: r* Coordinate cannot be used' |
507 |
CALL PRINT_ERROR( msgBuf, myThid ) |
508 |
WRITE(msgBuf,'(A)') |
509 |
& 'CONFIG_CHECK: without exactConserv' |
510 |
CALL PRINT_ERROR( msgBuf, myThid ) |
511 |
errCount = errCount + 1 |
512 |
ENDIF |
513 |
|
514 |
IF ( select_rStar.GE.1 .AND. nonlinFreeSurf.LE.0 ) THEN |
515 |
WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: r* Coordinate', |
516 |
& ' (select_rStar=', select_rStar, ' ) cannot be used' |
517 |
CALL PRINT_ERROR( msgBuf, myThid ) |
518 |
WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: ', |
519 |
& ' with Linear FreeSurf (nonlinFreeSurf=', nonlinFreeSurf,' )' |
520 |
CALL PRINT_ERROR( msgBuf, myThid ) |
521 |
errCount = errCount + 1 |
522 |
ENDIF |
523 |
IF ( select_rStar.EQ.2 .AND. nonlinFreeSurf.NE.4 ) THEN |
524 |
C- not consistent to account for the slope of the coordinate when |
525 |
C ignoring the variations of level-thickness in PhiHyd calculation; |
526 |
C for now, issue a warning (but might change the code later on): |
527 |
WRITE(msgBuf,'(2A,I3)') '** WARNING ** CONFIG_CHECK: ', |
528 |
& 'select_rStar=2 not right with nonlinFreeSurf=', nonlinFreeSurf |
529 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
530 |
& SQUEEZE_RIGHT, myThid ) |
531 |
ENDIF |
532 |
|
533 |
IF ( selectSigmaCoord.NE.0 ) THEN |
534 |
IF ( fluidIsWater ) THEN |
535 |
WRITE(msgBuf,'(A)') |
536 |
& 'CONFIG_CHECK: Sigma-Coords not yet coded for Oceanic set-up' |
537 |
CALL PRINT_ERROR( msgBuf, myThid ) |
538 |
errCount = errCount + 1 |
539 |
ENDIF |
540 |
IF ( nonlinFreeSurf.LE.0 ) THEN |
541 |
WRITE(msgBuf,'(A)') |
542 |
& 'CONFIG_CHECK: Sigma-Coords not coded for Lin-FreeSurf' |
543 |
CALL PRINT_ERROR( msgBuf, myThid ) |
544 |
errCount = errCount + 1 |
545 |
ENDIF |
546 |
IF (select_rStar.NE.0 ) THEN |
547 |
WRITE(msgBuf,'(A)') |
548 |
& 'CONFIG_CHECK: Sigma-Coords and rStar are not compatible' |
549 |
CALL PRINT_ERROR( msgBuf, myThid ) |
550 |
errCount = errCount + 1 |
551 |
ENDIF |
552 |
WRITE(msgBuf,'(A)') |
553 |
& 'CONFIG_CHECK: Sigma-Coords code neither complete nor tested' |
554 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
555 |
& SQUEEZE_RIGHT, myThid ) |
556 |
ENDIF |
557 |
|
558 |
C- note : not implemented in checkpoint48b but it is done now (since 01-28-03) |
559 |
c IF (select_rStar.GT.0 .AND. useOBCS ) THEN |
560 |
c STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
561 |
c ENDIF |
562 |
|
563 |
IF ( nonlinFreeSurf.NE.0 .AND. |
564 |
& deltaTFreeSurf.NE.dTtracerLev(1) ) THEN |
565 |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
566 |
& 'nonlinFreeSurf might cause problems' |
567 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
568 |
& SQUEEZE_RIGHT, myThid ) |
569 |
WRITE(msgBuf,'(2A)') '** WARNING ** ', |
570 |
& 'with different FreeSurf & Tracer time-steps' |
571 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
572 |
& SQUEEZE_RIGHT, myThid ) |
573 |
ENDIF |
574 |
|
575 |
IF ( useRealFreshWaterFlux .AND. exactConserv |
576 |
& .AND. implicDiv2DFlow.EQ.0. _d 0 |
577 |
& .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN |
578 |
WRITE(msgBuf,'(A)') |
579 |
& 'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:' |
580 |
CALL PRINT_ERROR( msgBuf, myThid ) |
581 |
WRITE(msgBuf,'(A)') |
582 |
& 'CONFIG_CHECK: restart not implemented in this config' |
583 |
CALL PRINT_ERROR( msgBuf, myThid ) |
584 |
errCount = errCount + 1 |
585 |
ENDIF |
586 |
|
587 |
IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv |
588 |
& .AND. implicDiv2DFlow.NE.1. ) THEN |
589 |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
590 |
& 'RealFreshWater & implicDiv2DFlow < 1' |
591 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
592 |
& SQUEEZE_RIGHT, myThid ) |
593 |
WRITE(msgBuf,'(2A)') '** WARNING ** works better', |
594 |
& ' with exactConserv=.T. (+ #define EXACT_CONSERV)' |
595 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
596 |
& SQUEEZE_RIGHT, myThid ) |
597 |
ENDIF |
598 |
|
599 |
#ifdef EXACT_CONSERV |
600 |
IF (useRealFreshWaterFlux .AND. .NOT.exactConserv |
601 |
& .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN |
602 |
WRITE(msgBuf,'(A)') |
603 |
& 'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP' |
604 |
CALL PRINT_ERROR( msgBuf, myThid ) |
605 |
WRITE(msgBuf,'(A)') |
606 |
& 'CONFIG_CHECK: requires exactConserv=T' |
607 |
CALL PRINT_ERROR( msgBuf, myThid ) |
608 |
errCount = errCount + 1 |
609 |
ENDIF |
610 |
#else |
611 |
IF (useRealFreshWaterFlux |
612 |
& .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN |
613 |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
614 |
& 'E-P effects on wVel are not included' |
615 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
616 |
& SQUEEZE_RIGHT, myThid ) |
617 |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
618 |
& '==> use #define EXACT_CONSERV to fix it' |
619 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
620 |
& SQUEEZE_RIGHT, myThid ) |
621 |
ENDIF |
622 |
#endif /* EXACT_CONSERV */ |
623 |
|
624 |
IF ( selectAddFluid.LT.-1 .OR. selectAddFluid.GT.2 ) THEN |
625 |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: selectAddFluid=', |
626 |
& selectAddFluid, ' not allowed' |
627 |
CALL PRINT_ERROR( msgBuf, myThid ) |
628 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
629 |
& 'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)' |
630 |
CALL PRINT_ERROR( msgBuf, myThid ) |
631 |
errCount = errCount + 1 |
632 |
ENDIF |
633 |
IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN |
634 |
WRITE(msgBuf,'(A)') |
635 |
& 'CONFIG_CHECK: selectAddFluid > 0 not compatible with' |
636 |
CALL PRINT_ERROR( msgBuf, myThid ) |
637 |
WRITE(msgBuf,'(A)') |
638 |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
639 |
CALL PRINT_ERROR( msgBuf, myThid ) |
640 |
errCount = errCount + 1 |
641 |
ENDIF |
642 |
IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN |
643 |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
644 |
& 'synchronous time-stepping =>' |
645 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
646 |
& SQUEEZE_RIGHT, myThid ) |
647 |
WRITE(msgBuf,'(2A)') '** WARNING ** ', |
648 |
& '1 time-step mismatch in AddFluid effects on T & S' |
649 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
650 |
& SQUEEZE_RIGHT, myThid ) |
651 |
ENDIF |
652 |
|
653 |
C-- Pressure calculation and pressure gradient: |
654 |
#ifndef INCLUDE_PHIHYD_CALCULATION_CODE |
655 |
IF ( momPressureForcing .OR. storePhiHyd4Phys ) THEN |
656 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
657 |
& 'missing code to calculate pressure (totPhiHyd)' |
658 |
CALL PRINT_ERROR( msgBuf, myThid ) |
659 |
errCount = errCount + 1 |
660 |
ENDIF |
661 |
#endif /* INCLUDE_PHIHYD_CALCULATION_CODE */ |
662 |
IF ( storePhiHyd4Phys .AND. .NOT.momStepping ) THEN |
663 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
664 |
& 'storePhiHyd4Phys = TRUE but pressure is not computed' |
665 |
CALL PRINT_ERROR( msgBuf, myThid ) |
666 |
errCount = errCount + 1 |
667 |
ENDIF |
668 |
|
669 |
C-- Non-hydrostatic and 3-D solver related limitations: |
670 |
IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN |
671 |
WRITE(msgBuf,'(A)') |
672 |
& 'CONFIG_CHECK: nonlinFreeSurf not yet implemented' |
673 |
CALL PRINT_ERROR( msgBuf, myThid ) |
674 |
WRITE(msgBuf,'(A)') |
675 |
& 'CONFIG_CHECK: in nonHydrostatic code' |
676 |
CALL PRINT_ERROR( msgBuf, myThid ) |
677 |
errCount = errCount + 1 |
678 |
ENDIF |
679 |
|
680 |
IF ( implicitNHPress*implicSurfPress*implicDiv2DFlow.NE.1. |
681 |
& .AND. implicitIntGravWave ) THEN |
682 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: implicitIntGravWave', |
683 |
& ' NOT SAFE with non-fully implicit solver' |
684 |
CALL PRINT_ERROR( msgBuf, myThid ) |
685 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: To by-pass this', |
686 |
& 'STOP, comment this test and re-compile config_check' |
687 |
CALL PRINT_ERROR( msgBuf, myThid ) |
688 |
errCount = errCount + 1 |
689 |
ENDIF |
690 |
IF ( implicitNHPress*implicSurfPress*implicDiv2DFlow.EQ.0. |
691 |
& .AND. nonHydrostatic ) THEN |
692 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
693 |
& 'Needs non-zero implicit factors (i.e., implicitNHPress,' |
694 |
CALL PRINT_ERROR( msgBuf, myThid ) |
695 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
696 |
& ' implicSurfPress & implicDiv2DFlow) to run nonHydrostatic' |
697 |
CALL PRINT_ERROR( msgBuf, myThid ) |
698 |
errCount = errCount + 1 |
699 |
ENDIF |
700 |
IF ( nonHydrostatic .AND. .NOT.exactConserv |
701 |
& .AND. implicDiv2DFlow.NE.1. ) THEN |
702 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Needs exactConserv=T', |
703 |
& ' for nonHydrostatic with implicDiv2DFlow < 1' |
704 |
CALL PRINT_ERROR( msgBuf, myThid ) |
705 |
errCount = errCount + 1 |
706 |
ENDIF |
707 |
IF ( nonHydrostatic .AND. |
708 |
& implicitNHPress.NE.implicSurfPress ) THEN |
709 |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
710 |
& ' nonHydrostatic might cause problems with' |
711 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
712 |
& SQUEEZE_RIGHT, myThid ) |
713 |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
714 |
& 'different implicitNHPress & implicSurfPress' |
715 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
716 |
& SQUEEZE_RIGHT, myThid ) |
717 |
ENDIF |
718 |
|
719 |
IF ( implicitViscosity .AND. use3Dsolver ) THEN |
720 |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
721 |
& 'Implicit viscosity applies to provisional u,vVel' |
722 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
723 |
& SQUEEZE_RIGHT, myThid ) |
724 |
WRITE(msgBuf,'(2A)') '** WARNING ** => not consistent with', |
725 |
& ' final vertical shear (after appling 3-D solver solution' |
726 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
727 |
& SQUEEZE_RIGHT, myThid ) |
728 |
ENDIF |
729 |
IF ( implicitViscosity .AND. nonHydrostatic ) THEN |
730 |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
731 |
& 'Implicit viscosity not implemented in CALC_GW' |
732 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
733 |
& SQUEEZE_RIGHT, myThid ) |
734 |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
735 |
& 'Explicit viscosity might become unstable if too large' |
736 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
737 |
& SQUEEZE_RIGHT, myThid ) |
738 |
ENDIF |
739 |
|
740 |
C-- Momentum related limitations: |
741 |
IF ( vectorInvariantMomentum.AND.momStepping ) THEN |
742 |
IF ( highOrderVorticity.AND.upwindVorticity ) THEN |
743 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
744 |
& '"highOrderVorticity" conflicts with "upwindVorticity"' |
745 |
CALL PRINT_ERROR( msgBuf, myThid ) |
746 |
errCount = errCount + 1 |
747 |
ENDIF |
748 |
ENDIF |
749 |
IF ( .NOT.vectorInvariantMomentum .AND. momAdvection ) THEN |
750 |
IF ( usingCurvilinearGrid ) THEN |
751 |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
752 |
& 'missing metric-terms for CurvilinearGrid' |
753 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
754 |
& SQUEEZE_RIGHT, myThid ) |
755 |
ENDIF |
756 |
IF ( hasWetCSCorners ) THEN |
757 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momAdvection ', |
758 |
& 'in flux-form is wrong on CubedSphere grid (corners)' |
759 |
CALL PRINT_ERROR( msgBuf, myThid ) |
760 |
errCount = errCount + 1 |
761 |
ENDIF |
762 |
ENDIF |
763 |
IF ( selectCoriMap.LT.0 .OR. selectCoriMap.GT.3 ) THEN |
764 |
WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ', |
765 |
& 'Invalid option: selectCoriMap=', selectCoriMap |
766 |
CALL PRINT_ERROR( msgBuf, myThid ) |
767 |
errCount = errCount + 1 |
768 |
ENDIF |
769 |
IF ( selectBotDragQuadr.LT.-1 .OR. selectBotDragQuadr.GT.2 ) THEN |
770 |
WRITE(msgBuf,'(2A,I8,A)') 'CONFIG_CHECK: ', |
771 |
& 'selectBotDragQuadr=', selectBotDragQuadr, |
772 |
& ' not valid (-1,0,1,2)' |
773 |
CALL PRINT_ERROR( msgBuf, myThid ) |
774 |
errCount = errCount + 1 |
775 |
ENDIF |
776 |
IF ( useSmag3D .AND. |
777 |
& ( usingPCoords .OR. deepAtmosphere .OR. selectSigmaCoord.NE.0 |
778 |
& .OR. rhoRefFile.NE.' ' .OR. hasWetCSCorners ) |
779 |
& ) THEN |
780 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
781 |
& 'Smag-3D not yet implemented for this set-up' |
782 |
CALL PRINT_ERROR( msgBuf, myThid ) |
783 |
errCount = errCount + 1 |
784 |
ENDIF |
785 |
|
786 |
IF ( momStepping .AND. .NOT.useCDscheme |
787 |
& .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN |
788 |
C- jmc: since useCDscheme is a new [04-13-03] flag (default=F), |
789 |
C put this WARNING to stress that even if CD-scheme parameters |
790 |
C (tauCD,rCD) are set, CD-scheme is not used without useCDscheme=T |
791 |
C- and STOP if using mom_fluxform (following Chris advise). |
792 |
C- jmc: but ultimately, this block can/will be removed. |
793 |
IF ( vectorInvariantMomentum ) THEN |
794 |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
795 |
& 'CD-scheme is OFF but params(tauCD,rCD) are set' |
796 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
797 |
& SQUEEZE_RIGHT, myThid ) |
798 |
WRITE(msgBuf,'(3A)') '** WARNING ** to turn ON CD-scheme:', |
799 |
& ' => "useCDscheme=.TRUE." in "data", namelist PARM01' |
800 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
801 |
& SQUEEZE_RIGHT, myThid ) |
802 |
ELSE |
803 |
WRITE(msgBuf,'(A)') |
804 |
& 'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set' |
805 |
CALL PRINT_ERROR( msgBuf, myThid ) |
806 |
WRITE(msgBuf,'(2A)') |
807 |
& 'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."', |
808 |
& ' in "data", namelist PARM01' |
809 |
CALL PRINT_ERROR( msgBuf, myThid ) |
810 |
errCount = errCount + 1 |
811 |
ENDIF |
812 |
ENDIF |
813 |
|
814 |
IF ( useCDscheme .AND. hasWetCSCorners ) THEN |
815 |
WRITE(msgBuf,'(2A)') |
816 |
& 'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid' |
817 |
CALL PRINT_ERROR( msgBuf, myThid ) |
818 |
errCount = errCount + 1 |
819 |
ENDIF |
820 |
|
821 |
C-- Time-stepping limitations |
822 |
IF ( implicitIntGravWave .AND. staggerTimeStep ) THEN |
823 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: staggerTimeStep', |
824 |
& ' incompatible with implicitIntGravWave' |
825 |
CALL PRINT_ERROR( msgBuf, myThid ) |
826 |
errCount = errCount + 1 |
827 |
ENDIF |
828 |
IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN |
829 |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=', |
830 |
& momForcingOutAB, ' not allowed' |
831 |
CALL PRINT_ERROR( msgBuf, myThid ) |
832 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ', |
833 |
& 'should be =1 (Out of AB) or =0 (In AB)' |
834 |
CALL PRINT_ERROR( msgBuf, myThid ) |
835 |
errCount = errCount + 1 |
836 |
ENDIF |
837 |
IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN |
838 |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=', |
839 |
& tracForcingOutAB, ' not allowed' |
840 |
CALL PRINT_ERROR( msgBuf, myThid ) |
841 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ', |
842 |
& 'should be =1 (Out of AB) or =0 (In AB)' |
843 |
CALL PRINT_ERROR( msgBuf, myThid ) |
844 |
errCount = errCount + 1 |
845 |
ENDIF |
846 |
IF ( implBottomFriction ) THEN |
847 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: implBottomFriction', |
848 |
& ' not yet coded.' |
849 |
CALL PRINT_ERROR( msgBuf, myThid ) |
850 |
errCount = errCount + 1 |
851 |
ENDIF |
852 |
|
853 |
C-- Grid limitations: |
854 |
IF ( rotateGrid ) THEN |
855 |
IF ( .NOT. usingSphericalPolarGrid ) THEN |
856 |
WRITE(msgBuf,'(2A)') |
857 |
& 'CONFIG_CHECK: specifying Euler angles makes only ', |
858 |
& 'sense with usingSphericalGrid=.TRUE.' |
859 |
CALL PRINT_ERROR( msgBuf, myThid ) |
860 |
errCount = errCount + 1 |
861 |
ENDIF |
862 |
IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN |
863 |
WRITE(msgBuf,'(2A)') |
864 |
& 'CONFIG_CHECK: specifying Euler angles will probably ', |
865 |
& 'not work with pkgs FLT, ZONAL_FLT, ECCO' |
866 |
CALL PRINT_ERROR( msgBuf, myThid ) |
867 |
errCount = errCount + 1 |
868 |
ENDIF |
869 |
ENDIF |
870 |
|
871 |
C-- Packages conflict |
872 |
IF ( useMATRIX .AND. useGCHEM ) THEN |
873 |
WRITE(msgBuf,'(2A)') |
874 |
& 'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM' |
875 |
CALL PRINT_ERROR( msgBuf, myThid ) |
876 |
errCount = errCount + 1 |
877 |
ENDIF |
878 |
|
879 |
IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN |
880 |
WRITE(msgBuf,'(2A)') |
881 |
& 'CONFIG_CHECK: cannot set useMATRIX without ', |
882 |
& 'setting usePTRACERS' |
883 |
CALL PRINT_ERROR( msgBuf, myThid ) |
884 |
errCount = errCount + 1 |
885 |
ENDIF |
886 |
|
887 |
IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN |
888 |
WRITE(msgBuf,'(2A)') |
889 |
& 'CONFIG_CHECK: cannot set allowFreezing', |
890 |
& ' with pkgs SEAICE or THSICE' |
891 |
CALL PRINT_ERROR( msgBuf, myThid ) |
892 |
errCount = errCount + 1 |
893 |
ENDIF |
894 |
|
895 |
IF ( errCount.GE.1 ) THEN |
896 |
WRITE(msgBuf,'(A,I3,A)') |
897 |
& 'CONFIG_CHECK: detected', errCount,' fatal error(s)' |
898 |
CALL PRINT_ERROR( msgBuf, myThid ) |
899 |
CALL ALL_PROC_DIE( 0 ) |
900 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
901 |
ENDIF |
902 |
_END_MASTER(myThid) |
903 |
|
904 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
905 |
|
906 |
_BEGIN_MASTER(myThid) |
907 |
WRITE(msgBuf,'(A)') '// CONFIG_CHECK : Normal End' |
908 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
909 |
& SQUEEZE_RIGHT, myThid ) |
910 |
WRITE(msgBuf,'(A)') |
911 |
&'// =======================================================' |
912 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
913 |
& SQUEEZE_RIGHT, myThid ) |
914 |
WRITE(msgBuf,'(A)') ' ' |
915 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
916 |
& SQUEEZE_RIGHT, myThid ) |
917 |
_END_MASTER(myThid) |
918 |
|
919 |
RETURN |
920 |
END |