/[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.84 by jmc, Tue May 3 23:25:40 2016 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 34  CEndOfInterface Line 36  CEndOfInterface
36    
37  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
38  C     == Local variables ==  C     == Local variables ==
39  C     msgBuf :: Informational/error meesage 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 46  C       code is being compiled Line 64  C       code is being compiled
64        IF (diffKrFile.NE.' ') THEN        IF (diffKrFile.NE.' ') THEN
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 58  C       code is being compiled Line 88  C       code is being compiled
88        IF (use3Dsolver) THEN        IF (use3Dsolver) THEN
89          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
90       &   'CONFIG_CHECK: #undef ALLOW_NONHYDROSTATIC and'       &   'CONFIG_CHECK: #undef ALLOW_NONHYDROSTATIC and'
91          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
92         IF ( implicitIntGravWave ) WRITE(msgBuf,'(A)')         IF ( implicitIntGravWave ) WRITE(msgBuf,'(A)')
93       &   'CONFIG_CHECK: implicitIntGravWave is TRUE'       &   'CONFIG_CHECK: implicitIntGravWave is TRUE'
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 72  C       code is being compiled Line 102  C       code is being compiled
102        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
103          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
104       &   '#undef ALLOW_ADAMSBASHFORTH_3 but alph_AB,beta_AB'       &   '#undef ALLOW_ADAMSBASHFORTH_3 but alph_AB,beta_AB'
105          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
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 84  C       code is being compiled Line 114  C       code is being compiled
114        IF ( momImplVertAdv ) THEN        IF ( momImplVertAdv ) THEN
115          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
116       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
117          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
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)')
125       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
126          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
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)')
134       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
135          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
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 )
143       &   ) THEN       &   ) THEN
144          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
145       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
146          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
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
152    #endif
153    
154    #ifdef ALLOW_AUTODIFF
155          IF ( momImplVertAdv ) THEN
156            WRITE(msgBuf,'(A)')
157         &   'CONFIG_CHECK: momImplVertAdv is not yet'
158            CALL PRINT_ERROR( msgBuf, myThid )
159            WRITE(msgBuf,'(A)')
160         &   'CONFIG_CHECK: supported in adjoint mode'
161            CALL PRINT_ERROR( msgBuf, myThid )
162            errCount = errCount + 1
163          ENDIF
164    #endif
165    
166    #ifdef ALLOW_DEPTH_CONTROL
167          IF ( useOBCS ) THEN
168            WRITE(msgBuf,'(A)')
169         &   'CONFIG_CHECK: DEPTH_CONTROL code not compatible with OBCS'
170            CALL PRINT_ERROR( msgBuf, myThid )
171            errCount = errCount + 1
172        ENDIF        ENDIF
173  #endif  #endif
174    
# Line 125  C       code is being compiled Line 176  C       code is being compiled
176        IF (exactConserv) THEN        IF (exactConserv) THEN
177          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
178       &   'CONFIG_CHECK: #undef EXACT_CONSERV and'       &   'CONFIG_CHECK: #undef EXACT_CONSERV and'
179          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
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 137  C       code is being compiled Line 188  C       code is being compiled
188        IF (nonlinFreeSurf.NE.0) THEN        IF (nonlinFreeSurf.NE.0) THEN
189          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
190       &   'CONFIG_CHECK: #undef NONLIN_FRSURF and'       &   'CONFIG_CHECK: #undef NONLIN_FRSURF and'
191          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
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 149  C       code is being compiled Line 200  C       code is being compiled
200        IF (select_rStar .NE. 0) THEN        IF (select_rStar .NE. 0) THEN
201          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
202       &   'CONFIG_CHECK: rStar is part of NonLin-FS '       &   'CONFIG_CHECK: rStar is part of NonLin-FS '
203          CALL PRINT_ERROR( msgBuf, myThid)          CALL PRINT_ERROR( msgBuf, myThid )
204          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
205       &   'CONFIG_CHECK: ==> use #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    
211    #ifdef DISABLE_RSTAR_CODE
212          IF ( select_rStar.NE.0 ) THEN
213            WRITE(msgBuf,'(A)')
214         &   'CONFIG_CHECK: rStar code disable (DISABLE_RSTAR_CODE defined)'
215            CALL PRINT_ERROR( msgBuf, myThid )
216            WRITE(msgBuf,'(A)')
217         &   'CONFIG_CHECK: ==> set #undef DISABLE_RSTAR_CODE to use it'
218            CALL PRINT_ERROR( msgBuf, myThid )
219            errCount = errCount + 1
220          ENDIF
221    #endif /* DISABLE_RSTAR_CODE */
222    
223    #ifdef DISABLE_SIGMA_CODE
224          IF ( selectSigmaCoord.NE.0 ) THEN
225            WRITE(msgBuf,'(A)')
226         &   'CONFIG_CHECK: Sigma code disable (DISABLE_SIGMA_CODE defined)'
227            CALL PRINT_ERROR( msgBuf, myThid )
228            WRITE(msgBuf,'(A)')
229         &   'CONFIG_CHECK: ==> set #undef DISABLE_SIGMA_CODE to use it'
230            CALL PRINT_ERROR( msgBuf, myThid )
231            errCount = errCount + 1
232          ENDIF
233    #endif /* DISABLE_SIGMA_CODE */
234    
235  #ifdef USE_NATURAL_BCS  #ifdef USE_NATURAL_BCS
236          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
237       &   'CONFIG_CHECK: USE_NATURAL_BCS option has been replaced'       &   'CONFIG_CHECK: USE_NATURAL_BCS option has been replaced'
238          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
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 185  C       code is being compiled Line 260  C       code is being compiled
260        IF (pLoadFile.NE.' ') THEN        IF (pLoadFile.NE.' ') THEN
261          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
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 213  C       code is being compiled Line 313  C       code is being compiled
313          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
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 , 1)          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 , 1)          CALL PRINT_ERROR( msgBuf, myThid )
320          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
321        ENDIF        ENDIF
322  #endif  #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
335    #endif
336    
337    #ifndef ALLOW_SRCG
338          IF (useSRCGSolver) THEN
339            WRITE(msgBuf,'(A,A)')
340         &  'CONFIG_CHECK: useSRCGSolver = .TRUE., but single reduction ',
341         &  'code is not compiled.'
342            CALL PRINT_ERROR( msgBuf, myThid )
343            WRITE(msgBuf,'(A)')
344         &  'CONFIG_CHECK: Re-compile with ALLOW_SRCG defined'
345            CALL PRINT_ERROR( msgBuf, myThid )
346            errCount = errCount + 1
347          ENDIF
348    #endif /* ALLOW_SRCG */
349    
350  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
351    
352  C--   Check parameter consistency :  C--   Check parameter consistency :
353    
354        IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND.        IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND.
355       &     ( viscC4leithD.NE.0.  .OR. viscC4leith.NE.0.       &     ( viscC4leithD.NE.0.  .OR. viscC4leith.NE.0.
356       &     .OR. viscC4smag.NE.0. .OR. viscA4Grid.NE.0.       &     .OR. viscC4smag.NE.0. .OR. viscA4Grid.NE.0.
357       &     .OR. viscA4D.NE.0.    .OR. viscA4Z.NE.0. ) ) THEN       &     .OR. viscA4D.NE.0.    .OR. viscA4Z.NE.0. ) ) THEN
358          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
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. )
366       &   ) THEN       &   ) THEN
367          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
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
381    
382    #ifndef DISCONNECTED_TILES
383    C     Overlaps cannot be larger than interior tile except for special cases
384          IF ( sNx.LT.OLx ) THEN
385    #ifdef ALLOW_EXCH2
386           WRITE(msgBuf,'(A)')
387         &  'CONFIG_CHECK: sNx<OLx not allowed with ALLOW_EXCH2 defined'
388           CALL PRINT_ERROR( msgBuf, myThid )
389            errCount = errCount + 1
390    #endif /* ALLOW_EXCH2 */
391           IF ( Nx.NE.1 ) THEN
392            WRITE(msgBuf,'(A)')
393         &  'CONFIG_CHECK: sNx<OLx not allowed unless Nx=1'
394            CALL PRINT_ERROR( msgBuf, myThid )
395            errCount = errCount + 1
396           ENDIF
397          ENDIF
398          IF ( sNy.LT.OLy ) THEN
399    #ifdef ALLOW_EXCH2
400           WRITE(msgBuf,'(A)')
401         &  'CONFIG_CHECK: sNy<OLy not allowed with ALLOW_EXCH2 defined'
402           CALL PRINT_ERROR( msgBuf, myThid )
403            errCount = errCount + 1
404    #endif /* ALLOW_EXCH2 */
405           IF ( Ny.NE.1 ) THEN
406            WRITE(msgBuf,'(A)')
407         &  'CONFIG_CHECK: sNy<OLy not allowed unless Ny=1'
408            CALL PRINT_ERROR( msgBuf, myThid )
409            errCount = errCount + 1
410           ENDIF
411          ENDIF
412    #endif /* ndef DISCONNECTED_TILES */
413    
414    C--   Gravity vertical profile limitations:
415          IF ( usingPCoords .AND. gravityFile .NE. ' ' ) THEN
416            WRITE(msgBuf,'(A,A)') 'CONFIG_CHECK: Variable gravity',
417         &  ' not yet implemented for P-coordinate'
418            CALL PRINT_ERROR( msgBuf, myThid )
419            errCount = errCount + 1
420          ENDIF
421          IF ( select_rStar.NE.0 .AND. gravityFile .NE. ' ' ) THEN
422            WRITE(msgBuf,'(A,A)') 'CONFIG_CHECK: Variable gravity',
423         &  ' not yet implemented with rStar'
424            CALL PRINT_ERROR( msgBuf, myThid )
425            errCount = errCount + 1
426        ENDIF        ENDIF
427    
428  C--   Deep-Atmosphere & Anelastic limitations:  C--   Deep-Atmosphere & Anelastic limitations:
# Line 251  C--   Deep-Atmosphere & Anelastic limita Line 431  C--   Deep-Atmosphere & Anelastic limita
431          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
432       &  'CONFIG_CHECK: Deep-Atmosphere not yet implemented with',       &  'CONFIG_CHECK: Deep-Atmosphere not yet implemented with',
433       &  ' real-Fresh-Water option in P-coordinate'       &  ' real-Fresh-Water option in P-coordinate'
434          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
435          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
436        ENDIF        ENDIF
437        IF ( select_rStar.NE.0 .AND.        IF ( select_rStar.NE.0 .AND.
438       &        ( deepAtmosphere .OR.       &        ( deepAtmosphere .OR.
# Line 260  C--   Deep-Atmosphere & Anelastic limita Line 440  C--   Deep-Atmosphere & Anelastic limita
440          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
441       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',
442       &  ' not yet implemented with rStar'       &  ' not yet implemented with rStar'
443          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
444          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
       ENDIF  
       IF ( vectorInvariantMomentum .AND.  
      &        ( deepAtmosphere .OR.  
      &          usingZCoords.AND.rhoRefFile .NE. ' ' ) ) THEN  
         WRITE(msgBuf,'(A,A)')  
      &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',  
      &  ' not yet implemented in Vector-Invariant momentum code'  
         CALL PRINT_ERROR( msgBuf , myThid)  
         STOP 'ABNORMAL END: S/R CONFIG_CHECK'  
445        ENDIF        ENDIF
446    
447  C--   Free-surface related limitations:  C--   Free-surface related limitations:
448          IF ( cg2dUseMinResSol.LT.0 .OR. cg2dUseMinResSol.GT.1 ) THEN
449            WRITE(msgBuf,'(A,I10,A)')
450         &   'CONFIG_CHECK: cg2dUseMinResSol set to unvalid value(=',
451         &                  cg2dUseMinResSol, ')'
452            CALL PRINT_ERROR( msgBuf, myThid )
453            errCount = errCount + 1
454          ENDIF
455    
456        IF ( rigidLid .AND. implicitFreeSurface ) THEN        IF ( rigidLid .AND. implicitFreeSurface ) THEN
457          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
458       &  'CONFIG_CHECK: Cannot select both implicitFreeSurface',       &  'CONFIG_CHECK: Cannot select both implicitFreeSurface',
459       &  ' and rigidLid.'       &  ' and rigidLid.'
460          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
461          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
462        ENDIF        ENDIF
463    
464        IF (rigidLid .AND. exactConserv) THEN        IF (rigidLid .AND. exactConserv) THEN
465          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
466       &   'CONFIG_CHECK: exactConserv not compatible with'       &   'CONFIG_CHECK: exactConserv not compatible with'
467          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
468          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
469       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
470          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
471          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
472        ENDIF        ENDIF
473    
474        IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN        IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN
475          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
476       &   'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.'       &   'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.'
477          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
478          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
479       &   'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'       &   'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'
480          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
481          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
482        ENDIF        ENDIF
483    
484        IF (rigidLid .AND. useRealFreshWaterFlux) THEN        IF (rigidLid .AND. useRealFreshWaterFlux) THEN
485          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
486       &   'CONFIG_CHECK: useRealFreshWaterFlux not compatible with'       &   'CONFIG_CHECK: useRealFreshWaterFlux not compatible with'
487          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
488          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
489       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
490          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
491          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'  
492        ENDIF        ENDIF
493    
494        IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN        IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN
495          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
496       &   'CONFIG_CHECK: nonlinFreeSurf cannot be used'       &   'CONFIG_CHECK: nonlinFreeSurf cannot be used'
497          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
498          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
499       &   'CONFIG_CHECK: without exactConserv'       &   'CONFIG_CHECK: without exactConserv'
500          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
501          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
502        ENDIF        ENDIF
503    
504        IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN        IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN
505          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
506       &   'CONFIG_CHECK: r* Coordinate cannot be used'       &   'CONFIG_CHECK: r* Coordinate cannot be used'
507          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
508          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
509       &   'CONFIG_CHECK: without exactConserv'       &   'CONFIG_CHECK: without exactConserv'
510          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
511          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
512        ENDIF        ENDIF
513    
514  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
515  c     IF (select_rStar.GT.0 .AND. useOBCS ) THEN          WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: r* Coordinate',
516  c       STOP 'ABNORMAL END: S/R CONFIG_CHECK'       &   ' (select_rStar=', select_rStar, ' ) cannot be used'
517  c     ENDIF          CALL PRINT_ERROR( msgBuf, myThid )
518            WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: ',
519         &   ' with Linear FreeSurf (nonlinFreeSurf=', nonlinFreeSurf,' )'
520            CALL PRINT_ERROR( msgBuf, myThid )
521            errCount = errCount + 1
522          ENDIF
523          IF ( select_rStar.EQ.2 .AND. nonlinFreeSurf.NE.4 ) THEN
524    C-    not consistent to account for the slope of the coordinate when
525    C     ignoring the variations of level-thickness in PhiHyd calculation;
526    C     for now, issue a warning (but might change the code later on):
527            WRITE(msgBuf,'(2A,I3)') '** WARNING ** CONFIG_CHECK: ',
528         &   'select_rStar=2 not right with nonlinFreeSurf=', nonlinFreeSurf
529            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
530         &                      SQUEEZE_RIGHT, myThid )
531          ENDIF
532    
533  c     IF (nonlinFreeSurf.NE.0 .AND. nonHydrostatic) THEN        IF ( selectSigmaCoord.NE.0 ) THEN
534        IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN         IF ( fluidIsWater ) THEN
535          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
536       &   'CONFIG_CHECK: nonlinFreeSurf not yet implemented'       &   'CONFIG_CHECK: Sigma-Coords not yet coded for Oceanic set-up'
537          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
538            errCount = errCount + 1
539           ENDIF
540           IF ( nonlinFreeSurf.LE.0 ) THEN
541          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
542       &   'CONFIG_CHECK: in nonHydrostatic code'       &   'CONFIG_CHECK: Sigma-Coords not coded for Lin-FreeSurf'
543          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
544          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
545           ENDIF
546           IF (select_rStar.NE.0 ) THEN
547            WRITE(msgBuf,'(A)')
548         &   'CONFIG_CHECK: Sigma-Coords and rStar are not compatible'
549            CALL PRINT_ERROR( msgBuf, myThid )
550            errCount = errCount + 1
551           ENDIF
552            WRITE(msgBuf,'(A)')
553         &   'CONFIG_CHECK: Sigma-Coords code neither complete nor tested'
554            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
555         &                      SQUEEZE_RIGHT, myThid )
556        ENDIF        ENDIF
557    
558    C- note : not implemented in checkpoint48b but it is done now (since 01-28-03)
559    c     IF (select_rStar.GT.0 .AND. useOBCS ) THEN
560    c       STOP 'ABNORMAL END: S/R CONFIG_CHECK'
561    c     ENDIF
562    
563        IF ( nonlinFreeSurf.NE.0 .AND.        IF ( nonlinFreeSurf.NE.0 .AND.
564       &     deltaTfreesurf.NE.dTtracerLev(1) ) THEN       &     deltaTFreeSurf.NE.dTtracerLev(1) ) THEN
565          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
566       &   'CONFIG_CHECK: WARNING: nonlinFreeSurf might cause problems'       &                       'nonlinFreeSurf might cause problems'
567          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
568       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
569          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(2A)') '** WARNING ** ',
570       &   'CONFIG_CHECK: with different FreeSurf & Tracer time-steps'       &               'with different FreeSurf & Tracer time-steps'
571          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
572       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
573        ENDIF        ENDIF
574    
575        IF ( useRealFreshWaterFlux .AND. exactConserv        IF ( useRealFreshWaterFlux .AND. exactConserv
576       &     .AND. implicDiv2Dflow.EQ.0. _d 0       &     .AND. implicDiv2DFlow.EQ.0. _d 0
577       &     .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN       &     .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN
578          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
579       &   'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:'       &   'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:'
580          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
581          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
582       &   'CONFIG_CHECK: restart not implemented in this config'       &   'CONFIG_CHECK: restart not implemented in this config'
583          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
584          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
585        ENDIF        ENDIF
586    
587        IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv        IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv
588       &     .AND. implicDiv2Dflow.NE.1. ) THEN       &     .AND. implicDiv2DFlow.NE.1. ) THEN
589          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: **WARNNING** ',          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
590       &   'RealFreshWater & implicDiv2Dflow < 1'       &   'RealFreshWater & implicDiv2DFlow < 1'
591          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
592       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
593          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: works better',          WRITE(msgBuf,'(2A)') '** WARNING ** works better',
594       &   ' with exactConserv=.T. (+ #define EXACT_CONSERV)'       &   ' with exactConserv=.T. (+ #define EXACT_CONSERV)'
595          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
596       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
597        ENDIF        ENDIF
598    
599  #ifdef EXACT_CONSERV  #ifdef EXACT_CONSERV
# Line 400  c     IF (nonlinFreeSurf.NE.0 .AND. nonH Line 601  c     IF (nonlinFreeSurf.NE.0 .AND. nonH
601       &            .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN       &            .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN
602          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
603       &   'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP'       &   'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP'
604          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
605          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
606       &   'CONFIG_CHECK: requires exactConserv=T'       &   'CONFIG_CHECK: requires exactConserv=T'
607          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
608          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
609        ENDIF        ENDIF
610  #else  #else
611        IF (useRealFreshWaterFlux        IF (useRealFreshWaterFlux
612       &            .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN       &            .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN
613          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
614       &   'CONFIG_CHECK: E-P effects on wVel are not included'       &               'E-P effects on wVel are not included'
615          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
616       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
617          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
618       &   'CONFIG_CHECK: ==> use #define EXACT_CONSERV to fix it'       &               '==> use #define EXACT_CONSERV to fix it'
619          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
620       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
621        ENDIF        ENDIF
622  #endif /* EXACT_CONSERV */  #endif /* EXACT_CONSERV */
623    
624        IF ( selectAddFluid.LT.-1 .OR. selectAddFluid.GT.2 ) THEN        IF ( selectAddFluid.LT.-1 .OR. selectAddFluid.GT.2 ) THEN
625          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: selectAddFluid=',          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: selectAddFluid=',
626       &                             selectAddFluid, ' not allowed'       &                             selectAddFluid, ' not allowed'
627          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
628          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
629       &       'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)'       &       'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)'
630          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
631          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
632        ENDIF        ENDIF
633        IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN        IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN
634          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
635       &   'CONFIG_CHECK: selectAddFluid > 0 not compatible with'       &   'CONFIG_CHECK: selectAddFluid > 0 not compatible with'
636          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
637          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
638       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
639          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
640          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
641        ENDIF        ENDIF
642        IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN        IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN
643          WRITE(msgBuf,'(2A)') '**WARNNING** ',          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
644       &   'CONFIG_CHECK: synchronous time-stepping =>'       &   'synchronous time-stepping =>'
645          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
646       &                      SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
647          WRITE(msgBuf,'(2A)') '**WARNNING** ',          WRITE(msgBuf,'(2A)') '** WARNING ** ',
648       &   '1 time-step mismatch in AddFluid effects on T & S'       &   '1 time-step mismatch in AddFluid effects on T & S'
649          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
650       &                      SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
651          ENDIF
652    
653    C--   Pressure calculation and pressure gradient:
654    #ifndef INCLUDE_PHIHYD_CALCULATION_CODE
655          IF ( momPressureForcing .OR. storePhiHyd4Phys ) THEN
656            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
657         &   'missing code to calculate pressure (totPhiHyd)'
658            CALL PRINT_ERROR( msgBuf, myThid )
659            errCount = errCount + 1
660          ENDIF
661    #endif /* INCLUDE_PHIHYD_CALCULATION_CODE */
662          IF ( storePhiHyd4Phys .AND. .NOT.momStepping ) THEN
663            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
664         &   'storePhiHyd4Phys = TRUE but pressure is not computed'
665            CALL PRINT_ERROR( msgBuf, myThid )
666            errCount = errCount + 1
667          ENDIF
668    
669    C--   Non-hydrostatic and 3-D solver related limitations:
670          IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN
671            WRITE(msgBuf,'(A)')
672         &   'CONFIG_CHECK: nonlinFreeSurf not yet implemented'
673            CALL PRINT_ERROR( msgBuf, myThid )
674            WRITE(msgBuf,'(A)')
675         &   'CONFIG_CHECK: in nonHydrostatic code'
676            CALL PRINT_ERROR( msgBuf, myThid )
677            errCount = errCount + 1
678          ENDIF
679    
680          IF ( implicitNHPress*implicSurfPress*implicDiv2DFlow.NE.1.
681         &     .AND. implicitIntGravWave ) THEN
682            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: implicitIntGravWave',
683         &    ' NOT SAFE with non-fully implicit solver'
684            CALL PRINT_ERROR( msgBuf, myThid )
685            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: To by-pass this',
686         &    'STOP, comment this test and re-compile config_check'
687            CALL PRINT_ERROR( msgBuf, myThid )
688            errCount = errCount + 1
689          ENDIF
690          IF ( implicitNHPress*implicSurfPress*implicDiv2DFlow.EQ.0.
691         &     .AND. nonHydrostatic ) THEN
692            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
693         &   'Needs non-zero implicit factors (i.e., implicitNHPress,'
694            CALL PRINT_ERROR( msgBuf, myThid )
695            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
696         &   ' implicSurfPress & implicDiv2DFlow) to run nonHydrostatic'
697            CALL PRINT_ERROR( msgBuf, myThid )
698            errCount = errCount + 1
699          ENDIF
700          IF ( nonHydrostatic .AND. .NOT.exactConserv
701         &     .AND. implicDiv2DFlow.NE.1. ) THEN
702            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Needs exactConserv=T',
703         &               ' for nonHydrostatic with implicDiv2DFlow < 1'
704            CALL PRINT_ERROR( msgBuf, myThid )
705            errCount = errCount + 1
706          ENDIF
707          IF ( nonHydrostatic .AND.
708         &     implicitNHPress.NE.implicSurfPress ) THEN
709            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
710         &               ' nonHydrostatic might cause problems with'
711            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
712         &                      SQUEEZE_RIGHT, myThid )
713            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
714         &               'different implicitNHPress & implicSurfPress'
715            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
716         &                      SQUEEZE_RIGHT, myThid )
717          ENDIF
718    
719          IF ( implicitViscosity .AND. use3Dsolver ) THEN
720            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
721         &    'Implicit viscosity applies to provisional u,vVel'
722            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
723         &                      SQUEEZE_RIGHT, myThid )
724            WRITE(msgBuf,'(2A)') '** WARNING ** => not consistent with',
725         &    ' final vertical shear (after appling 3-D solver solution'
726            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
727         &                      SQUEEZE_RIGHT, myThid )
728          ENDIF
729          IF ( implicitViscosity .AND. nonHydrostatic ) THEN
730            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
731         &    'Implicit viscosity not implemented in CALC_GW'
732            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
733         &                      SQUEEZE_RIGHT, myThid )
734            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
735         &    'Explicit viscosity might become unstable if too large'
736            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
737         &                      SQUEEZE_RIGHT, myThid )
738        ENDIF        ENDIF
739    
740  C--   Momentum related limitations:  C--   Momentum related limitations:
# Line 454  C--   Momentum related limitations: Line 742  C--   Momentum related limitations:
742         IF ( highOrderVorticity.AND.upwindVorticity ) THEN         IF ( highOrderVorticity.AND.upwindVorticity ) THEN
743          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
744       &   '"highOrderVorticity" conflicts with "upwindVorticity"'       &   '"highOrderVorticity" conflicts with "upwindVorticity"'
745          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
746          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
747           ENDIF
748          ENDIF
749          IF ( .NOT.vectorInvariantMomentum .AND. momAdvection ) THEN
750           IF ( usingCurvilinearGrid ) THEN
751            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
752         &       'missing metric-terms for CurvilinearGrid'
753            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
754         &                      SQUEEZE_RIGHT, myThid )
755           ENDIF
756           IF ( hasWetCSCorners ) THEN
757            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momAdvection ',
758         &   'in flux-form is wrong on CubedSphere grid (corners)'
759            CALL PRINT_ERROR( msgBuf, myThid )
760            errCount = errCount + 1
761         ENDIF         ENDIF
762        ENDIF        ENDIF
763          IF ( selectCoriMap.LT.0 .OR. selectCoriMap.GT.3 ) THEN
764            WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ',
765         &       'Invalid option: selectCoriMap=', selectCoriMap
766            CALL PRINT_ERROR( msgBuf, myThid )
767            errCount = errCount + 1
768          ENDIF
769          IF ( selectBotDragQuadr.LT.-1 .OR. selectBotDragQuadr.GT.2 ) THEN
770            WRITE(msgBuf,'(2A,I8,A)') 'CONFIG_CHECK: ',
771         &       'selectBotDragQuadr=', selectBotDragQuadr,
772         &       ' not valid (-1,0,1,2)'
773            CALL PRINT_ERROR( msgBuf, myThid )
774            errCount = errCount + 1
775          ENDIF
776          IF ( useSmag3D .AND.
777         &    ( usingPCoords .OR. deepAtmosphere .OR. selectSigmaCoord.NE.0
778         &                   .OR. rhoRefFile.NE.' ' .OR. hasWetCSCorners )
779         &   ) THEN
780            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
781         &       'Smag-3D not yet implemented for this set-up'
782            CALL PRINT_ERROR( msgBuf, myThid )
783            errCount = errCount + 1
784          ENDIF
785    
786        IF (.NOT.useCDscheme .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN        IF ( momStepping .AND. .NOT.useCDscheme
787         &                 .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN
788  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),
789  C       put this WARNING to stress that even if CD-scheme parameters  C       put this WARNING to stress that even if CD-scheme parameters
790  C       (tauCD,rCD) are set, CD-scheme is not used without useCDscheme=T  C       (tauCD,rCD) are set, CD-scheme is not used without useCDscheme=T
791  C-    and STOP if using mom_fluxform (following Chris advise).  C-    and STOP if using mom_fluxform (following Chris advise).
792  C- jmc: but ultimately, this block can/will be removed.  C- jmc: but ultimately, this block can/will be removed.
793         IF (.NOT.vectorInvariantMomentum.AND.momStepping) THEN         IF ( vectorInvariantMomentum ) THEN
794            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
795         &   'CD-scheme is OFF but params(tauCD,rCD) are set'
796            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
797         &                      SQUEEZE_RIGHT, myThid )
798            WRITE(msgBuf,'(3A)') '** WARNING ** to turn ON CD-scheme:',
799         &   ' => "useCDscheme=.TRUE." in "data", namelist PARM01'
800            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
801         &                      SQUEEZE_RIGHT, myThid )
802           ELSE
803          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
804       &   'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set'       &   'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set'
805          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
806          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
807       &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',       &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',
808       &   ' in "data", namelist PARM01'       &   ' in "data", namelist PARM01'
809          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
810          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
811         ENDIF         ENDIF
         WRITE(msgBuf,'(2A)') '**WARNNING** ',  
      &   'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set'  
         CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,  
      &                    SQUEEZE_RIGHT , myThid)  
         WRITE(msgBuf,'(2A)')  
      &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',  
      &   ' in "data", namelist PARM01'  
         CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,  
      &                    SQUEEZE_RIGHT , myThid)  
