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 |
62 |
C code is being compiled |
C code is being compiled |
63 |
#if !(defined ALLOW_3D_DIFFKR || \ |
#ifndef ALLOW_3D_DIFFKR |
|
(defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL))) |
|
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 |
|
#ifdef EXCLUDE_PCELL_MIX_CODE |
76 |
|
IF ( interDiffKr_pCell .OR. interViscAr_pCell |
77 |
|
& .OR. pCellMix_select.NE.0 ) THEN |
78 |
|
IF ( interDiffKr_pCell ) THEN |
79 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
80 |
|
& 'Cannot use interDiffKr_pCell=.TRUE.' |
81 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
82 |
|
ENDIF |
83 |
|
IF ( interViscAr_pCell ) THEN |
84 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
85 |
|
& 'Cannot use interViscAr_pCell=.TRUE.' |
86 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
87 |
|
ENDIF |
88 |
|
IF ( pCellMix_select.NE.0 ) THEN |
89 |
|
WRITE(msgBuf,'(2A,I6)') 'CONFIG_CHECK: ', |
90 |
|
& 'Cannot use pCellMix_select=', pCellMix_select |
91 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
92 |
|
ENDIF |
93 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: when compiled ', |
94 |
|
& 'with "#define EXCLUDE_PCELL_MIX_CODE" in CPP_OPTIONS.h' |
95 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
96 |
|
errCount = errCount + 1 |
97 |
|
ENDIF |
98 |
|
#endif |
99 |
|
|
100 |
|
#ifndef ALLOW_SMAG_3D |
101 |
|
IF ( useSmag3D ) THEN |
102 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
103 |
|
& 'Cannot set useSmag3D=TRUE when compiled with' |
104 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
105 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
106 |
|
& '"#undef ALLOW_SMAG_3D" in MOM_COMMON_OPTIONS.h' |
107 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
108 |
|
errCount = errCount + 1 |
109 |
ENDIF |
ENDIF |
110 |
#endif |
#endif |
111 |
|
|
113 |
IF (use3Dsolver) THEN |
IF (use3Dsolver) THEN |
114 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
115 |
& 'CONFIG_CHECK: #undef ALLOW_NONHYDROSTATIC and' |
& 'CONFIG_CHECK: #undef ALLOW_NONHYDROSTATIC and' |
116 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
117 |
IF ( implicitIntGravWave ) WRITE(msgBuf,'(A)') |
IF ( implicitIntGravWave ) WRITE(msgBuf,'(A)') |
118 |
& 'CONFIG_CHECK: implicitIntGravWave is TRUE' |
& 'CONFIG_CHECK: implicitIntGravWave is TRUE' |
119 |
IF ( nonHydrostatic ) WRITE(msgBuf,'(A)') |
IF ( nonHydrostatic ) WRITE(msgBuf,'(A)') |
120 |
& 'CONFIG_CHECK: nonHydrostatic is TRUE' |
& 'CONFIG_CHECK: nonHydrostatic is TRUE' |
121 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
122 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
123 |
ENDIF |
ENDIF |
124 |
#endif |
#endif |
125 |
|
|
127 |
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 |
128 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
129 |
& '#undef ALLOW_ADAMSBASHFORTH_3 but alph_AB,beta_AB' |
& '#undef ALLOW_ADAMSBASHFORTH_3 but alph_AB,beta_AB' |
130 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
131 |
WRITE(msgBuf,'(A,1P2E20.7)') |
WRITE(msgBuf,'(A,1P2E20.7)') |
132 |
& 'CONFIG_CHECK: are set to:',alph_AB,beta_AB |
& 'CONFIG_CHECK: are set to:',alph_AB,beta_AB |
133 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
134 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
135 |
ENDIF |
ENDIF |
136 |
#endif |
#endif |
137 |
|
|
139 |
IF ( momImplVertAdv ) THEN |
IF ( momImplVertAdv ) THEN |
140 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
141 |
& 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE' |
& 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE' |
142 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
143 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
144 |
& 'CONFIG_CHECK: but momImplVertAdv is TRUE' |
& 'CONFIG_CHECK: but momImplVertAdv is TRUE' |
145 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
146 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
147 |
ENDIF |
ENDIF |
148 |
IF ( tempImplVertAdv ) THEN |
IF ( tempImplVertAdv ) THEN |
149 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
150 |
& 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE' |
& 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE' |
151 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
152 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
153 |
& 'CONFIG_CHECK: but tempImplVertAdv is TRUE' |
& 'CONFIG_CHECK: but tempImplVertAdv is TRUE' |
154 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
155 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
156 |
ENDIF |
ENDIF |
157 |
IF ( saltImplVertAdv ) THEN |
IF ( saltImplVertAdv ) THEN |
158 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
159 |
& 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE' |
& 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE' |
160 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
161 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
162 |
& 'CONFIG_CHECK: but saltImplVertAdv is TRUE' |
& 'CONFIG_CHECK: but saltImplVertAdv is TRUE' |
163 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
164 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
165 |
ENDIF |
ENDIF |
166 |
IF ( dTtracerLev(1).NE.dTtracerLev(Nr) .AND. implicitDiffusion |
IF ( dTtracerLev(1).NE.dTtracerLev(Nr) .AND. implicitDiffusion |
167 |
& .AND. ( saltStepping .OR. tempStepping .OR. usePTRACERS ) |
& .AND. ( saltStepping .OR. tempStepping .OR. usePTRACERS ) |
168 |
& ) THEN |
& ) THEN |
169 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
170 |
& 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE' |
& 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE' |
171 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
172 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
173 |
& 'but implicitDiffusion=T with non-uniform dTtracerLev' |
& 'but implicitDiffusion=T with non-uniform dTtracerLev' |
174 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
175 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
176 |
|
ENDIF |
177 |
|
IF ( selectImplicitDrag.GT.0 ) THEN |
178 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
179 |
|
& 'Needs to compile with #define INCLUDE_IMPLVERTADV_CODE' |
180 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
181 |
|
WRITE(msgBuf,'(A)') |
182 |
|
& 'CONFIG_CHECK: to use selectImplicitDrag > 0 ==> STOP here' |
183 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
184 |
|
errCount = errCount + 1 |
185 |
|
ENDIF |
186 |
|
#endif |
187 |
|
|
188 |
|
#ifndef ALLOW_SOLVE4_PS_AND_DRAG |
189 |
|
IF ( selectImplicitDrag.EQ.2 ) THEN |
190 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
191 |
|
& 'Needs to compile with #define ALLOW_SOLVE4_PS_AND_DRAG' |
192 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
193 |
|
WRITE(msgBuf,'(A)') |
194 |
|
& 'CONFIG_CHECK: to use selectImplicitDrag = 2 ==> STOP here' |
195 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
196 |
|
errCount = errCount + 1 |
197 |
|
ENDIF |
198 |
|
#endif |
199 |
|
|
200 |
|
#ifdef ALLOW_AUTODIFF |
201 |
|
IF ( momImplVertAdv ) THEN |
202 |
|
WRITE(msgBuf,'(A)') |
203 |
|
& 'CONFIG_CHECK: momImplVertAdv is not yet' |
204 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
205 |
|
WRITE(msgBuf,'(A)') |
206 |
|
& 'CONFIG_CHECK: supported in adjoint mode' |
207 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
208 |
|
errCount = errCount + 1 |
209 |
|
ENDIF |
210 |
|
IF ( selectImplicitDrag.GT.0 ) THEN |
211 |
|
WRITE(msgBuf,'(A)') |
212 |
|
& 'CONFIG_CHECK: selectImplicitDrag is not yet' |
213 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
214 |
|
WRITE(msgBuf,'(A)') |
215 |
|
& 'CONFIG_CHECK: supported in adjoint mode' |
216 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
217 |
|
errCount = errCount + 1 |
218 |
|
ENDIF |
219 |
|
#endif |
220 |
|
|
221 |
|
#ifdef ALLOW_DEPTH_CONTROL |
222 |
|
IF ( useOBCS ) THEN |
223 |
|
WRITE(msgBuf,'(A)') |
224 |
|
& 'CONFIG_CHECK: DEPTH_CONTROL code not compatible with OBCS' |
225 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
226 |
|
errCount = errCount + 1 |
227 |
ENDIF |
ENDIF |
228 |
#endif |
#endif |
229 |
|
|
231 |
IF (exactConserv) THEN |
IF (exactConserv) THEN |
232 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
233 |
& 'CONFIG_CHECK: #undef EXACT_CONSERV and' |
& 'CONFIG_CHECK: #undef EXACT_CONSERV and' |
234 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
235 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
236 |
& 'CONFIG_CHECK: exactConserv is TRUE' |
& 'CONFIG_CHECK: exactConserv is TRUE' |
237 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
238 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
239 |
ENDIF |
ENDIF |
240 |
#endif |
#endif |
241 |
|
|
243 |
IF (nonlinFreeSurf.NE.0) THEN |
IF (nonlinFreeSurf.NE.0) THEN |
244 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
245 |
& 'CONFIG_CHECK: #undef NONLIN_FRSURF and' |
& 'CONFIG_CHECK: #undef NONLIN_FRSURF and' |
246 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
247 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
248 |
& 'CONFIG_CHECK: nonlinFreeSurf is non-zero' |
& 'CONFIG_CHECK: nonlinFreeSurf is non-zero' |
249 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
250 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
251 |
ENDIF |
ENDIF |
252 |
#endif |
#endif |
253 |
|
|
255 |
IF (select_rStar .NE. 0) THEN |
IF (select_rStar .NE. 0) THEN |
256 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
257 |
& 'CONFIG_CHECK: rStar is part of NonLin-FS ' |
& 'CONFIG_CHECK: rStar is part of NonLin-FS ' |
258 |
CALL PRINT_ERROR( msgBuf, myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
259 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
260 |
& 'CONFIG_CHECK: ==> use #define NONLIN_FRSURF to use it' |
& 'CONFIG_CHECK: ==> set #define NONLIN_FRSURF to use it' |
261 |
CALL PRINT_ERROR( msgBuf, myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
262 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
263 |
ENDIF |
ENDIF |
264 |
#endif /* NONLIN_FRSURF */ |
#endif /* NONLIN_FRSURF */ |
265 |
|
|
266 |
|
#ifdef DISABLE_RSTAR_CODE |
267 |
|
IF ( select_rStar.NE.0 ) THEN |
268 |
|
WRITE(msgBuf,'(A)') |
269 |
|
& 'CONFIG_CHECK: rStar code disable (DISABLE_RSTAR_CODE defined)' |
270 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
271 |
|
WRITE(msgBuf,'(A)') |
272 |
|
& 'CONFIG_CHECK: ==> set #undef DISABLE_RSTAR_CODE to use it' |
273 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
274 |
|
errCount = errCount + 1 |
275 |
|
ENDIF |
276 |
|
#endif /* DISABLE_RSTAR_CODE */ |
277 |
|
|
278 |
|
#ifdef DISABLE_SIGMA_CODE |
279 |
|
IF ( selectSigmaCoord.NE.0 ) THEN |
280 |
|
WRITE(msgBuf,'(A)') |
281 |
|
& 'CONFIG_CHECK: Sigma code disable (DISABLE_SIGMA_CODE defined)' |
282 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
283 |
|
WRITE(msgBuf,'(A)') |
284 |
|
& 'CONFIG_CHECK: ==> set #undef DISABLE_SIGMA_CODE to use it' |
285 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
286 |
|
errCount = errCount + 1 |
287 |
|
ENDIF |
288 |
|
#endif /* DISABLE_SIGMA_CODE */ |
289 |
|
|
290 |
#ifdef USE_NATURAL_BCS |
#ifdef USE_NATURAL_BCS |
291 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
292 |
& 'CONFIG_CHECK: USE_NATURAL_BCS option has been replaced' |
& 'CONFIG_CHECK: USE_NATURAL_BCS option has been replaced' |
293 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
294 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
295 |
& 'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file' |
& 'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file' |
296 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
297 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
298 |
#endif |
#endif |
299 |
|
|
300 |
|
#ifndef ALLOW_ADDFLUID |
301 |
|
IF ( selectAddFluid.NE.0 ) THEN |
302 |
|
WRITE(msgBuf,'(A)') |
303 |
|
& 'CONFIG_CHECK: #undef ALLOW_ADDFLUID (CPP_OPTIONS.h) and' |
304 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
305 |
|
WRITE(msgBuf,'(A,I4,A)') 'CONFIG_CHECK: selectAddFluid=', |
306 |
|
& selectAddFluid, ' is not zero' |
307 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
308 |
|
errCount = errCount + 1 |
309 |
|
ENDIF |
310 |
|
#endif /* ALLOW_ADDFLUID */ |
311 |
|
|
312 |
C o If pLoadFile is set, then we should make sure the corresponing |
C o If pLoadFile is set, then we should make sure the corresponing |
313 |
C code is being compiled |
C code is being compiled |
314 |
#ifndef ATMOSPHERIC_LOADING |
#ifndef ATMOSPHERIC_LOADING |
315 |
IF (pLoadFile.NE.' ') THEN |
IF (pLoadFile.NE.' ') THEN |
316 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
317 |
& 'CONFIG_CHECK: pLoadFile is set but you have not' |
& 'CONFIG_CHECK: pLoadFile is set but you have not' |
318 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
319 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
320 |
& 'compiled the model with the pressure loading code.' |
& ' compiled the model with the pressure loading code.' |
321 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
322 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
323 |
& 'Re-compile with: #define ATMOSPHERIC_LOADING' |
& ' Re-compile with: "#define ATMOSPHERIC_LOADING"' |
324 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
325 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
326 |
ENDIF |
ENDIF |
327 |
IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN |
IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN |
328 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
329 |
& 'CONFIG_CHECK: sIceLoad is computed but' |
& 'CONFIG_CHECK: sIceLoad is computed but' |
330 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
331 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
332 |
& 'pressure loading code is not compiled.' |
& ' pressure loading code is not compiled.' |
333 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
334 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
335 |
& 'Re-compile with: #define ATMOSPHERIC_LOADING' |
& ' Re-compile with: "#define ATMOSPHERIC_LOADING"' |
336 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
337 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
338 |
|
ENDIF |
339 |
|
#endif |
340 |
|
|
341 |
|
IF ( geothermalFile.NE.' ' ) THEN |
342 |
|
C o Need to use S/R APPLY_FORCING_T to get Geothermal forcing |
343 |
|
#ifdef USE_OLD_EXTERNAL_FORCING |
344 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
345 |
|
& 'geothermalFile is set but Geothermal-Flux code' |
346 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
347 |
|
WRITE(msgBuf,'(2A)')' is missing.', |
348 |
|
& ' Re-compile with "#undef USE_OLD_EXTERNAL_FORCING"' |
349 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
350 |
|
errCount = errCount + 1 |
351 |
|
#endif /* USE_OLD_EXTERNAL_FORCING */ |
352 |
|
C o Need to define ALLOW_GEOTHERMAL_FLUX to use geothermalFile forcing |
353 |
|
#ifndef ALLOW_GEOTHERMAL_FLUX |
354 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
355 |
|
& 'geothermalFile is set but Geothermal-Flux code' |
356 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
357 |
|
WRITE(msgBuf,'(2A)')' is not compiled.', |
358 |
|
& ' Re-compile with "#define ALLOW_GEOTHERMAL_FLUX"' |
359 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
360 |
|
errCount = errCount + 1 |
361 |
|
#endif /* ALLOW_GEOTHERMAL_FLUX */ |
362 |
|
ENDIF |
363 |
|
|
364 |
|
C o Need to use S/R APPLY_FORCING_U,V to get Tidal forcing |
365 |
|
#ifdef USE_OLD_EXTERNAL_FORCING |
366 |
|
IF ( momTidalForcing ) THEN |
367 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
368 |
|
& 'momTidalForcing is set but Tidal forcing code' |
369 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
370 |
|
WRITE(msgBuf,'(2A)')' is missing.', |
371 |
|
& ' Re-compile with "#undef USE_OLD_EXTERNAL_FORCING"' |
372 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
373 |
|
errCount = errCount + 1 |
374 |
|
ENDIF |
375 |
|
#endif /* USE_OLD_EXTERNAL_FORCING */ |
376 |
|
|
377 |
|
#ifndef ALLOW_FRICTION_HEATING |
378 |
|
IF ( addFrictionHeating ) THEN |
379 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: addFrictionHeating=T', |
380 |
|
& ' but FRICTIONAL_HEATING code is not compiled.' |
381 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
382 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Re-compile with:', |
383 |
|
& ' "#define ALLOW_FRICTION_HEATING" (CPP_OPTIONS.h)' |
384 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
385 |
|
errCount = errCount + 1 |
386 |
ENDIF |
ENDIF |
387 |
#endif |
#endif |
388 |
|
|
391 |
WRITE(msgBuf,'(A,A)') |
WRITE(msgBuf,'(A,A)') |
392 |
& 'CONFIG_CHECK: balanceEmPmR/Qnet is set but balance code ', |
& 'CONFIG_CHECK: balanceEmPmR/Qnet is set but balance code ', |
393 |
& 'is not compiled.' |
& 'is not compiled.' |
394 |
CALL PRINT_ERROR( msgBuf , 1) |
CALL PRINT_ERROR( msgBuf, myThid ) |
395 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
396 |
& 'Re-compile with ALLOW_BALANCE_FLUXES defined' |
& 'Re-compile with: ALLOW_BALANCE_FLUXES defined' |
397 |
CALL PRINT_ERROR( msgBuf , 1) |
CALL PRINT_ERROR( msgBuf, myThid ) |
398 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
399 |
ENDIF |
ENDIF |
400 |
#endif |
#endif |
401 |
|
|
402 |
|
#ifndef ALLOW_BALANCE_RELAX |
403 |
|
IF (balanceThetaClimRelax .OR. balanceSaltClimRelax) THEN |
404 |
|
WRITE(msgBuf,'(A,A)') |
405 |
|
& 'CONFIG_CHECK: balanceTheta/SaltClimRelax is set ', |
406 |
|
& 'but balance code is not compiled.' |
407 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
408 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
409 |
|
& 'Re-compile with ALLOW_BALANCE_RELAX defined' |
410 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
411 |
|
errCount = errCount + 1 |
412 |
|
ENDIF |
413 |
|
#endif |
414 |
|
|
415 |
|
#ifndef ALLOW_SRCG |
416 |
|
IF (useSRCGSolver) THEN |
417 |
|
WRITE(msgBuf,'(A,A)') |
418 |
|
& 'CONFIG_CHECK: useSRCGSolver = .TRUE., but single reduction ', |
419 |
|
& 'code is not compiled.' |
420 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
421 |
|
WRITE(msgBuf,'(A)') |
422 |
|
& 'CONFIG_CHECK: Re-compile with ALLOW_SRCG defined' |
423 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
424 |
|
errCount = errCount + 1 |
425 |
|
ENDIF |
426 |
|
#endif /* ALLOW_SRCG */ |
427 |
|
|
428 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
429 |
|
|
430 |
C- check parameter consistency : |
C-- Check parameter consistency : |
431 |
|
|
432 |
IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND. |
IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND. |
433 |
& ( viscC4leithD.NE.0. .OR. viscC4leith.NE.0. |
& ( viscC4leithD.NE.0. .OR. viscC4leith.NE.0. |
434 |
& .OR. viscC4smag.NE.0. .OR. viscA4Grid.NE.0. |
& .OR. viscC4smag.NE.0. .OR. viscA4Grid.NE.0. |
435 |
& .OR. viscA4D.NE.0. .OR. viscA4Z.NE.0. ) ) THEN |
& .OR. viscA4D.NE.0. .OR. viscA4Z.NE.0. ) ) THEN |
436 |
WRITE(msgBuf,'(A,A)') |
WRITE(msgBuf,'(A,A)') |
437 |
& 'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with', |
& 'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with', |
438 |
& ' overlap (Olx,Oly) smaller than 3' |
& ' overlap (OLx,OLy) smaller than 3' |
439 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
440 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
441 |
ENDIF |
ENDIF |
442 |
IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND. |
IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND. |
443 |
& ( viscC2leithD.NE.0. .OR. viscC4leithD.NE.0. ) |
& ( viscC2leithD.NE.0. .OR. viscC4leithD.NE.0. ) |
444 |
& ) THEN |
& ) THEN |
445 |
WRITE(msgBuf,'(A,A)') |
WRITE(msgBuf,'(A,A)') |
446 |
& 'CONFIG_CHECK: cannot use Leith Visc.(div.part) with', |
& 'CONFIG_CHECK: cannot use Leith Visc.(div.part) with', |
447 |
& ' overlap (Olx,Oly) smaller than 3' |
& ' overlap (OLx,OLy) smaller than 3' |
448 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
449 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
450 |
|
ENDIF |
451 |
|
IF ( ( OLx.LT.3 .OR. OLy.LT.3 ) .AND. |
452 |
|
& useSmag3D .AND. useCDscheme ) THEN |
453 |
|
WRITE(msgBuf,'(A,A)') |
454 |
|
& 'CONFIG_CHECK: cannot use Smag-3D + CD-scheme with', |
455 |
|
& ' overlap (OLx,OLy) smaller than 3' |
456 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
457 |
|
errCount = errCount + 1 |
458 |
|
ENDIF |
459 |
|
|
460 |
|
#ifndef DISCONNECTED_TILES |
461 |
|
C Overlaps cannot be larger than interior tile except for special cases |
462 |
|
IF ( sNx.LT.OLx ) THEN |
463 |
|
#ifdef ALLOW_EXCH2 |
464 |
|
WRITE(msgBuf,'(A)') |
465 |
|
& 'CONFIG_CHECK: sNx<OLx not allowed with ALLOW_EXCH2 defined' |
466 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
467 |
|
errCount = errCount + 1 |
468 |
|
#endif /* ALLOW_EXCH2 */ |
469 |
|
IF ( Nx.NE.1 ) THEN |
470 |
|
WRITE(msgBuf,'(A)') |
471 |
|
& 'CONFIG_CHECK: sNx<OLx not allowed unless Nx=1' |
472 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
473 |
|
errCount = errCount + 1 |
474 |
|
ENDIF |
475 |
|
ENDIF |
476 |
|
IF ( sNy.LT.OLy ) THEN |
477 |
|
#ifdef ALLOW_EXCH2 |
478 |
|
WRITE(msgBuf,'(A)') |
479 |
|
& 'CONFIG_CHECK: sNy<OLy not allowed with ALLOW_EXCH2 defined' |
480 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
481 |
|
errCount = errCount + 1 |
482 |
|
#endif /* ALLOW_EXCH2 */ |
483 |
|
IF ( Ny.NE.1 ) THEN |
484 |
|
WRITE(msgBuf,'(A)') |
485 |
|
& 'CONFIG_CHECK: sNy<OLy not allowed unless Ny=1' |
486 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
487 |
|
errCount = errCount + 1 |
488 |
|
ENDIF |
489 |
ENDIF |
ENDIF |
490 |
|
#endif /* ndef DISCONNECTED_TILES */ |
491 |
|
|
492 |
C- Deep-Atmosphere & Anelastic limitations: |
C-- Gravity vertical profile limitations: |
493 |
|
IF ( usingPCoords .AND. gravityFile .NE. ' ' ) THEN |
494 |
|
WRITE(msgBuf,'(A,A)') 'CONFIG_CHECK: Variable gravity', |
495 |
|
& ' not yet implemented for P-coordinate' |
496 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
497 |
|
errCount = errCount + 1 |
498 |
|
ENDIF |
499 |
|
IF ( select_rStar.NE.0 .AND. gravityFile .NE. ' ' ) THEN |
500 |
|
WRITE(msgBuf,'(A,A)') 'CONFIG_CHECK: Variable gravity', |
501 |
|
& ' not yet implemented with rStar' |
502 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
503 |
|
errCount = errCount + 1 |
504 |
|
ENDIF |
505 |
|
|
506 |
|
C-- Deep-Atmosphere & Anelastic limitations: |
507 |
IF ( deepAtmosphere .AND. |
IF ( deepAtmosphere .AND. |
508 |
& useRealFreshWaterFlux .AND. usingPCoords ) THEN |
& useRealFreshWaterFlux .AND. usingPCoords ) THEN |
509 |
WRITE(msgBuf,'(A,A)') |
WRITE(msgBuf,'(A,A)') |
510 |
& 'CONFIG_CHECK: Deep-Atmosphere not yet implemented with', |
& 'CONFIG_CHECK: Deep-Atmosphere not yet implemented with', |
511 |
& ' real-Fresh-Water option in P-coordinate' |
& ' real-Fresh-Water option in P-coordinate' |
512 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
513 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
514 |
ENDIF |
ENDIF |
515 |
IF ( select_rStar.NE.0 .AND. |
IF ( select_rStar.NE.0 .AND. |
516 |
& ( deepAtmosphere .OR. |
& ( deepAtmosphere .OR. |
518 |
WRITE(msgBuf,'(A,A)') |
WRITE(msgBuf,'(A,A)') |
519 |
& 'CONFIG_CHECK: Deep-Atmosphere or Anelastic', |
& 'CONFIG_CHECK: Deep-Atmosphere or Anelastic', |
520 |
& ' not yet implemented with rStar' |
& ' not yet implemented with rStar' |
521 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
522 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
523 |
ENDIF |
ENDIF |
524 |
IF ( vectorInvariantMomentum .AND. |
|
525 |
& ( deepAtmosphere .OR. |
C-- Free-surface related limitations: |
526 |
& usingZCoords.AND.rhoRefFile .NE. ' ' ) ) THEN |
IF ( cg2dUseMinResSol.LT.0 .OR. cg2dUseMinResSol.GT.1 ) THEN |
527 |
WRITE(msgBuf,'(A,A)') |
WRITE(msgBuf,'(A,I10,A)') |
528 |
& 'CONFIG_CHECK: Deep-Atmosphere or Anelastic', |
& 'CONFIG_CHECK: cg2dUseMinResSol set to unvalid value(=', |
529 |
& ' not yet implemented in Vector-Invariant momentum code' |
& cg2dUseMinResSol, ')' |
530 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
531 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
532 |
ENDIF |
ENDIF |
533 |
|
|
534 |
IF ( rigidLid .AND. implicitFreeSurface ) THEN |
IF ( rigidLid .AND. implicitFreeSurface ) THEN |
535 |
WRITE(msgBuf,'(A,A)') |
WRITE(msgBuf,'(A,A)') |
536 |
& 'CONFIG_CHECK: Cannot select both implicitFreeSurface', |
& 'CONFIG_CHECK: Cannot select both implicitFreeSurface', |
537 |
& ' and rigidLid.' |
& ' and rigidLid.' |
538 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
539 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
540 |
ENDIF |
ENDIF |
541 |
|
|
542 |
IF (rigidLid .AND. exactConserv) THEN |
IF (rigidLid .AND. exactConserv) THEN |
543 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
544 |
& 'CONFIG_CHECK: exactConserv not compatible with' |
& 'CONFIG_CHECK: exactConserv not compatible with' |
545 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
546 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
547 |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
548 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
549 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
550 |
ENDIF |
ENDIF |
551 |
|
|
552 |
IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN |
IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN |
553 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
554 |
& 'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.' |
& 'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.' |
555 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
556 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
557 |
& 'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.' |
& 'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.' |
558 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
559 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
560 |
ENDIF |
ENDIF |
561 |
|
|
562 |
IF (rigidLid .AND. useRealFreshWaterFlux) THEN |
IF (rigidLid .AND. useRealFreshWaterFlux) THEN |
563 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
564 |
& 'CONFIG_CHECK: useRealFreshWaterFlux not compatible with' |
& 'CONFIG_CHECK: useRealFreshWaterFlux not compatible with' |
565 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
566 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
567 |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
568 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
569 |
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' |
|
570 |
ENDIF |
ENDIF |
571 |
|
|
572 |
IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN |
IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN |
573 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
574 |
& 'CONFIG_CHECK: nonlinFreeSurf cannot be used' |
& 'CONFIG_CHECK: nonlinFreeSurf cannot be used' |
575 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
576 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
577 |
& 'CONFIG_CHECK: without exactConserv' |
& 'CONFIG_CHECK: without exactConserv' |
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 (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN |
IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN |
583 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
584 |
& 'CONFIG_CHECK: r* Coordinate cannot be used' |
& 'CONFIG_CHECK: r* Coordinate cannot be used' |
585 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
586 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
587 |
& 'CONFIG_CHECK: without exactConserv' |
& 'CONFIG_CHECK: without exactConserv' |
588 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
589 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
590 |
ENDIF |
ENDIF |
591 |
|
|
592 |
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 |
593 |
c IF (select_rStar.GT.0 .AND. useOBCS ) THEN |
WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: r* Coordinate', |
594 |
c WRITE(msgBuf,'(A)') |
& ' (select_rStar=', select_rStar, ' ) cannot be used' |
595 |
c & 'CONFIG_CHECK: r* Coordinate not yet implemented' |
CALL PRINT_ERROR( msgBuf, myThid ) |
596 |
c CALL PRINT_ERROR( msgBuf , 1) |
WRITE(msgBuf,'(2A,I3,A)') 'CONFIG_CHECK: ', |
597 |
c WRITE(msgBuf,'(A)') |
& ' with Linear FreeSurf (nonlinFreeSurf=', nonlinFreeSurf,' )' |
598 |
c & 'CONFIG_CHECK: in OBC package' |
CALL PRINT_ERROR( msgBuf, myThid ) |
599 |
c CALL PRINT_ERROR( msgBuf , 1) |
errCount = errCount + 1 |
600 |
c STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
ENDIF |
601 |
c ENDIF |
IF ( select_rStar.EQ.2 .AND. nonlinFreeSurf.NE.4 ) THEN |
602 |
|
C- not consistent to account for the slope of the coordinate when |
603 |
|
C ignoring the variations of level-thickness in PhiHyd calculation; |
604 |
|
C for now, issue a warning (but might change the code later on): |
605 |
|
WRITE(msgBuf,'(2A,I3)') '** WARNING ** CONFIG_CHECK: ', |
606 |
|
& 'select_rStar=2 not right with nonlinFreeSurf=', nonlinFreeSurf |
607 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
608 |
|
& SQUEEZE_RIGHT, myThid ) |
609 |
|
ENDIF |
610 |
|
|
611 |
c IF (nonlinFreeSurf.NE.0 .AND. nonHydrostatic) THEN |
IF ( selectSigmaCoord.NE.0 ) THEN |
612 |
IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN |
IF ( fluidIsWater ) THEN |
613 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
614 |
& 'CONFIG_CHECK: nonlinFreeSurf not yet implemented' |
& 'CONFIG_CHECK: Sigma-Coords not yet coded for Oceanic set-up' |
615 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
616 |
|
errCount = errCount + 1 |
617 |
|
ENDIF |
618 |
|
IF ( nonlinFreeSurf.LE.0 ) THEN |
619 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
620 |
& 'CONFIG_CHECK: in nonHydrostatic code' |
& 'CONFIG_CHECK: Sigma-Coords not coded for Lin-FreeSurf' |
621 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
622 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
623 |
|
ENDIF |
624 |
|
IF (select_rStar.NE.0 ) THEN |
625 |
|
WRITE(msgBuf,'(A)') |
626 |
|
& 'CONFIG_CHECK: Sigma-Coords and rStar are not compatible' |
627 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
628 |
|
errCount = errCount + 1 |
629 |
|
ENDIF |
630 |
|
WRITE(msgBuf,'(A)') |
631 |
|
& 'CONFIG_CHECK: Sigma-Coords code neither complete nor tested' |
632 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
633 |
|
& SQUEEZE_RIGHT, myThid ) |
634 |
ENDIF |
ENDIF |
635 |
|
|
636 |
|
C- note : not implemented in checkpoint48b but it is done now (since 01-28-03) |
637 |
|
c IF (select_rStar.GT.0 .AND. useOBCS ) THEN |
638 |
|
c STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
639 |
|
c ENDIF |
640 |
|
|
641 |
IF ( nonlinFreeSurf.NE.0 .AND. |
IF ( nonlinFreeSurf.NE.0 .AND. |
642 |
& deltaTfreesurf.NE.dTtracerLev(1) ) THEN |
& deltaTFreeSurf.NE.dTtracerLev(1) ) THEN |
643 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
644 |
& 'CONFIG_CHECK: WARNING: nonlinFreeSurf might cause problems' |
& 'nonlinFreeSurf might cause problems' |
645 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
646 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
647 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(2A)') '** WARNING ** ', |
648 |
& 'CONFIG_CHECK: with different FreeSurf & Tracer time-steps' |
& 'with different FreeSurf & Tracer time-steps' |
649 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
650 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
651 |
ENDIF |
ENDIF |
652 |
|
|
653 |
IF ( useRealFreshWaterFlux .AND. exactConserv |
IF ( useRealFreshWaterFlux .AND. exactConserv |
655 |
& .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN |
& .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN |
656 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
657 |
& 'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:' |
& 'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:' |
658 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
659 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
660 |
& 'CONFIG_CHECK: restart not implemented in this config' |
& 'CONFIG_CHECK: restart not implemented in this config' |
661 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
662 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
663 |
ENDIF |
ENDIF |
664 |
|
|
665 |
IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv |
IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv |
666 |
& .AND. implicDiv2DFlow.NE.1. ) THEN |
& .AND. implicDiv2DFlow.NE.1. ) THEN |
667 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: **WARNNING** ', |
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
668 |
& 'RealFreshWater & implicDiv2DFlow < 1' |
& 'RealFreshWater & implicDiv2DFlow < 1' |
669 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
670 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
671 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: works better', |
WRITE(msgBuf,'(2A)') '** WARNING ** works better', |
672 |
& ' with exactConserv=.T. (+ #define EXACT_CONSERV)' |
& ' with exactConserv=.T. (+ #define EXACT_CONSERV)' |
673 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
674 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
675 |
ENDIF |
ENDIF |
676 |
|
|
677 |
#ifdef EXACT_CONSERV |
#ifdef EXACT_CONSERV |
679 |
& .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN |
& .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN |
680 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
681 |
& 'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP' |
& 'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP' |
682 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
683 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
684 |
& 'CONFIG_CHECK: requires exactConserv=T' |
& 'CONFIG_CHECK: requires exactConserv=T' |
685 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
686 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
687 |
ENDIF |
ENDIF |
688 |
#else |
#else |
689 |
IF (useRealFreshWaterFlux |
IF (useRealFreshWaterFlux |
690 |
& .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN |
& .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN |
691 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
692 |
|
& 'E-P effects on wVel are not included' |
693 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
694 |
|
& SQUEEZE_RIGHT, myThid ) |
695 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
696 |
|
& '==> use #define EXACT_CONSERV to fix it' |
697 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
698 |
|
& SQUEEZE_RIGHT, myThid ) |
699 |
|
ENDIF |
700 |
|
#endif /* EXACT_CONSERV */ |
701 |
|
|
702 |
|
IF ( selectAddFluid.LT.-1 .OR. selectAddFluid.GT.2 ) THEN |
703 |
|
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: selectAddFluid=', |
704 |
|
& selectAddFluid, ' not allowed' |
705 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
706 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
707 |
|
& 'should be =0 (Off), 1,2 (Add Mass) or -1 (Virtual Flux)' |
708 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
709 |
|
errCount = errCount + 1 |
710 |
|
ENDIF |
711 |
|
IF ( selectAddFluid.GE.1 .AND. rigidLid ) THEN |
712 |
|
WRITE(msgBuf,'(A)') |
713 |
|
& 'CONFIG_CHECK: selectAddFluid > 0 not compatible with' |
714 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
715 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
716 |
& 'CONFIG_CHECK: E-P effects on wVel are not included' |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
717 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
718 |
|
errCount = errCount + 1 |
719 |
|
ENDIF |
720 |
|
IF ( selectAddFluid.GE.1 .AND. .NOT.staggerTimeStep ) THEN |
721 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
722 |
|
& 'synchronous time-stepping =>' |
723 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
724 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
725 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** ', |
726 |
|
& '1 time-step mismatch in AddFluid effects on T & S' |
727 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
728 |
|
& SQUEEZE_RIGHT, myThid ) |
729 |
|
ENDIF |
730 |
|
|
731 |
|
C-- Pressure calculation and pressure gradient: |
732 |
|
#ifndef INCLUDE_PHIHYD_CALCULATION_CODE |
733 |
|
IF ( momPressureForcing .OR. storePhiHyd4Phys ) THEN |
734 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
735 |
|
& 'missing code to calculate pressure (totPhiHyd)' |
736 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
737 |
|
errCount = errCount + 1 |
738 |
|
ENDIF |
739 |
|
#endif /* INCLUDE_PHIHYD_CALCULATION_CODE */ |
740 |
|
IF ( storePhiHyd4Phys .AND. .NOT.momStepping ) THEN |
741 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
742 |
|
& 'storePhiHyd4Phys = TRUE but pressure is not computed' |
743 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
744 |
|
errCount = errCount + 1 |
745 |
|
ENDIF |
746 |
|
|
747 |
|
C-- Non-hydrostatic and 3-D solver related limitations: |
748 |
|
IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN |
749 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
750 |
& 'CONFIG_CHECK: ==> use #define EXACT_CONSERV to fix it' |
& 'CONFIG_CHECK: nonlinFreeSurf not yet implemented' |
751 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
752 |
|
WRITE(msgBuf,'(A)') |
753 |
|
& 'CONFIG_CHECK: in nonHydrostatic code' |
754 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
755 |
|
errCount = errCount + 1 |
756 |
|
ENDIF |
757 |
|
|
758 |
|
IF ( implicitNHPress*implicSurfPress*implicDiv2DFlow.NE.1. |
759 |
|
& .AND. implicitIntGravWave ) THEN |
760 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: implicitIntGravWave', |
761 |
|
& ' NOT SAFE with non-fully implicit solver' |
762 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
763 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: To by-pass this', |
764 |
|
& 'STOP, comment this test and re-compile config_check' |
765 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
766 |
|
errCount = errCount + 1 |
767 |
|
ENDIF |
768 |
|
IF ( implicitNHPress*implicSurfPress*implicDiv2DFlow.EQ.0. |
769 |
|
& .AND. nonHydrostatic ) THEN |
770 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
771 |
|
& 'Needs non-zero implicit factors (i.e., implicitNHPress,' |
772 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
773 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
774 |
|
& ' implicSurfPress & implicDiv2DFlow) to run nonHydrostatic' |
775 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
776 |
|
errCount = errCount + 1 |
777 |
|
ENDIF |
778 |
|
IF ( nonHydrostatic .AND. .NOT.exactConserv |
779 |
|
& .AND. implicDiv2DFlow.NE.1. ) THEN |
780 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: Needs exactConserv=T', |
781 |
|
& ' for nonHydrostatic with implicDiv2DFlow < 1' |
782 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
783 |
|
errCount = errCount + 1 |
784 |
|
ENDIF |
785 |
|
IF ( nonHydrostatic .AND. |
786 |
|
& implicitNHPress.NE.implicSurfPress ) THEN |
787 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
788 |
|
& 'nonHydrostatic might cause problems with' |
789 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
790 |
|
& SQUEEZE_RIGHT, myThid ) |
791 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
792 |
|
& 'different implicitNHPress & implicSurfPress' |
793 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
794 |
& SQUEEZE_RIGHT , myThid) |
& SQUEEZE_RIGHT, myThid ) |
795 |
|
ENDIF |
796 |
|
|
797 |
|
IF ( selectImplicitDrag.EQ.2 .AND. use3Dsolver ) THEN |
798 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: selectImplicitDrag=2', |
799 |
|
& ' not compatible with 3-D Press. solver' |
800 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
801 |
|
errCount = errCount + 1 |
802 |
|
ENDIF |
803 |
|
|
804 |
|
IF ( implicitViscosity .AND. use3Dsolver ) THEN |
805 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
806 |
|
& 'Implicit viscosity applies to provisional u,vVel' |
807 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
808 |
|
& SQUEEZE_RIGHT, myThid ) |
809 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** => not consistent with', |
810 |
|
& ' final vertical shear (after appling 3-D solver solution' |
811 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
812 |
|
& SQUEEZE_RIGHT, myThid ) |
813 |
|
ENDIF |
814 |
|
IF ( implicitViscosity .AND. nonHydrostatic ) THEN |
815 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
816 |
|
& 'Implicit viscosity not implemented in CALC_GW' |
817 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
818 |
|
& SQUEEZE_RIGHT, myThid ) |
819 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
820 |
|
& 'Explicit viscosity might become unstable if too large' |
821 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
822 |
|
& SQUEEZE_RIGHT, myThid ) |
823 |
|
ENDIF |
824 |
|
|
825 |
|
C-- Momentum related limitations: |
826 |
|
IF ( vectorInvariantMomentum.AND.momStepping ) THEN |
827 |
|
IF ( highOrderVorticity.AND.upwindVorticity ) THEN |
828 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
829 |
|
& '"highOrderVorticity" conflicts with "upwindVorticity"' |
830 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
831 |
|
errCount = errCount + 1 |
832 |
|
ENDIF |
833 |
|
ENDIF |
834 |
|
IF ( .NOT.vectorInvariantMomentum .AND. momAdvection ) THEN |
835 |
|
IF ( usingCurvilinearGrid ) THEN |
836 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
837 |
|
& 'missing metric-terms for CurvilinearGrid' |
838 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
839 |
|
& SQUEEZE_RIGHT, myThid ) |
840 |
|
ENDIF |
841 |
|
IF ( hasWetCSCorners ) THEN |
842 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momAdvection ', |
843 |
|
& 'in flux-form is wrong on CubedSphere grid (corners)' |
844 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
845 |
|
errCount = errCount + 1 |
846 |
|
ENDIF |
847 |
|
ENDIF |
848 |
|
IF ( selectCoriMap.LT.0 .OR. selectCoriMap.GT.3 ) THEN |
849 |
|
WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ', |
850 |
|
& 'Invalid option: selectCoriMap=', selectCoriMap |
851 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
852 |
|
errCount = errCount + 1 |
853 |
|
ENDIF |
854 |
|
IF ( selectBotDragQuadr.LT.-1 .OR. selectBotDragQuadr.GT.2 ) THEN |
855 |
|
WRITE(msgBuf,'(2A,I8,A)') 'CONFIG_CHECK: ', |
856 |
|
& 'selectBotDragQuadr=', selectBotDragQuadr, |
857 |
|
& ' not valid (-1,0,1,2)' |
858 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
859 |
|
errCount = errCount + 1 |
860 |
|
ENDIF |
861 |
|
IF ( useSmag3D .AND. |
862 |
|
& ( usingPCoords .OR. deepAtmosphere .OR. selectSigmaCoord.NE.0 |
863 |
|
& .OR. rhoRefFile.NE.' ' .OR. hasWetCSCorners ) |
864 |
|
& ) THEN |
865 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
866 |
|
& 'Smag-3D not yet implemented for this set-up' |
867 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
868 |
|
errCount = errCount + 1 |
869 |
ENDIF |
ENDIF |
|
#endif /* EXACT_CONSERV */ |
|
870 |
|
|
871 |
IF (.NOT.useCDscheme .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN |
IF ( momStepping .AND. .NOT.useCDscheme |
872 |
|
& .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN |
873 |
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), |
874 |
C put this WARNING to stress that even if CD-scheme parameters |
C put this WARNING to stress that even if CD-scheme parameters |
875 |
C (tauCD,rCD) are set, CD-scheme is not used without useCDscheme=T |
C (tauCD,rCD) are set, CD-scheme is not used without useCDscheme=T |
876 |
C- and STOP if using mom_fluxform (following Chris advise). |
C- and STOP if using mom_fluxform (following Chris advise). |
877 |
C- jmc: but ultimately, this block can/will be removed. |
C- jmc: but ultimately, this block can/will be removed. |
878 |
IF (.NOT.vectorInvariantMomentum.AND.momStepping) THEN |
IF ( vectorInvariantMomentum ) THEN |
879 |
|
WRITE(msgBuf,'(2A)') '** WARNING ** CONFIG_CHECK: ', |
880 |
|
& 'CD-scheme is OFF but params(tauCD,rCD) are set' |
881 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
882 |
|
& SQUEEZE_RIGHT, myThid ) |
883 |
|
WRITE(msgBuf,'(3A)') '** WARNING ** to turn ON CD-scheme:', |
884 |
|
& ' => "useCDscheme=.TRUE." in "data", namelist PARM01' |
885 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
886 |
|
& SQUEEZE_RIGHT, myThid ) |
887 |
|
ELSE |
888 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
889 |
& 'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set' |
& 'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set' |
890 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
891 |
WRITE(msgBuf,'(2A)') |
WRITE(msgBuf,'(2A)') |
892 |
& 'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."', |
& 'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."', |
893 |
& ' in "data", namelist PARM01' |
& ' in "data", namelist PARM01' |
894 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
895 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
896 |
ENDIF |
ENDIF |
|
WRITE(msgBuf,'(2A)') '**WARNNING** ', |
|
|
& 'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set' |
|
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
|
WRITE(msgBuf,'(2A)') |
|
|
& 'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."', |
|
|
& ' in "data", namelist PARM01' |
|
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
|
|
& SQUEEZE_RIGHT , myThid) |
|
897 |
ENDIF |
ENDIF |
898 |
|
|
899 |
IF ( useCDscheme .AND. useCubedSphereExchange ) THEN |
IF ( useCDscheme .AND. hasWetCSCorners ) THEN |
900 |
WRITE(msgBuf,'(2A)') |
WRITE(msgBuf,'(2A)') |
901 |
& 'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid' |
& 'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid' |
902 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
903 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
904 |
|
ENDIF |
905 |
|
IF ( useCDscheme .AND. momImplVertAdv ) THEN |
906 |
|
WRITE(msgBuf,'(2A)')'CONFIG_CHECK: ', |
907 |
|
& 'Implicit Vert. Advect. not coded for CD-scheme velocity' |
908 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
909 |
|
errCount = errCount + 1 |
910 |
|
ENDIF |
911 |
|
IF ( useCDscheme .AND. selectImplicitDrag.GT.0 ) THEN |
912 |
|
WRITE(msgBuf,'(2A)')'CONFIG_CHECK: ', |
913 |
|
& 'Implicit (bottom) drag not coded for CD-scheme velocity' |
914 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
915 |
|
errCount = errCount + 1 |
916 |
|
ENDIF |
917 |
|
|
918 |
|
C-- Time-stepping limitations |
919 |
|
IF ( implicitIntGravWave .AND. staggerTimeStep ) THEN |
920 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: staggerTimeStep', |
921 |
|
& ' incompatible with implicitIntGravWave' |
922 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
923 |
|
errCount = errCount + 1 |
924 |
ENDIF |
ENDIF |
|
|
|
925 |
IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN |
IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN |
926 |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=', |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=', |
927 |
& momForcingOutAB, ' not allowed' |
& momForcingOutAB, ' not allowed' |
928 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
929 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ', |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ', |
930 |
& 'should be =1 (Out of AB) or =0 (In AB)' |
& 'should be =1 (Out of AB) or =0 (In AB)' |
931 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
932 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
933 |
ENDIF |
ENDIF |
934 |
IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN |
IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN |
935 |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=', |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=', |
936 |
& tracForcingOutAB, ' not allowed' |
& tracForcingOutAB, ' not allowed' |
937 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
938 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ', |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ', |
939 |
& 'should be =1 (Out of AB) or =0 (In AB)' |
& 'should be =1 (Out of AB) or =0 (In AB)' |
940 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
941 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
942 |
ENDIF |
ENDIF |
943 |
|
IF ( selectImplicitDrag.LT.0 .OR. selectImplicitDrag.GT.2 ) THEN |
944 |
IF ( useMATRIX .AND. useGCHEM ) THEN |
WRITE(msgBuf,'(2A,I4)') 'CONFIG_CHECK: ', |
945 |
WRITE(msgBuf,'(2A)') |
& 'Invalid option: selectImplicitDrag=', selectImplicitDrag |
946 |
& 'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM' |
CALL PRINT_ERROR( msgBuf, myThid ) |
947 |
CALL PRINT_ERROR( msgBuf , myThid) |
errCount = errCount + 1 |
948 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
ENDIF |
949 |
ENDIF |
IF ( selectImplicitDrag.EQ.1 ) THEN |
950 |
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: selectImplicitDrag=1', |
951 |
IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN |
& ' not yet available' |
952 |
WRITE(msgBuf,'(2A)') |
CALL PRINT_ERROR( msgBuf, myThid ) |
953 |
& 'CONFIG_CHECK: cannot set useMATRIX without ', |
errCount = errCount + 1 |
|
& 'setting usePTRACERS' |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
|
954 |
ENDIF |
ENDIF |
955 |
|
|
956 |
|
C-- Grid limitations: |
957 |
IF ( rotateGrid ) THEN |
IF ( rotateGrid ) THEN |
958 |
IF ( .NOT. usingSphericalPolarGrid ) THEN |
IF ( .NOT. usingSphericalPolarGrid ) THEN |
959 |
WRITE(msgBuf,'(2A)') |
WRITE(msgBuf,'(2A)') |
960 |
& 'CONFIG_CHECK: specifying Euler angles makes only ', |
& 'CONFIG_CHECK: specifying Euler angles makes only ', |
961 |
& 'sense with usingSphericalGrid=.TRUE.' |
& 'sense with usingSphericalGrid=.TRUE.' |
962 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
963 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
964 |
ENDIF |
ENDIF |
965 |
IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN |
IF ( useFLT .OR. useZonal_Filt .OR. useECCO ) THEN |
966 |
WRITE(msgBuf,'(2A)') |
WRITE(msgBuf,'(2A)') |
967 |
& 'CONFIG_CHECK: specifying Euler angles will probably ', |
& 'CONFIG_CHECK: specifying Euler angles will probably ', |
968 |
& 'not work with pkgs FLT, ZONAL_FLT, ECCO' |
& 'not work with pkgs FLT, ZONAL_FLT, ECCO' |
969 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
970 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
errCount = errCount + 1 |
|
ENDIF |
|
|
IF ( use3dCoriolis ) THEN |
|
|
WRITE(msgBuf,'(3A)') |
|
|
& 'CONFIG_CHECK: computation of angleCosC and angleSinC ', |
|
|
& 'as required by use3dCoriolis ', |
|
|
& 'not yet implemented with rotated grid. Sorry!' |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
|
971 |
ENDIF |
ENDIF |
972 |
#ifdef ALLOW_PROFILES |
ENDIF |
973 |
|
|
974 |
|
C-- Packages conflict |
975 |
|
IF ( useMATRIX .AND. useGCHEM ) THEN |
976 |
WRITE(msgBuf,'(2A)') |
WRITE(msgBuf,'(2A)') |
977 |
& 'CONFIG_CHECK: specifying Euler angles will probably ', |
& 'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM' |
978 |
& 'not work with pkg profiles' |
CALL PRINT_ERROR( msgBuf, myThid ) |
979 |
CALL PRINT_ERROR( msgBuf , myThid) |
errCount = errCount + 1 |
980 |
|
ENDIF |
981 |
|
|
982 |
|
IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN |
983 |
|
WRITE(msgBuf,'(2A)') |
984 |
|
& 'CONFIG_CHECK: cannot set useMATRIX without ', |
985 |
|
& 'setting usePTRACERS' |
986 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
987 |
|
errCount = errCount + 1 |
988 |
|
ENDIF |
989 |
|
|
990 |
|
IF ( (useSEAICE .OR. useThSIce) .AND. allowFreezing ) THEN |
991 |
|
WRITE(msgBuf,'(2A)') |
992 |
|
& 'CONFIG_CHECK: cannot set allowFreezing', |
993 |
|
& ' with pkgs SEAICE or THSICE' |
994 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
995 |
|
errCount = errCount + 1 |
996 |
|
ENDIF |
997 |
|
|
998 |
|
IF ( errCount.GE.1 ) THEN |
999 |
|
WRITE(msgBuf,'(A,I3,A)') |
1000 |
|
& 'CONFIG_CHECK: detected', errCount,' fatal error(s)' |
1001 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
1002 |
|
CALL ALL_PROC_DIE( 0 ) |
1003 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
|
#endif /* ALLOW_PROFILES */ |
|
1004 |
ENDIF |
ENDIF |
1005 |
|
_END_MASTER(myThid) |
1006 |
|
|
1007 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
1008 |
|
|
1009 |
WRITE(msgBuf,'(A)') 'CONFIG_CHECK: OK' |
_BEGIN_MASTER(myThid) |
1010 |
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
WRITE(msgBuf,'(A)') '// CONFIG_CHECK : Normal End' |
1011 |
& SQUEEZE_RIGHT,myThid) |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
1012 |
|
& SQUEEZE_RIGHT, myThid ) |
1013 |
|
WRITE(msgBuf,'(A)') |
1014 |
|
&'// =======================================================' |
1015 |
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
1016 |
|
& SQUEEZE_RIGHT, myThid ) |
1017 |
|
WRITE(msgBuf,'(A)') ' ' |
1018 |
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
1019 |
|
& SQUEEZE_RIGHT, myThid ) |
1020 |
|
_END_MASTER(myThid) |
1021 |
|
|
1022 |
RETURN |
RETURN |
1023 |
END |
END |