/[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.31 - (show annotations) (download)
Fri Feb 10 07:56:20 2006 UTC (18 years, 3 months ago) by mlosch
Branch: MAIN
Changes since 1.30: +14 -1 lines
o add code to balance EmPmP and Qnet at the end of do_ocean_physics. Useful
  if bulk formulae are used in long integration (especially EmPmR). Turn
  on with balanceEmPmR = .true. or balanceQnet = .true. in data, PARM01
  if balancePrintMean, the imbalance that is substracted is printed to
  STDOUT.

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

  ViewVC Help
Powered by ViewVC 1.1.22