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

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

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

revision 1.58 by jmc, Tue Mar 15 00:15:23 2011 UTC revision 1.68 by jmc, Mon Jul 9 19:20:17 2012 UTC
# Line 36  C     !LOCAL VARIABLES: Line 36  C     !LOCAL VARIABLES:
36  C     == Local variables ==  C     == Local variables ==
37  C     msgBuf :: Informational/error message buffer  C     msgBuf :: Informational/error message buffer
38        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
39          INTEGER errCount
40  CEOP  CEOP
41    
42    C--   MPI + multi-threads: seems to be OK to let master-thread check & stop
43    C      (as long as all procs finish cleanly by calling ALL_PROC_DIE)
44          _BEGIN_MASTER(myThid)
45          errCount = 0
46    
47  C-  check that CPP option is "defined" when running-flag parameter is on:  C-  check that CPP option is "defined" when running-flag parameter is on:
48    
49  C     o If diffKrFile is set, then we should make sure the corresponing  C     o If diffKrFile is set, then we should make sure the corresponing
# Line 50  C       code is being compiled Line 56  C       code is being compiled
56          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
57       &  'Re-compile with:  #define ALLOW_3D_DIFFKR'       &  'Re-compile with:  #define ALLOW_3D_DIFFKR'
58          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
59          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
60        ENDIF        ENDIF
61  #endif  #endif
62    
# Line 64  C       code is being compiled Line 70  C       code is being compiled
70         IF ( nonHydrostatic ) WRITE(msgBuf,'(A)')         IF ( nonHydrostatic ) WRITE(msgBuf,'(A)')
71       &   'CONFIG_CHECK: nonHydrostatic is TRUE'       &   'CONFIG_CHECK: nonHydrostatic is TRUE'
72          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
73          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
74        ENDIF        ENDIF
75  #endif  #endif
76    
# Line 76  C       code is being compiled Line 82  C       code is being compiled
82          WRITE(msgBuf,'(A,1P2E20.7)')          WRITE(msgBuf,'(A,1P2E20.7)')
83       &   'CONFIG_CHECK: are set to:',alph_AB,beta_AB       &   'CONFIG_CHECK: are set to:',alph_AB,beta_AB
84          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
85          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
86        ENDIF        ENDIF
87  #endif  #endif
88    
# Line 88  C       code is being compiled Line 94  C       code is being compiled
94          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
95       &   'CONFIG_CHECK: but momImplVertAdv is TRUE'       &   'CONFIG_CHECK: but momImplVertAdv is TRUE'
96          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
97          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
98        ENDIF        ENDIF
99        IF ( tempImplVertAdv ) THEN        IF ( tempImplVertAdv ) THEN
100          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
# Line 97  C       code is being compiled Line 103  C       code is being compiled
103          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
104       &   'CONFIG_CHECK: but tempImplVertAdv is TRUE'       &   'CONFIG_CHECK: but tempImplVertAdv is TRUE'
105          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
106          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
107        ENDIF        ENDIF
108        IF ( saltImplVertAdv ) THEN        IF ( saltImplVertAdv ) THEN
109          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
# Line 106  C       code is being compiled Line 112  C       code is being compiled
112          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
113       &   'CONFIG_CHECK: but saltImplVertAdv is TRUE'       &   'CONFIG_CHECK: but saltImplVertAdv is TRUE'
114          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
115          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
116        ENDIF        ENDIF
117        IF ( dTtracerLev(1).NE.dTtracerLev(Nr) .AND. implicitDiffusion        IF ( dTtracerLev(1).NE.dTtracerLev(Nr) .AND. implicitDiffusion
118       &     .AND. ( saltStepping .OR. tempStepping .OR. usePTRACERS )       &     .AND. ( saltStepping .OR. tempStepping .OR. usePTRACERS )
# Line 117  C       code is being compiled Line 123  C       code is being compiled
123          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
124       &   'but implicitDiffusion=T with non-uniform dTtracerLev'       &   'but implicitDiffusion=T with non-uniform dTtracerLev'
125          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
126          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
127        ENDIF        ENDIF
128  #endif  #endif
129    
# Line 129  C       code is being compiled Line 135  C       code is being compiled
135          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
136       &   'CONFIG_CHECK: supported in adjoint mode'       &   'CONFIG_CHECK: supported in adjoint mode'
137          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
138          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
139        ENDIF        ENDIF
140  #endif  #endif
141    
# Line 138  C       code is being compiled Line 144  C       code is being compiled
144          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
145       &   'CONFIG_CHECK: DEPTH_CONTROL code not compatible with OBCS'       &   'CONFIG_CHECK: DEPTH_CONTROL code not compatible with OBCS'
146          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
147          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
148        ENDIF        ENDIF
149  #endif  #endif
150    
# Line 150  C       code is being compiled Line 156  C       code is being compiled
156          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
157       &   'CONFIG_CHECK: exactConserv is TRUE'       &   'CONFIG_CHECK: exactConserv is TRUE'
158          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
159          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
160        ENDIF        ENDIF
161  #endif  #endif
162    
# Line 162  C       code is being compiled Line 168  C       code is being compiled
168          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
169       &   'CONFIG_CHECK: nonlinFreeSurf is non-zero'       &   'CONFIG_CHECK: nonlinFreeSurf is non-zero'
170          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
171          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
172        ENDIF        ENDIF
173  #endif  #endif
174    
# Line 174  C       code is being compiled Line 180  C       code is being compiled
180          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
181       &   'CONFIG_CHECK: ==> set #define NONLIN_FRSURF to use it'       &   'CONFIG_CHECK: ==> set #define NONLIN_FRSURF to use it'
182          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
183          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
184        ENDIF        ENDIF
185  #endif /* NONLIN_FRSURF */  #endif /* NONLIN_FRSURF */
186    
# Line 186  C       code is being compiled Line 192  C       code is being compiled
192          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
193       &   'CONFIG_CHECK: ==> set #undef DISABLE_RSTAR_CODE to use it'       &   'CONFIG_CHECK: ==> set #undef DISABLE_RSTAR_CODE to use it'
194          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
195          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
196        ENDIF        ENDIF
197  #endif /* DISABLE_RSTAR_CODE */  #endif /* DISABLE_RSTAR_CODE */
198    
# Line 198  C       code is being compiled Line 204  C       code is being compiled
204          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
205       &   'CONFIG_CHECK: ==> set #undef DISABLE_SIGMA_CODE to use it'       &   'CONFIG_CHECK: ==> set #undef DISABLE_SIGMA_CODE to use it'
206          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
207          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
208        ENDIF        ENDIF
209  #endif /* DISABLE_SIGMA_CODE */  #endif /* DISABLE_SIGMA_CODE */
210    
# Line 209  C       code is being compiled Line 215  C       code is being compiled
215          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
216       &   'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file'       &   'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file'
217          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
218          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
219  #endif  #endif
220    
221  #ifndef ALLOW_ADDFLUID  #ifndef ALLOW_ADDFLUID
# Line 220  C       code is being compiled Line 226  C       code is being compiled
226          WRITE(msgBuf,'(A,I4,A)') 'CONFIG_CHECK: selectAddFluid=',          WRITE(msgBuf,'(A,I4,A)') 'CONFIG_CHECK: selectAddFluid=',
227       &                           selectAddFluid, ' is not zero'       &                           selectAddFluid, ' is not zero'
228          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
229          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
230        ENDIF        ENDIF
231  #endif /* ALLOW_ADDFLUID */  #endif /* ALLOW_ADDFLUID */
232    
# Line 237  C       code is being compiled Line 243  C       code is being compiled
243          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
244       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'
245          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
246          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
247        ENDIF        ENDIF
248        IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN        IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN
249          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
# Line 249  C       code is being compiled Line 255  C       code is being compiled
255          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
256       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'
257          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
258          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
259        ENDIF        ENDIF
260  #endif  #endif
261    
# Line 262  C       code is being compiled Line 268  C       code is being compiled
268          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
269       &  'Re-compile with  ALLOW_BALANCE_FLUXES defined'       &  'Re-compile with  ALLOW_BALANCE_FLUXES defined'
270          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
271          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
272          ENDIF
273    #endif
274    
275    #ifndef ALLOW_BALANCE_RELAX
276          IF (balanceThetaClimRelax .OR. balanceSaltClimRelax) THEN
277            WRITE(msgBuf,'(A,A)')
278         &  'CONFIG_CHECK: balanceTheta/SaltClimRelax is set ',
279         &  'but balance code is not compiled.'
280            CALL PRINT_ERROR( msgBuf, myThid )
281            WRITE(msgBuf,'(A)')
282         &  'Re-compile with  ALLOW_BALANCE_RELAX defined'
283            CALL PRINT_ERROR( msgBuf, myThid )
284            errCount = errCount + 1
285        ENDIF        ENDIF
286  #endif  #endif
287    
# Line 275  C       code is being compiled Line 294  C       code is being compiled
294          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
295       &  'CONFIG_CHECK: Re-compile with ALLOW_SRCG defined'       &  'CONFIG_CHECK: Re-compile with ALLOW_SRCG defined'
296          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
297          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
298        ENDIF        ENDIF
299  #endif /* ALLOW_SRCG */  #endif /* ALLOW_SRCG */
300    
# Line 283  C---+----1----+----2----+----3----+----4 Line 302  C---+----1----+----2----+----3----+----4
302    
303  C--   Check parameter consistency :  C--   Check parameter consistency :
304    
305        IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND.        IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.
306       &     ( viscC4leithD.NE.0.  .OR. viscC4leith.NE.0.       &     ( viscC4leithD.NE.0.  .OR. viscC4leith.NE.0.
307       &     .OR. viscC4smag.NE.0. .OR. viscA4Grid.NE.0.       &     .OR. viscC4smag.NE.0. .OR. viscA4Grid.NE.0.
308       &     .OR. viscA4D.NE.0.    .OR. viscA4Z.NE.0. ) ) THEN       &     .OR. viscA4D.NE.0.    .OR. viscA4Z.NE.0. ) ) THEN
309          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
310       &  'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with',       &  'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with',
311       &  ' overlap (Olx,Oly) smaller than 3'       &  ' overlap (OLx,OLy) smaller than 3'
312          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
313          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
314        ENDIF        ENDIF
315        IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND.        IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.
316       &     ( viscC2leithD.NE.0. .OR. viscC4leithD.NE.0. )       &     ( viscC2leithD.NE.0. .OR. viscC4leithD.NE.0. )
317       &   ) THEN       &   ) THEN
318          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
319       &  'CONFIG_CHECK: cannot use Leith Visc.(div.part) with',       &  'CONFIG_CHECK: cannot use Leith Visc.(div.part) with',
320       &  ' overlap (Olx,Oly) smaller than 3'       &  ' overlap (OLx,OLy) smaller than 3'
321          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
322          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
323        ENDIF        ENDIF
324    
325    #ifndef DISCONNECTED_TILES
326    C     Overlaps cannot be larger than interior tile except for special cases
327          IF ( sNx.LT.OLx ) THEN
328    #ifdef ALLOW_EXCH2
329           WRITE(msgBuf,'(A)')
330         &  'CONFIG_CHECK: sNx<OLx not allowed with ALLOW_EXCH2 defined'
331           CALL PRINT_ERROR( msgBuf, myThid )
332            errCount = errCount + 1
333    #endif /* ALLOW_EXCH2 */
334           IF ( Nx.NE.1 ) THEN
335            WRITE(msgBuf,'(A)')
336         &  'CONFIG_CHECK: sNx<OLx not allowed unless Nx=1'
337            CALL PRINT_ERROR( msgBuf, myThid )
338            errCount = errCount + 1
339           ENDIF
340          ENDIF
341          IF ( sNy.LT.OLy ) THEN
342    #ifdef ALLOW_EXCH2
343           WRITE(msgBuf,'(A)')
344         &  'CONFIG_CHECK: sNy<OLy not allowed with ALLOW_EXCH2 defined'
345           CALL PRINT_ERROR( msgBuf, myThid )
346            errCount = errCount + 1
347    #endif /* ALLOW_EXCH2 */
348           IF ( Ny.NE.1 ) THEN
349            WRITE(msgBuf,'(A)')
350         &  'CONFIG_CHECK: sNy<OLy not allowed unless Ny=1'
351            CALL PRINT_ERROR( msgBuf, myThid )
352            errCount = errCount + 1
353           ENDIF
354          ENDIF
355    #endif /* ndef DISCONNECTED_TILES */
356    
357  C--   Deep-Atmosphere & Anelastic limitations:  C--   Deep-Atmosphere & Anelastic limitations:
358        IF ( deepAtmosphere .AND.        IF ( deepAtmosphere .AND.
359       &     useRealFreshWaterFlux .AND. usingPCoords ) THEN       &     useRealFreshWaterFlux .AND. usingPCoords ) THEN
# Line 310  C--   Deep-Atmosphere & Anelastic limita Line 361  C--   Deep-Atmosphere & Anelastic limita
361       &  'CONFIG_CHECK: Deep-Atmosphere not yet implemented with',       &  'CONFIG_CHECK: Deep-Atmosphere not yet implemented with',
362       &  ' real-Fresh-Water option in P-coordinate'       &  ' real-Fresh-Water option in P-coordinate'
363          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
364          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
365        ENDIF        ENDIF
366        IF ( select_rStar.NE.0 .AND.        IF ( select_rStar.NE.0 .AND.
367       &        ( deepAtmosphere .OR.       &        ( deepAtmosphere .OR.
# Line 319  C--   Deep-Atmosphere & Anelastic limita Line 370  C--   Deep-Atmosphere & Anelastic limita
370       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',
371       &  ' not yet implemented with rStar'       &  ' not yet implemented with rStar'
372          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
373          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
374        ENDIF        ENDIF
375        IF ( vectorInvariantMomentum .AND.        IF ( vectorInvariantMomentum .AND.
376       &        ( deepAtmosphere .OR.       &        ( deepAtmosphere .OR.
# Line 328  C--   Deep-Atmosphere & Anelastic limita Line 379  C--   Deep-Atmosphere & Anelastic limita
379       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',
380       &  ' not yet implemented in Vector-Invariant momentum code'       &  ' not yet implemented in Vector-Invariant momentum code'
381          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
382          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
383        ENDIF        ENDIF
384    
385  C--   Free-surface related limitations:  C--   Free-surface related limitations:
# Line 337  C--   Free-surface related limitations: Line 388  C--   Free-surface related limitations:
388       &  'CONFIG_CHECK: Cannot select both implicitFreeSurface',       &  'CONFIG_CHECK: Cannot select both implicitFreeSurface',
389       &  ' and rigidLid.'       &  ' and rigidLid.'
390          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
391          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
392        ENDIF        ENDIF
393    
394        IF (rigidLid .AND. exactConserv) THEN        IF (rigidLid .AND. exactConserv) THEN
# Line 347  C--   Free-surface related limitations: Line 398  C--   Free-surface related limitations:
398          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
399       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
400          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
401          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
402        ENDIF        ENDIF
403    
404        IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN        IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN
# Line 357  C--   Free-surface related limitations: Line 408  C--   Free-surface related limitations:
408          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
409       &   'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'       &   'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'
410          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
411          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
412        ENDIF        ENDIF
413    
414        IF (rigidLid .AND. useRealFreshWaterFlux) THEN        IF (rigidLid .AND. useRealFreshWaterFlux) THEN
# Line 367  C--   Free-surface related limitations: Line 418  C--   Free-surface related limitations:
418          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
419       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
420          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
421          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
422        ENDIF        ENDIF
423    
424        IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN        IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN
# Line 377  C--   Free-surface related limitations: Line 428  C--   Free-surface related limitations:
428          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
429       &   'CONFIG_CHECK: without exactConserv'       &   'CONFIG_CHECK: without exactConserv'
430          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
431          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
432        ENDIF        ENDIF
433    
434        IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN        IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN
# Line 387  C--   Free-surface related limitations: Line 438  C--   Free-surface related limitations:
438          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
439       &   'CONFIG_CHECK: without exactConserv'       &   'CONFIG_CHECK: without exactConserv'
440          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
441          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
442          ENDIF
443    
444          IF ( select_rStar.GE.1 .AND. nonlinFreeSurf.LE.0 ) THEN
445            WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: r* Coordinate',
446         &   ' (select_rStar=', select_rStar, ' ) cannot be used'
447            CALL PRINT_ERROR( msgBuf, myThid )
448            WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: ',
449         &   ' with Linear FreeSurf (nonlinFreeSurf=', nonlinFreeSurf,' )'
450            CALL PRINT_ERROR( msgBuf, myThid )
451            errCount = errCount + 1
452        ENDIF        ENDIF
453    
454        IF ( selectSigmaCoord.NE.0 ) THEN        IF ( selectSigmaCoord.NE.0 ) THEN
# Line 395  C--   Free-surface related limitations: Line 456  C--   Free-surface related limitations:
456          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
457       &   'CONFIG_CHECK: Sigma-Coords not yet coded for Oceanic set-up'       &   'CONFIG_CHECK: Sigma-Coords not yet coded for Oceanic set-up'
458          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
459          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
460         ENDIF         ENDIF
461         IF ( nonlinFreeSurf.LE.0 ) THEN         IF ( nonlinFreeSurf.LE.0 ) THEN
462          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
463       &   'CONFIG_CHECK: Sigma-Coords not coded for Lin-FreeSurf'       &   'CONFIG_CHECK: Sigma-Coords not coded for Lin-FreeSurf'
464          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
465          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
466         ENDIF         ENDIF
467         IF (select_rStar.NE.0 ) THEN         IF (select_rStar.NE.0 ) THEN
468          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
469       &   'CONFIG_CHECK: Sigma-Coords and rStar are not compatible'       &   'CONFIG_CHECK: Sigma-Coords and rStar are not compatible'
470          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
471          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
472         ENDIF         ENDIF
473          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
474       &   'CONFIG_CHECK: Sigma-Coords code neither complete nor tested'       &   'CONFIG_CHECK: Sigma-Coords code neither complete nor tested'
# Line 441  c     ENDIF Line 502  c     ENDIF
502          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
503       &   'CONFIG_CHECK: restart not implemented in this config'       &   'CONFIG_CHECK: restart not implemented in this config'
504          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
505          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
506        ENDIF        ENDIF
507    
508        IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv        IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv
# Line 465  c     ENDIF Line 526  c     ENDIF
526          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
527       &   'CONFIG_CHECK: requires exactConserv=T'       &   'CONFIG_CHECK: requires exactConserv=T'
528          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
529          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
530        ENDIF        ENDIF
531  #else  #else
532        IF (useRealFreshWaterFlux        IF (useRealFreshWaterFlux
# Line 488  c     ENDIF Line 549  c     ENDIF
549          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
550       &       'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)'       &       'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)'
551          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
552          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
553        ENDIF        ENDIF
554        IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN        IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN
555          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
# Line 497  c     ENDIF Line 558  c     ENDIF
558          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
559       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
560          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
561          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
562        ENDIF        ENDIF
563        IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN        IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN
564          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
# Line 518  C--   Non-hydrostatic and 3-D solver rel Line 579  C--   Non-hydrostatic and 3-D solver rel
579          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
580       &   'CONFIG_CHECK: in nonHydrostatic code'       &   'CONFIG_CHECK: in nonHydrostatic code'
581          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
582          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
583        ENDIF        ENDIF
584    
585        IF ( implicitNHPress*implicSurfPress*implicDiv2Dflow.NE.1.        IF ( implicitNHPress*implicSurfPress*implicDiv2Dflow.NE.1.
# Line 529  C--   Non-hydrostatic and 3-D solver rel Line 590  C--   Non-hydrostatic and 3-D solver rel
590          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: To by-pass this',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: To by-pass this',
591       &    'STOP, comment this test and re-compile config_check'       &    'STOP, comment this test and re-compile config_check'
592          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
593          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
594        ENDIF        ENDIF
595        IF ( nonHydrostatic .AND. .NOT.exactConserv        IF ( nonHydrostatic .AND. .NOT.exactConserv
596       &     .AND. implicDiv2Dflow.NE.1. ) THEN       &     .AND. implicDiv2Dflow.NE.1. ) THEN
597          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Needs exactConserv=T',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Needs exactConserv=T',
598       &               ' for nonHydrostatic with implicDiv2Dflow < 1'       &               ' for nonHydrostatic with implicDiv2Dflow < 1'
599          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
600          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
601        ENDIF        ENDIF
602        IF ( nonHydrostatic .AND.        IF ( nonHydrostatic .AND.
603       &     implicitNHPress.NE.implicSurfPress ) THEN       &     implicitNHPress.NE.implicSurfPress ) THEN
# Line 577  C--   Momentum related limitations: Line 638  C--   Momentum related limitations:
638          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
639       &   '"highOrderVorticity" conflicts with "upwindVorticity"'       &   '"highOrderVorticity" conflicts with "upwindVorticity"'
640          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
641          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
642         ENDIF         ENDIF
643        ENDIF        ENDIF
644        IF ( selectCoriMap.LT.0 .OR. selectCoriMap.GT.3 ) THEN        IF ( selectCoriMap.LT.0 .OR. selectCoriMap.GT.3 ) THEN
645          WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ',
646       &       'Invalid option: selectCoriMap=', selectCoriMap       &       'Invalid option: selectCoriMap=', selectCoriMap
647          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
648          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
649        ENDIF        ENDIF
650    
651        IF (.NOT.useCDscheme .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN        IF (.NOT.useCDscheme .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN
# Line 601  C- jmc: but ultimately, this block can/w Line 662  C- jmc: but ultimately, this block can/w
662       &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',       &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',
663       &   ' in "data", namelist PARM01'       &   ' in "data", namelist PARM01'
664          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
665          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
666         ENDIF         ENDIF
667          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
668       &   'CD-scheme is OFF but params(tauCD,rCD) are set'       &   'CD-scheme is OFF but params(tauCD,rCD) are set'
# Line 620  C- jmc: but ultimately, this block can/w Line 681  C- jmc: but ultimately, this block can/w
681          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
682       &   'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'       &   'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'
683          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
684  cph        STOP 'ABNORMAL END: S/R CONFIG_CHECK'  cph        errCount = errCount + 1
685        ENDIF        ENDIF
686    
687  C--   Time-stepping limitations  C--   Time-stepping limitations
# Line 631  C--   Time-stepping limitations Line 692  C--   Time-stepping limitations
692          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',
693       &                       'should be =1 (Out of AB) or =0 (In AB)'       &                       'should be =1 (Out of AB) or =0 (In AB)'
694          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
695          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
696        ENDIF        ENDIF
697        IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN        IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN
698          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',
# Line 640  C--   Time-stepping limitations Line 701  C--   Time-stepping limitations
701          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',
702       &                       'should be =1 (Out of AB) or =0 (In AB)'       &                       'should be =1 (Out of AB) or =0 (In AB)'
703          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
704          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
705        ENDIF        ENDIF
706    
707  C--   Grid limitations:  C--   Grid limitations:
# Line 650  C--   Grid limitations: Line 711  C--   Grid limitations:
711       &       'CONFIG_CHECK: specifying Euler angles makes only ',       &       'CONFIG_CHECK: specifying Euler angles makes only ',
712       &       'sense with usingSphericalGrid=.TRUE.'       &       'sense with usingSphericalGrid=.TRUE.'
713          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
714          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
715         ENDIF         ENDIF
716         IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN         IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN
717          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
718       &       'CONFIG_CHECK: specifying Euler angles will probably ',       &       'CONFIG_CHECK: specifying Euler angles will probably ',
719       &       'not work with pkgs FLT, ZONAL_FLT, ECCO'       &       'not work with pkgs FLT, ZONAL_FLT, ECCO'
720          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
721          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
722         ENDIF         ENDIF
 #ifdef ALLOW_PROFILES  
         WRITE(msgBuf,'(2A)')  
      &       'CONFIG_CHECK: specifying Euler angles will probably ',  
      &       'not work with pkg profiles'  
         CALL PRINT_ERROR( msgBuf, myThid )  
         STOP 'ABNORMAL END: S/R CONFIG_CHECK'  
 #endif /* ALLOW_PROFILES */  
723        ENDIF        ENDIF
724    
725  C--   Packages conflict  C--   Packages conflict
# Line 673  C--   Packages conflict Line 727  C--   Packages conflict
727          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
728       &   'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'       &   'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'
729          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
730          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
731        ENDIF        ENDIF
732    
733        IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN        IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN
# Line 681  C--   Packages conflict Line 735  C--   Packages conflict
735       &       'CONFIG_CHECK: cannot set useMATRIX without ',       &       'CONFIG_CHECK: cannot set useMATRIX without ',
736       &       'setting usePTRACERS'       &       'setting usePTRACERS'
737          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
738          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
739        ENDIF        ENDIF
740    
741        IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN        IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN
# Line 689  C--   Packages conflict Line 743  C--   Packages conflict
743       &       'CONFIG_CHECK: cannot set allowFreezing',       &       'CONFIG_CHECK: cannot set allowFreezing',
744       &       ' with pkgs SEAICE or THSICE'       &       ' with pkgs SEAICE or THSICE'
745          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
746            errCount = errCount + 1
747          ENDIF
748    
749          IF ( errCount.GE.1 ) THEN
750            WRITE(msgBuf,'(A,I3,A)')
751         &       'CONFIG_CHECK: detected', errCount,' fatal error(s)'
752            CALL PRINT_ERROR( msgBuf, myThid )
753            CALL ALL_PROC_DIE( 0 )
754          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
755        ENDIF        ENDIF
756          _END_MASTER(myThid)
757    
758    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
759    
760          _BEGIN_MASTER(myThid)
761        WRITE(msgBuf,'(A)')        WRITE(msgBuf,'(A)')
762       &'// ======================================================='       &'// ======================================================='
763        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
# Line 706  C--   Packages conflict Line 772  C--   Packages conflict
772        WRITE(msgBuf,'(A)') ' '        WRITE(msgBuf,'(A)') ' '
773        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
774       &                    SQUEEZE_RIGHT, myThid )       &                    SQUEEZE_RIGHT, myThid )
775          _END_MASTER(myThid)
776    
777        RETURN        RETURN
778        END        END

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.68

  ViewVC Help
Powered by ViewVC 1.1.22