/[MITgcm]/MITgcm/model/src/config_check.F
ViewVC logotype

Annotation of /MITgcm/model/src/config_check.F

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


Revision 1.82 - (hide annotations) (download)
Thu Sep 10 18:10:28 2015 UTC (8 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65t, checkpoint65o
Changes since 1.81: +2 -11 lines
allow to use Vector-Invariant form in deep atmos and anelastic formulation

1 jmc 1.82 C $Header: /u/gcmpack/MITgcm/model/src/config_check.F,v 1.81 2015/07/14 21:51:59 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4 edhill 1.10 #include "PACKAGES_CONFIG.h"
5 jmc 1.1 #include "CPP_OPTIONS.h"
6 jmc 1.73 #ifdef ALLOW_MOM_COMMON
7     # include "MOM_COMMON_OPTIONS.h"
8     #endif
9 jmc 1.1
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 jmc 1.33 C \ev
23 jmc 1.1
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 jmc 1.53 C msgBuf :: Informational/error message buffer
40 jmc 1.1 CHARACTER*(MAX_LEN_MBUF) msgBuf
41 jmc 1.61 INTEGER errCount
42 jmc 1.1 CEOP
43    
44 jmc 1.69 _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 jmc 1.61 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 jmc 1.1 C- check that CPP option is "defined" when running-flag parameter is on:
60    
61 dimitri 1.43 C o If diffKrFile is set, then we should make sure the corresponing
62     C code is being compiled
63 jmc 1.50 #ifndef ALLOW_3D_DIFFKR
64 dimitri 1.43 IF (diffKrFile.NE.' ') THEN
65     WRITE(msgBuf,'(A)')
66     & 'CONFIG_CHECK: diffKrFile is set but never used.'
67 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
68 jmc 1.70 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
69     & 'Re-compile with: "#define ALLOW_3D_DIFFKR"'
70 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
71 jmc 1.61 errCount = errCount + 1
72 dimitri 1.43 ENDIF
73     #endif
74    
75 jmc 1.73 #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 jmc 1.1 #ifndef ALLOW_NONHYDROSTATIC
88 jmc 1.40 IF (use3Dsolver) THEN
89     WRITE(msgBuf,'(A)')
90 jmc 1.1 & 'CONFIG_CHECK: #undef ALLOW_NONHYDROSTATIC and'
91 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
92 jmc 1.32 IF ( implicitIntGravWave ) WRITE(msgBuf,'(A)')
93     & 'CONFIG_CHECK: implicitIntGravWave is TRUE'
94     IF ( nonHydrostatic ) WRITE(msgBuf,'(A)')
95 jmc 1.1 & 'CONFIG_CHECK: nonHydrostatic is TRUE'
96 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
97 jmc 1.61 errCount = errCount + 1
98 jmc 1.1 ENDIF
99     #endif
100    
101 jmc 1.22 #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 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
106 jmc 1.22 WRITE(msgBuf,'(A,1P2E20.7)')
107     & 'CONFIG_CHECK: are set to:',alph_AB,beta_AB
108 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
109 jmc 1.61 errCount = errCount + 1
110 jmc 1.22 ENDIF
111     #endif
112    
113 jmc 1.13 #ifndef INCLUDE_IMPLVERTADV_CODE
114 jmc 1.40 IF ( momImplVertAdv ) THEN
115     WRITE(msgBuf,'(A)')
116 jmc 1.13 & 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
117 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
118 jmc 1.13 WRITE(msgBuf,'(A)')
119     & 'CONFIG_CHECK: but momImplVertAdv is TRUE'
120 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
121 jmc 1.61 errCount = errCount + 1
122 jmc 1.13 ENDIF
123 jmc 1.40 IF ( tempImplVertAdv ) THEN
124     WRITE(msgBuf,'(A)')
125 jmc 1.13 & 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
126 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
127 jmc 1.13 WRITE(msgBuf,'(A)')
128     & 'CONFIG_CHECK: but tempImplVertAdv is TRUE'
129 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
130 jmc 1.61 errCount = errCount + 1
131 jmc 1.13 ENDIF
132 jmc 1.40 IF ( saltImplVertAdv ) THEN
133     WRITE(msgBuf,'(A)')
134 jmc 1.13 & 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
135 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
136 jmc 1.13 WRITE(msgBuf,'(A)')
137     & 'CONFIG_CHECK: but saltImplVertAdv is TRUE'
138 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
139 jmc 1.61 errCount = errCount + 1
140 jmc 1.13 ENDIF
141 jmc 1.19 IF ( dTtracerLev(1).NE.dTtracerLev(Nr) .AND. implicitDiffusion
142 jmc 1.40 & .AND. ( saltStepping .OR. tempStepping .OR. usePTRACERS )
143 jmc 1.19 & ) THEN
144 jmc 1.40 WRITE(msgBuf,'(A)')
145 jmc 1.19 & 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
146 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
147 jmc 1.19 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
148     & 'but implicitDiffusion=T with non-uniform dTtracerLev'
149 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
150 jmc 1.61 errCount = errCount + 1
151 jmc 1.19 ENDIF
152 jmc 1.13 #endif
153    
154 jmc 1.76 #ifdef ALLOW_AUTODIFF
155 gforget 1.55 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 jmc 1.61 errCount = errCount + 1
163 gforget 1.55 ENDIF
164     #endif
165    
166 jmc 1.58 #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 jmc 1.61 errCount = errCount + 1
172 jmc 1.58 ENDIF
173     #endif
174    
175 jmc 1.1 #ifndef EXACT_CONSERV
176 jmc 1.40 IF (exactConserv) THEN
177     WRITE(msgBuf,'(A)')
178 jmc 1.1 & 'CONFIG_CHECK: #undef EXACT_CONSERV and'
179 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
180 jmc 1.1 WRITE(msgBuf,'(A)')
181     & 'CONFIG_CHECK: exactConserv is TRUE'
182 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
183 jmc 1.61 errCount = errCount + 1
184 jmc 1.1 ENDIF
185     #endif
186    
187     #ifndef NONLIN_FRSURF
188 jmc 1.40 IF (nonlinFreeSurf.NE.0) THEN
189     WRITE(msgBuf,'(A)')
190 jmc 1.1 & 'CONFIG_CHECK: #undef NONLIN_FRSURF and'
191 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
192 jmc 1.1 WRITE(msgBuf,'(A)')
193     & 'CONFIG_CHECK: nonlinFreeSurf is non-zero'
194 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
195 jmc 1.61 errCount = errCount + 1
196 jmc 1.1 ENDIF
197     #endif
198    
199 jmc 1.9 #ifndef NONLIN_FRSURF
200     IF (select_rStar .NE. 0) THEN
201 jmc 1.40 WRITE(msgBuf,'(A)')
202 jmc 1.9 & 'CONFIG_CHECK: rStar is part of NonLin-FS '
203 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
204 jmc 1.9 WRITE(msgBuf,'(A)')
205 jmc 1.56 & 'CONFIG_CHECK: ==> set #define NONLIN_FRSURF to use it'
206 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
207 jmc 1.61 errCount = errCount + 1
208 jmc 1.9 ENDIF
209     #endif /* NONLIN_FRSURF */
210    
211 jmc 1.56 #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 jmc 1.61 errCount = errCount + 1
220 jmc 1.56 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 jmc 1.61 errCount = errCount + 1
232 jmc 1.56 ENDIF
233     #endif /* DISABLE_SIGMA_CODE */
234    
235 jmc 1.1 #ifdef USE_NATURAL_BCS
236 jmc 1.40 WRITE(msgBuf,'(A)')
237 jmc 1.3 & 'CONFIG_CHECK: USE_NATURAL_BCS option has been replaced'
238 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
239 jmc 1.1 WRITE(msgBuf,'(A)')
240 jmc 1.3 & 'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file'
241 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
242 jmc 1.61 errCount = errCount + 1
243 jmc 1.3 #endif
244    
245 jmc 1.50 #ifndef ALLOW_ADDFLUID
246     IF ( selectAddFluid.NE.0 ) THEN
247     WRITE(msgBuf,'(A)')
248 jmc 1.70 & 'CONFIG_CHECK: #undef ALLOW_ADDFLUID (CPP_OPTIONS.h) and'
249 jmc 1.50 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 jmc 1.61 errCount = errCount + 1
254 jmc 1.50 ENDIF
255     #endif /* ALLOW_ADDFLUID */
256    
257 jmc 1.4 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 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
264 jmc 1.4 WRITE(msgBuf,'(A)')
265 jmc 1.70 & ' compiled the model with the pressure loading code.'
266 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
267 jmc 1.15 WRITE(msgBuf,'(A)')
268 jmc 1.70 & ' Re-compile with: "#define ATMOSPHERIC_LOADING"'
269 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
270 jmc 1.61 errCount = errCount + 1
271 jmc 1.15 ENDIF
272     IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN
273     WRITE(msgBuf,'(A)')
274     & 'CONFIG_CHECK: sIceLoad is computed but'
275 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
276 jmc 1.15 WRITE(msgBuf,'(A)')
277 jmc 1.70 & ' pressure loading code is not compiled.'
278 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
279 jmc 1.15 WRITE(msgBuf,'(A)')
280 jmc 1.70 & ' Re-compile with: "#define ATMOSPHERIC_LOADING"'
281     CALL PRINT_ERROR( msgBuf, myThid )
282     errCount = errCount + 1
283     ENDIF
284     #endif
285    
286 jmc 1.78 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 jmc 1.70 #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 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
307 jmc 1.61 errCount = errCount + 1
308 jmc 1.4 ENDIF
309     #endif
310    
311 mlosch 1.31 #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 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
317 jmc 1.70 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
318     & 'Re-compile with: ALLOW_BALANCE_FLUXES defined'
319 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
320 jmc 1.61 errCount = errCount + 1
321 mlosch 1.31 ENDIF
322     #endif
323    
324 gforget 1.66 #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 jmc 1.70 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
331 gforget 1.66 & 'Re-compile with ALLOW_BALANCE_RELAX defined'
332     CALL PRINT_ERROR( msgBuf, myThid )
333     errCount = errCount + 1
334     ENDIF
335     #endif
336    
337 mlosch 1.52 #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 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
343 mlosch 1.52 WRITE(msgBuf,'(A)')
344     & 'CONFIG_CHECK: Re-compile with ALLOW_SRCG defined'
345 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
346 jmc 1.61 errCount = errCount + 1
347 mlosch 1.52 ENDIF
348     #endif /* ALLOW_SRCG */
349    
350 jmc 1.3 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
351    
352 jmc 1.48 C-- Check parameter consistency :
353 jmc 1.8
354 jmc 1.59 IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.
355 jmc 1.28 & ( 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 jmc 1.8 WRITE(msgBuf,'(A,A)')
359     & 'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with',
360 jmc 1.59 & ' overlap (OLx,OLy) smaller than 3'
361 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
362 jmc 1.61 errCount = errCount + 1
363 jmc 1.33 ENDIF
364 jmc 1.59 IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.
365 jmc 1.28 & ( 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 jmc 1.59 & ' overlap (OLx,OLy) smaller than 3'
370 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
371 jmc 1.61 errCount = errCount + 1
372 jmc 1.33 ENDIF
373 jmc 1.75 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 jmc 1.3
382 jmc 1.62 #ifndef DISCONNECTED_TILES
383     C Overlaps cannot be larger than interior tile except for special cases
384 mlosch 1.60 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 jmc 1.61 errCount = errCount + 1
390 mlosch 1.60 #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 jmc 1.61 errCount = errCount + 1
396 mlosch 1.60 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 jmc 1.61 errCount = errCount + 1
404 mlosch 1.60 #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 jmc 1.61 errCount = errCount + 1
410 mlosch 1.60 ENDIF
411     ENDIF
412 jmc 1.62 #endif /* ndef DISCONNECTED_TILES */
413 mlosch 1.60
414 jmc 1.48 C-- Deep-Atmosphere & Anelastic limitations:
415 jmc 1.40 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 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
421 jmc 1.61 errCount = errCount + 1
422 jmc 1.40 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 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
430 jmc 1.61 errCount = errCount + 1
431 jmc 1.40 ENDIF
432    
433 jmc 1.48 C-- Free-surface related limitations:
434 jmc 1.71 IF ( cg2dUseMinResSol.LT.0 .OR. cg2dUseMinResSol.GT.1 ) THEN
435     WRITE(msgBuf,'(A,I10,A)')
436     & 'CONFIG_CHECK: cg2dUseMinResSol set to unvalid value(=',
437     & cg2dUseMinResSol, ')'
438     CALL PRINT_ERROR( msgBuf, myThid )
439     errCount = errCount + 1
440     ENDIF
441    
442 jmc 1.3 IF ( rigidLid .AND. implicitFreeSurface ) THEN
443     WRITE(msgBuf,'(A,A)')
444     & 'CONFIG_CHECK: Cannot select both implicitFreeSurface',
445     & ' and rigidLid.'
446 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
447 jmc 1.61 errCount = errCount + 1
448 jmc 1.33 ENDIF
449 jmc 1.3
450     IF (rigidLid .AND. exactConserv) THEN
451 jmc 1.40 WRITE(msgBuf,'(A)')
452 jmc 1.3 & 'CONFIG_CHECK: exactConserv not compatible with'
453 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
454 jmc 1.1 WRITE(msgBuf,'(A)')
455 jmc 1.3 & 'CONFIG_CHECK: rigidLid (meaningless in that case)'
456 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
457 jmc 1.61 errCount = errCount + 1
458 jmc 1.1 ENDIF
459    
460 dfer 1.41 IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN
461     WRITE(msgBuf,'(A)')
462     & 'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.'
463 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
464 dfer 1.41 WRITE(msgBuf,'(A)')
465     & 'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'
466 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
467 jmc 1.61 errCount = errCount + 1
468 dfer 1.41 ENDIF
469    
470 jmc 1.3 IF (rigidLid .AND. useRealFreshWaterFlux) THEN
471 jmc 1.40 WRITE(msgBuf,'(A)')
472 jmc 1.3 & 'CONFIG_CHECK: useRealFreshWaterFlux not compatible with'
473 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
474 jmc 1.1 WRITE(msgBuf,'(A)')
475     & 'CONFIG_CHECK: rigidLid (meaningless in that case)'
476 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
477 jmc 1.61 errCount = errCount + 1
478 jmc 1.1 ENDIF
479    
480     IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN
481 jmc 1.40 WRITE(msgBuf,'(A)')
482 jmc 1.1 & 'CONFIG_CHECK: nonlinFreeSurf cannot be used'
483 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
484 jmc 1.1 WRITE(msgBuf,'(A)')
485     & 'CONFIG_CHECK: without exactConserv'
486 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
487 jmc 1.61 errCount = errCount + 1
488 jmc 1.1 ENDIF
489    
490 jmc 1.6 IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN
491 jmc 1.40 WRITE(msgBuf,'(A)')
492 jmc 1.6 & 'CONFIG_CHECK: r* Coordinate cannot be used'
493 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
494 jmc 1.6 WRITE(msgBuf,'(A)')
495     & 'CONFIG_CHECK: without exactConserv'
496 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
497 jmc 1.61 errCount = errCount + 1
498 jmc 1.6 ENDIF
499    
500 jmc 1.67 IF ( select_rStar.GE.1 .AND. nonlinFreeSurf.LE.0 ) THEN
501     WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: r* Coordinate',
502     & ' (select_rStar=', select_rStar, ' ) cannot be used'
503     CALL PRINT_ERROR( msgBuf, myThid )
504     WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: ',
505     & ' with Linear FreeSurf (nonlinFreeSurf=', nonlinFreeSurf,' )'
506     CALL PRINT_ERROR( msgBuf, myThid )
507     errCount = errCount + 1
508     ENDIF
509 jmc 1.72 IF ( select_rStar.EQ.2 .AND. nonlinFreeSurf.NE.4 ) THEN
510     C- not consistent to account for the slope of the coordinate when
511     C ignoring the variations of level-thickness in PhiHyd calculation;
512     C for now, issue a warning (but might change the code later on):
513     WRITE(msgBuf,'(2A,I3)') '** WARNING ** CONFIG_CHECK: ',
514     & 'select_rStar=2 not right with nonlinFreeSurf=', nonlinFreeSurf
515     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
516     & SQUEEZE_RIGHT, myThid )
517     ENDIF
518 jmc 1.67
519 jmc 1.56 IF ( selectSigmaCoord.NE.0 ) THEN
520     IF ( fluidIsWater ) THEN
521     WRITE(msgBuf,'(A)')
522     & 'CONFIG_CHECK: Sigma-Coords not yet coded for Oceanic set-up'
523     CALL PRINT_ERROR( msgBuf, myThid )
524 jmc 1.61 errCount = errCount + 1
525 jmc 1.56 ENDIF
526     IF ( nonlinFreeSurf.LE.0 ) THEN
527     WRITE(msgBuf,'(A)')
528     & 'CONFIG_CHECK: Sigma-Coords not coded for Lin-FreeSurf'
529     CALL PRINT_ERROR( msgBuf, myThid )
530 jmc 1.61 errCount = errCount + 1
531 jmc 1.56 ENDIF
532     IF (select_rStar.NE.0 ) THEN
533     WRITE(msgBuf,'(A)')
534     & 'CONFIG_CHECK: Sigma-Coords and rStar are not compatible'
535     CALL PRINT_ERROR( msgBuf, myThid )
536 jmc 1.61 errCount = errCount + 1
537 jmc 1.56 ENDIF
538     WRITE(msgBuf,'(A)')
539     & 'CONFIG_CHECK: Sigma-Coords code neither complete nor tested'
540     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
541     & SQUEEZE_RIGHT, myThid )
542     ENDIF
543    
544 jmc 1.54 C- note : not implemented in checkpoint48b but it is done now (since 01-28-03)
545 jmc 1.7 c IF (select_rStar.GT.0 .AND. useOBCS ) THEN
546     c STOP 'ABNORMAL END: S/R CONFIG_CHECK'
547     c ENDIF
548 jmc 1.1
549 jmc 1.40 IF ( nonlinFreeSurf.NE.0 .AND.
550 jmc 1.70 & deltaTFreeSurf.NE.dTtracerLev(1) ) THEN
551 jmc 1.53 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
552     & 'nonlinFreeSurf might cause problems'
553 jmc 1.4 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
554 jmc 1.53 & SQUEEZE_RIGHT, myThid )
555     WRITE(msgBuf,'(2A)') '** WARNING ** ',
556     & 'with different FreeSurf & Tracer time-steps'
557 jmc 1.4 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
558 jmc 1.53 & SQUEEZE_RIGHT, myThid )
559 jmc 1.3 ENDIF
560    
561 jmc 1.15 IF ( useRealFreshWaterFlux .AND. exactConserv
562 jmc 1.50 & .AND. implicDiv2Dflow.EQ.0. _d 0
563 jmc 1.21 & .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN
564 jmc 1.40 WRITE(msgBuf,'(A)')
565 jmc 1.3 & 'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:'
566 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
567 jmc 1.3 WRITE(msgBuf,'(A)')
568     & 'CONFIG_CHECK: restart not implemented in this config'
569 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
570 jmc 1.61 errCount = errCount + 1
571 jmc 1.3 ENDIF
572    
573 jmc 1.40 IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv
574 jmc 1.50 & .AND. implicDiv2Dflow.NE.1. ) THEN
575 jmc 1.53 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
576 jmc 1.50 & 'RealFreshWater & implicDiv2Dflow < 1'
577 jmc 1.15 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
578 jmc 1.53 & SQUEEZE_RIGHT, myThid )
579     WRITE(msgBuf,'(2A)') '** WARNING ** works better',
580 jmc 1.15 & ' with exactConserv=.T. (+ #define EXACT_CONSERV)'
581     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
582 jmc 1.53 & SQUEEZE_RIGHT, myThid )
583 jmc 1.15 ENDIF
584    
585     #ifdef EXACT_CONSERV
586 jmc 1.4 IF (useRealFreshWaterFlux .AND. .NOT.exactConserv
587     & .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN
588 jmc 1.40 WRITE(msgBuf,'(A)')
589 jmc 1.4 & 'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP'
590 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
591 jmc 1.4 WRITE(msgBuf,'(A)')
592     & 'CONFIG_CHECK: requires exactConserv=T'
593 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
594 jmc 1.61 errCount = errCount + 1
595 jmc 1.4 ENDIF
596     #else
597     IF (useRealFreshWaterFlux
598     & .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN
599 jmc 1.53 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
600     & 'E-P effects on wVel are not included'
601 jmc 1.4 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
602 jmc 1.53 & SQUEEZE_RIGHT, myThid )
603     WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
604     & '==> use #define EXACT_CONSERV to fix it'
605 jmc 1.5 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
606 jmc 1.53 & SQUEEZE_RIGHT, myThid )
607 jmc 1.5 ENDIF
608 jmc 1.15 #endif /* EXACT_CONSERV */
609 jmc 1.5
610 jmc 1.50 IF ( selectAddFluid.LT.-1 .OR. selectAddFluid.GT.2 ) THEN
611     WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: selectAddFluid=',
612     & selectAddFluid, ' not allowed'
613 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
614 jmc 1.50 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
615     & 'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)'
616 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
617 jmc 1.61 errCount = errCount + 1
618 jmc 1.50 ENDIF
619     IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN
620     WRITE(msgBuf,'(A)')
621     & 'CONFIG_CHECK: selectAddFluid > 0 not compatible with'
622 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
623 jmc 1.50 WRITE(msgBuf,'(A)')
624     & 'CONFIG_CHECK: rigidLid (meaningless in that case)'
625 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
626 jmc 1.61 errCount = errCount + 1
627 jmc 1.50 ENDIF
628     IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN
629 jmc 1.53 WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
630     & 'synchronous time-stepping =>'
631 jmc 1.50 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
632 jmc 1.53 & SQUEEZE_RIGHT, myThid )
633     WRITE(msgBuf,'(2A)') '** WARNING ** ',
634 jmc 1.50 & '1 time-step mismatch in AddFluid effects on T & S'
635     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
636 jmc 1.53 & SQUEEZE_RIGHT, myThid )
637     ENDIF
638    
639 jmc 1.74 C-- Pressure calculation and pressure gradient:
640     #ifndef INCLUDE_PHIHYD_CALCULATION_CODE
641     IF ( momPressureForcing .OR. useDynP_inEos_Zc ) THEN
642     WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
643     & 'missing code to calculate pressure (totPhiHyd)'
644     CALL PRINT_ERROR( msgBuf, myThid )
645     errCount = errCount + 1
646     ENDIF
647     #endif /* INCLUDE_PHIHYD_CALCULATION_CODE */
648     IF ( useDynP_inEos_Zc .AND. .NOT.momStepping ) THEN
649     WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
650     & 'useDynP_inEos_Zc = TRUE but pressure is not computed'
651     CALL PRINT_ERROR( msgBuf, myThid )
652     errCount = errCount + 1
653     ENDIF
654    
655 jmc 1.53 C-- Non-hydrostatic and 3-D solver related limitations:
656     IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN
657     WRITE(msgBuf,'(A)')
658     & 'CONFIG_CHECK: nonlinFreeSurf not yet implemented'
659     CALL PRINT_ERROR( msgBuf, myThid )
660     WRITE(msgBuf,'(A)')
661     & 'CONFIG_CHECK: in nonHydrostatic code'
662     CALL PRINT_ERROR( msgBuf, myThid )
663 jmc 1.61 errCount = errCount + 1
664 jmc 1.53 ENDIF
665    
666     IF ( implicitNHPress*implicSurfPress*implicDiv2Dflow.NE.1.
667     & .AND. implicitIntGravWave ) THEN
668     WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: implicitIntGravWave',
669     & ' NOT SAFE with non-fully implicit solver'
670     CALL PRINT_ERROR( msgBuf, myThid )
671     WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: To by-pass this',
672     & 'STOP, comment this test and re-compile config_check'
673     CALL PRINT_ERROR( msgBuf, myThid )
674 jmc 1.61 errCount = errCount + 1
675 jmc 1.53 ENDIF
676     IF ( nonHydrostatic .AND. .NOT.exactConserv
677     & .AND. implicDiv2Dflow.NE.1. ) THEN
678     WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Needs exactConserv=T',
679     & ' for nonHydrostatic with implicDiv2Dflow < 1'
680     CALL PRINT_ERROR( msgBuf, myThid )
681 jmc 1.61 errCount = errCount + 1
682 jmc 1.53 ENDIF
683     IF ( nonHydrostatic .AND.
684     & implicitNHPress.NE.implicSurfPress ) THEN
685     WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
686     & ' nonHydrostatic might cause problems with'
687     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
688     & SQUEEZE_RIGHT, myThid )
689     WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
690     & 'different implicitNHPress & implicSurfPress'
691     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
692     & SQUEEZE_RIGHT, myThid )
693     ENDIF
694    
695     IF ( implicitViscosity .AND. use3Dsolver ) THEN
696     WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
697     & 'Implicit viscosity applies to provisional u,vVel'
698     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
699     & SQUEEZE_RIGHT, myThid )
700     WRITE(msgBuf,'(2A)') '** WARNING ** => not consistent with',
701 jmc 1.82 & ' final vertical shear (after appling 3-D solver solution'
702 jmc 1.53 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
703     & SQUEEZE_RIGHT, myThid )
704     ENDIF
705     IF ( implicitViscosity .AND. nonHydrostatic ) THEN
706     WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
707     & 'Implicit viscosity not implemented in CALC_GW'
708     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
709     & SQUEEZE_RIGHT, myThid )
710     WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
711     & 'Explicit viscosity might become unstable if too large'
712     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
713     & SQUEEZE_RIGHT, myThid )
714 jmc 1.50 ENDIF
715    
716 jmc 1.48 C-- Momentum related limitations:
717 jmc 1.47 IF ( vectorInvariantMomentum.AND.momStepping ) THEN
718     IF ( highOrderVorticity.AND.upwindVorticity ) THEN
719     WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
720     & '"highOrderVorticity" conflicts with "upwindVorticity"'
721 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
722 jmc 1.61 errCount = errCount + 1
723 jmc 1.47 ENDIF
724     ENDIF
725 jmc 1.69 IF ( .NOT.vectorInvariantMomentum .AND. momAdvection ) THEN
726     IF ( usingCurvilinearGrid ) THEN
727     WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
728     & 'missing metric-terms for CurvilinearGrid'
729     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
730     & SQUEEZE_RIGHT, myThid )
731     ENDIF
732     IF ( hasWetCSCorners ) THEN
733     WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momAdvection ',
734     & 'in flux-form is wrong on CubedSphere grid (corners)'
735     CALL PRINT_ERROR( msgBuf, myThid )
736     errCount = errCount + 1
737     ENDIF
738     ENDIF
739 jmc 1.57 IF ( selectCoriMap.LT.0 .OR. selectCoriMap.GT.3 ) THEN
740     WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ',
741     & 'Invalid option: selectCoriMap=', selectCoriMap
742     CALL PRINT_ERROR( msgBuf, myThid )
743 jmc 1.61 errCount = errCount + 1
744 jmc 1.57 ENDIF
745 jmc 1.79 IF ( selectBotDragQuadr.LT.-1 .OR. selectBotDragQuadr.GT.2 ) THEN
746     WRITE(msgBuf,'(2A,I8,A)') 'CONFIG_CHECK: ',
747     & 'selectBotDragQuadr=', selectBotDragQuadr,
748     & ' not valid (-1,0,1,2)'
749     CALL PRINT_ERROR( msgBuf, myThid )
750     errCount = errCount + 1
751     ENDIF
752 jmc 1.73 IF ( useSmag3D .AND.
753     & ( usingPCoords .OR. deepAtmosphere .OR. selectSigmaCoord.NE.0
754     & .OR. rhoRefFile.NE.' ' .OR. hasWetCSCorners )
755     & ) THEN
756     WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
757     & 'Smag-3D not yet implemented for this set-up'
758     CALL PRINT_ERROR( msgBuf, myThid )
759     errCount = errCount + 1
760     ENDIF
761 jmc 1.47
762 jmc 1.81 IF ( momStepping .AND. .NOT.useCDscheme
763     & .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN
764 jmc 1.40 C- jmc: since useCDscheme is a new [04-13-03] flag (default=F),
765     C put this WARNING to stress that even if CD-scheme parameters
766     C (tauCD,rCD) are set, CD-scheme is not used without useCDscheme=T
767 jmc 1.9 C- and STOP if using mom_fluxform (following Chris advise).
768     C- jmc: but ultimately, this block can/will be removed.
769 jmc 1.81 IF ( vectorInvariantMomentum ) THEN
770     WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
771     & 'CD-scheme is OFF but params(tauCD,rCD) are set'
772     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
773     & SQUEEZE_RIGHT, myThid )
774     WRITE(msgBuf,'(3A)') '** WARNING ** to turn ON CD-scheme:',
775     & ' => "useCDscheme=.TRUE." in "data", namelist PARM01'
776     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
777     & SQUEEZE_RIGHT, myThid )
778     ELSE
779 jmc 1.40 WRITE(msgBuf,'(A)')
780 jmc 1.9 & 'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set'
781 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
782 jmc 1.9 WRITE(msgBuf,'(2A)')
783     & 'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',
784 jmc 1.40 & ' in "data", namelist PARM01'
785 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
786 jmc 1.61 errCount = errCount + 1
787 jmc 1.9 ENDIF
788 jmc 1.12 ENDIF
789    
790 jmc 1.69 IF ( useCDscheme .AND. hasWetCSCorners ) THEN
791 jmc 1.12 WRITE(msgBuf,'(2A)')
792     & 'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'
793 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
794 jmc 1.69 errCount = errCount + 1
795 jmc 1.12 ENDIF
796    
797 jmc 1.48 C-- Time-stepping limitations
798 jmc 1.77 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 jmc 1.40 IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN
805 jmc 1.34 WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=',
806     & momForcingOutAB, ' not allowed'
807 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
808 jmc 1.34 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',
809     & 'should be =1 (Out of AB) or =0 (In AB)'
810 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
811 jmc 1.61 errCount = errCount + 1
812 jmc 1.34 ENDIF
813 jmc 1.40 IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN
814 jmc 1.34 WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',
815     & tracForcingOutAB, ' not allowed'
816 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
817 jmc 1.34 WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',
818     & 'should be =1 (Out of AB) or =0 (In AB)'
819 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
820 jmc 1.61 errCount = errCount + 1
821 jmc 1.4 ENDIF
822 jmc 1.79 IF ( implBottomFriction ) THEN
823     WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: implBottomFriction',
824     & ' not yet coded.'
825     CALL PRINT_ERROR( msgBuf, myThid )
826     errCount = errCount + 1
827     ENDIF
828 jmc 1.1
829 jmc 1.48 C-- Grid limitations:
830 mlosch 1.44 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 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
836 jmc 1.61 errCount = errCount + 1
837 mlosch 1.44 ENDIF
838 gforget 1.65 IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN
839 mlosch 1.44 WRITE(msgBuf,'(2A)')
840     & 'CONFIG_CHECK: specifying Euler angles will probably ',
841     & 'not work with pkgs FLT, ZONAL_FLT, ECCO'
842 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
843 jmc 1.61 errCount = errCount + 1
844 mlosch 1.44 ENDIF
845     ENDIF
846    
847 jmc 1.48 C-- Packages conflict
848     IF ( useMATRIX .AND. useGCHEM ) THEN
849     WRITE(msgBuf,'(2A)')
850     & 'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'
851 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
852 jmc 1.61 errCount = errCount + 1
853 jmc 1.48 ENDIF
854    
855     IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN
856     WRITE(msgBuf,'(2A)')
857     & 'CONFIG_CHECK: cannot set useMATRIX without ',
858     & 'setting usePTRACERS'
859 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
860 jmc 1.61 errCount = errCount + 1
861 jmc 1.48 ENDIF
862    
863 jmc 1.50 IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN
864     WRITE(msgBuf,'(2A)')
865     & 'CONFIG_CHECK: cannot set allowFreezing',
866     & ' with pkgs SEAICE or THSICE'
867 jmc 1.53 CALL PRINT_ERROR( msgBuf, myThid )
868 jmc 1.61 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 jmc 1.50 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
877     ENDIF
878 jmc 1.61 _END_MASTER(myThid)
879    
880     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
881 jmc 1.50
882 jmc 1.61 _BEGIN_MASTER(myThid)
883 jmc 1.49 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 jmc 1.61 _END_MASTER(myThid)
894 jmc 1.1
895     RETURN
896     END

  ViewVC Help
Powered by ViewVC 1.1.22