/[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.80 by jmc, Thu Jan 22 18:30:00 2015 UTC
# Line 3  C $Name$ Line 3  C $Name$
3    
4  #include "PACKAGES_CONFIG.h"  #include "PACKAGES_CONFIG.h"
5  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
6    #ifdef ALLOW_MOM_COMMON
7    # include "MOM_COMMON_OPTIONS.h"
8    #endif
9    
10  CBOP  CBOP
11  C     !ROUTINE: CONFIG_CHECK  C     !ROUTINE: CONFIG_CHECK
# Line 24  C     === Global variables === Line 27  C     === Global variables ===
27  #include "SIZE.h"  #include "SIZE.h"
28  #include "EEPARAMS.h"  #include "EEPARAMS.h"
29  #include "PARAMS.h"  #include "PARAMS.h"
 c #include "GRID.h"  
30    
31  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
32  C     === Routine arguments ===  C     === Routine arguments ===
# Line 36  C     !LOCAL VARIABLES: Line 38  C     !LOCAL VARIABLES:
38  C     == Local variables ==  C     == Local variables ==
39  C     msgBuf :: Informational/error message buffer  C     msgBuf :: Informational/error message buffer
40        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
41          INTEGER errCount
42  CEOP  CEOP
43    
44          _BEGIN_MASTER(myThid)
45          WRITE(msgBuf,'(A)')
46         &'// ======================================================='
47          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
48         &                    SQUEEZE_RIGHT, myThid )
49          WRITE(msgBuf,'(A)') '// Check Model config. (CONFIG_CHECK):'
50          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
51         &                    SQUEEZE_RIGHT, myThid )
52          _END_MASTER(myThid)
53    
54    C--   MPI + multi-threads: seems to be OK to let master-thread check & stop
55    C      (as long as all procs finish cleanly by calling ALL_PROC_DIE)
56          _BEGIN_MASTER(myThid)
57          errCount = 0
58    
59  C-  check that CPP option is "defined" when running-flag parameter is on:  C-  check that CPP option is "defined" when running-flag parameter is on:
60    
61  C     o If diffKrFile is set, then we should make sure the corresponing  C     o If diffKrFile is set, then we should make sure the corresponing
# Line 47  C       code is being compiled Line 65  C       code is being compiled
65          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
66       &  'CONFIG_CHECK: diffKrFile is set but never used.'       &  'CONFIG_CHECK: diffKrFile is set but never used.'
67          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
68          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
69       &  'Re-compile with:  #define ALLOW_3D_DIFFKR'       &  'Re-compile with: "#define ALLOW_3D_DIFFKR"'
70          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
71          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
72          ENDIF
73    #endif
74    
75    #ifndef ALLOW_SMAG_3D
76          IF ( useSmag3D ) THEN
77            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
78         &  'Cannot set useSmag3D=TRUE when compiled with'
79            CALL PRINT_ERROR( msgBuf, myThid )
80            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
81         &  '"#undef ALLOW_SMAG_3D" in MOM_COMMON_OPTIONS.h'
82            CALL PRINT_ERROR( msgBuf, myThid )
83            errCount = errCount + 1
84        ENDIF        ENDIF
85  #endif  #endif
86    
# Line 64  C       code is being compiled Line 94  C       code is being compiled
94         IF ( nonHydrostatic ) WRITE(msgBuf,'(A)')         IF ( nonHydrostatic ) WRITE(msgBuf,'(A)')
95       &   'CONFIG_CHECK: nonHydrostatic is TRUE'       &   'CONFIG_CHECK: nonHydrostatic 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  #endif  #endif
100    
# Line 76  C       code is being compiled Line 106  C       code is being compiled
106          WRITE(msgBuf,'(A,1P2E20.7)')          WRITE(msgBuf,'(A,1P2E20.7)')
107       &   'CONFIG_CHECK: are set to:',alph_AB,beta_AB       &   'CONFIG_CHECK: are set to:',alph_AB,beta_AB
108          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
109          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
110        ENDIF        ENDIF
111  #endif  #endif
112    
# Line 88  C       code is being compiled Line 118  C       code is being compiled
118          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
119       &   'CONFIG_CHECK: but momImplVertAdv is TRUE'       &   'CONFIG_CHECK: but momImplVertAdv is TRUE'
120          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
121          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
122        ENDIF        ENDIF
123        IF ( tempImplVertAdv ) THEN        IF ( tempImplVertAdv ) THEN
124          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
# Line 97  C       code is being compiled Line 127  C       code is being compiled
127          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
128       &   'CONFIG_CHECK: but tempImplVertAdv is TRUE'       &   'CONFIG_CHECK: but tempImplVertAdv is TRUE'
129          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
130          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
131        ENDIF        ENDIF
132        IF ( saltImplVertAdv ) THEN        IF ( saltImplVertAdv ) THEN
133          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
# Line 106  C       code is being compiled Line 136  C       code is being compiled
136          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
137       &   'CONFIG_CHECK: but saltImplVertAdv is TRUE'       &   'CONFIG_CHECK: but saltImplVertAdv is TRUE'
138          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
139          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
140        ENDIF        ENDIF
141        IF ( dTtracerLev(1).NE.dTtracerLev(Nr) .AND. implicitDiffusion        IF ( dTtracerLev(1).NE.dTtracerLev(Nr) .AND. implicitDiffusion
142       &     .AND. ( saltStepping .OR. tempStepping .OR. usePTRACERS )       &     .AND. ( saltStepping .OR. tempStepping .OR. usePTRACERS )
# Line 117  C       code is being compiled Line 147  C       code is being compiled
147          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
148       &   'but implicitDiffusion=T with non-uniform dTtracerLev'       &   'but implicitDiffusion=T with non-uniform dTtracerLev'
149          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
150          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
151        ENDIF        ENDIF
152  #endif  #endif
153    
154  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF
155        IF ( momImplVertAdv ) THEN        IF ( momImplVertAdv ) THEN
156          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
157       &   'CONFIG_CHECK: momImplVertAdv is not yet'       &   'CONFIG_CHECK: momImplVertAdv is not yet'
# Line 129  C       code is being compiled Line 159  C       code is being compiled
159          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
160       &   'CONFIG_CHECK: supported in adjoint mode'       &   'CONFIG_CHECK: supported in adjoint mode'
161          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
162          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
163        ENDIF        ENDIF
164  #endif  #endif
165    
166  #ifdef ALLOW_DEPTH_CONTROL  #ifdef ALLOW_DEPTH_CONTROL
       IF ( implicitDiffusion ) THEN  
         WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',  
      &       'implicitDiffusion not available with DEPTH_CONTROL'  
         CALL PRINT_ERROR( msgBuf, myThid )  
         STOP 'ABNORMAL END: S/R CONFIG_CHECK'  
       ENDIF  
167        IF ( useOBCS ) THEN        IF ( useOBCS ) THEN
168          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
169       &   'CONFIG_CHECK: DEPTH_CONTROL code not compatible with OBCS'       &   'CONFIG_CHECK: DEPTH_CONTROL code not compatible with OBCS'
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 156  C       code is being compiled Line 180  C       code is being compiled
180          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
181       &   'CONFIG_CHECK: exactConserv is TRUE'       &   'CONFIG_CHECK: exactConserv is TRUE'
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  #endif
186    
# Line 168  C       code is being compiled Line 192  C       code is being compiled
192          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
193       &   'CONFIG_CHECK: nonlinFreeSurf is non-zero'       &   'CONFIG_CHECK: nonlinFreeSurf is non-zero'
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  #endif
198    
# Line 180  C       code is being compiled Line 204  C       code is being compiled
204          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
205       &   'CONFIG_CHECK: ==> set #define NONLIN_FRSURF to use it'       &   'CONFIG_CHECK: ==> set #define NONLIN_FRSURF 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 /* NONLIN_FRSURF */  #endif /* NONLIN_FRSURF */
210    
# Line 192  C       code is being compiled Line 216  C       code is being compiled
216          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
217       &   'CONFIG_CHECK: ==> set #undef DISABLE_RSTAR_CODE to use it'       &   'CONFIG_CHECK: ==> set #undef DISABLE_RSTAR_CODE to use it'
218          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
219          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
220        ENDIF        ENDIF
221  #endif /* DISABLE_RSTAR_CODE */  #endif /* DISABLE_RSTAR_CODE */
222    
# Line 204  C       code is being compiled Line 228  C       code is being compiled
228          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
229       &   'CONFIG_CHECK: ==> set #undef DISABLE_SIGMA_CODE to use it'       &   'CONFIG_CHECK: ==> set #undef DISABLE_SIGMA_CODE to use it'
230          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
231          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
232        ENDIF        ENDIF
233  #endif /* DISABLE_SIGMA_CODE */  #endif /* DISABLE_SIGMA_CODE */
234    
# Line 215  C       code is being compiled Line 239  C       code is being compiled
239          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
240       &   'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file'       &   'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file'
241          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
242          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
243  #endif  #endif
244    
245  #ifndef ALLOW_ADDFLUID  #ifndef ALLOW_ADDFLUID
246        IF ( selectAddFluid.NE.0 ) THEN        IF ( selectAddFluid.NE.0 ) THEN
247          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
248       &   'CONFIG_CHECK: #undef ALLOW_ADDFLUID and'       &   'CONFIG_CHECK: #undef ALLOW_ADDFLUID (CPP_OPTIONS.h) and'
249          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
250          WRITE(msgBuf,'(A,I4,A)') 'CONFIG_CHECK: selectAddFluid=',          WRITE(msgBuf,'(A,I4,A)') 'CONFIG_CHECK: selectAddFluid=',
251       &                           selectAddFluid, ' is not zero'       &                           selectAddFluid, ' is not zero'
252          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
253          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
254        ENDIF        ENDIF
255  #endif /* ALLOW_ADDFLUID */  #endif /* ALLOW_ADDFLUID */
256    
# Line 238  C       code is being compiled Line 262  C       code is being compiled
262       &  'CONFIG_CHECK: pLoadFile is set but you have not'       &  'CONFIG_CHECK: pLoadFile is set but you have not'
263          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
264          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
265       &  'compiled the model with the pressure loading code.'       &  ' compiled the model with the pressure loading code.'
266          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
267          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
268       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'       &  ' Re-compile with: "#define ATMOSPHERIC_LOADING"'
269          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
270          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
271        ENDIF        ENDIF
272        IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN        IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN
273          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
274       &  'CONFIG_CHECK: sIceLoad is computed but'       &  'CONFIG_CHECK: sIceLoad is computed but'
275          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
276          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
277       &  'pressure loading code is not compiled.'       &  ' pressure loading code is not compiled.'
278          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
279          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
280       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'       &  ' Re-compile with: "#define ATMOSPHERIC_LOADING"'
281          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
282          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
283          ENDIF
284    #endif
285    
286    C     o Need to define ALLOW_GEOTHERMAL_FLUX to use geothermalFile forcing
287    #ifndef ALLOW_GEOTHERMAL_FLUX
288          IF ( geothermalFile.NE.' ' ) THEN
289            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
290         &  'geothermalFile is set but Geothermal-Flux code'
291            CALL PRINT_ERROR( msgBuf, myThid )
292            WRITE(msgBuf,'(2A)')' is not compiled.',
293         &  ' Re-compile with "#define ALLOW_GEOTHERMAL_FLUX"'
294            CALL PRINT_ERROR( msgBuf, myThid )
295            errCount = errCount + 1
296          ENDIF
297    #endif /* ALLOW_GEOTHERMAL_FLUX */
298    
299    #ifndef ALLOW_FRICTION_HEATING
300          IF ( addFrictionHeating ) THEN
301            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: addFrictionHeating=T',
302         &  ' but FRICTIONAL_HEATING code is not compiled.'
303            CALL PRINT_ERROR( msgBuf, myThid )
304            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Re-compile with:',
305         &   ' "#define ALLOW_FRICTION_HEATING" (CPP_OPTIONS.h)'
306            CALL PRINT_ERROR( msgBuf, myThid )
307            errCount = errCount + 1
308        ENDIF        ENDIF
309  #endif  #endif
310    
# Line 265  C       code is being compiled Line 314  C       code is being compiled
314       &  'CONFIG_CHECK: balanceEmPmR/Qnet is set but balance code ',       &  'CONFIG_CHECK: balanceEmPmR/Qnet is set but balance code ',
315       &  'is not compiled.'       &  'is not compiled.'
316          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
317          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
318       &  'Re-compile with  ALLOW_BALANCE_FLUXES defined'       &  'Re-compile with:  ALLOW_BALANCE_FLUXES defined'
319          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
320          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
321          ENDIF
322    #endif
323    
324    #ifndef ALLOW_BALANCE_RELAX
325          IF (balanceThetaClimRelax .OR. balanceSaltClimRelax) THEN
326            WRITE(msgBuf,'(A,A)')
327         &  'CONFIG_CHECK: balanceTheta/SaltClimRelax is set ',
328         &  'but balance code is not compiled.'
329            CALL PRINT_ERROR( msgBuf, myThid )
330            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
331         &  'Re-compile with  ALLOW_BALANCE_RELAX defined'
332            CALL PRINT_ERROR( msgBuf, myThid )
333            errCount = errCount + 1
334        ENDIF        ENDIF
335  #endif  #endif
336    
# Line 281  C       code is being compiled Line 343  C       code is being compiled
343          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
344       &  'CONFIG_CHECK: Re-compile with ALLOW_SRCG defined'       &  'CONFIG_CHECK: Re-compile with ALLOW_SRCG defined'
345          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
346          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
347        ENDIF        ENDIF
348  #endif /* ALLOW_SRCG */  #endif /* ALLOW_SRCG */
349    
# Line 297  C--   Check parameter consistency : Line 359  C--   Check parameter consistency :
359       &  'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with',       &  'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with',
360       &  ' overlap (OLx,OLy) smaller than 3'       &  ' overlap (OLx,OLy) smaller than 3'
361          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
362          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
363        ENDIF        ENDIF
364        IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.        IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.
365       &     ( viscC2leithD.NE.0. .OR. viscC4leithD.NE.0. )       &     ( viscC2leithD.NE.0. .OR. viscC4leithD.NE.0. )
# Line 306  C--   Check parameter consistency : Line 368  C--   Check parameter consistency :
368       &  'CONFIG_CHECK: cannot use Leith Visc.(div.part) with',       &  'CONFIG_CHECK: cannot use Leith Visc.(div.part) with',
369       &  ' overlap (OLx,OLy) smaller than 3'       &  ' overlap (OLx,OLy) smaller than 3'
370          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
371          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
372          ENDIF
373          IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.
374         &     useSmag3D .AND. useCDscheme ) THEN
375            WRITE(msgBuf,'(A,A)')
376         &  'CONFIG_CHECK: cannot use Smag-3D + CD-scheme with',
377         &  ' overlap (OLx,OLy) smaller than 3'
378            CALL PRINT_ERROR( msgBuf, myThid )
379            errCount = errCount + 1
380        ENDIF        ENDIF
381    
382  C     Overlaps cannot be larger than interior tile except for special  #ifndef DISCONNECTED_TILES
383  C     cases  C     Overlaps cannot be larger than interior tile except for special cases
384        IF ( sNx.LT.OLx ) THEN        IF ( sNx.LT.OLx ) THEN
385  #ifdef ALLOW_EXCH2  #ifdef ALLOW_EXCH2
386         WRITE(msgBuf,'(A)')         WRITE(msgBuf,'(A)')
387       &  'CONFIG_CHECK: sNx<OLx not allowed with ALLOW_EXCH2 defined'       &  'CONFIG_CHECK: sNx<OLx not allowed with ALLOW_EXCH2 defined'
388         CALL PRINT_ERROR( msgBuf, myThid )         CALL PRINT_ERROR( msgBuf, myThid )
389         STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
390  #endif /* ALLOW_EXCH2 */  #endif /* ALLOW_EXCH2 */
391         IF ( Nx.NE.1 ) THEN         IF ( Nx.NE.1 ) THEN
392          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
393       &  'CONFIG_CHECK: sNx<OLx not allowed unless Nx=1'       &  'CONFIG_CHECK: sNx<OLx not allowed unless Nx=1'
394          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
395          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
396         ENDIF         ENDIF
397        ENDIF        ENDIF
398        IF ( sNy.LT.OLy ) THEN        IF ( sNy.LT.OLy ) THEN
# Line 330  C     cases Line 400  C     cases
400         WRITE(msgBuf,'(A)')         WRITE(msgBuf,'(A)')
401       &  'CONFIG_CHECK: sNy<OLy not allowed with ALLOW_EXCH2 defined'       &  'CONFIG_CHECK: sNy<OLy not allowed with ALLOW_EXCH2 defined'
402         CALL PRINT_ERROR( msgBuf, myThid )         CALL PRINT_ERROR( msgBuf, myThid )
403         STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
404  #endif /* ALLOW_EXCH2 */  #endif /* ALLOW_EXCH2 */
405         IF ( Ny.NE.1 ) THEN         IF ( Ny.NE.1 ) THEN
406          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
407       &  'CONFIG_CHECK: sNy<OLy not allowed unless Ny=1'       &  'CONFIG_CHECK: sNy<OLy not allowed unless Ny=1'
408          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
409          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
410         ENDIF         ENDIF
411        ENDIF        ENDIF
412    #endif /* ndef DISCONNECTED_TILES */
413    
414  C--   Deep-Atmosphere & Anelastic limitations:  C--   Deep-Atmosphere & Anelastic limitations:
415        IF ( deepAtmosphere .AND.        IF ( deepAtmosphere .AND.
# Line 347  C--   Deep-Atmosphere & Anelastic limita Line 418  C--   Deep-Atmosphere & Anelastic limita
418       &  'CONFIG_CHECK: Deep-Atmosphere not yet implemented with',       &  'CONFIG_CHECK: Deep-Atmosphere not yet implemented with',
419       &  ' real-Fresh-Water option in P-coordinate'       &  ' real-Fresh-Water option in P-coordinate'
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        IF ( select_rStar.NE.0 .AND.        IF ( select_rStar.NE.0 .AND.
424       &        ( deepAtmosphere .OR.       &        ( deepAtmosphere .OR.
# Line 356  C--   Deep-Atmosphere & Anelastic limita Line 427  C--   Deep-Atmosphere & Anelastic limita
427       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',
428       &  ' not yet implemented with rStar'       &  ' not yet implemented with rStar'
429          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
430          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
431        ENDIF        ENDIF
432        IF ( vectorInvariantMomentum .AND.        IF ( vectorInvariantMomentum .AND.
433       &        ( deepAtmosphere .OR.       &        ( deepAtmosphere .OR.
# Line 365  C--   Deep-Atmosphere & Anelastic limita Line 436  C--   Deep-Atmosphere & Anelastic limita
436       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',
437       &  ' not yet implemented in Vector-Invariant momentum code'       &  ' not yet implemented in Vector-Invariant momentum code'
438          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
439          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
440        ENDIF        ENDIF
441    
442  C--   Free-surface related limitations:  C--   Free-surface related limitations:
443          IF ( cg2dUseMinResSol.LT.0 .OR. cg2dUseMinResSol.GT.1 ) THEN
444            WRITE(msgBuf,'(A,I10,A)')
445         &   'CONFIG_CHECK: cg2dUseMinResSol set to unvalid value(=',
446         &                  cg2dUseMinResSol, ')'
447            CALL PRINT_ERROR( msgBuf, myThid )
448            errCount = errCount + 1
449          ENDIF
450    
451        IF ( rigidLid .AND. implicitFreeSurface ) THEN        IF ( rigidLid .AND. implicitFreeSurface ) THEN
452          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
453       &  'CONFIG_CHECK: Cannot select both implicitFreeSurface',       &  'CONFIG_CHECK: Cannot select both implicitFreeSurface',
454       &  ' and rigidLid.'       &  ' and rigidLid.'
455          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
456          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
457        ENDIF        ENDIF
458    
459        IF (rigidLid .AND. exactConserv) THEN        IF (rigidLid .AND. exactConserv) THEN
# Line 384  C--   Free-surface related limitations: Line 463  C--   Free-surface related limitations:
463          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
464       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
465          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
466          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
467        ENDIF        ENDIF
468    
469        IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN        IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN
# Line 394  C--   Free-surface related limitations: Line 473  C--   Free-surface related limitations:
473          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
474       &   'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'       &   'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'
475          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
476          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
477        ENDIF        ENDIF
478    
479        IF (rigidLid .AND. useRealFreshWaterFlux) THEN        IF (rigidLid .AND. useRealFreshWaterFlux) THEN
# Line 404  C--   Free-surface related limitations: Line 483  C--   Free-surface related limitations:
483          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
484       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
485          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
486          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
487        ENDIF        ENDIF
488    
489        IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN        IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN
# Line 414  C--   Free-surface related limitations: Line 493  C--   Free-surface related limitations:
493          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
494       &   'CONFIG_CHECK: without exactConserv'       &   'CONFIG_CHECK: without exactConserv'
495          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
496          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
497        ENDIF        ENDIF
498    
499        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 503  C--   Free-surface related limitations:
503          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
504       &   'CONFIG_CHECK: without exactConserv'       &   'CONFIG_CHECK: without exactConserv'
505          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
506          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
507          ENDIF
508    
509          IF ( select_rStar.GE.1 .AND. nonlinFreeSurf.LE.0 ) THEN
510            WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: r* Coordinate',
511         &   ' (select_rStar=', select_rStar, ' ) cannot be used'
512            CALL PRINT_ERROR( msgBuf, myThid )
513            WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: ',
514         &   ' with Linear FreeSurf (nonlinFreeSurf=', nonlinFreeSurf,' )'
515            CALL PRINT_ERROR( msgBuf, myThid )
516            errCount = errCount + 1
517          ENDIF
518          IF ( select_rStar.EQ.2 .AND. nonlinFreeSurf.NE.4 ) THEN
519    C-    not consistent to account for the slope of the coordinate when
520    C     ignoring the variations of level-thickness in PhiHyd calculation;
521    C     for now, issue a warning (but might change the code later on):
522            WRITE(msgBuf,'(2A,I3)') '** WARNING ** CONFIG_CHECK: ',
523         &   'select_rStar=2 not right with nonlinFreeSurf=', nonlinFreeSurf
524            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
525         &                      SQUEEZE_RIGHT, myThid )
526        ENDIF        ENDIF
527    
528        IF ( selectSigmaCoord.NE.0 ) THEN        IF ( selectSigmaCoord.NE.0 ) THEN
# Line 432  C--   Free-surface related limitations: Line 530  C--   Free-surface related limitations:
530          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
531       &   'CONFIG_CHECK: Sigma-Coords not yet coded for Oceanic set-up'       &   'CONFIG_CHECK: Sigma-Coords not yet coded for Oceanic set-up'
532          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
533          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
534         ENDIF         ENDIF
535         IF ( nonlinFreeSurf.LE.0 ) THEN         IF ( nonlinFreeSurf.LE.0 ) THEN
536          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
537       &   'CONFIG_CHECK: Sigma-Coords not coded for Lin-FreeSurf'       &   'CONFIG_CHECK: Sigma-Coords not coded for Lin-FreeSurf'
538          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
539          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
540         ENDIF         ENDIF
541         IF (select_rStar.NE.0 ) THEN         IF (select_rStar.NE.0 ) THEN
542          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
543       &   'CONFIG_CHECK: Sigma-Coords and rStar are not compatible'       &   'CONFIG_CHECK: Sigma-Coords and rStar are not compatible'
544          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
545          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
546         ENDIF         ENDIF
547          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
548       &   'CONFIG_CHECK: Sigma-Coords code neither complete nor tested'       &   'CONFIG_CHECK: Sigma-Coords code neither complete nor tested'
# Line 458  c       STOP 'ABNORMAL END: S/R CONFIG_C Line 556  c       STOP 'ABNORMAL END: S/R CONFIG_C
556  c     ENDIF  c     ENDIF
557    
558        IF ( nonlinFreeSurf.NE.0 .AND.        IF ( nonlinFreeSurf.NE.0 .AND.
559       &     deltaTfreesurf.NE.dTtracerLev(1) ) THEN       &     deltaTFreeSurf.NE.dTtracerLev(1) ) THEN
560          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
561       &                       'nonlinFreeSurf might cause problems'       &                       'nonlinFreeSurf might cause problems'
562          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
# Line 478  c     ENDIF Line 576  c     ENDIF
576          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
577       &   'CONFIG_CHECK: restart not implemented in this config'       &   'CONFIG_CHECK: restart not implemented in this config'
578          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
579          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
580        ENDIF        ENDIF
581    
582        IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv        IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv
# Line 502  c     ENDIF Line 600  c     ENDIF
600          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
601       &   'CONFIG_CHECK: requires exactConserv=T'       &   'CONFIG_CHECK: requires exactConserv=T'
602          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
603          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
604        ENDIF        ENDIF
605  #else  #else
606        IF (useRealFreshWaterFlux        IF (useRealFreshWaterFlux
# Line 525  c     ENDIF Line 623  c     ENDIF
623          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
624       &       'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)'       &       'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)'
625          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
626          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
627        ENDIF        ENDIF
628        IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN        IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN
629          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
# Line 534  c     ENDIF Line 632  c     ENDIF
632          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
633       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
634          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
635          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
636        ENDIF        ENDIF
637        IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN        IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN
638          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
# Line 547  c     ENDIF Line 645  c     ENDIF
645       &                      SQUEEZE_RIGHT, myThid )       &                      SQUEEZE_RIGHT, myThid )
646        ENDIF        ENDIF
647    
648    C--   Pressure calculation and pressure gradient:
649    #ifndef INCLUDE_PHIHYD_CALCULATION_CODE
650          IF ( momPressureForcing .OR. useDynP_inEos_Zc ) THEN
651            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
652         &   'missing code to calculate pressure (totPhiHyd)'
653            CALL PRINT_ERROR( msgBuf, myThid )
654            errCount = errCount + 1
655          ENDIF
656    #endif /* INCLUDE_PHIHYD_CALCULATION_CODE */
657          IF ( useDynP_inEos_Zc .AND. .NOT.momStepping ) THEN
658            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
659         &   'useDynP_inEos_Zc = TRUE but pressure is not computed'
660            CALL PRINT_ERROR( msgBuf, myThid )
661            errCount = errCount + 1
662          ENDIF
663    
664  C--   Non-hydrostatic and 3-D solver related limitations:  C--   Non-hydrostatic and 3-D solver related limitations:
665        IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN        IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN
666          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
# Line 555  C--   Non-hydrostatic and 3-D solver rel Line 669  C--   Non-hydrostatic and 3-D solver rel
669          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
670       &   'CONFIG_CHECK: in nonHydrostatic code'       &   'CONFIG_CHECK: in nonHydrostatic code'
671          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
672          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
673        ENDIF        ENDIF
674    
675        IF ( implicitNHPress*implicSurfPress*implicDiv2Dflow.NE.1.        IF ( implicitNHPress*implicSurfPress*implicDiv2Dflow.NE.1.
# Line 566  C--   Non-hydrostatic and 3-D solver rel Line 680  C--   Non-hydrostatic and 3-D solver rel
680          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: To by-pass this',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: To by-pass this',
681       &    'STOP, comment this test and re-compile config_check'       &    'STOP, comment this test and re-compile config_check'
682          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
683          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
684        ENDIF        ENDIF
685        IF ( nonHydrostatic .AND. .NOT.exactConserv        IF ( nonHydrostatic .AND. .NOT.exactConserv
686       &     .AND. implicDiv2Dflow.NE.1. ) THEN       &     .AND. implicDiv2Dflow.NE.1. ) THEN
687          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Needs exactConserv=T',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Needs exactConserv=T',
688       &               ' for nonHydrostatic with implicDiv2Dflow < 1'       &               ' for nonHydrostatic with implicDiv2Dflow < 1'
689          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
690          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
691        ENDIF        ENDIF
692        IF ( nonHydrostatic .AND.        IF ( nonHydrostatic .AND.
693       &     implicitNHPress.NE.implicSurfPress ) THEN       &     implicitNHPress.NE.implicSurfPress ) THEN
# Line 614  C--   Momentum related limitations: Line 728  C--   Momentum related limitations:
728          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
729       &   '"highOrderVorticity" conflicts with "upwindVorticity"'       &   '"highOrderVorticity" conflicts with "upwindVorticity"'
730          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
731          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
732           ENDIF
733          ENDIF
734          IF ( .NOT.vectorInvariantMomentum .AND. momAdvection ) THEN
735           IF ( usingCurvilinearGrid ) THEN
736            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
737         &       'missing metric-terms for CurvilinearGrid'
738            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
739         &                      SQUEEZE_RIGHT, myThid )
740           ENDIF
741           IF ( hasWetCSCorners ) THEN
742            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momAdvection ',
743         &   'in flux-form is wrong on CubedSphere grid (corners)'
744            CALL PRINT_ERROR( msgBuf, myThid )
745            errCount = errCount + 1
746         ENDIF         ENDIF
747        ENDIF        ENDIF
748        IF ( selectCoriMap.LT.0 .OR. selectCoriMap.GT.3 ) THEN        IF ( selectCoriMap.LT.0 .OR. selectCoriMap.GT.3 ) THEN
749          WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ',
750       &       'Invalid option: selectCoriMap=', selectCoriMap       &       'Invalid option: selectCoriMap=', selectCoriMap
751          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
752          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
753          ENDIF
754          IF ( selectBotDragQuadr.LT.-1 .OR. selectBotDragQuadr.GT.2 ) THEN
755            WRITE(msgBuf,'(2A,I8,A)') 'CONFIG_CHECK: ',
756         &       'selectBotDragQuadr=', selectBotDragQuadr,
757         &       ' not valid (-1,0,1,2)'
758            CALL PRINT_ERROR( msgBuf, myThid )
759            errCount = errCount + 1
760          ENDIF
761          IF ( useSmag3D .AND.
762         &    ( usingPCoords .OR. deepAtmosphere .OR. selectSigmaCoord.NE.0
763         &                   .OR. rhoRefFile.NE.' ' .OR. hasWetCSCorners )
764         &   ) THEN
765            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
766         &       'Smag-3D not yet implemented for this set-up'
767            CALL PRINT_ERROR( msgBuf, myThid )
768            errCount = errCount + 1
769        ENDIF        ENDIF
770    
771        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 782  C- jmc: but ultimately, this block can/w
782       &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',       &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',
783       &   ' in "data", namelist PARM01'       &   ' in "data", namelist PARM01'
784          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
785          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
786         ENDIF         ENDIF
787          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
788       &   'CD-scheme is OFF but params(tauCD,rCD) are set'       &   'CD-scheme is OFF but params(tauCD,rCD) are set'
789          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
790       &                      SQUEEZE_RIGHT, myThid )       &                      SQUEEZE_RIGHT, myThid )
         WRITE(msgBuf,'(3A)') '** WARNING ** ',  
      &   'to turn ON CD-scheme: => "useCDscheme=.TRUE."',  
      &   ' in "data", namelist PARM01'  
791          WRITE(msgBuf,'(3A)') '** WARNING ** to turn ON CD-scheme:',          WRITE(msgBuf,'(3A)') '** WARNING ** to turn ON CD-scheme:',
792       &   ' => "useCDscheme=.TRUE." in "data", namelist PARM01'       &   ' => "useCDscheme=.TRUE." in "data", namelist PARM01'
793          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
794       &                      SQUEEZE_RIGHT, myThid )       &                      SQUEEZE_RIGHT, myThid )
795        ENDIF        ENDIF
796    
797        IF ( useCDscheme .AND. useCubedSphereExchange ) THEN        IF ( useCDscheme .AND. hasWetCSCorners ) THEN
798          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
799       &   'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'       &   'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'
800          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
801  cph        STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
802        ENDIF        ENDIF
803    
804  C--   Time-stepping limitations  C--   Time-stepping limitations
805          IF ( implicitIntGravWave .AND. staggerTimeStep ) THEN
806            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: staggerTimeStep',
807         &    ' incompatible with implicitIntGravWave'
808            CALL PRINT_ERROR( msgBuf, myThid )
809            errCount = errCount + 1
810          ENDIF
811        IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN        IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN
812          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=',          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=',
813       &                             momForcingOutAB, ' not allowed'       &                             momForcingOutAB, ' not allowed'
# Line 668  C--   Time-stepping limitations Line 815  C--   Time-stepping limitations
815          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',
816       &                       'should be =1 (Out of AB) or =0 (In AB)'       &                       'should be =1 (Out of AB) or =0 (In AB)'
817          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
818          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
819        ENDIF        ENDIF
820        IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN        IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN
821          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',
# Line 677  C--   Time-stepping limitations Line 824  C--   Time-stepping limitations
824          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',
825       &                       'should be =1 (Out of AB) or =0 (In AB)'       &                       'should be =1 (Out of AB) or =0 (In AB)'
826          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
827          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
828          ENDIF
829          IF ( implBottomFriction ) THEN
830            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: implBottomFriction',
831         &  ' not yet coded.'
832            CALL PRINT_ERROR( msgBuf, myThid )
833            errCount = errCount + 1
834        ENDIF        ENDIF
835    
836  C--   Grid limitations:  C--   Grid limitations:
# Line 687  C--   Grid limitations: Line 840  C--   Grid limitations:
840       &       'CONFIG_CHECK: specifying Euler angles makes only ',       &       'CONFIG_CHECK: specifying Euler angles makes only ',
841       &       'sense with usingSphericalGrid=.TRUE.'       &       'sense with usingSphericalGrid=.TRUE.'
842          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
843          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
844         ENDIF         ENDIF
845         IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN         IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN
846          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
847       &       'CONFIG_CHECK: specifying Euler angles will probably ',       &       'CONFIG_CHECK: specifying Euler angles will probably ',
848       &       'not work with pkgs FLT, ZONAL_FLT, ECCO'       &       'not work with pkgs FLT, ZONAL_FLT, ECCO'
849          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
850          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
851         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 */  
852        ENDIF        ENDIF
853    
854  C--   Packages conflict  C--   Packages conflict
# Line 710  C--   Packages conflict Line 856  C--   Packages conflict
856          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
857       &   'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'       &   'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'
858          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
859          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
860        ENDIF        ENDIF
861    
862        IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN        IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN
# Line 718  C--   Packages conflict Line 864  C--   Packages conflict
864       &       'CONFIG_CHECK: cannot set useMATRIX without ',       &       'CONFIG_CHECK: cannot set useMATRIX without ',
865       &       'setting usePTRACERS'       &       'setting usePTRACERS'
866          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
867          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
868        ENDIF        ENDIF
869    
870        IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN        IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN
# Line 726  C--   Packages conflict Line 872  C--   Packages conflict
872       &       'CONFIG_CHECK: cannot set allowFreezing',       &       'CONFIG_CHECK: cannot set allowFreezing',
873       &       ' with pkgs SEAICE or THSICE'       &       ' with pkgs SEAICE or THSICE'
874          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
875            errCount = errCount + 1
876          ENDIF
877    
878          IF ( errCount.GE.1 ) THEN
879            WRITE(msgBuf,'(A,I3,A)')
880         &       'CONFIG_CHECK: detected', errCount,' fatal error(s)'
881            CALL PRINT_ERROR( msgBuf, myThid )
882            CALL ALL_PROC_DIE( 0 )
883          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
884        ENDIF        ENDIF
885          _END_MASTER(myThid)
886    
887        WRITE(msgBuf,'(A)')  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
888       &'// ======================================================='  
889        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        _BEGIN_MASTER(myThid)
      &                    SQUEEZE_RIGHT, myThid )  
890        WRITE(msgBuf,'(A)') '// CONFIG_CHECK : Normal End'        WRITE(msgBuf,'(A)') '// CONFIG_CHECK : Normal End'
891        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
892       &                    SQUEEZE_RIGHT, myThid )       &                    SQUEEZE_RIGHT, myThid )
# Line 743  C--   Packages conflict Line 897  C--   Packages conflict
897        WRITE(msgBuf,'(A)') ' '        WRITE(msgBuf,'(A)') ' '
898        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
899       &                    SQUEEZE_RIGHT, myThid )       &                    SQUEEZE_RIGHT, myThid )
900          _END_MASTER(myThid)
901    
902        RETURN        RETURN
903        END        END

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

  ViewVC Help
Powered by ViewVC 1.1.22