812        ENDIF        ENDIF
813    
814        IF ( useCDscheme .AND. useCubedSphereExchange ) THEN        IF ( useCDscheme .AND. hasWetCSCorners ) THEN
815          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
816       &   'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'       &   'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'
817          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
818  cph        STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
819        ENDIF        ENDIF
820    
821  C--   Time-stepping limitations  C--   Time-stepping limitations
822          IF ( implicitIntGravWave .AND. staggerTimeStep ) THEN
823            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: staggerTimeStep',
824         &    ' incompatible with implicitIntGravWave'
825            CALL PRINT_ERROR( msgBuf, myThid )
826            errCount = errCount + 1
827          ENDIF
828        IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN        IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN
829          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=',          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=',
830       &                             momForcingOutAB, ' not allowed'       &                             momForcingOutAB, ' not allowed'
831          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
832          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',
833       &                       'should be =1 (Out of AB) or =0 (In AB)'       &                       'should be =1 (Out of AB) or =0 (In AB)'
834          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
835          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
836        ENDIF        ENDIF
837        IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN        IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN
838          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',
839       &                             tracForcingOutAB, ' not allowed'       &                             tracForcingOutAB, ' not allowed'
840          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
841          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',
842       &                       'should be =1 (Out of AB) or =0 (In AB)'       &                       'should be =1 (Out of AB) or =0 (In AB)'
843          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
844          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
845          ENDIF
846          IF ( implBottomFriction ) THEN
847            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: implBottomFriction',
848         &  ' not yet coded.'
849            CALL PRINT_ERROR( msgBuf, myThid )
850            errCount = errCount + 1
851        ENDIF        ENDIF
852    
853  C--   Grid limitations:  C--   Grid limitations:
# Line 519  C--   Grid limitations: Line 856  C--   Grid limitations:
856          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
857       &       'CONFIG_CHECK: specifying Euler angles makes only ',       &       'CONFIG_CHECK: specifying Euler angles makes only ',
858       &       'sense with usingSphericalGrid=.TRUE.'       &       'sense with usingSphericalGrid=.TRUE.'
859          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
860          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
861         ENDIF         ENDIF
862         IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN         IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN
863          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
864       &       'CONFIG_CHECK: specifying Euler angles will probably ',       &       'CONFIG_CHECK: specifying Euler angles will probably ',
865       &       'not work with pkgs FLT, ZONAL_FLT, ECCO'       &       'not work with pkgs FLT, ZONAL_FLT, ECCO'
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
 #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 */  
