/[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.51 by heimbach, Sat Oct 10 22:36:14 2009 UTC revision 1.69 by jmc, Fri Jul 13 23:24:52 2012 UTC
# Line 34  CEndOfInterface Line 34  CEndOfInterface
34    
35  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
36  C     == Local variables ==  C     == Local variables ==
37  C     msgBuf :: Informational/error meesage 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          _BEGIN_MASTER(myThid)
43          WRITE(msgBuf,'(A)')
44         &'// ======================================================='
45          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
46         &                    SQUEEZE_RIGHT, myThid )
47          WRITE(msgBuf,'(A)') '// Check Model config. (CONFIG_CHECK):'
48          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
49         &                    SQUEEZE_RIGHT, myThid )
50          _END_MASTER(myThid)
51    
52    C--   MPI + multi-threads: seems to be OK to let master-thread check & stop
53    C      (as long as all procs finish cleanly by calling ALL_PROC_DIE)
54          _BEGIN_MASTER(myThid)
55          errCount = 0
56    
57  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:
58    
59  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 46  C       code is being compiled Line 62  C       code is being compiled
62        IF (diffKrFile.NE.' ') THEN        IF (diffKrFile.NE.' ') THEN
63          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
64       &  'CONFIG_CHECK: diffKrFile is set but never used.'       &  'CONFIG_CHECK: diffKrFile is set but never used.'
65          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
66          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
67       &  'Re-compile with:  #define ALLOW_3D_DIFFKR'       &  'Re-compile with:  #define ALLOW_3D_DIFFKR'
68          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
69          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
70        ENDIF        ENDIF
71  #endif  #endif
72    
# Line 58  C       code is being compiled Line 74  C       code is being compiled
74        IF (use3Dsolver) THEN        IF (use3Dsolver) THEN
75          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
76       &   'CONFIG_CHECK: #undef ALLOW_NONHYDROSTATIC and'       &   'CONFIG_CHECK: #undef ALLOW_NONHYDROSTATIC and'
77          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
78         IF ( implicitIntGravWave ) WRITE(msgBuf,'(A)')         IF ( implicitIntGravWave ) WRITE(msgBuf,'(A)')
79       &   'CONFIG_CHECK: implicitIntGravWave is TRUE'       &   'CONFIG_CHECK: implicitIntGravWave is TRUE'
80         IF ( nonHydrostatic ) WRITE(msgBuf,'(A)')         IF ( nonHydrostatic ) WRITE(msgBuf,'(A)')
81       &   'CONFIG_CHECK: nonHydrostatic is TRUE'       &   'CONFIG_CHECK: nonHydrostatic is TRUE'
82          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
83          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
84        ENDIF        ENDIF
85  #endif  #endif
86    
# Line 72  C       code is being compiled Line 88  C       code is being compiled
88        IF ( alph_AB.NE.UNSET_RL .OR. beta_AB.NE.UNSET_RL ) THEN        IF ( alph_AB.NE.UNSET_RL .OR. beta_AB.NE.UNSET_RL ) THEN
89          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
90       &   '#undef ALLOW_ADAMSBASHFORTH_3 but alph_AB,beta_AB'       &   '#undef ALLOW_ADAMSBASHFORTH_3 but alph_AB,beta_AB'
91          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
92          WRITE(msgBuf,'(A,1P2E20.7)')          WRITE(msgBuf,'(A,1P2E20.7)')
93       &   'CONFIG_CHECK: are set to:',alph_AB,beta_AB       &   'CONFIG_CHECK: are set to:',alph_AB,beta_AB
94          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
95          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
96        ENDIF        ENDIF
97  #endif  #endif
98    
# Line 84  C       code is being compiled Line 100  C       code is being compiled
100        IF ( momImplVertAdv ) THEN        IF ( momImplVertAdv ) THEN
101          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
102       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
103          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
104          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
105       &   'CONFIG_CHECK: but momImplVertAdv is TRUE'       &   'CONFIG_CHECK: but momImplVertAdv is TRUE'
106          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
107          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
108        ENDIF        ENDIF
109        IF ( tempImplVertAdv ) THEN        IF ( tempImplVertAdv ) THEN
110          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
111       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
112          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
113          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
114       &   'CONFIG_CHECK: but tempImplVertAdv is TRUE'       &   'CONFIG_CHECK: but tempImplVertAdv is TRUE'
115          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
116          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
117        ENDIF        ENDIF
118        IF ( saltImplVertAdv ) THEN        IF ( saltImplVertAdv ) THEN
119          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
120       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
121          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
122          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
123       &   'CONFIG_CHECK: but saltImplVertAdv is TRUE'       &   'CONFIG_CHECK: but saltImplVertAdv is TRUE'
124          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
125          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
126        ENDIF        ENDIF
127        IF ( dTtracerLev(1).NE.dTtracerLev(Nr) .AND. implicitDiffusion        IF ( dTtracerLev(1).NE.dTtracerLev(Nr) .AND. implicitDiffusion
128       &     .AND. ( saltStepping .OR. tempStepping .OR. usePTRACERS )       &     .AND. ( saltStepping .OR. tempStepping .OR. usePTRACERS )
129       &   ) THEN       &   ) THEN
130          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
131       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
132          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
133          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
134       &   'but implicitDiffusion=T with non-uniform dTtracerLev'       &   'but implicitDiffusion=T with non-uniform dTtracerLev'
135          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
136          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
137          ENDIF
138    #endif
139    
140    #ifdef ALLOW_AUTODIFF_TAMC
141          IF ( momImplVertAdv ) THEN
142            WRITE(msgBuf,'(A)')
143         &   'CONFIG_CHECK: momImplVertAdv is not yet'
144            CALL PRINT_ERROR( msgBuf, myThid )
145            WRITE(msgBuf,'(A)')
146         &   'CONFIG_CHECK: supported in adjoint mode'
147            CALL PRINT_ERROR( msgBuf, myThid )
148            errCount = errCount + 1
149          ENDIF
150    #endif
151    
152    #ifdef ALLOW_DEPTH_CONTROL
153          IF ( useOBCS ) THEN
154            WRITE(msgBuf,'(A)')
155         &   'CONFIG_CHECK: DEPTH_CONTROL code not compatible with OBCS'
156            CALL PRINT_ERROR( msgBuf, myThid )
157            errCount = errCount + 1
158        ENDIF        ENDIF
159  #endif  #endif
160    
# Line 125  C       code is being compiled Line 162  C       code is being compiled
162        IF (exactConserv) THEN        IF (exactConserv) THEN
163          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
164       &   'CONFIG_CHECK: #undef EXACT_CONSERV and'       &   'CONFIG_CHECK: #undef EXACT_CONSERV and'
165          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
166          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
167       &   'CONFIG_CHECK: exactConserv is TRUE'       &   'CONFIG_CHECK: exactConserv is TRUE'
168          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
169          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
170        ENDIF        ENDIF
171  #endif  #endif
172    
# Line 137  C       code is being compiled Line 174  C       code is being compiled
174        IF (nonlinFreeSurf.NE.0) THEN        IF (nonlinFreeSurf.NE.0) THEN
175          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
176       &   'CONFIG_CHECK: #undef NONLIN_FRSURF and'       &   'CONFIG_CHECK: #undef NONLIN_FRSURF and'
177          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
178          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
179       &   'CONFIG_CHECK: nonlinFreeSurf is non-zero'       &   'CONFIG_CHECK: nonlinFreeSurf is non-zero'
180          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
181          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
182        ENDIF        ENDIF
183  #endif  #endif
184    
# Line 149  C       code is being compiled Line 186  C       code is being compiled
186        IF (select_rStar .NE. 0) THEN        IF (select_rStar .NE. 0) THEN
187          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
188       &   'CONFIG_CHECK: rStar is part of NonLin-FS '       &   'CONFIG_CHECK: rStar is part of NonLin-FS '
189          CALL PRINT_ERROR( msgBuf, myThid)          CALL PRINT_ERROR( msgBuf, myThid )
190          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
191       &   'CONFIG_CHECK: ==> use #define NONLIN_FRSURF to use it'       &   'CONFIG_CHECK: ==> set #define NONLIN_FRSURF to use it'
192          CALL PRINT_ERROR( msgBuf, myThid)          CALL PRINT_ERROR( msgBuf, myThid )
193          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
194        ENDIF        ENDIF
195  #endif /* NONLIN_FRSURF */  #endif /* NONLIN_FRSURF */
196    
197    #ifdef DISABLE_RSTAR_CODE
198          IF ( select_rStar.NE.0 ) THEN
199            WRITE(msgBuf,'(A)')
200         &   'CONFIG_CHECK: rStar code disable (DISABLE_RSTAR_CODE defined)'
201            CALL PRINT_ERROR( msgBuf, myThid )
202            WRITE(msgBuf,'(A)')
203         &   'CONFIG_CHECK: ==> set #undef DISABLE_RSTAR_CODE to use it'
204            CALL PRINT_ERROR( msgBuf, myThid )
205            errCount = errCount + 1
206          ENDIF
207    #endif /* DISABLE_RSTAR_CODE */
208    
209    #ifdef DISABLE_SIGMA_CODE
210          IF ( selectSigmaCoord.NE.0 ) THEN
211            WRITE(msgBuf,'(A)')
212         &   'CONFIG_CHECK: Sigma code disable (DISABLE_SIGMA_CODE defined)'
213            CALL PRINT_ERROR( msgBuf, myThid )
214            WRITE(msgBuf,'(A)')
215         &   'CONFIG_CHECK: ==> set #undef DISABLE_SIGMA_CODE to use it'
216            CALL PRINT_ERROR( msgBuf, myThid )
217            errCount = errCount + 1
218          ENDIF
219    #endif /* DISABLE_SIGMA_CODE */
220    
221  #ifdef USE_NATURAL_BCS  #ifdef USE_NATURAL_BCS
222          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
223       &   'CONFIG_CHECK: USE_NATURAL_BCS option has been replaced'       &   'CONFIG_CHECK: USE_NATURAL_BCS option has been replaced'
224          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
225          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
226       &   'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file'       &   'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file'
227          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
228          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
229  #endif  #endif
230    
231  #ifndef ALLOW_ADDFLUID  #ifndef ALLOW_ADDFLUID
# Line 175  C       code is being compiled Line 236  C       code is being compiled
236          WRITE(msgBuf,'(A,I4,A)') 'CONFIG_CHECK: selectAddFluid=',          WRITE(msgBuf,'(A,I4,A)') 'CONFIG_CHECK: selectAddFluid=',
237       &                           selectAddFluid, ' is not zero'       &                           selectAddFluid, ' is not zero'
238          CALL PRINT_ERROR( msgBuf, myThid )          CALL PRINT_ERROR( msgBuf, myThid )
239          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
240        ENDIF        ENDIF
241  #endif /* ALLOW_ADDFLUID */  #endif /* ALLOW_ADDFLUID */
242    
# Line 185  C       code is being compiled Line 246  C       code is being compiled
246        IF (pLoadFile.NE.' ') THEN        IF (pLoadFile.NE.' ') THEN
247          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
248       &  'CONFIG_CHECK: pLoadFile is set but you have not'       &  'CONFIG_CHECK: pLoadFile is set but you have not'
249          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
250          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
251       &  'compiled the model with the pressure loading code.'       &  'compiled the model with the pressure loading code.'
252          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
253          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
254       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'
255          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
256          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
257        ENDIF        ENDIF
258        IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN        IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN
259          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
260       &  'CONFIG_CHECK: sIceLoad is computed but'       &  'CONFIG_CHECK: sIceLoad is computed but'
261          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
262          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
263       &  'pressure loading code is not compiled.'       &  'pressure loading code is not compiled.'
264          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
265          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
266       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'
267          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
268          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
269        ENDIF        ENDIF
270  #endif  #endif
271    
# Line 213  C       code is being compiled Line 274  C       code is being compiled
274          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
275       &  'CONFIG_CHECK: balanceEmPmR/Qnet is set but balance code ',       &  'CONFIG_CHECK: balanceEmPmR/Qnet is set but balance code ',
276       &  'is not compiled.'       &  'is not compiled.'
277          CALL PRINT_ERROR( msgBuf , 1)          CALL PRINT_ERROR( msgBuf, myThid )
278          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
279       &  'Re-compile with  ALLOW_BALANCE_FLUXES defined'       &  'Re-compile with  ALLOW_BALANCE_FLUXES defined'
280          CALL PRINT_ERROR( msgBuf , 1)          CALL PRINT_ERROR( msgBuf, myThid )
281          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
282        ENDIF        ENDIF
283  #endif  #endif
284    
285    #ifndef ALLOW_BALANCE_RELAX
286          IF (balanceThetaClimRelax .OR. balanceSaltClimRelax) THEN
287            WRITE(msgBuf,'(A,A)')
288         &  'CONFIG_CHECK: balanceTheta/SaltClimRelax is set ',
289         &  'but balance code is not compiled.'
290            CALL PRINT_ERROR( msgBuf, myThid )
291            WRITE(msgBuf,'(A)')
292         &  'Re-compile with  ALLOW_BALANCE_RELAX defined'
293            CALL PRINT_ERROR( msgBuf, myThid )
294            errCount = errCount + 1
295          ENDIF
296    #endif
297    
298    #ifndef ALLOW_SRCG
299          IF (useSRCGSolver) THEN
300            WRITE(msgBuf,'(A,A)')
301         &  'CONFIG_CHECK: useSRCGSolver = .TRUE., but single reduction ',
302         &  'code is not compiled.'
303            CALL PRINT_ERROR( msgBuf, myThid )
304            WRITE(msgBuf,'(A)')
305         &  'CONFIG_CHECK: Re-compile with ALLOW_SRCG defined'
306            CALL PRINT_ERROR( msgBuf, myThid )
307            errCount = errCount + 1
308          ENDIF
309    #endif /* ALLOW_SRCG */
310    
311  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
312    
313  C--   Check parameter consistency :  C--   Check parameter consistency :
314    
315        IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND.        IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.
316       &     ( viscC4leithD.NE.0.  .OR. viscC4leith.NE.0.       &     ( viscC4leithD.NE.0.  .OR. viscC4leith.NE.0.
317       &     .OR. viscC4smag.NE.0. .OR. viscA4Grid.NE.0.       &     .OR. viscC4smag.NE.0. .OR. viscA4Grid.NE.0.
318       &     .OR. viscA4D.NE.0.    .OR. viscA4Z.NE.0. ) ) THEN       &     .OR. viscA4D.NE.0.    .OR. viscA4Z.NE.0. ) ) THEN
319          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
320       &  'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with',       &  'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with',
321       &  ' overlap (Olx,Oly) smaller than 3'       &  ' overlap (OLx,OLy) smaller than 3'
322          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
323          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
324        ENDIF        ENDIF
325        IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND.        IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.
326       &     ( viscC2leithD.NE.0. .OR. viscC4leithD.NE.0. )       &     ( viscC2leithD.NE.0. .OR. viscC4leithD.NE.0. )
327       &   ) THEN       &   ) THEN
328          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
329       &  'CONFIG_CHECK: cannot use Leith Visc.(div.part) with',       &  'CONFIG_CHECK: cannot use Leith Visc.(div.part) with',
330       &  ' overlap (Olx,Oly) smaller than 3'       &  ' overlap (OLx,OLy) smaller than 3'
331          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
332          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
333        ENDIF        ENDIF
334    
335    #ifndef DISCONNECTED_TILES
336    C     Overlaps cannot be larger than interior tile except for special cases
337          IF ( sNx.LT.OLx ) THEN
338    #ifdef ALLOW_EXCH2
339           WRITE(msgBuf,'(A)')
340         &  'CONFIG_CHECK: sNx<OLx not allowed with ALLOW_EXCH2 defined'
341           CALL PRINT_ERROR( msgBuf, myThid )
342            errCount = errCount + 1
343    #endif /* ALLOW_EXCH2 */
344           IF ( Nx.NE.1 ) THEN
345            WRITE(msgBuf,'(A)')
346         &  'CONFIG_CHECK: sNx<OLx not allowed unless Nx=1'
347            CALL PRINT_ERROR( msgBuf, myThid )
348            errCount = errCount + 1
349           ENDIF
350          ENDIF
351          IF ( sNy.LT.OLy ) THEN
352    #ifdef ALLOW_EXCH2
353           WRITE(msgBuf,'(A)')
354         &  'CONFIG_CHECK: sNy<OLy not allowed with ALLOW_EXCH2 defined'
355           CALL PRINT_ERROR( msgBuf, myThid )
356            errCount = errCount + 1
357    #endif /* ALLOW_EXCH2 */
358           IF ( Ny.NE.1 ) THEN
359            WRITE(msgBuf,'(A)')
360         &  'CONFIG_CHECK: sNy<OLy not allowed unless Ny=1'
361            CALL PRINT_ERROR( msgBuf, myThid )
362            errCount = errCount + 1
363           ENDIF
364          ENDIF
365    #endif /* ndef DISCONNECTED_TILES */
366    
367  C--   Deep-Atmosphere & Anelastic limitations:  C--   Deep-Atmosphere & Anelastic limitations:
368        IF ( deepAtmosphere .AND.        IF ( deepAtmosphere .AND.
369       &     useRealFreshWaterFlux .AND. usingPCoords ) THEN       &     useRealFreshWaterFlux .AND. usingPCoords ) THEN
370          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
371       &  'CONFIG_CHECK: Deep-Atmosphere not yet implemented with',       &  'CONFIG_CHECK: Deep-Atmosphere not yet implemented with',
372       &  ' real-Fresh-Water option in P-coordinate'       &  ' real-Fresh-Water option in P-coordinate'
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        IF ( select_rStar.NE.0 .AND.        IF ( select_rStar.NE.0 .AND.
377       &        ( deepAtmosphere .OR.       &        ( deepAtmosphere .OR.
# Line 260  C--   Deep-Atmosphere & Anelastic limita Line 379  C--   Deep-Atmosphere & Anelastic limita
379          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
380       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',
381       &  ' not yet implemented with rStar'       &  ' not yet implemented with rStar'
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        IF ( vectorInvariantMomentum .AND.        IF ( vectorInvariantMomentum .AND.
386       &        ( deepAtmosphere .OR.       &        ( deepAtmosphere .OR.
# Line 269  C--   Deep-Atmosphere & Anelastic limita Line 388  C--   Deep-Atmosphere & Anelastic limita
388          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
389       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',
390       &  ' not yet implemented in Vector-Invariant momentum code'       &  ' not yet implemented in Vector-Invariant momentum code'
391          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
392          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
393        ENDIF        ENDIF
394    
395  C--   Free-surface related limitations:  C--   Free-surface related limitations:
# Line 278  C--   Free-surface related limitations: Line 397  C--   Free-surface related limitations:
397          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
398       &  'CONFIG_CHECK: Cannot select both implicitFreeSurface',       &  'CONFIG_CHECK: Cannot select both implicitFreeSurface',
399       &  ' and rigidLid.'       &  ' and rigidLid.'
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 (rigidLid .AND. exactConserv) THEN        IF (rigidLid .AND. exactConserv) THEN
405          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
406       &   'CONFIG_CHECK: exactConserv not compatible with'       &   'CONFIG_CHECK: exactConserv not compatible with'
407          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
408          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
409       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
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 ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN        IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN
415          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
416       &   'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.'       &   'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.'
417          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
418          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
419       &   'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'       &   'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'
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 (rigidLid .AND. useRealFreshWaterFlux) THEN        IF (rigidLid .AND. useRealFreshWaterFlux) THEN
425          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
426       &   'CONFIG_CHECK: useRealFreshWaterFlux not compatible with'       &   'CONFIG_CHECK: useRealFreshWaterFlux not compatible with'
427          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
428          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
429       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
430          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
431          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
       ENDIF  
   
       IF ( (implicSurfPress.NE.1. .OR. implicDiv2Dflow.NE.1.)  
      &    .AND. nonHydrostatic ) THEN  
         WRITE(msgBuf,'(A,A)') 'CONFIG_CHECK: nonHydrostatic',  
      & ' NOT SAFE with non-fully implicit Barotropic solver'  
         CALL PRINT_ERROR( msgBuf , myThid)  
         WRITE(msgBuf,'(A,A)') 'CONFIG_CHECK: To by-pass this',  
      &    'STOP, comment this test and re-compile config_check'  
         CALL PRINT_ERROR( msgBuf , myThid)  
         STOP 'ABNORMAL END: S/R CONFIG_CHECK'  
432        ENDIF        ENDIF
433    
434        IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN        IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN
435          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
436       &   'CONFIG_CHECK: nonlinFreeSurf cannot be used'       &   'CONFIG_CHECK: nonlinFreeSurf cannot be used'
437          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
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        ENDIF
443    
444        IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN        IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN
445          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
446       &   'CONFIG_CHECK: r* Coordinate cannot be used'       &   'CONFIG_CHECK: r* Coordinate cannot be used'
447          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
448          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
449       &   'CONFIG_CHECK: without exactConserv'       &   'CONFIG_CHECK: without exactConserv'
450          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
451          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
452        ENDIF        ENDIF
453    
454  C- note : not implemented in checkpoint48b but it's done now (since 01-28-03)        IF ( select_rStar.GE.1 .AND. nonlinFreeSurf.LE.0 ) THEN
455  c     IF (select_rStar.GT.0 .AND. useOBCS ) THEN          WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: r* Coordinate',
456  c       STOP 'ABNORMAL END: S/R CONFIG_CHECK'       &   ' (select_rStar=', select_rStar, ' ) cannot be used'
457  c     ENDIF          CALL PRINT_ERROR( msgBuf, myThid )
458            WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: ',
459         &   ' with Linear FreeSurf (nonlinFreeSurf=', nonlinFreeSurf,' )'
460            CALL PRINT_ERROR( msgBuf, myThid )
461            errCount = errCount + 1
462          ENDIF
463    
464  c     IF (nonlinFreeSurf.NE.0 .AND. nonHydrostatic) THEN        IF ( selectSigmaCoord.NE.0 ) THEN
465        IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN         IF ( fluidIsWater ) THEN
466          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
467       &   'CONFIG_CHECK: nonlinFreeSurf not yet implemented'       &   'CONFIG_CHECK: Sigma-Coords not yet coded for Oceanic set-up'
468          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
469            errCount = errCount + 1
470           ENDIF
471           IF ( nonlinFreeSurf.LE.0 ) THEN
472          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
473       &   'CONFIG_CHECK: in nonHydrostatic code'       &   'CONFIG_CHECK: Sigma-Coords not coded for Lin-FreeSurf'
474          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
475          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
476           ENDIF
477           IF (select_rStar.NE.0 ) THEN
478            WRITE(msgBuf,'(A)')
479         &   'CONFIG_CHECK: Sigma-Coords and rStar are not compatible'
480            CALL PRINT_ERROR( msgBuf, myThid )
481            errCount = errCount + 1
482           ENDIF
483            WRITE(msgBuf,'(A)')
484         &   'CONFIG_CHECK: Sigma-Coords code neither complete nor tested'
485            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
486         &                      SQUEEZE_RIGHT, myThid )
487        ENDIF        ENDIF
488    
489    C- note : not implemented in checkpoint48b but it is done now (since 01-28-03)
490    c     IF (select_rStar.GT.0 .AND. useOBCS ) THEN
491    c       STOP 'ABNORMAL END: S/R CONFIG_CHECK'
492    c     ENDIF
493    
494        IF ( nonlinFreeSurf.NE.0 .AND.        IF ( nonlinFreeSurf.NE.0 .AND.
495       &     deltaTfreesurf.NE.dTtracerLev(1) ) THEN       &     deltaTfreesurf.NE.dTtracerLev(1) ) THEN
496          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
497       &   'CONFIG_CHECK: WARNING: nonlinFreeSurf might cause problems'       &                       'nonlinFreeSurf might cause problems'
498          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
499       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
500          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(2A)') '** WARNING ** ',
501       &   'CONFIG_CHECK: with different FreeSurf & Tracer time-steps'       &               'with different FreeSurf & Tracer time-steps'
502          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
503       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
504        ENDIF        ENDIF
505    
506        IF ( useRealFreshWaterFlux .AND. exactConserv        IF ( useRealFreshWaterFlux .AND. exactConserv
# Line 376  c     IF (nonlinFreeSurf.NE.0 .AND. nonH Line 508  c     IF (nonlinFreeSurf.NE.0 .AND. nonH
508       &     .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN       &     .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN
509          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
510       &   'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:'       &   'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:'
511          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
512          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
513       &   'CONFIG_CHECK: restart not implemented in this config'       &   'CONFIG_CHECK: restart not implemented in this config'
514          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
515          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
516        ENDIF        ENDIF
517    
518        IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv        IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv
519       &     .AND. implicDiv2Dflow.NE.1. ) THEN       &     .AND. implicDiv2Dflow.NE.1. ) THEN
520          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: **WARNNING** ',          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
521       &   'RealFreshWater & implicDiv2Dflow < 1'       &   'RealFreshWater & implicDiv2Dflow < 1'
522          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
523       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
524          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: works better',          WRITE(msgBuf,'(2A)') '** WARNING ** works better',
525       &   ' with exactConserv=.T. (+ #define EXACT_CONSERV)'       &   ' with exactConserv=.T. (+ #define EXACT_CONSERV)'
526          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
527       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
528        ENDIF        ENDIF
529    
530  #ifdef EXACT_CONSERV  #ifdef EXACT_CONSERV
# Line 400  c     IF (nonlinFreeSurf.NE.0 .AND. nonH Line 532  c     IF (nonlinFreeSurf.NE.0 .AND. nonH
532       &            .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN       &            .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN
533          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
534       &   'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP'       &   'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP'
535          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
536          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
537       &   'CONFIG_CHECK: requires exactConserv=T'       &   'CONFIG_CHECK: requires exactConserv=T'
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  #else  #else
542        IF (useRealFreshWaterFlux        IF (useRealFreshWaterFlux
543       &            .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN       &            .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN
544          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
545       &   'CONFIG_CHECK: E-P effects on wVel are not included'       &               'E-P effects on wVel are not included'
546          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
547       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
548          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
549       &   'CONFIG_CHECK: ==> use #define EXACT_CONSERV to fix it'       &               '==> use #define EXACT_CONSERV to fix it'
550          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
551       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
552        ENDIF        ENDIF
553  #endif /* EXACT_CONSERV */  #endif /* EXACT_CONSERV */
554    
555        IF ( selectAddFluid.LT.-1 .OR. selectAddFluid.GT.2 ) THEN        IF ( selectAddFluid.LT.-1 .OR. selectAddFluid.GT.2 ) THEN
556          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: selectAddFluid=',          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: selectAddFluid=',
557       &                             selectAddFluid, ' not allowed'       &                             selectAddFluid, ' not allowed'
558          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
559          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
560       &       'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)'       &       'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)'
561          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
562          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
563        ENDIF        ENDIF
564        IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN        IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN
565          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
566       &   'CONFIG_CHECK: selectAddFluid > 0 not compatible with'       &   'CONFIG_CHECK: selectAddFluid > 0 not compatible with'
567          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
568          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
569       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
570          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
571          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
572        ENDIF        ENDIF
573        IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN        IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN
574          WRITE(msgBuf,'(2A)') '**WARNNING** ',          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
575       &   'CONFIG_CHECK: synchronous time-stepping =>'       &   'synchronous time-stepping =>'
576          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
577       &                      SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
578          WRITE(msgBuf,'(2A)') '**WARNNING** ',          WRITE(msgBuf,'(2A)') '** WARNING ** ',
579       &   '1 time-step mismatch in AddFluid effects on T & S'       &   '1 time-step mismatch in AddFluid effects on T & S'
580          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
581       &                      SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
582          ENDIF
583    
584    C--   Non-hydrostatic and 3-D solver related limitations:
585          IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN
586            WRITE(msgBuf,'(A)')
587         &   'CONFIG_CHECK: nonlinFreeSurf not yet implemented'
588            CALL PRINT_ERROR( msgBuf, myThid )
589            WRITE(msgBuf,'(A)')
590         &   'CONFIG_CHECK: in nonHydrostatic code'
591            CALL PRINT_ERROR( msgBuf, myThid )
592            errCount = errCount + 1
593          ENDIF
594    
595          IF ( implicitNHPress*implicSurfPress*implicDiv2Dflow.NE.1.
596         &     .AND. implicitIntGravWave ) THEN
597            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: implicitIntGravWave',
598         &    ' NOT SAFE with non-fully implicit solver'
599            CALL PRINT_ERROR( msgBuf, myThid )
600            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: To by-pass this',
601         &    'STOP, comment this test and re-compile config_check'
602            CALL PRINT_ERROR( msgBuf, myThid )
603            errCount = errCount + 1
604          ENDIF
605          IF ( nonHydrostatic .AND. .NOT.exactConserv
606         &     .AND. implicDiv2Dflow.NE.1. ) THEN
607            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Needs exactConserv=T',
608         &               ' for nonHydrostatic with implicDiv2Dflow < 1'
609            CALL PRINT_ERROR( msgBuf, myThid )
610            errCount = errCount + 1
611          ENDIF
612          IF ( nonHydrostatic .AND.
613         &     implicitNHPress.NE.implicSurfPress ) THEN
614            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
615         &               ' nonHydrostatic might cause problems with'
616            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
617         &                      SQUEEZE_RIGHT, myThid )
618            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
619         &               'different implicitNHPress & implicSurfPress'
620            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
621         &                      SQUEEZE_RIGHT, myThid )
622          ENDIF
623    
624          IF ( implicitViscosity .AND. use3Dsolver ) THEN
625            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
626         &    'Implicit viscosity applies to provisional u,vVel'
627            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
628         &                      SQUEEZE_RIGHT, myThid )
629            WRITE(msgBuf,'(2A)') '** WARNING ** => not consistent with',
630         &    'final vertical shear (after appling 3-D solver solution'
631            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
632         &                      SQUEEZE_RIGHT, myThid )
633          ENDIF
634          IF ( implicitViscosity .AND. nonHydrostatic ) THEN
635            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
636         &    'Implicit viscosity not implemented in CALC_GW'
637            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
638         &                      SQUEEZE_RIGHT, myThid )
639            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
640         &    'Explicit viscosity might become unstable if too large'
641            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
642         &                      SQUEEZE_RIGHT, myThid )
643        ENDIF        ENDIF
644    
645  C--   Momentum related limitations:  C--   Momentum related limitations:
# Line 454  C--   Momentum related limitations: Line 647  C--   Momentum related limitations:
647         IF ( highOrderVorticity.AND.upwindVorticity ) THEN         IF ( highOrderVorticity.AND.upwindVorticity ) THEN
648          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
649       &   '"highOrderVorticity" conflicts with "upwindVorticity"'       &   '"highOrderVorticity" conflicts with "upwindVorticity"'
650          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
651          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
652           ENDIF
653          ENDIF
654          IF ( .NOT.vectorInvariantMomentum .AND. momAdvection ) THEN
655           IF ( usingCurvilinearGrid ) THEN
656            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
657         &       'missing metric-terms for CurvilinearGrid'
658            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
659         &                      SQUEEZE_RIGHT, myThid )
660           ENDIF
661           IF ( hasWetCSCorners ) THEN
662            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momAdvection ',
663         &   'in flux-form is wrong on CubedSphere grid (corners)'
664            CALL PRINT_ERROR( msgBuf, myThid )
665            errCount = errCount + 1
666         ENDIF         ENDIF
667        ENDIF        ENDIF
668          IF ( selectCoriMap.LT.0 .OR. selectCoriMap.GT.3 ) THEN
669            WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ',
670         &       'Invalid option: selectCoriMap=', selectCoriMap
671            CALL PRINT_ERROR( msgBuf, myThid )
672            errCount = errCount + 1
673          ENDIF
674    
675        IF (.NOT.useCDscheme .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN        IF (.NOT.useCDscheme .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN
676  C- jmc: since useCDscheme is a new [04-13-03] flag (default=F),  C- jmc: since useCDscheme is a new [04-13-03] flag (default=F),
# Line 468  C- jmc: but ultimately, this block can/w Line 681  C- jmc: but ultimately, this block can/w
681         IF (.NOT.vectorInvariantMomentum.AND.momStepping) THEN         IF (.NOT.vectorInvariantMomentum.AND.momStepping) THEN
682          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
683       &   'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set'       &   'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set'
684          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
685          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
686       &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',       &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',
687       &   ' in "data", namelist PARM01'       &   ' in "data", namelist PARM01'
688          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
689          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
690         ENDIF         ENDIF
691          WRITE(msgBuf,'(2A)') '**WARNNING** ',          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
692       &   'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set'       &   'CD-scheme is OFF but params(tauCD,rCD) are set'
693          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
694       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
695          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(3A)') '** WARNING ** to turn ON CD-scheme:',
696       &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',       &   ' => "useCDscheme=.TRUE." in "data", namelist PARM01'
      &   ' in "data", namelist PARM01'  
697          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
698       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
699        ENDIF        ENDIF
700    
701        IF ( useCDscheme .AND. useCubedSphereExchange ) THEN        IF ( useCDscheme .AND. hasWetCSCorners ) THEN
702          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
703       &   'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'       &   'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'
704          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
705  cph        STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
706        ENDIF        ENDIF
707    
708  C--   Time-stepping limitations  C--   Time-stepping limitations
709        IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN        IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN
710          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=',          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=',
711       &                             momForcingOutAB, ' not allowed'       &                             momForcingOutAB, ' not allowed'
712          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
713          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',
714       &                       'should be =1 (Out of AB) or =0 (In AB)'       &                       'should be =1 (Out of AB) or =0 (In AB)'
715          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
716          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
717        ENDIF        ENDIF
718        IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN        IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN
719          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',
720       &                             tracForcingOutAB, ' not allowed'       &                             tracForcingOutAB, ' not allowed'
721          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
722          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',
723       &                       'should be =1 (Out of AB) or =0 (In AB)'       &                       'should be =1 (Out of AB) or =0 (In AB)'
724          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
725          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
726        ENDIF        ENDIF
727    
728  C--   Grid limitations:  C--   Grid limitations:
# Line 519  C--   Grid limitations: Line 731  C--   Grid limitations:
731          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
732       &       'CONFIG_CHECK: specifying Euler angles makes only ',       &       'CONFIG_CHECK: specifying Euler angles makes only ',
733       &       'sense with usingSphericalGrid=.TRUE.'       &       'sense with usingSphericalGrid=.TRUE.'
734          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
735          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
736         ENDIF         ENDIF
737         IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN         IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN
738          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
739       &       'CONFIG_CHECK: specifying Euler angles will probably ',       &       'CONFIG_CHECK: specifying Euler angles will probably ',
740       &       'not work with pkgs FLT, ZONAL_FLT, ECCO'       &       'not work with pkgs FLT, ZONAL_FLT, ECCO'
741          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
742          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
743         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 */  
744        ENDIF        ENDIF
745    
746  C--   Packages conflict  C--   Packages conflict
747        IF ( useMATRIX .AND. useGCHEM ) THEN        IF ( useMATRIX .AND. useGCHEM ) THEN
748          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
749       &   'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'       &   'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'
750          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
751          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
752        ENDIF        ENDIF
753    
754        IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN        IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN
755          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
756       &       'CONFIG_CHECK: cannot set useMATRIX without ',       &       'CONFIG_CHECK: cannot set useMATRIX without ',
757       &       'setting usePTRACERS'       &       'setting usePTRACERS'
758          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
759          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
760        ENDIF        ENDIF
761    
762        IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN        IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN
763          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
764       &       'CONFIG_CHECK: cannot set allowFreezing',       &       'CONFIG_CHECK: cannot set allowFreezing',
765       &       ' with pkgs SEAICE or THSICE'       &       ' with pkgs SEAICE or THSICE'
766          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
767            errCount = errCount + 1
768          ENDIF
769    
770          IF ( errCount.GE.1 ) THEN
771            WRITE(msgBuf,'(A,I3,A)')
772         &       'CONFIG_CHECK: detected', errCount,' fatal error(s)'
773            CALL PRINT_ERROR( msgBuf, myThid )
774            CALL ALL_PROC_DIE( 0 )
775          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
776        ENDIF        ENDIF
777          _END_MASTER(myThid)
778    
779        WRITE(msgBuf,'(A)')  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
780       &'// ======================================================='  
781        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        _BEGIN_MASTER(myThid)
      &                    SQUEEZE_RIGHT, myThid )  
782        WRITE(msgBuf,'(A)') '// CONFIG_CHECK : Normal End'        WRITE(msgBuf,'(A)') '// CONFIG_CHECK : Normal End'
783        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
784       &                    SQUEEZE_RIGHT, myThid )       &                    SQUEEZE_RIGHT, myThid )
# Line 576  C--   Packages conflict Line 789  C--   Packages conflict
789        WRITE(msgBuf,'(A)') ' '        WRITE(msgBuf,'(A)') ' '
790        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
791       &                    SQUEEZE_RIGHT, myThid )       &                    SQUEEZE_RIGHT, myThid )
792          _END_MASTER(myThid)
793    
794        RETURN        RETURN
795        END        END

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.69

  ViewVC Help
Powered by ViewVC 1.1.22