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