/[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.45 by mlosch, Fri Feb 8 07:57:44 2008 UTC revision 1.54 by jmc, Tue Mar 16 00:08:27 2010 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  CEOP  CEOP
40    
# Line 42  C-  check that CPP option is "defined" w Line 42  C-  check that CPP option is "defined" w
42    
43  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
44  C       code is being compiled  C       code is being compiled
45  #if !(defined ALLOW_3D_DIFFKR || \  #ifndef ALLOW_3D_DIFFKR
       (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL)))  
46        IF (diffKrFile.NE.' ') THEN        IF (diffKrFile.NE.' ') THEN
47          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
48       &  'CONFIG_CHECK: diffKrFile is set but never used.'       &  'CONFIG_CHECK: diffKrFile is set but never used.'
49          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
50          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
51       &  'Re-compile with:  #define ALLOW_3D_DIFFKR'       &  'Re-compile with:  #define ALLOW_3D_DIFFKR'
52          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
53          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
54        ENDIF        ENDIF
55  #endif  #endif
# Line 59  C       code is being compiled Line 58  C       code is being compiled
58        IF (use3Dsolver) THEN        IF (use3Dsolver) THEN
59          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
60       &   'CONFIG_CHECK: #undef ALLOW_NONHYDROSTATIC and'       &   'CONFIG_CHECK: #undef ALLOW_NONHYDROSTATIC and'
61          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
62         IF ( implicitIntGravWave ) WRITE(msgBuf,'(A)')         IF ( implicitIntGravWave ) WRITE(msgBuf,'(A)')
63       &   'CONFIG_CHECK: implicitIntGravWave is TRUE'       &   'CONFIG_CHECK: implicitIntGravWave is TRUE'
64         IF ( nonHydrostatic ) WRITE(msgBuf,'(A)')         IF ( nonHydrostatic ) WRITE(msgBuf,'(A)')
65       &   'CONFIG_CHECK: nonHydrostatic is TRUE'       &   'CONFIG_CHECK: nonHydrostatic is TRUE'
66          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
67          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
68        ENDIF        ENDIF
69  #endif  #endif
# Line 73  C       code is being compiled Line 72  C       code is being compiled
72        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
73          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
74       &   '#undef ALLOW_ADAMSBASHFORTH_3 but alph_AB,beta_AB'       &   '#undef ALLOW_ADAMSBASHFORTH_3 but alph_AB,beta_AB'
75          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
76          WRITE(msgBuf,'(A,1P2E20.7)')          WRITE(msgBuf,'(A,1P2E20.7)')
77       &   'CONFIG_CHECK: are set to:',alph_AB,beta_AB       &   'CONFIG_CHECK: are set to:',alph_AB,beta_AB
78          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
79          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
80        ENDIF        ENDIF
81  #endif  #endif
# Line 85  C       code is being compiled Line 84  C       code is being compiled
84        IF ( momImplVertAdv ) THEN        IF ( momImplVertAdv ) THEN
85          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
86       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
87          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
88          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
89       &   'CONFIG_CHECK: but momImplVertAdv is TRUE'       &   'CONFIG_CHECK: but momImplVertAdv is TRUE'
90          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
91          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
92        ENDIF        ENDIF
93        IF ( tempImplVertAdv ) THEN        IF ( tempImplVertAdv ) THEN
94          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
95       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
96          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
97          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
98       &   'CONFIG_CHECK: but tempImplVertAdv is TRUE'       &   'CONFIG_CHECK: but tempImplVertAdv is TRUE'
99          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
100          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
101        ENDIF        ENDIF
102        IF ( saltImplVertAdv ) THEN        IF ( saltImplVertAdv ) THEN
103          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
104       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
105          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
106          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
107       &   'CONFIG_CHECK: but saltImplVertAdv is TRUE'       &   'CONFIG_CHECK: but saltImplVertAdv is TRUE'
108          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
109          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
110        ENDIF        ENDIF
111        IF ( dTtracerLev(1).NE.dTtracerLev(Nr) .AND. implicitDiffusion        IF ( dTtracerLev(1).NE.dTtracerLev(Nr) .AND. implicitDiffusion
# Line 114  C       code is being compiled Line 113  C       code is being compiled
113       &   ) THEN       &   ) THEN
114          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
115       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'       &   'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE'
116          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
117          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
118       &   'but implicitDiffusion=T with non-uniform dTtracerLev'       &   'but implicitDiffusion=T with non-uniform dTtracerLev'
119          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
120          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
121        ENDIF        ENDIF
122  #endif  #endif
# Line 126  C       code is being compiled Line 125  C       code is being compiled
125        IF (exactConserv) THEN        IF (exactConserv) THEN
126          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
127       &   'CONFIG_CHECK: #undef EXACT_CONSERV and'       &   'CONFIG_CHECK: #undef EXACT_CONSERV and'
128          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
129          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
130       &   'CONFIG_CHECK: exactConserv is TRUE'       &   'CONFIG_CHECK: exactConserv is TRUE'
131          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
132          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
133        ENDIF        ENDIF
134  #endif  #endif
# Line 138  C       code is being compiled Line 137  C       code is being compiled
137        IF (nonlinFreeSurf.NE.0) THEN        IF (nonlinFreeSurf.NE.0) THEN
138          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
139       &   'CONFIG_CHECK: #undef NONLIN_FRSURF and'       &   'CONFIG_CHECK: #undef NONLIN_FRSURF and'
140          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
141          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
142       &   'CONFIG_CHECK: nonlinFreeSurf is non-zero'       &   'CONFIG_CHECK: nonlinFreeSurf is non-zero'
143          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
144          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
145        ENDIF        ENDIF
146  #endif  #endif
# Line 150  C       code is being compiled Line 149  C       code is being compiled
149        IF (select_rStar .NE. 0) THEN        IF (select_rStar .NE. 0) THEN
150          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
151       &   'CONFIG_CHECK: rStar is part of NonLin-FS '       &   'CONFIG_CHECK: rStar is part of NonLin-FS '
152          CALL PRINT_ERROR( msgBuf, myThid)          CALL PRINT_ERROR( msgBuf, myThid )
153          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
154       &   'CONFIG_CHECK: ==> use #define NONLIN_FRSURF to use it'       &   'CONFIG_CHECK: ==> use #define NONLIN_FRSURF to use it'
155          CALL PRINT_ERROR( msgBuf, myThid)          CALL PRINT_ERROR( msgBuf, myThid )
156          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
157        ENDIF        ENDIF
158  #endif /* NONLIN_FRSURF */  #endif /* NONLIN_FRSURF */
# Line 161  C       code is being compiled Line 160  C       code is being compiled
160  #ifdef USE_NATURAL_BCS  #ifdef USE_NATURAL_BCS
161          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
162       &   'CONFIG_CHECK: USE_NATURAL_BCS option has been replaced'       &   'CONFIG_CHECK: USE_NATURAL_BCS option has been replaced'
163          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
164          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
165       &   'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file'       &   'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file'
166          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
167          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
168  #endif  #endif
169    
170    #ifndef ALLOW_ADDFLUID
171          IF ( selectAddFluid.NE.0 ) THEN
172            WRITE(msgBuf,'(A)')
173         &   'CONFIG_CHECK: #undef ALLOW_ADDFLUID and'
174            CALL PRINT_ERROR( msgBuf, myThid )
175            WRITE(msgBuf,'(A,I4,A)') 'CONFIG_CHECK: selectAddFluid=',
176         &                           selectAddFluid, ' is not zero'
177            CALL PRINT_ERROR( msgBuf, myThid )
178            STOP 'ABNORMAL END: S/R CONFIG_CHECK'
179          ENDIF
180    #endif /* ALLOW_ADDFLUID */
181    
182  C     o If pLoadFile is set, then we should make sure the corresponing  C     o If pLoadFile is set, then we should make sure the corresponing
183  C       code is being compiled  C       code is being compiled
184  #ifndef ATMOSPHERIC_LOADING  #ifndef ATMOSPHERIC_LOADING
185        IF (pLoadFile.NE.' ') THEN        IF (pLoadFile.NE.' ') THEN
186          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
187       &  'CONFIG_CHECK: pLoadFile is set but you have not'       &  'CONFIG_CHECK: pLoadFile is set but you have not'
188          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
189          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
190       &  'compiled the model with the pressure loading code.'       &  'compiled the model with the pressure loading code.'
191          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
192          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
193       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'
194          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
195          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
196        ENDIF        ENDIF
197        IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN        IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN
198          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
199       &  'CONFIG_CHECK: sIceLoad is computed but'       &  'CONFIG_CHECK: sIceLoad is computed but'
200          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
201          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
202       &  'pressure loading code is not compiled.'       &  'pressure loading code is not compiled.'
203          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
204          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
205       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'       &  'Re-compile with:  #define ATMOSPHERIC_LOADING'
206          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
207          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
208        ENDIF        ENDIF
209  #endif  #endif
# Line 202  C       code is being compiled Line 213  C       code is being compiled
213          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
214       &  'CONFIG_CHECK: balanceEmPmR/Qnet is set but balance code ',       &  'CONFIG_CHECK: balanceEmPmR/Qnet is set but balance code ',
215       &  'is not compiled.'       &  'is not compiled.'
216          CALL PRINT_ERROR( msgBuf , 1)          CALL PRINT_ERROR( msgBuf, myThid )
217          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
218       &  'Re-compile with  ALLOW_BALANCE_FLUXES defined'       &  'Re-compile with  ALLOW_BALANCE_FLUXES defined'
219          CALL PRINT_ERROR( msgBuf , 1)          CALL PRINT_ERROR( msgBuf, myThid )
220          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
221        ENDIF        ENDIF
222  #endif  #endif
223    
224    #ifndef ALLOW_SRCG
225          IF (useSRCGSolver) THEN
226            WRITE(msgBuf,'(A,A)')
227         &  'CONFIG_CHECK: useSRCGSolver = .TRUE., but single reduction ',
228         &  'code is not compiled.'
229            CALL PRINT_ERROR( msgBuf, myThid )
230            WRITE(msgBuf,'(A)')
231         &  'CONFIG_CHECK: Re-compile with ALLOW_SRCG defined'
232            CALL PRINT_ERROR( msgBuf, myThid )
233            STOP 'ABNORMAL END: S/R CONFIG_CHECK'
234          ENDIF
235    #endif /* ALLOW_SRCG */
236    
237  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
238    
239  C-  check parameter consistency :  C--   Check parameter consistency :
240    
241        IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND.        IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND.
242       &     ( viscC4leithD.NE.0.  .OR. viscC4leith.NE.0.       &     ( viscC4leithD.NE.0.  .OR. viscC4leith.NE.0.
# Line 221  C-  check parameter consistency : Line 245  C-  check parameter consistency :
245          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
246       &  'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with',       &  'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with',
247       &  ' overlap (Olx,Oly) smaller than 3'       &  ' overlap (Olx,Oly) smaller than 3'
248          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
249          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
250        ENDIF        ENDIF
251        IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND.        IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND.
# Line 230  C-  check parameter consistency : Line 254  C-  check parameter consistency :
254          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
255       &  'CONFIG_CHECK: cannot use Leith Visc.(div.part) with',       &  'CONFIG_CHECK: cannot use Leith Visc.(div.part) with',
256       &  ' overlap (Olx,Oly) smaller than 3'       &  ' overlap (Olx,Oly) smaller than 3'
257          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
258          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
259        ENDIF        ENDIF
260    
261  C-    Deep-Atmosphere & Anelastic limitations:  C--   Deep-Atmosphere & Anelastic limitations:
262        IF ( deepAtmosphere .AND.        IF ( deepAtmosphere .AND.
263       &     useRealFreshWaterFlux .AND. usingPCoords ) THEN       &     useRealFreshWaterFlux .AND. usingPCoords ) THEN
264          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
265       &  'CONFIG_CHECK: Deep-Atmosphere not yet implemented with',       &  'CONFIG_CHECK: Deep-Atmosphere not yet implemented with',
266       &  ' real-Fresh-Water option in P-coordinate'       &  ' real-Fresh-Water option in P-coordinate'
267          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
268          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
269        ENDIF        ENDIF
270        IF ( select_rStar.NE.0 .AND.        IF ( select_rStar.NE.0 .AND.
# Line 249  C-    Deep-Atmosphere & Anelastic limita Line 273  C-    Deep-Atmosphere & Anelastic limita
273          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
274       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',
275       &  ' not yet implemented with rStar'       &  ' not yet implemented with rStar'
276          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
277          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
278        ENDIF        ENDIF
279        IF ( vectorInvariantMomentum .AND.        IF ( vectorInvariantMomentum .AND.
# Line 258  C-    Deep-Atmosphere & Anelastic limita Line 282  C-    Deep-Atmosphere & Anelastic limita
282          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
283       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',       &  'CONFIG_CHECK: Deep-Atmosphere or Anelastic',
284       &  ' not yet implemented in Vector-Invariant momentum code'       &  ' not yet implemented in Vector-Invariant momentum code'
285          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
286          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
287        ENDIF        ENDIF
288    
289    C--   Free-surface related limitations:
290        IF ( rigidLid .AND. implicitFreeSurface ) THEN        IF ( rigidLid .AND. implicitFreeSurface ) THEN
291          WRITE(msgBuf,'(A,A)')          WRITE(msgBuf,'(A,A)')
292       &  'CONFIG_CHECK: Cannot select both implicitFreeSurface',       &  'CONFIG_CHECK: Cannot select both implicitFreeSurface',
293       &  ' and rigidLid.'       &  ' and rigidLid.'
294          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
295          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
296        ENDIF        ENDIF
297    
298        IF (rigidLid .AND. exactConserv) THEN        IF (rigidLid .AND. exactConserv) THEN
299          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
300       &   'CONFIG_CHECK: exactConserv not compatible with'       &   'CONFIG_CHECK: exactConserv not compatible with'
301          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
302          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
303       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
304          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
305          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
306        ENDIF        ENDIF
307    
308        IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN        IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN
309          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
310       &   'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.'       &   'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.'
311          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
312          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
313       &   'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'       &   'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.'
314          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
315          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
316        ENDIF        ENDIF
317    
318        IF (rigidLid .AND. useRealFreshWaterFlux) THEN        IF (rigidLid .AND. useRealFreshWaterFlux) THEN
319          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
320       &   'CONFIG_CHECK: useRealFreshWaterFlux not compatible with'       &   'CONFIG_CHECK: useRealFreshWaterFlux not compatible with'
321          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
322          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
323       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
324          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
         STOP 'ABNORMAL END: S/R CONFIG_CHECK'  
       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)  
325          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
326        ENDIF        ENDIF
327    
328        IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN        IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN
329          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
330       &   'CONFIG_CHECK: nonlinFreeSurf cannot be used'       &   'CONFIG_CHECK: nonlinFreeSurf cannot be used'
331          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
332          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
333       &   'CONFIG_CHECK: without exactConserv'       &   'CONFIG_CHECK: without exactConserv'
334          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
335          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
336        ENDIF        ENDIF
337    
338        IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN        IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN
339          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
340       &   'CONFIG_CHECK: r* Coordinate cannot be used'       &   'CONFIG_CHECK: r* Coordinate cannot be used'
341          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
342          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
343       &   'CONFIG_CHECK: without exactConserv'       &   'CONFIG_CHECK: without exactConserv'
344          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
345          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
346        ENDIF        ENDIF
347    
348  C- note : not implemented in checkpoint48b but it's done now (since 01-28-03)  C- note : not implemented in checkpoint48b but it is done now (since 01-28-03)
349  c     IF (select_rStar.GT.0 .AND. useOBCS ) THEN  c     IF (select_rStar.GT.0 .AND. useOBCS ) THEN
 c       WRITE(msgBuf,'(A)')  
 c    &   'CONFIG_CHECK: r* Coordinate not yet implemented'  
 c       CALL PRINT_ERROR( msgBuf , 1)  
 c       WRITE(msgBuf,'(A)')  
 c    &   'CONFIG_CHECK: in OBC package'  
 c       CALL PRINT_ERROR( msgBuf , 1)  
350  c       STOP 'ABNORMAL END: S/R CONFIG_CHECK'  c       STOP 'ABNORMAL END: S/R CONFIG_CHECK'
351  c     ENDIF  c     ENDIF
352    
 c     IF (nonlinFreeSurf.NE.0 .AND. nonHydrostatic) THEN  
       IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN  
         WRITE(msgBuf,'(A)')  
      &   'CONFIG_CHECK: nonlinFreeSurf not yet implemented'  
         CALL PRINT_ERROR( msgBuf , myThid)  
         WRITE(msgBuf,'(A)')  
      &   'CONFIG_CHECK: in nonHydrostatic code'  
         CALL PRINT_ERROR( msgBuf , myThid)  
         STOP 'ABNORMAL END: S/R CONFIG_CHECK'  
       ENDIF  
   
353        IF ( nonlinFreeSurf.NE.0 .AND.        IF ( nonlinFreeSurf.NE.0 .AND.
354       &     deltaTfreesurf.NE.dTtracerLev(1) ) THEN       &     deltaTfreesurf.NE.dTtracerLev(1) ) THEN
355          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
356       &   'CONFIG_CHECK: WARNING: nonlinFreeSurf might cause problems'       &                       'nonlinFreeSurf might cause problems'
357          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
358       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
359          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(2A)') '** WARNING ** ',
360       &   'CONFIG_CHECK: with different FreeSurf & Tracer time-steps'       &               'with different FreeSurf & Tracer time-steps'
361          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
362       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
363        ENDIF        ENDIF
364    
365        IF ( useRealFreshWaterFlux .AND. exactConserv        IF ( useRealFreshWaterFlux .AND. exactConserv
366       &     .AND. implicDiv2DFlow.EQ.0. _d 0       &     .AND. implicDiv2Dflow.EQ.0. _d 0
367       &     .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN       &     .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN
368          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
369       &   'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:'       &   'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:'
370          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
371          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
372       &   'CONFIG_CHECK: restart not implemented in this config'       &   'CONFIG_CHECK: restart not implemented in this config'
373          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
374          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
375        ENDIF        ENDIF
376    
377        IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv        IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv
378       &     .AND. implicDiv2DFlow.NE.1. ) THEN       &     .AND. implicDiv2Dflow.NE.1. ) THEN
379          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: **WARNNING** ',          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
380       &   'RealFreshWater & implicDiv2DFlow < 1'       &   'RealFreshWater & implicDiv2Dflow < 1'
381          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
382       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
383          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: works better',          WRITE(msgBuf,'(2A)') '** WARNING ** works better',
384       &   ' with exactConserv=.T. (+ #define EXACT_CONSERV)'       &   ' with exactConserv=.T. (+ #define EXACT_CONSERV)'
385          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
386       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
387        ENDIF        ENDIF
388    
389  #ifdef EXACT_CONSERV  #ifdef EXACT_CONSERV
# Line 394  c     IF (nonlinFreeSurf.NE.0 .AND. nonH Line 391  c     IF (nonlinFreeSurf.NE.0 .AND. nonH
391       &            .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN       &            .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN
392          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
393       &   'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP'       &   'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP'
394          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
395          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
396       &   'CONFIG_CHECK: requires exactConserv=T'       &   'CONFIG_CHECK: requires exactConserv=T'
397          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
398          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
399        ENDIF        ENDIF
400  #else  #else
401        IF (useRealFreshWaterFlux        IF (useRealFreshWaterFlux
402       &            .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN       &            .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN
403            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
404         &               'E-P effects on wVel are not included'
405            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
406         &                      SQUEEZE_RIGHT, myThid )
407            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
408         &               '==> use #define EXACT_CONSERV to fix it'
409            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
410         &                      SQUEEZE_RIGHT, myThid )
411          ENDIF
412    #endif /* EXACT_CONSERV */
413    
414          IF ( selectAddFluid.LT.-1 .OR. selectAddFluid.GT.2 ) THEN
415            WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: selectAddFluid=',
416         &                             selectAddFluid, ' not allowed'
417            CALL PRINT_ERROR( msgBuf, myThid )
418            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
419         &       'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)'
420            CALL PRINT_ERROR( msgBuf, myThid )
421            STOP 'ABNORMAL END: S/R CONFIG_CHECK'
422          ENDIF
423          IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN
424            WRITE(msgBuf,'(A)')
425         &   'CONFIG_CHECK: selectAddFluid > 0 not compatible with'
426            CALL PRINT_ERROR( msgBuf, myThid )
427          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
428       &   'CONFIG_CHECK: E-P effects on wVel are not included'       &   'CONFIG_CHECK: rigidLid (meaningless in that case)'
429            CALL PRINT_ERROR( msgBuf, myThid )
430            STOP 'ABNORMAL END: S/R CONFIG_CHECK'
431          ENDIF
432          IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN
433            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
434         &   'synchronous time-stepping =>'
435          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
436       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
437            WRITE(msgBuf,'(2A)') '** WARNING ** ',
438         &   '1 time-step mismatch in AddFluid effects on T & S'
439            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
440         &                      SQUEEZE_RIGHT, myThid )
441          ENDIF
442    
443    C--   Non-hydrostatic and 3-D solver related limitations:
444          IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN
445            WRITE(msgBuf,'(A)')
446         &   'CONFIG_CHECK: nonlinFreeSurf not yet implemented'
447            CALL PRINT_ERROR( msgBuf, myThid )
448          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
449       &   'CONFIG_CHECK: ==> use #define EXACT_CONSERV to fix it'       &   'CONFIG_CHECK: in nonHydrostatic code'
450            CALL PRINT_ERROR( msgBuf, myThid )
451            STOP 'ABNORMAL END: S/R CONFIG_CHECK'
452          ENDIF
453    
454          IF ( implicitNHPress*implicSurfPress*implicDiv2Dflow.NE.1.
455         &     .AND. implicitIntGravWave ) THEN
456            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: implicitIntGravWave',
457         &    ' NOT SAFE with non-fully implicit solver'
458            CALL PRINT_ERROR( msgBuf, myThid )
459            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: To by-pass this',
460         &    'STOP, comment this test and re-compile config_check'
461            CALL PRINT_ERROR( msgBuf, myThid )
462            STOP 'ABNORMAL END: S/R CONFIG_CHECK'
463          ENDIF
464          IF ( nonHydrostatic .AND. .NOT.exactConserv
465         &     .AND. implicDiv2Dflow.NE.1. ) THEN
466            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Needs exactConserv=T',
467         &               ' for nonHydrostatic with implicDiv2Dflow < 1'
468            CALL PRINT_ERROR( msgBuf, myThid )
469            STOP 'ABNORMAL END: S/R CONFIG_CHECK'
470          ENDIF
471          IF ( nonHydrostatic .AND.
472         &     implicitNHPress.NE.implicSurfPress ) THEN
473            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
474         &               ' nonHydrostatic might cause problems with'
475          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
476       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
477            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
478         &               'different implicitNHPress & implicSurfPress'
479            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
480         &                      SQUEEZE_RIGHT, myThid )
481          ENDIF
482    
483          IF ( implicitViscosity .AND. use3Dsolver ) THEN
484            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
485         &    'Implicit viscosity applies to provisional u,vVel'
486            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
487         &                      SQUEEZE_RIGHT, myThid )
488            WRITE(msgBuf,'(2A)') '** WARNING ** => not consistent with',
489         &    'final vertical shear (after appling 3-D solver solution'
490            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
491         &                      SQUEEZE_RIGHT, myThid )
492          ENDIF
493          IF ( implicitViscosity .AND. nonHydrostatic ) THEN
494            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
495         &    'Implicit viscosity not implemented in CALC_GW'
496            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
497         &                      SQUEEZE_RIGHT, myThid )
498            WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
499         &    'Explicit viscosity might become unstable if too large'
500            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
501         &                      SQUEEZE_RIGHT, myThid )
502          ENDIF
503    
504    C--   Momentum related limitations:
505          IF ( vectorInvariantMomentum.AND.momStepping ) THEN
506           IF ( highOrderVorticity.AND.upwindVorticity ) THEN
507            WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ',
508         &   '"highOrderVorticity" conflicts with "upwindVorticity"'
509            CALL PRINT_ERROR( msgBuf, myThid )
510            STOP 'ABNORMAL END: S/R CONFIG_CHECK'
511           ENDIF
512        ENDIF        ENDIF
 #endif /* EXACT_CONSERV */  