869        ENDIF        ENDIF
870    
871  C--   Packages conflict  C--   Packages conflict
872        IF ( useMATRIX .AND. useGCHEM ) THEN        IF ( useMATRIX .AND. useGCHEM ) THEN
873          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
874       &   'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'       &   'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'
875          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
876          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
877        ENDIF        ENDIF
878    
879        IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN        IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN
880          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
881       &       'CONFIG_CHECK: cannot set useMATRIX without ',       &       'CONFIG_CHECK: cannot set useMATRIX without ',
882       &       'setting usePTRACERS'       &       'setting usePTRACERS'
883          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
884          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          errCount = errCount + 1
885        ENDIF        ENDIF
886    
887        IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN        IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN
888          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
889       &       'CONFIG_CHECK: cannot set allowFreezing',       &       'CONFIG_CHECK: cannot set allowFreezing',
890       &       ' with pkgs SEAICE or THSICE'       &       ' with pkgs SEAICE or THSICE'
891          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
892            errCount = errCount + 1
893          ENDIF
894    
895          IF ( errCount.GE.1 ) THEN
896            WRITE(msgBuf,'(A,I3,A)')
897         &       'CONFIG_CHECK: detected', errCount,' fatal error(s)'
898            CALL PRINT_ERROR( msgBuf, myThid )
899            CALL ALL_PROC_DIE( 0 )
900          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
901        ENDIF        ENDIF
902          _END_MASTER(myThid)
903    
904        WRITE(msgBuf,'(A)')  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
905       &'// ======================================================='  
906        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        _BEGIN_MASTER(myThid)
      &                    SQUEEZE_RIGHT, myThid )  
907        WRITE(msgBuf,'(A)') '// CONFIG_CHECK : Normal End'        WRITE(msgBuf,'(A)') '// CONFIG_CHECK : Normal End'
908        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
909       &                    SQUEEZE_RIGHT, myThid )       &                    SQUEEZE_RIGHT, myThid )
# Line 576  C--   Packages conflict Line 914  C--   Packages conflict
914        WRITE(msgBuf,'(A)') ' '        WRITE(msgBuf,'(A)') ' '
915        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
916       &                    SQUEEZE_RIGHT, myThid )       &                    SQUEEZE_RIGHT, myThid )
917          _END_MASTER(myThid)
918    
919        RETURN        RETURN
920        END        END

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

  ViewVC Help
Powered by ViewVC 1.1.22