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 |
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 === |
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 |
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
ENDIF |
412 |
|
#endif /* ndef DISCONNECTED_TILES */ |
413 |
|
|
414 |
C-- Deep-Atmosphere & Anelastic limitations: |
C-- Deep-Atmosphere & Anelastic limitations: |
415 |
IF ( deepAtmosphere .AND. |
IF ( deepAtmosphere .AND. |
417 |
WRITE(msgBuf,'(A,A)') |
WRITE(msgBuf,'(A,A)') |
418 |
& 'CONFIG_CHECK: Deep-Atmosphere not yet implemented with', |
& 'CONFIG_CHECK: Deep-Atmosphere not yet implemented with', |
419 |
& ' real-Fresh-Water option in P-coordinate' |
& ' real-Fresh-Water option in P-coordinate' |
420 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
421 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
422 |
ENDIF |
ENDIF |
423 |
IF ( select_rStar.NE.0 .AND. |
IF ( select_rStar.NE.0 .AND. |
424 |
& ( deepAtmosphere .OR. |
& ( deepAtmosphere .OR. |
426 |
WRITE(msgBuf,'(A,A)') |
WRITE(msgBuf,'(A,A)') |
427 |
& 'CONFIG_CHECK: Deep-Atmosphere or Anelastic', |
& 'CONFIG_CHECK: Deep-Atmosphere or Anelastic', |
428 |
& ' not yet implemented with rStar' |
& ' not yet implemented with rStar' |
429 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
430 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
431 |
ENDIF |
ENDIF |
432 |
IF ( vectorInvariantMomentum .AND. |
IF ( vectorInvariantMomentum .AND. |
433 |
& ( deepAtmosphere .OR. |
& ( deepAtmosphere .OR. |
435 |
WRITE(msgBuf,'(A,A)') |
WRITE(msgBuf,'(A,A)') |
436 |
& 'CONFIG_CHECK: Deep-Atmosphere or Anelastic', |
& 'CONFIG_CHECK: Deep-Atmosphere or Anelastic', |
437 |
& ' not yet implemented in Vector-Invariant momentum code' |
& ' not yet implemented in Vector-Invariant momentum code' |
438 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
439 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
440 |
ENDIF |
ENDIF |
441 |
|
|
442 |
C-- Free-surface related limitations: |
C-- Free-surface related limitations: |
443 |
|
IF ( cg2dUseMinResSol.LT.0 .OR. cg2dUseMinResSol.GT.1 ) THEN |
444 |
|
WRITE(msgBuf,'(A,I10,A)') |
445 |
|
& 'CONFIG_CHECK: cg2dUseMinResSol set to unvalid value(=', |
446 |
|
& cg2dUseMinResSol, ')' |
447 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
448 |
|
errCount = errCount + 1 |
449 |
|
ENDIF |
450 |
|
|
451 |
IF ( rigidLid .AND. implicitFreeSurface ) THEN |
IF ( rigidLid .AND. implicitFreeSurface ) THEN |
452 |
WRITE(msgBuf,'(A,A)') |
WRITE(msgBuf,'(A,A)') |
453 |
& 'CONFIG_CHECK: Cannot select both implicitFreeSurface', |
& 'CONFIG_CHECK: Cannot select both implicitFreeSurface', |
454 |
& ' and rigidLid.' |
& ' and rigidLid.' |
455 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
456 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
457 |
ENDIF |
ENDIF |
458 |
|
|
459 |
IF (rigidLid .AND. exactConserv) THEN |
IF (rigidLid .AND. exactConserv) THEN |
460 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
461 |
& 'CONFIG_CHECK: exactConserv not compatible with' |
& 'CONFIG_CHECK: exactConserv not compatible with' |
462 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
463 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
464 |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
465 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
466 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
467 |
ENDIF |
ENDIF |
468 |
|
|
469 |
IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN |
IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN |
470 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
471 |
& 'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.' |
& 'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.' |
472 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
473 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
474 |
& 'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.' |
& 'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.' |
475 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
476 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
477 |
ENDIF |
ENDIF |
478 |
|
|
479 |
IF (rigidLid .AND. useRealFreshWaterFlux) THEN |
IF (rigidLid .AND. useRealFreshWaterFlux) THEN |
480 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
481 |
& 'CONFIG_CHECK: useRealFreshWaterFlux not compatible with' |
& 'CONFIG_CHECK: useRealFreshWaterFlux not compatible with' |
482 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
483 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
484 |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
485 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
486 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
|
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' |
|
487 |
ENDIF |
ENDIF |
488 |
|
|
489 |
IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN |
IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN |
490 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
491 |
& 'CONFIG_CHECK: nonlinFreeSurf cannot be used' |
& 'CONFIG_CHECK: nonlinFreeSurf cannot be used' |
492 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
493 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
494 |
& 'CONFIG_CHECK: without exactConserv' |
& 'CONFIG_CHECK: without exactConserv' |
495 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
496 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
497 |
ENDIF |
ENDIF |
498 |
|
|
499 |
IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN |
IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN |
500 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
501 |
& 'CONFIG_CHECK: r* Coordinate cannot be used' |
& 'CONFIG_CHECK: r* Coordinate cannot be used' |
502 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
503 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
504 |
& 'CONFIG_CHECK: without exactConserv' |
& 'CONFIG_CHECK: without exactConserv' |
505 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
506 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
507 |
ENDIF |
ENDIF |
508 |
|
|
509 |
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 |
510 |
c IF (select_rStar.GT.0 .AND. useOBCS ) THEN |
WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: r* Coordinate', |
511 |
c STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
& ' (select_rStar=', select_rStar, ' ) cannot be used' |
512 |
c ENDIF |
CALL PRINT_ERROR( msgBuf, myThid ) |
513 |
|
WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: ', |
514 |
|
& ' with Linear FreeSurf (nonlinFreeSurf=', nonlinFreeSurf,' )' |
515 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
516 |
|
errCount = errCount + 1 |
517 |
|
ENDIF |
518 |
|
IF ( select_rStar.EQ.2 .AND. nonlinFreeSurf.NE.4 ) THEN |
519 |
|
C- not consistent to account for the slope of the coordinate when |
520 |
|
C ignoring the variations of level-thickness in PhiHyd calculation; |
521 |
|
C for now, issue a warning (but might change the code later on): |
522 |
|
WRITE(msgBuf,'(2A,I3)') '** WARNING ** CONFIG_CHECK: ', |
523 |
|
& 'select_rStar=2 not right with nonlinFreeSurf=', nonlinFreeSurf |
524 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
525 |
|
& SQUEEZE_RIGHT, myThid ) |
526 |
|
ENDIF |
527 |
|
|
528 |
c IF (nonlinFreeSurf.NE.0 .AND. nonHydrostatic) THEN |
IF ( selectSigmaCoord.NE.0 ) THEN |
529 |
IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN |
IF ( fluidIsWater ) THEN |
530 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
531 |
& 'CONFIG_CHECK: nonlinFreeSurf not yet implemented' |
& 'CONFIG_CHECK: Sigma-Coords not yet coded for Oceanic set-up' |
532 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
533 |
|
errCount = errCount + 1 |
534 |
|
ENDIF |
535 |
|
IF ( nonlinFreeSurf.LE.0 ) THEN |
536 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
537 |
& 'CONFIG_CHECK: in nonHydrostatic code' |
& 'CONFIG_CHECK: Sigma-Coords not coded for Lin-FreeSurf' |
538 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
539 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
540 |
|
ENDIF |
541 |
|
IF (select_rStar.NE.0 ) THEN |
542 |
|
WRITE(msgBuf,'(A)') |
543 |
|
& 'CONFIG_CHECK: Sigma-Coords and rStar are not compatible' |
544 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
545 |
|
errCount = errCount + 1 |
546 |
|
ENDIF |
547 |
|
WRITE(msgBuf,'(A)') |
548 |
|
& 'CONFIG_CHECK: Sigma-Coords code neither complete nor tested' |
549 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
550 |
|
& SQUEEZE_RIGHT, myThid ) |
551 |
ENDIF |
ENDIF |
552 |
|
|
553 |
|
C- note : not implemented in checkpoint48b but it is done now (since 01-28-03) |
554 |
|
c IF (select_rStar.GT.0 .AND. useOBCS ) THEN |
555 |
|
c STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
556 |
|
c ENDIF |
557 |
|
|
558 |
IF ( nonlinFreeSurf.NE.0 .AND. |
IF ( nonlinFreeSurf.NE.0 .AND. |
559 |
& deltaTfreesurf.NE.dTtracerLev(1) ) THEN |
& deltaTFreeSurf.NE.dTtracerLev(1) ) THEN |
560 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
561 |
& 'CONFIG_CHECK: WARNING: nonlinFreeSurf might cause problems' |
& 'nonlinFreeSurf might cause problems' |
562 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
563 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
564 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(2A)') '** WARNING ** ', |
565 |
& 'CONFIG_CHECK: with different FreeSurf & Tracer time-steps' |
& 'with different FreeSurf & Tracer time-steps' |
566 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
567 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
568 |
ENDIF |
ENDIF |
569 |
|
|
570 |
IF ( useRealFreshWaterFlux .AND. exactConserv |
IF ( useRealFreshWaterFlux .AND. exactConserv |
572 |
& .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN |
& .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN |
573 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
574 |
& 'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:' |
& 'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:' |
575 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
576 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
577 |
& 'CONFIG_CHECK: restart not implemented in this config' |
& 'CONFIG_CHECK: restart not implemented in this config' |
578 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
579 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
580 |
ENDIF |
ENDIF |
581 |
|
|
582 |
IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv |
IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv |
583 |
& .AND. implicDiv2Dflow.NE.1. ) THEN |
& .AND. implicDiv2Dflow.NE.1. ) THEN |
584 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: **WARNNING** ', |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
585 |
& 'RealFreshWater & implicDiv2Dflow < 1' |
& 'RealFreshWater & implicDiv2Dflow < 1' |
586 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
587 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
588 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: works better', |
WRITE(msgBuf,'(2A)') '** WARNING ** works better', |
589 |
& ' with exactConserv=.T. (+ #define EXACT_CONSERV)' |
& ' with exactConserv=.T. (+ #define EXACT_CONSERV)' |
590 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
591 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
592 |
ENDIF |
ENDIF |
593 |
|
|
594 |
#ifdef EXACT_CONSERV |
#ifdef EXACT_CONSERV |
596 |
& .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN |
& .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN |
597 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
598 |
& 'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP' |
& 'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP' |
599 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
600 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
601 |
& 'CONFIG_CHECK: requires exactConserv=T' |
& 'CONFIG_CHECK: requires exactConserv=T' |
602 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
603 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
604 |
ENDIF |
ENDIF |
605 |
#else |
#else |
606 |
IF (useRealFreshWaterFlux |
IF (useRealFreshWaterFlux |
607 |
& .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN |
& .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN |
608 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
609 |
& 'CONFIG_CHECK: E-P effects on wVel are not included' |
& 'E-P effects on wVel are not included' |
610 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
611 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
612 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
613 |
& 'CONFIG_CHECK: ==> use #define EXACT_CONSERV to fix it' |
& '==> use #define EXACT_CONSERV to fix it' |
614 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
615 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
616 |
ENDIF |
ENDIF |
617 |
#endif /* EXACT_CONSERV */ |
#endif /* EXACT_CONSERV */ |
618 |
|
|
619 |
IF ( selectAddFluid.LT.-1 .OR. selectAddFluid.GT.2 ) THEN |
IF ( selectAddFluid.LT.-1 .OR. selectAddFluid.GT.2 ) THEN |
620 |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: selectAddFluid=', |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: selectAddFluid=', |
621 |
& selectAddFluid, ' not allowed' |
& selectAddFluid, ' not allowed' |
622 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
623 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
624 |
& 'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)' |
& 'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)' |
625 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
626 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
627 |
ENDIF |
ENDIF |
628 |
IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN |
IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN |
629 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
630 |
& 'CONFIG_CHECK: selectAddFluid > 0 not compatible with' |
& 'CONFIG_CHECK: selectAddFluid > 0 not compatible with' |
631 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
632 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
633 |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
634 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
635 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
636 |
ENDIF |
ENDIF |
637 |
IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN |
IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN |
638 |
WRITE(msgBuf,'(2A)') '**WARNNING** ', |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
639 |
& 'CONFIG_CHECK: synchronous time-stepping =>' |
& 'synchronous time-stepping =>' |
640 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
641 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
642 |
WRITE(msgBuf,'(2A)') '**WARNNING** ', |
WRITE(msgBuf,'(2A)') '** WARNING ** ', |
643 |
& '1 time-step mismatch in AddFluid effects on T & S' |
& '1 time-step mismatch in AddFluid effects on T & S' |
644 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
645 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
646 |
|
ENDIF |
647 |
|
|
648 |
|
C-- Pressure calculation and pressure gradient: |
649 |
|
#ifndef INCLUDE_PHIHYD_CALCULATION_CODE |
650 |
|
IF ( momPressureForcing .OR. useDynP_inEos_Zc ) THEN |
651 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
652 |
|
& 'missing code to calculate pressure (totPhiHyd)' |
653 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
654 |
|
errCount = errCount + 1 |
655 |
|
ENDIF |
656 |
|
#endif /* INCLUDE_PHIHYD_CALCULATION_CODE */ |
657 |
|
IF ( useDynP_inEos_Zc .AND. .NOT.momStepping ) THEN |
658 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
659 |
|
& 'useDynP_inEos_Zc = TRUE but pressure is not computed' |
660 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
661 |
|
errCount = errCount + 1 |
662 |
|
ENDIF |
663 |
|
|
664 |
|
C-- Non-hydrostatic and 3-D solver related limitations: |
665 |
|
IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN |
666 |
|
WRITE(msgBuf,'(A)') |
667 |
|
& 'CONFIG_CHECK: nonlinFreeSurf not yet implemented' |
668 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
669 |
|
WRITE(msgBuf,'(A)') |
670 |
|
& 'CONFIG_CHECK: in nonHydrostatic code' |
671 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
672 |
|
errCount = errCount + 1 |
673 |
|
ENDIF |
674 |
|
|
675 |
|
IF ( implicitNHPress*implicSurfPress*implicDiv2Dflow.NE.1. |
676 |
|
& .AND. implicitIntGravWave ) THEN |
677 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: implicitIntGravWave', |
678 |
|
& ' NOT SAFE with non-fully implicit solver' |
679 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
680 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: To by-pass this', |
681 |
|
& 'STOP, comment this test and re-compile config_check' |
682 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
683 |
|
errCount = errCount + 1 |
684 |
|
ENDIF |
685 |
|
IF ( nonHydrostatic .AND. .NOT.exactConserv |
686 |
|
& .AND. implicDiv2Dflow.NE.1. ) THEN |
687 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Needs exactConserv=T', |
688 |
|
& ' for nonHydrostatic with implicDiv2Dflow < 1' |
689 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
690 |
|
errCount = errCount + 1 |
691 |
|
ENDIF |
692 |
|
IF ( nonHydrostatic .AND. |
693 |
|
& implicitNHPress.NE.implicSurfPress ) THEN |
694 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
695 |
|
& ' nonHydrostatic might cause problems with' |
696 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
697 |
|
& SQUEEZE_RIGHT, myThid ) |
698 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
699 |
|
& 'different implicitNHPress & implicSurfPress' |
700 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
701 |
|
& SQUEEZE_RIGHT, myThid ) |
702 |
|
ENDIF |
703 |
|
|
704 |
|
IF ( implicitViscosity .AND. use3Dsolver ) THEN |
705 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
706 |
|
& 'Implicit viscosity applies to provisional u,vVel' |
707 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
708 |
|
& SQUEEZE_RIGHT, myThid ) |
709 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** => not consistent with', |
710 |
|
& 'final vertical shear (after appling 3-D solver solution' |
711 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
712 |
|
& SQUEEZE_RIGHT, myThid ) |
713 |
|
ENDIF |
714 |
|
IF ( implicitViscosity .AND. nonHydrostatic ) THEN |
715 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
716 |
|
& 'Implicit viscosity not implemented in CALC_GW' |
717 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
718 |
|
& SQUEEZE_RIGHT, myThid ) |
719 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
720 |
|
& 'Explicit viscosity might become unstable if too large' |
721 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
722 |
|
& SQUEEZE_RIGHT, myThid ) |
723 |
ENDIF |
ENDIF |
724 |
|
|
725 |
C-- Momentum related limitations: |
C-- Momentum related limitations: |
727 |
IF ( highOrderVorticity.AND.upwindVorticity ) THEN |
IF ( highOrderVorticity.AND.upwindVorticity ) THEN |
728 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
729 |
& '"highOrderVorticity" conflicts with "upwindVorticity"' |
& '"highOrderVorticity" conflicts with "upwindVorticity"' |
730 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
731 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
732 |
|
ENDIF |
733 |
|
ENDIF |
734 |
|
IF ( .NOT.vectorInvariantMomentum .AND. momAdvection ) THEN |
735 |
|
IF ( usingCurvilinearGrid ) THEN |
736 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
737 |
|
& 'missing metric-terms for CurvilinearGrid' |
738 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
739 |
|
& SQUEEZE_RIGHT, myThid ) |
740 |
ENDIF |
ENDIF |
741 |
|
IF ( hasWetCSCorners ) THEN |
742 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momAdvection ', |
743 |
|
& 'in flux-form is wrong on CubedSphere grid (corners)' |
744 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
745 |
|
errCount = errCount + 1 |
746 |
|
ENDIF |
747 |
|
ENDIF |
748 |
|
IF ( selectCoriMap.LT.0 .OR. selectCoriMap.GT.3 ) THEN |
749 |
|
WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ', |
750 |
|
& 'Invalid option: selectCoriMap=', selectCoriMap |
751 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
752 |
|
errCount = errCount + 1 |
753 |
|
ENDIF |
754 |
|
IF ( selectBotDragQuadr.LT.-1 .OR. selectBotDragQuadr.GT.2 ) THEN |
755 |
|
WRITE(msgBuf,'(2A,I8,A)') 'CONFIG_CHECK: ', |
756 |
|
& 'selectBotDragQuadr=', selectBotDragQuadr, |
757 |
|
& ' not valid (-1,0,1,2)' |
758 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
759 |
|
errCount = errCount + 1 |
760 |
|
ENDIF |
761 |
|
IF ( useSmag3D .AND. |
762 |
|
& ( usingPCoords .OR. deepAtmosphere .OR. selectSigmaCoord.NE.0 |
763 |
|
& .OR. rhoRefFile.NE.' ' .OR. hasWetCSCorners ) |
764 |
|
& ) THEN |
765 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
766 |
|
& 'Smag-3D not yet implemented for this set-up' |
767 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
768 |
|
errCount = errCount + 1 |
769 |
ENDIF |
ENDIF |
770 |
|
|
771 |
IF (.NOT.useCDscheme .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN |
IF (.NOT.useCDscheme .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN |
777 |
IF (.NOT.vectorInvariantMomentum.AND.momStepping) THEN |
IF (.NOT.vectorInvariantMomentum.AND.momStepping) THEN |
778 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
779 |
& 'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set' |
& 'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set' |
780 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
781 |
WRITE(msgBuf,'(2A)') |
WRITE(msgBuf,'(2A)') |
782 |
& 'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."', |
& 'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."', |
783 |
& ' in "data", namelist PARM01' |
& ' in "data", namelist PARM01' |
784 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
785 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
786 |
ENDIF |
ENDIF |
787 |
WRITE(msgBuf,'(2A)') '**WARNNING** ', |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
788 |
& 'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set' |
& 'CD-scheme is OFF but params(tauCD,rCD) are set' |
789 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
790 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
791 |
WRITE(msgBuf,'(2A)') |
WRITE(msgBuf,'(3A)') '** WARNING ** to turn ON CD-scheme:', |
792 |
& 'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."', |
& ' => "useCDscheme=.TRUE." in "data", namelist PARM01' |
|
& ' in "data", namelist PARM01' |
|
793 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
794 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
795 |
ENDIF |
ENDIF |
796 |
|
|
797 |
IF ( useCDscheme .AND. useCubedSphereExchange ) THEN |
IF ( useCDscheme .AND. hasWetCSCorners ) THEN |
798 |
WRITE(msgBuf,'(2A)') |
WRITE(msgBuf,'(2A)') |
799 |
& 'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid' |
& 'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid' |
800 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
801 |
cph STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
802 |
ENDIF |
ENDIF |
803 |
|
|
804 |
C-- Time-stepping limitations |
C-- Time-stepping limitations |
805 |
|
IF ( implicitIntGravWave .AND. staggerTimeStep ) THEN |
806 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: staggerTimeStep', |
807 |
|
& ' incompatible with implicitIntGravWave' |
808 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
809 |
|
errCount = errCount + 1 |
810 |
|
ENDIF |
811 |
IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN |
IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN |
812 |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=', |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=', |
813 |
& momForcingOutAB, ' not allowed' |
& momForcingOutAB, ' not allowed' |
814 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
815 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ', |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ', |
816 |
& 'should be =1 (Out of AB) or =0 (In AB)' |
& 'should be =1 (Out of AB) or =0 (In AB)' |
817 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
818 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
819 |
ENDIF |
ENDIF |
820 |
IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN |
IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN |
821 |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=', |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=', |
822 |
& tracForcingOutAB, ' not allowed' |
& tracForcingOutAB, ' not allowed' |
823 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
824 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ', |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ', |
825 |
& 'should be =1 (Out of AB) or =0 (In AB)' |
& 'should be =1 (Out of AB) or =0 (In AB)' |
826 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
827 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
828 |
|
ENDIF |
829 |
|
IF ( implBottomFriction ) THEN |
830 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: implBottomFriction', |
831 |
|
& ' not yet coded.' |
832 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
833 |
|
errCount = errCount + 1 |
834 |
ENDIF |
ENDIF |
835 |
|
|
836 |
C-- Grid limitations: |
C-- Grid limitations: |
839 |
WRITE(msgBuf,'(2A)') |
WRITE(msgBuf,'(2A)') |
840 |
& 'CONFIG_CHECK: specifying Euler angles makes only ', |
& 'CONFIG_CHECK: specifying Euler angles makes only ', |
841 |
& 'sense with usingSphericalGrid=.TRUE.' |
& 'sense with usingSphericalGrid=.TRUE.' |
842 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
843 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
844 |
ENDIF |
ENDIF |
845 |
IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN |
IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN |
846 |
WRITE(msgBuf,'(2A)') |
WRITE(msgBuf,'(2A)') |
847 |
& 'CONFIG_CHECK: specifying Euler angles will probably ', |
& 'CONFIG_CHECK: specifying Euler angles will probably ', |
848 |
& 'not work with pkgs FLT, ZONAL_FLT, ECCO' |
& 'not work with pkgs FLT, ZONAL_FLT, ECCO' |
849 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
850 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
851 |
ENDIF |
ENDIF |
|
#ifdef ALLOW_PROFILES |
|
|
WRITE(msgBuf,'(2A)') |
|
|
& 'CONFIG_CHECK: specifying Euler angles will probably ', |
|
|
& 'not work with pkg profiles' |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
|
|
#endif /* ALLOW_PROFILES */ |
|
852 |
ENDIF |
ENDIF |
853 |
|
|
854 |
C-- Packages conflict |
C-- Packages conflict |
855 |
IF ( useMATRIX .AND. useGCHEM ) THEN |
IF ( useMATRIX .AND. useGCHEM ) THEN |
856 |
WRITE(msgBuf,'(2A)') |
WRITE(msgBuf,'(2A)') |
857 |
& 'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM' |
& 'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM' |
858 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
859 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
860 |
ENDIF |
ENDIF |
861 |
|
|
862 |
IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN |
IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN |
863 |
WRITE(msgBuf,'(2A)') |
WRITE(msgBuf,'(2A)') |
864 |
& 'CONFIG_CHECK: cannot set useMATRIX without ', |
& 'CONFIG_CHECK: cannot set useMATRIX without ', |
865 |
& 'setting usePTRACERS' |
& 'setting usePTRACERS' |
866 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
867 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
868 |
ENDIF |
ENDIF |
869 |
|
|
870 |
IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN |
IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN |
871 |
WRITE(msgBuf,'(2A)') |
WRITE(msgBuf,'(2A)') |
872 |
& 'CONFIG_CHECK: cannot set allowFreezing', |
& 'CONFIG_CHECK: cannot set allowFreezing', |
873 |
& ' with pkgs SEAICE or THSICE' |
& ' with pkgs SEAICE or THSICE' |
874 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
875 |
|
errCount = errCount + 1 |
876 |
|
ENDIF |
877 |
|
|
878 |
|
IF ( errCount.GE.1 ) THEN |
879 |
|
WRITE(msgBuf,'(A,I3,A)') |
880 |
|
& 'CONFIG_CHECK: detected', errCount,' fatal error(s)' |
881 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
882 |
|
CALL ALL_PROC_DIE( 0 ) |
883 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
884 |
ENDIF |
ENDIF |
885 |
|
_END_MASTER(myThid) |
886 |
|
|
887 |
WRITE(msgBuf,'(A)') |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
888 |
&'// =======================================================' |
|
889 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
_BEGIN_MASTER(myThid) |
|
& SQUEEZE_RIGHT, myThid ) |
|
890 |
WRITE(msgBuf,'(A)') '// CONFIG_CHECK : Normal End' |
WRITE(msgBuf,'(A)') '// CONFIG_CHECK : Normal End' |
891 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
892 |
& SQUEEZE_RIGHT, myThid ) |
& SQUEEZE_RIGHT, myThid ) |
897 |
WRITE(msgBuf,'(A)') ' ' |
WRITE(msgBuf,'(A)') ' ' |
898 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
899 |
& SQUEEZE_RIGHT, myThid ) |
& SQUEEZE_RIGHT, myThid ) |
900 |
|
_END_MASTER(myThid) |
901 |
|
|
902 |
RETURN |
RETURN |
903 |
END |
END |