513    
514        IF (.NOT.useCDscheme .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN        IF (.NOT.useCDscheme .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN
515  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 423  C- jmc: but ultimately, this block can/w Line 520  C- jmc: but ultimately, this block can/w
520         IF (.NOT.vectorInvariantMomentum.AND.momStepping) THEN         IF (.NOT.vectorInvariantMomentum.AND.momStepping) THEN
521          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(A)')
522       &   'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set'       &   'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set'
523          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
524          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
525       &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',       &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',
526       &   ' in "data", namelist PARM01'       &   ' in "data", namelist PARM01'
527          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
528          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
529         ENDIF         ENDIF
530          WRITE(msgBuf,'(2A)') '**WARNNING** ',          WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ',
531       &   'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set'       &   'CD-scheme is OFF but params(tauCD,rCD) are set'
532          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
533       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
534          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(3A)') '** WARNING ** ',
535       &   'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."',       &   'to turn ON CD-scheme: => "useCDscheme=.TRUE."',
536       &   ' in "data", namelist PARM01'       &   ' in "data", namelist PARM01'
537            WRITE(msgBuf,'(3A)') '** WARNING ** to turn ON CD-scheme:',
538         &   ' => "useCDscheme=.TRUE." in "data", namelist PARM01'
539          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
540       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
541        ENDIF        ENDIF
542    
543        IF ( useCDscheme .AND. useCubedSphereExchange ) THEN        IF ( useCDscheme .AND. useCubedSphereExchange ) THEN
544          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
545       &   'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'       &   'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid'
546          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
547          STOP 'ABNORMAL END: S/R CONFIG_CHECK'  cph        STOP 'ABNORMAL END: S/R CONFIG_CHECK'
548        ENDIF        ENDIF
549    
550    C--   Time-stepping limitations
551        IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN        IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN
552          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=',          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=',
553       &                             momForcingOutAB, ' not allowed'       &                             momForcingOutAB, ' not allowed'
554          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
555          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ',
556       &                       'should be =1 (Out of AB) or =0 (In AB)'       &                       'should be =1 (Out of AB) or =0 (In AB)'
557          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
558          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
559        ENDIF        ENDIF
560        IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN        IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN
561          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',          WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=',
562       &                             tracForcingOutAB, ' not allowed'       &                             tracForcingOutAB, ' not allowed'
563          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
564          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',          WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ',
565       &                       'should be =1 (Out of AB) or =0 (In AB)'       &                       'should be =1 (Out of AB) or =0 (In AB)'
566          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
         STOP 'ABNORMAL END: S/R CONFIG_CHECK'  
       ENDIF  
   
       IF ( useMATRIX .AND. useGCHEM ) THEN  
         WRITE(msgBuf,'(2A)')  
      &   'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'  
         CALL PRINT_ERROR( msgBuf , myThid)  
         STOP 'ABNORMAL END: S/R CONFIG_CHECK'  
       ENDIF  
   
       IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN  
         WRITE(msgBuf,'(2A)')  
      &       'CONFIG_CHECK: cannot set useMATRIX without ',  
      &       'setting usePTRACERS'  
         CALL PRINT_ERROR( msgBuf , myThid)  
567          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
568        ENDIF        ENDIF
569    
570    C--   Grid limitations:
571        IF ( rotateGrid ) THEN        IF ( rotateGrid ) THEN
572         IF ( .NOT. usingSphericalPolarGrid ) THEN         IF ( .NOT. usingSphericalPolarGrid ) THEN
573          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
574       &       'CONFIG_CHECK: specifying Euler angles makes only ',       &       'CONFIG_CHECK: specifying Euler angles makes only ',
575       &       'sense with usingSphericalGrid=.TRUE.'       &       'sense with usingSphericalGrid=.TRUE.'
576          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
577          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
578         ENDIF         ENDIF
579         IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN         IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN
580          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
581       &       'CONFIG_CHECK: specifying Euler angles will probably ',       &       'CONFIG_CHECK: specifying Euler angles will probably ',
582       &       'not work with pkgs FLT, ZONAL_FLT, ECCO'       &       'not work with pkgs FLT, ZONAL_FLT, ECCO'
583          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
         STOP 'ABNORMAL END: S/R CONFIG_CHECK'  
        ENDIF  
        IF ( use3dCoriolis ) THEN  
         WRITE(msgBuf,'(3A)')  
      &       'CONFIG_CHECK: computation of angleCosC and angleSinC ',  
      &       'as required by use3dCoriolis ',  
      &       'not yet implemented with rotated grid. Sorry!'  
         CALL PRINT_ERROR( msgBuf , myThid)  
584          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
585         ENDIF         ENDIF
586  #ifdef ALLOW_PROFILES  #ifdef ALLOW_PROFILES
587          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)')
588       &       'CONFIG_CHECK: specifying Euler angles will probably ',       &       'CONFIG_CHECK: specifying Euler angles will probably ',
589       &       'not work with pkg profiles'       &       'not work with pkg profiles'
590          CALL PRINT_ERROR( msgBuf , myThid)          CALL PRINT_ERROR( msgBuf, myThid )
591          STOP 'ABNORMAL END: S/R CONFIG_CHECK'          STOP 'ABNORMAL END: S/R CONFIG_CHECK'
592  #endif /* ALLOW_PROFILES */  #endif /* ALLOW_PROFILES */
593        ENDIF        ENDIF
594    
595        WRITE(msgBuf,'(A)') 'CONFIG_CHECK: OK'  C--   Packages conflict
596        CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,        IF ( useMATRIX .AND. useGCHEM ) THEN
597       &                   SQUEEZE_RIGHT,myThid)          WRITE(msgBuf,'(2A)')
598         &   'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM'
599            CALL PRINT_ERROR( msgBuf, myThid )
600            STOP 'ABNORMAL END: S/R CONFIG_CHECK'
601          ENDIF
602    
603          IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN
604            WRITE(msgBuf,'(2A)')
605         &       'CONFIG_CHECK: cannot set useMATRIX without ',
606         &       'setting usePTRACERS'
607            CALL PRINT_ERROR( msgBuf, myThid )
608            STOP 'ABNORMAL END: S/R CONFIG_CHECK'
609          ENDIF
610    
611          IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN
612            WRITE(msgBuf,'(2A)')
613         &       'CONFIG_CHECK: cannot set allowFreezing',
614         &       ' with pkgs SEAICE or THSICE'
615            CALL PRINT_ERROR( msgBuf, myThid )
616            STOP 'ABNORMAL END: S/R CONFIG_CHECK'
617          ENDIF
618    
619          WRITE(msgBuf,'(A)')
620         &'// ======================================================='
621          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
622         &                    SQUEEZE_RIGHT, myThid )
623          WRITE(msgBuf,'(A)') '// CONFIG_CHECK : Normal End'
624          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
625         &                    SQUEEZE_RIGHT, myThid )
626          WRITE(msgBuf,'(A)')
627         &'// ======================================================='
628          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
629         &                    SQUEEZE_RIGHT, myThid )
630          WRITE(msgBuf,'(A)') ' '
631          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
632         &                    SQUEEZE_RIGHT, myThid )
633    
634        RETURN        RETURN
635        END        END

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.54

  ViewVC Help
Powered by ViewVC 1.1.22