/[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.60 by mlosch, Sat Mar 24 20:53:36 2012 UTC revision 1.61 by jmc, Mon Apr 2 15:54:52 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,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
145       &       'implicitDiffusion not available with DEPTH_CONTROL'       &       'implicitDiffusion not available with DEPTH_CONTROL'
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        IF ( useOBCS ) THEN        IF ( useOBCS ) THEN
150          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
151       &   'CONFIG_CHECK: DEPTH_CONTROL code not compatible with OBCS'       &   'CONFIG_CHECK: DEPTH_CONTROL code not compatible with OBCS'
152          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
153          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
154        ENDIF        ENDIF
155  #endif  #endif
156    
# Line 156  C       code is being compiled Line 162  C       code is being compiled
162          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
163       &   'CONFIG_CHECK: exactConserv is TRUE'       &   'CONFIG_CHECK: exactConserv is TRUE'
164          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
165          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
166        ENDIF        ENDIF
167  #endif  #endif
168    
# Line 168  C       code is being compiled Line 174  C       code is being compiled
174          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
175       &   'CONFIG_CHECK: nonlinFreeSurf is non-zero'       &   'CONFIG_CHECK: nonlinFreeSurf is non-zero'
176          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
177          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
178        ENDIF        ENDIF
179  #endif  #endif
180    
# Line 180  C       code is being compiled Line 186  C       code is being compiled
186          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
187       &   'CONFIG_CHECK: ==> set #define NONLIN_FRSURF to use it'       &   'CONFIG_CHECK: ==> set #define NONLIN_FRSURF to use it'
188          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
189          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
190        ENDIF        ENDIF
191  #endif /* NONLIN_FRSURF */  #endif /* NONLIN_FRSURF */
192    
# Line 192  C       code is being compiled Line 198  C       code is being compiled
198          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
199       &   'CONFIG_CHECK: ==> set #undef DISABLE_RSTAR_CODE to use it'       &   'CONFIG_CHECK: ==> set #undef DISABLE_RSTAR_CODE to use it'
200          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
201          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
202        ENDIF        ENDIF
203  #endif /* DISABLE_RSTAR_CODE */  #endif /* DISABLE_RSTAR_CODE */
204    
# Line 204  C       code is being compiled Line 210  C       code is being compiled
210          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
211       &   'CONFIG_CHECK: ==> set #undef DISABLE_SIGMA_CODE to use it'       &   'CONFIG_CHECK: ==> set #undef DISABLE_SIGMA_CODE to use it'
212          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
213          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
214        ENDIF        ENDIF
215  #endif /* DISABLE_SIGMA_CODE */  #endif /* DISABLE_SIGMA_CODE */
216    
# Line 215  C       code is being compiled Line 221  C       code is being compiled
221          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
222       &   'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file'       &   'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file'
223          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
224          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
225  #endif  #endif
226    
227  #ifndef ALLOW_ADDFLUID  #ifndef ALLOW_ADDFLUID
# Line 226  C       code is being compiled Line 232  C       code is being compiled
232          WRITE(msgBuf,'(A,I4,A)') 'CONFIG_CHECK: selectAddFluid=',          WRITE(msgBuf,'(A,I4,A)') 'CONFIG_CHECK: selectAddFluid=',
233       &                           selectAddFluid, ' is not zero'       &                           selectAddFluid, ' is not zero'
234          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
235          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
236        ENDIF        ENDIF
237  #endif /* ALLOW_ADDFLUID */  #endif /* ALLOW_ADDFLUID */
238    
# Line 243  C       code is being compiled Line 249  C       code is being compiled
249          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
250       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'
251          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
252          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
253        ENDIF        ENDIF
254        IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN        IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN
255          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
# Line 255  C       code is being compiled Line 261  C       code is being compiled
261          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
262       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'
263          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
264          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
265        ENDIF        ENDIF
266  #endif  #endif
267    
# Line 268  C       code is being compiled Line 274  C       code is being compiled
274          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
275       &  'Re-compile with  ALLOW_BALANCE_FLUXES defined'       &  'Re-compile with  ALLOW_BALANCE_FLUXES defined'
276          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
277          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
278        ENDIF        ENDIF
279  #endif  #endif
280    
# Line 281  C       code is being compiled Line 287  C       code is being compiled
287          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
288       &  'CONFIG_CHECK: Re-compile with ALLOW_SRCG defined'       &  'CONFIG_CHECK: Re-compile with ALLOW_SRCG defined'
289          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
290          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
291        ENDIF        ENDIF
292  #endif /* ALLOW_SRCG */  #endif /* ALLOW_SRCG */
293    
# Line 297  C--   Check parameter consistency : Line 303  C--   Check parameter consistency :
303       &  'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with',       &  'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with',
304       &  ' overlap (OLx,OLy) smaller than 3'       &  ' overlap (OLx,OLy) smaller than 3'
305          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
306          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
307        ENDIF        ENDIF
308        IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.        IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.
309       &     ( viscC2leithD.NE.0. .OR. viscC4leithD.NE.0. )       &     ( viscC2leithD.NE.0. .OR. viscC4leithD.NE.0. )
# Line 306  C--   Check parameter consistency : Line 312  C--   Check parameter consistency :
312       &  'CONFIG_CHECK: cannot use Leith Visc.(div.part) with',       &  'CONFIG_CHECK: cannot use Leith Visc.(div.part) with',
313       &  ' overlap (OLx,OLy) smaller than 3'       &  ' overlap (OLx,OLy) smaller than 3'
314          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
315          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
316        ENDIF        ENDIF
317    
318  C     Overlaps cannot be larger than interior tile except for special  C     Overlaps cannot be larger than interior tile except for special
# Line 316  C     cases Line 322  C     cases
322         WRITE(msgBuf,'(A)')         WRITE(msgBuf,'(A)')
323       &  'CONFIG_CHECK: sNx<OLx not allowed with ALLOW_EXCH2 defined'       &  'CONFIG_CHECK: sNx<OLx not allowed with ALLOW_EXCH2 defined'
324         CALL PRINT_ERROR( msgBuf, myThid )         CALL PRINT_ERROR( msgBuf, myThid )
325         STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
326  #endif /* ALLOW_EXCH2 */  #endif /* ALLOW_EXCH2 */
327         IF ( Nx.NE.1 ) THEN         IF ( Nx.NE.1 ) THEN
328          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
329       &  'CONFIG_CHECK: sNx<OLx not allowed unless Nx=1'       &  'CONFIG_CHECK: sNx<OLx not allowed unless Nx=1'
330          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
331          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
332         ENDIF         ENDIF
333        ENDIF        ENDIF
334        IF ( sNy.LT.OLy ) THEN        IF ( sNy.LT.OLy ) THEN
# Line 330  C     cases Line 336  C     cases
336         WRITE(msgBuf,'(A)')         WRITE(msgBuf,'(A)')
337       &  'CONFIG_CHECK: sNy<OLy not allowed with ALLOW_EXCH2 defined'       &  'CONFIG_CHECK: sNy<OLy not allowed with ALLOW_EXCH2 defined'
338         CALL PRINT_ERROR( msgBuf, myThid )         CALL PRINT_ERROR( msgBuf, myThid )
339         STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
340  #endif /* ALLOW_EXCH2 */  #endif /* ALLOW_EXCH2 */
341         IF ( Ny.NE.1 ) THEN         IF ( Ny.NE.1 ) THEN
342          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
343       &  'CONFIG_CHECK: sNy<OLy not allowed unless Ny=1'       &  'CONFIG_CHECK: sNy<OLy not allowed unless Ny=1'
344          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
345          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
346         ENDIF         ENDIF
347        ENDIF        ENDIF
348    
# Line 347  C--   Deep-Atmosphere & Anelastic limita Line 353  C--   Deep-Atmosphere & Anelastic limita
353       &  'CONFIG_CHECK: Deep-Atmosphere not yet implemented with',       &  'CONFIG_CHECK: Deep-Atmosphere not yet implemented with',
354       &  ' real-Fresh-Water option in P-coordinate'       &  ' real-Fresh-Water option in P-coordinate'
355          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
356          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
357        ENDIF        ENDIF
358        IF ( select_rStar.NE.0 .AND.        IF ( select_rStar.NE.0 .AND.
359       &        ( deepAtmosphere .OR.       &        ( deepAtmosphere .OR.
# Line 356  C--   Deep-Atmosphere & Anelastic limita Line 362  C--   Deep-Atmosphere & Anelastic limita
362       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',
363       &  ' not yet implemented with rStar'       &  ' not yet implemented with rStar'
364          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
365          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
366        ENDIF        ENDIF
367        IF ( vectorInvariantMomentum .AND.        IF ( vectorInvariantMomentum .AND.
368       &        ( deepAtmosphere .OR.       &        ( deepAtmosphere .OR.
# Line 365  C--   Deep-Atmosphere & Anelastic limita Line 371  C--   Deep-Atmosphere & Anelastic limita
371       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',
372       &  ' not yet implemented in Vector-Invariant momentum code'       &  ' not yet implemented in Vector-Invariant momentum code'
373          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
374          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
375        ENDIF        ENDIF
376    
377  C--   Free-surface related limitations:  C--   Free-surface related limitations:
# Line 374  C--   Free-surface related limitations: Line 380  C--   Free-surface related limitations:
380       &  'CONFIG_CHECK: Cannot select both implicitFreeSurface',       &  'CONFIG_CHECK: Cannot select both implicitFreeSurface',
381       &  ' and rigidLid.'       &  ' and rigidLid.'
382          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
383          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
384        ENDIF        ENDIF
385    
386        IF (rigidLid .AND. exactConserv) THEN        IF (rigidLid .AND. exactConserv) THEN
# Line 384  C--   Free-surface related limitations: Line 390  C--   Free-surface related limitations:
390          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
391       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
392          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
393          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
394        ENDIF        ENDIF
395    
396        IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN        IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN
# Line 394  C--   Free-surface related limitations: Line 400  C--   Free-surface related limitations:
400          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
401       &   'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'       &   'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'
402          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
403          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
404        ENDIF        ENDIF
405    
406        IF (rigidLid .AND. useRealFreshWaterFlux) THEN        IF (rigidLid .AND. useRealFreshWaterFlux) THEN
# Line 404  C--   Free-surface related limitations: Line 410  C--   Free-surface related limitations:
410          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
411       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
412          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
413          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
414        ENDIF        ENDIF
415    
416        IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN        IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN
# Line 414  C--   Free-surface related limitations: Line 420  C--   Free-surface related limitations:
420          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
421       &   'CONFIG_CHECK: without exactConserv'       &   'CONFIG_CHECK: without exactConserv'
422          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
423          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
424        ENDIF        ENDIF
425    
426        IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN        IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN
# Line 424  C--   Free-surface related limitations: Line 430  C--   Free-surface related limitations:
430          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
431       &   'CONFIG_CHECK: without exactConserv'       &   'CONFIG_CHECK: without exactConserv'
432          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
433          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
434        ENDIF        ENDIF
435    
436        IF ( selectSigmaCoord.NE.0 ) THEN        IF ( selectSigmaCoord.NE.0 ) THEN
# Line 432  C--   Free-surface related limitations: Line 438  C--   Free-surface related limitations:
438          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
439       &   'CONFIG_CHECK: Sigma-Coords not yet coded for Oceanic set-up'       &   'CONFIG_CHECK: Sigma-Coords not yet coded for Oceanic set-up'
440          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
441          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
442         ENDIF         ENDIF
443         IF ( nonlinFreeSurf.LE.0 ) THEN         IF ( nonlinFreeSurf.LE.0 ) THEN
444          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
445       &   'CONFIG_CHECK: Sigma-Coords not coded for Lin-FreeSurf'       &   'CONFIG_CHECK: Sigma-Coords not coded for Lin-FreeSurf'
446          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
447          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
448         ENDIF         ENDIF
449         IF (select_rStar.NE.0 ) THEN         IF (select_rStar.NE.0 ) THEN
450          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
451       &   'CONFIG_CHECK: Sigma-Coords and rStar are not compatible'       &   'CONFIG_CHECK: Sigma-Coords and rStar are not compatible'
452          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
453          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
454         ENDIF         ENDIF
455          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
456       &   'CONFIG_CHECK: Sigma-Coords code neither complete nor tested'       &   'CONFIG_CHECK: Sigma-Coords code neither complete nor tested'
# Line 478  c     ENDIF Line 484  c     ENDIF
484          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
485       &   'CONFIG_CHECK: restart not implemented in this config'       &   'CONFIG_CHECK: restart not implemented in this config'
486          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
487          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
488        ENDIF        ENDIF
489    
490        IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv        IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv
# Line 502  c     ENDIF Line 508  c     ENDIF
508          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
509       &   'CONFIG_CHECK: requires exactConserv=T'       &   'CONFIG_CHECK: requires exactConserv=T'
510          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
511          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
512        ENDIF        ENDIF
513  #else  #else
514        IF (useRealFreshWaterFlux        IF (useRealFreshWaterFlux
# Line 525  c     ENDIF Line 531  c     ENDIF
531          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
532       &       'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)'       &       'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)'
533          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
534          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
535        ENDIF        ENDIF
536        IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN        IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN
537          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
# Line 534  c     ENDIF Line 540  c     ENDIF
540          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
541       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
542          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
543          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
544        ENDIF        ENDIF
545        IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN        IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN
546          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
# Line 555  C--   Non-hydrostatic and 3-D solver rel Line 561  C--   Non-hydrostatic and 3-D solver rel
561          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
562       &   'CONFIG_CHECK: in nonHydrostatic code'       &   'CONFIG_CHECK: in nonHydrostatic code'
563          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
564          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
565        ENDIF        ENDIF
566    
567        IF ( implicitNHPress*implicSurfPress*implicDiv2Dflow.NE.1.        IF ( implicitNHPress*implicSurfPress*implicDiv2Dflow.NE.1.
# Line 566  C--   Non-hydrostatic and 3-D solver rel Line 572  C--   Non-hydrostatic and 3-D solver rel
572          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: To by-pass this',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: To by-pass this',
573       &    'STOP, comment this test and re-compile config_check'       &    'STOP, comment this test and re-compile config_check'
574          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
575          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
576        ENDIF        ENDIF
577        IF ( nonHydrostatic .AND. .NOT.exactConserv        IF ( nonHydrostatic .AND. .NOT.exactConserv
578       &     .AND. implicDiv2Dflow.NE.1. ) THEN       &     .AND. implicDiv2Dflow.NE.1. ) THEN
579          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Needs exactConserv=T',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Needs exactConserv=T',
580       &               ' for nonHydrostatic with implicDiv2Dflow < 1'       &               ' for nonHydrostatic with implicDiv2Dflow < 1'
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        IF ( nonHydrostatic .AND.        IF ( nonHydrostatic .AND.
585       &     implicitNHPress.NE.implicSurfPress ) THEN       &     implicitNHPress.NE.implicSurfPress ) THEN
# Line 614  C--   Momentum related limitations: Line 620  C--   Momentum related limitations:
620          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
621       &   '"highOrderVorticity" conflicts with "upwindVorticity"'       &   '"highOrderVorticity" conflicts with "upwindVorticity"'
622          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
623          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
624         ENDIF         ENDIF
625        ENDIF        ENDIF
626        IF ( selectCoriMap.LT.0 .OR. selectCoriMap.GT.3 ) THEN        IF ( selectCoriMap.LT.0 .OR. selectCoriMap.GT.3 ) THEN
627          WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ',
628       &       'Invalid option: selectCoriMap=', selectCoriMap       &       'Invalid option: selectCoriMap=', selectCoriMap
629          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
630          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
631        ENDIF        ENDIF
632    
633        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 638  C- jmc: but ultimately, this block can/w Line 644  C- jmc: but ultimately, this block can/w
644       &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',       &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',
645       &   ' in "data", namelist PARM01'       &   ' in "data", namelist PARM01'
646          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
647          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
648         ENDIF         ENDIF
649          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
650       &   'CD-scheme is OFF but params(tauCD,rCD) are set'       &   'CD-scheme is OFF but params(tauCD,rCD) are set'
# Line 657  C- jmc: but ultimately, this block can/w Line 663  C- jmc: but ultimately, this block can/w
663          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
664       &   'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'       &   'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'
665          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
666  cph        STOP 'ABNORMAL END: S/R CONFIG_CHECK'  cph        errCount = errCount + 1
667        ENDIF        ENDIF
668    
669  C--   Time-stepping limitations  C--   Time-stepping limitations
# Line 668  C--   Time-stepping limitations Line 674  C--   Time-stepping limitations
674          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',
675       &                       'should be =1 (Out of AB) or =0 (In AB)'       &                       'should be =1 (Out of AB) or =0 (In AB)'
676          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
677          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
678        ENDIF        ENDIF
679        IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN        IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN
680          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',
# Line 677  C--   Time-stepping limitations Line 683  C--   Time-stepping limitations
683          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',
684       &                       'should be =1 (Out of AB) or =0 (In AB)'       &                       'should be =1 (Out of AB) or =0 (In AB)'
685          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
686          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
687        ENDIF        ENDIF
688    
689  C--   Grid limitations:  C--   Grid limitations:
# Line 687  C--   Grid limitations: Line 693  C--   Grid limitations:
693       &       'CONFIG_CHECK: specifying Euler angles makes only ',       &       'CONFIG_CHECK: specifying Euler angles makes only ',
694       &       'sense with usingSphericalGrid=.TRUE.'       &       'sense with usingSphericalGrid=.TRUE.'
695          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
696          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
697         ENDIF         ENDIF
698         IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN         IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN
699          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
700       &       'CONFIG_CHECK: specifying Euler angles will probably ',       &       'CONFIG_CHECK: specifying Euler angles will probably ',
701       &       'not work with pkgs FLT, ZONAL_FLT, ECCO'       &       'not work with pkgs FLT, ZONAL_FLT, ECCO'
702          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
703          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
704         ENDIF         ENDIF
705  #ifdef ALLOW_PROFILES  #ifdef ALLOW_PROFILES
706          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
707       &       'CONFIG_CHECK: specifying Euler angles will probably ',       &       'CONFIG_CHECK: specifying Euler angles will probably ',
708       &       'not work with pkg profiles'       &       'not work with pkg profiles'
709          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
710          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
711  #endif /* ALLOW_PROFILES */  #endif /* ALLOW_PROFILES */
712        ENDIF        ENDIF
713    
# Line 710  C--   Packages conflict Line 716  C--   Packages conflict
716          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
717       &   'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'       &   'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'
718          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
719          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
720        ENDIF        ENDIF
721    
722        IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN        IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN
# Line 718  C--   Packages conflict Line 724  C--   Packages conflict
724       &       'CONFIG_CHECK: cannot set useMATRIX without ',       &       'CONFIG_CHECK: cannot set useMATRIX without ',
725       &       'setting usePTRACERS'       &       'setting usePTRACERS'
726          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
727          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
728        ENDIF        ENDIF
729    
730        IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN        IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN
# Line 726  C--   Packages conflict Line 732  C--   Packages conflict
732       &       'CONFIG_CHECK: cannot set allowFreezing',       &       'CONFIG_CHECK: cannot set allowFreezing',
733       &       ' with pkgs SEAICE or THSICE'       &       ' with pkgs SEAICE or THSICE'
734          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
735            errCount = errCount + 1
736          ENDIF
737    
738          IF ( errCount.GE.1 ) THEN
739            WRITE(msgBuf,'(A,I3,A)')
740         &       'CONFIG_CHECK: detected', errCount,' fatal error(s)'
741            CALL PRINT_ERROR( msgBuf, myThid )
742            CALL ALL_PROC_DIE( 0 )
743          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
744        ENDIF        ENDIF
745          _END_MASTER(myThid)
746    
747    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
748    
749          _BEGIN_MASTER(myThid)
750        WRITE(msgBuf,'(A)')        WRITE(msgBuf,'(A)')
751       &'// ======================================================='       &'// ======================================================='
752        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
# Line 743  C--   Packages conflict Line 761  C--   Packages conflict
761        WRITE(msgBuf,'(A)') ' '        WRITE(msgBuf,'(A)') ' '
762        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
763       &                    SQUEEZE_RIGHT, myThid )       &                    SQUEEZE_RIGHT, myThid )
764          _END_MASTER(myThid)
765    
766        RETURN        RETURN
767        END        END

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61

  ViewVC Help
Powered by ViewVC 1.1.22