1 |
dimitri |
1.43 |
C $Header: /u/gcmpack/MITgcm/model/src/config_check.F,v 1.42 2007/03/07 00:00:06 jmc Exp $ |
2 |
jmc |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
edhill |
1.10 |
#include "PACKAGES_CONFIG.h" |
5 |
jmc |
1.1 |
#include "CPP_OPTIONS.h" |
6 |
|
|
|
7 |
|
|
CBOP |
8 |
|
|
C !ROUTINE: CONFIG_CHECK |
9 |
|
|
C !INTERFACE: |
10 |
|
|
SUBROUTINE CONFIG_CHECK( myThid ) |
11 |
|
|
C !DESCRIPTION: \bv |
12 |
|
|
C *=========================================================* |
13 |
|
|
C | SUBROUTINE CONFIG_CHECK |
14 |
|
|
C | o Check model parameter settings. |
15 |
|
|
C *=========================================================* |
16 |
|
|
C | This routine help to prevent the use of parameters |
17 |
|
|
C | that are not compatible with the model configuration. |
18 |
|
|
C *=========================================================* |
19 |
jmc |
1.33 |
C \ev |
20 |
jmc |
1.1 |
|
21 |
|
|
C !USES: |
22 |
|
|
IMPLICIT NONE |
23 |
|
|
C === Global variables === |
24 |
|
|
#include "SIZE.h" |
25 |
|
|
#include "EEPARAMS.h" |
26 |
|
|
#include "PARAMS.h" |
27 |
|
|
c #include "GRID.h" |
28 |
|
|
|
29 |
|
|
C !INPUT/OUTPUT PARAMETERS: |
30 |
|
|
C === Routine arguments === |
31 |
|
|
C myThid - Number of this instances of CONFIG_CHECK |
32 |
|
|
INTEGER myThid |
33 |
|
|
CEndOfInterface |
34 |
|
|
|
35 |
|
|
C !LOCAL VARIABLES: |
36 |
|
|
C == Local variables == |
37 |
|
|
C msgBuf :: Informational/error meesage buffer |
38 |
|
|
CHARACTER*(MAX_LEN_MBUF) msgBuf |
39 |
|
|
CEOP |
40 |
|
|
|
41 |
|
|
C- check that CPP option is "defined" when running-flag parameter is on: |
42 |
|
|
|
43 |
dimitri |
1.43 |
C o If diffKrFile is set, then we should make sure the corresponing |
44 |
|
|
C code is being compiled |
45 |
|
|
#if !(defined ALLOW_3D_DIFFKR || \ |
46 |
|
|
(defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL))) |
47 |
|
|
IF (diffKrFile.NE.' ') THEN |
48 |
|
|
WRITE(msgBuf,'(A)') |
49 |
|
|
& 'CONFIG_CHECK: diffKrFile is set but never used.' |
50 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
51 |
|
|
WRITE(msgBuf,'(A)') |
52 |
|
|
& 'Re-compile with: #define ALLOW_3D_DIFFKR' |
53 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
54 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
55 |
|
|
ENDIF |
56 |
|
|
#endif |
57 |
|
|
|
58 |
jmc |
1.1 |
#ifndef ALLOW_NONHYDROSTATIC |
59 |
jmc |
1.40 |
IF (use3Dsolver) THEN |
60 |
|
|
WRITE(msgBuf,'(A)') |
61 |
jmc |
1.1 |
& 'CONFIG_CHECK: #undef ALLOW_NONHYDROSTATIC and' |
62 |
jmc |
1.3 |
CALL PRINT_ERROR( msgBuf , myThid) |
63 |
jmc |
1.32 |
IF ( implicitIntGravWave ) WRITE(msgBuf,'(A)') |
64 |
|
|
& 'CONFIG_CHECK: implicitIntGravWave is TRUE' |
65 |
|
|
IF ( nonHydrostatic ) WRITE(msgBuf,'(A)') |
66 |
jmc |
1.1 |
& 'CONFIG_CHECK: nonHydrostatic is TRUE' |
67 |
jmc |
1.3 |
CALL PRINT_ERROR( msgBuf , myThid) |
68 |
jmc |
1.1 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
69 |
|
|
ENDIF |
70 |
|
|
#endif |
71 |
|
|
|
72 |
jmc |
1.22 |
#ifndef ALLOW_ADAMSBASHFORTH_3 |
73 |
|
|
IF ( alph_AB.NE.UNSET_RL .OR. beta_AB.NE.UNSET_RL ) THEN |
74 |
|
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
75 |
|
|
& '#undef ALLOW_ADAMSBASHFORTH_3 but alph_AB,beta_AB' |
76 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
77 |
|
|
WRITE(msgBuf,'(A,1P2E20.7)') |
78 |
|
|
& 'CONFIG_CHECK: are set to:',alph_AB,beta_AB |
79 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
80 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
81 |
|
|
ENDIF |
82 |
|
|
#endif |
83 |
|
|
|
84 |
jmc |
1.13 |
#ifndef INCLUDE_IMPLVERTADV_CODE |
85 |
jmc |
1.40 |
IF ( momImplVertAdv ) THEN |
86 |
|
|
WRITE(msgBuf,'(A)') |
87 |
jmc |
1.13 |
& 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE' |
88 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
89 |
|
|
WRITE(msgBuf,'(A)') |
90 |
|
|
& 'CONFIG_CHECK: but momImplVertAdv is TRUE' |
91 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
92 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
93 |
|
|
ENDIF |
94 |
jmc |
1.40 |
IF ( tempImplVertAdv ) THEN |
95 |
|
|
WRITE(msgBuf,'(A)') |
96 |
jmc |
1.13 |
& 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE' |
97 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
98 |
|
|
WRITE(msgBuf,'(A)') |
99 |
|
|
& 'CONFIG_CHECK: but tempImplVertAdv is TRUE' |
100 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
101 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
102 |
|
|
ENDIF |
103 |
jmc |
1.40 |
IF ( saltImplVertAdv ) THEN |
104 |
|
|
WRITE(msgBuf,'(A)') |
105 |
jmc |
1.13 |
& 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE' |
106 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
107 |
|
|
WRITE(msgBuf,'(A)') |
108 |
|
|
& 'CONFIG_CHECK: but saltImplVertAdv is TRUE' |
109 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
110 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
111 |
|
|
ENDIF |
112 |
jmc |
1.19 |
IF ( dTtracerLev(1).NE.dTtracerLev(Nr) .AND. implicitDiffusion |
113 |
jmc |
1.40 |
& .AND. ( saltStepping .OR. tempStepping .OR. usePTRACERS ) |
114 |
jmc |
1.19 |
& ) THEN |
115 |
jmc |
1.40 |
WRITE(msgBuf,'(A)') |
116 |
jmc |
1.19 |
& 'CONFIG_CHECK: #undef INCLUDE_IMPLVERTADV_CODE' |
117 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
118 |
|
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: ', |
119 |
|
|
& 'but implicitDiffusion=T with non-uniform dTtracerLev' |
120 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
121 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
122 |
|
|
ENDIF |
123 |
jmc |
1.13 |
#endif |
124 |
|
|
|
125 |
jmc |
1.1 |
#ifndef EXACT_CONSERV |
126 |
jmc |
1.40 |
IF (exactConserv) THEN |
127 |
|
|
WRITE(msgBuf,'(A)') |
128 |
jmc |
1.1 |
& 'CONFIG_CHECK: #undef EXACT_CONSERV and' |
129 |
jmc |
1.3 |
CALL PRINT_ERROR( msgBuf , myThid) |
130 |
jmc |
1.1 |
WRITE(msgBuf,'(A)') |
131 |
|
|
& 'CONFIG_CHECK: exactConserv is TRUE' |
132 |
jmc |
1.3 |
CALL PRINT_ERROR( msgBuf , myThid) |
133 |
jmc |
1.1 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
134 |
|
|
ENDIF |
135 |
|
|
#endif |
136 |
|
|
|
137 |
|
|
#ifndef NONLIN_FRSURF |
138 |
jmc |
1.40 |
IF (nonlinFreeSurf.NE.0) THEN |
139 |
|
|
WRITE(msgBuf,'(A)') |
140 |
jmc |
1.1 |
& 'CONFIG_CHECK: #undef NONLIN_FRSURF and' |
141 |
jmc |
1.3 |
CALL PRINT_ERROR( msgBuf , myThid) |
142 |
jmc |
1.1 |
WRITE(msgBuf,'(A)') |
143 |
|
|
& 'CONFIG_CHECK: nonlinFreeSurf is non-zero' |
144 |
jmc |
1.3 |
CALL PRINT_ERROR( msgBuf , myThid) |
145 |
jmc |
1.1 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
146 |
|
|
ENDIF |
147 |
|
|
#endif |
148 |
|
|
|
149 |
jmc |
1.9 |
#ifndef NONLIN_FRSURF |
150 |
|
|
IF (select_rStar .NE. 0) THEN |
151 |
jmc |
1.40 |
WRITE(msgBuf,'(A)') |
152 |
jmc |
1.9 |
& 'CONFIG_CHECK: rStar is part of NonLin-FS ' |
153 |
jmc |
1.33 |
CALL PRINT_ERROR( msgBuf, myThid) |
154 |
jmc |
1.9 |
WRITE(msgBuf,'(A)') |
155 |
|
|
& 'CONFIG_CHECK: ==> use #define NONLIN_FRSURF to use it' |
156 |
jmc |
1.33 |
CALL PRINT_ERROR( msgBuf, myThid) |
157 |
jmc |
1.9 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
158 |
|
|
ENDIF |
159 |
|
|
#endif /* NONLIN_FRSURF */ |
160 |
|
|
|
161 |
jmc |
1.1 |
#ifdef USE_NATURAL_BCS |
162 |
jmc |
1.40 |
WRITE(msgBuf,'(A)') |
163 |
jmc |
1.3 |
& 'CONFIG_CHECK: USE_NATURAL_BCS option has been replaced' |
164 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
165 |
jmc |
1.1 |
WRITE(msgBuf,'(A)') |
166 |
jmc |
1.3 |
& 'CONFIG_CHECK: by useRealFreshWaterFlux=TRUE in data file' |
167 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
168 |
jmc |
1.1 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
169 |
jmc |
1.3 |
#endif |
170 |
|
|
|
171 |
jmc |
1.4 |
C o If pLoadFile is set, then we should make sure the corresponing |
172 |
|
|
C code is being compiled |
173 |
|
|
#ifndef ATMOSPHERIC_LOADING |
174 |
|
|
IF (pLoadFile.NE.' ') THEN |
175 |
|
|
WRITE(msgBuf,'(A)') |
176 |
|
|
& 'CONFIG_CHECK: pLoadFile is set but you have not' |
177 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
178 |
|
|
WRITE(msgBuf,'(A)') |
179 |
|
|
& 'compiled the model with the pressure loading code.' |
180 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
181 |
jmc |
1.15 |
WRITE(msgBuf,'(A)') |
182 |
|
|
& 'Re-compile with: #define ATMOSPHERIC_LOADING' |
183 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
184 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
185 |
|
|
ENDIF |
186 |
|
|
IF ( useRealFreshWaterFlux .AND. useThSIce ) THEN |
187 |
|
|
WRITE(msgBuf,'(A)') |
188 |
|
|
& 'CONFIG_CHECK: sIceLoad is computed but' |
189 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
190 |
|
|
WRITE(msgBuf,'(A)') |
191 |
|
|
& 'pressure loading code is not compiled.' |
192 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
193 |
|
|
WRITE(msgBuf,'(A)') |
194 |
|
|
& 'Re-compile with: #define ATMOSPHERIC_LOADING' |
195 |
jmc |
1.4 |
CALL PRINT_ERROR( msgBuf , myThid) |
196 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
197 |
|
|
ENDIF |
198 |
|
|
#endif |
199 |
|
|
|
200 |
mlosch |
1.31 |
#ifndef ALLOW_BALANCE_FLUXES |
201 |
|
|
IF (balanceEmPmR .OR. balanceQnet) THEN |
202 |
|
|
WRITE(msgBuf,'(A,A)') |
203 |
|
|
& 'CONFIG_CHECK: balanceEmPmR/Qnet is set but balance code ', |
204 |
|
|
& 'is not compiled.' |
205 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
206 |
|
|
WRITE(msgBuf,'(A)') |
207 |
|
|
& 'Re-compile with ALLOW_BALANCE_FLUXES defined' |
208 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
209 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
210 |
|
|
ENDIF |
211 |
|
|
#endif |
212 |
|
|
|
213 |
jmc |
1.3 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
214 |
|
|
|
215 |
|
|
C- check parameter consistency : |
216 |
jmc |
1.8 |
|
217 |
jmc |
1.17 |
IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND. |
218 |
jmc |
1.28 |
& ( viscC4leithD.NE.0. .OR. viscC4leith.NE.0. |
219 |
|
|
& .OR. viscC4smag.NE.0. .OR. viscA4Grid.NE.0. |
220 |
|
|
& .OR. viscA4D.NE.0. .OR. viscA4Z.NE.0. ) ) THEN |
221 |
jmc |
1.8 |
WRITE(msgBuf,'(A,A)') |
222 |
|
|
& 'CONFIG_CHECK: cannot use Biharmonic Visc. (viscA4) with', |
223 |
|
|
& ' overlap (Olx,Oly) smaller than 3' |
224 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
225 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
226 |
jmc |
1.33 |
ENDIF |
227 |
jmc |
1.28 |
IF ( ( Olx.LT.3 .OR. Oly.LT.3 ) .AND. |
228 |
|
|
& ( viscC2leithD.NE.0. .OR. viscC4leithD.NE.0. ) |
229 |
|
|
& ) THEN |
230 |
|
|
WRITE(msgBuf,'(A,A)') |
231 |
|
|
& 'CONFIG_CHECK: cannot use Leith Visc.(div.part) with', |
232 |
|
|
& ' overlap (Olx,Oly) smaller than 3' |
233 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
234 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
235 |
jmc |
1.33 |
ENDIF |
236 |
jmc |
1.3 |
|
237 |
jmc |
1.40 |
C- Deep-Atmosphere & Anelastic limitations: |
238 |
|
|
IF ( deepAtmosphere .AND. |
239 |
|
|
& useRealFreshWaterFlux .AND. usingPCoords ) THEN |
240 |
|
|
WRITE(msgBuf,'(A,A)') |
241 |
|
|
& 'CONFIG_CHECK: Deep-Atmosphere not yet implemented with', |
242 |
|
|
& ' real-Fresh-Water option in P-coordinate' |
243 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
244 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
245 |
|
|
ENDIF |
246 |
|
|
IF ( select_rStar.NE.0 .AND. |
247 |
|
|
& ( deepAtmosphere .OR. |
248 |
|
|
& usingZCoords.AND.rhoRefFile .NE. ' ' ) ) THEN |
249 |
|
|
WRITE(msgBuf,'(A,A)') |
250 |
|
|
& 'CONFIG_CHECK: Deep-Atmosphere or Anelastic', |
251 |
|
|
& ' not yet implemented with rStar' |
252 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
253 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
254 |
|
|
ENDIF |
255 |
|
|
IF ( vectorInvariantMomentum .AND. |
256 |
|
|
& ( deepAtmosphere .OR. |
257 |
|
|
& usingZCoords.AND.rhoRefFile .NE. ' ' ) ) THEN |
258 |
|
|
WRITE(msgBuf,'(A,A)') |
259 |
|
|
& 'CONFIG_CHECK: Deep-Atmosphere or Anelastic', |
260 |
|
|
& ' not yet implemented in Vector-Invariant momentum code' |
261 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
262 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
263 |
|
|
ENDIF |
264 |
|
|
|
265 |
jmc |
1.3 |
IF ( rigidLid .AND. implicitFreeSurface ) THEN |
266 |
|
|
WRITE(msgBuf,'(A,A)') |
267 |
|
|
& 'CONFIG_CHECK: Cannot select both implicitFreeSurface', |
268 |
|
|
& ' and rigidLid.' |
269 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
270 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
271 |
jmc |
1.33 |
ENDIF |
272 |
jmc |
1.3 |
|
273 |
|
|
IF (rigidLid .AND. exactConserv) THEN |
274 |
jmc |
1.40 |
WRITE(msgBuf,'(A)') |
275 |
jmc |
1.3 |
& 'CONFIG_CHECK: exactConserv not compatible with' |
276 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
277 |
jmc |
1.1 |
WRITE(msgBuf,'(A)') |
278 |
jmc |
1.3 |
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
279 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
280 |
jmc |
1.1 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
281 |
|
|
ENDIF |
282 |
|
|
|
283 |
dfer |
1.41 |
IF ( linFSConserveTr .AND. nonlinFreeSurf.NE.0 ) THEN |
284 |
|
|
WRITE(msgBuf,'(A)') |
285 |
|
|
& 'CONFIG_CHECK: Cannot select both a Nonlinear Free Surf.' |
286 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
287 |
|
|
WRITE(msgBuf,'(A)') |
288 |
|
|
& 'CONFIG_CHECK: and Tracer Correction of Lin. Free Surf.' |
289 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
290 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
291 |
|
|
ENDIF |
292 |
|
|
|
293 |
jmc |
1.3 |
IF (rigidLid .AND. useRealFreshWaterFlux) THEN |
294 |
jmc |
1.40 |
WRITE(msgBuf,'(A)') |
295 |
jmc |
1.3 |
& 'CONFIG_CHECK: useRealFreshWaterFlux not compatible with' |
296 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
297 |
jmc |
1.1 |
WRITE(msgBuf,'(A)') |
298 |
|
|
& 'CONFIG_CHECK: rigidLid (meaningless in that case)' |
299 |
jmc |
1.3 |
CALL PRINT_ERROR( msgBuf , myThid) |
300 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
301 |
|
|
ENDIF |
302 |
|
|
|
303 |
|
|
IF ( (implicSurfPress.NE.1. .OR. implicDiv2DFlow.NE.1.) |
304 |
|
|
& .AND. nonHydrostatic ) THEN |
305 |
|
|
WRITE(msgBuf,'(A,A)') 'CONFIG_CHECK: nonHydrostatic', |
306 |
|
|
& ' NOT SAFE with non-fully implicit Barotropic solver' |
307 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
308 |
|
|
WRITE(msgBuf,'(A,A)') 'CONFIG_CHECK: To by-pass this', |
309 |
|
|
& 'STOP, comment this test and re-compile config_check' |
310 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
311 |
jmc |
1.1 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
312 |
|
|
ENDIF |
313 |
|
|
|
314 |
|
|
IF (nonlinFreeSurf.NE.0 .AND. .NOT.exactConserv) THEN |
315 |
jmc |
1.40 |
WRITE(msgBuf,'(A)') |
316 |
jmc |
1.1 |
& 'CONFIG_CHECK: nonlinFreeSurf cannot be used' |
317 |
jmc |
1.3 |
CALL PRINT_ERROR( msgBuf , myThid) |
318 |
jmc |
1.1 |
WRITE(msgBuf,'(A)') |
319 |
|
|
& 'CONFIG_CHECK: without exactConserv' |
320 |
jmc |
1.3 |
CALL PRINT_ERROR( msgBuf , myThid) |
321 |
jmc |
1.1 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
322 |
|
|
ENDIF |
323 |
|
|
|
324 |
jmc |
1.6 |
IF (select_rStar.NE.0 .AND. .NOT.exactConserv) THEN |
325 |
jmc |
1.40 |
WRITE(msgBuf,'(A)') |
326 |
jmc |
1.6 |
& 'CONFIG_CHECK: r* Coordinate cannot be used' |
327 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
328 |
|
|
WRITE(msgBuf,'(A)') |
329 |
|
|
& 'CONFIG_CHECK: without exactConserv' |
330 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
331 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
332 |
|
|
ENDIF |
333 |
|
|
|
334 |
jmc |
1.7 |
C- note : not implemented in checkpoint48b but it's done now (since 01-28-03) |
335 |
|
|
c IF (select_rStar.GT.0 .AND. useOBCS ) THEN |
336 |
jmc |
1.40 |
c WRITE(msgBuf,'(A)') |
337 |
jmc |
1.7 |
c & 'CONFIG_CHECK: r* Coordinate not yet implemented' |
338 |
|
|
c CALL PRINT_ERROR( msgBuf , 1) |
339 |
|
|
c WRITE(msgBuf,'(A)') |
340 |
|
|
c & 'CONFIG_CHECK: in OBC package' |
341 |
|
|
c CALL PRINT_ERROR( msgBuf , 1) |
342 |
|
|
c STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
343 |
|
|
c ENDIF |
344 |
jmc |
1.1 |
|
345 |
jmc |
1.33 |
c IF (nonlinFreeSurf.NE.0 .AND. nonHydrostatic) THEN |
346 |
|
|
IF (nonlinFreeSurf.NE.0 .AND. use3Dsolver) THEN |
347 |
jmc |
1.40 |
WRITE(msgBuf,'(A)') |
348 |
jmc |
1.1 |
& 'CONFIG_CHECK: nonlinFreeSurf not yet implemented' |
349 |
jmc |
1.3 |
CALL PRINT_ERROR( msgBuf , myThid) |
350 |
jmc |
1.1 |
WRITE(msgBuf,'(A)') |
351 |
|
|
& 'CONFIG_CHECK: in nonHydrostatic code' |
352 |
jmc |
1.3 |
CALL PRINT_ERROR( msgBuf , myThid) |
353 |
jmc |
1.1 |
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
354 |
|
|
ENDIF |
355 |
jmc |
1.3 |
|
356 |
jmc |
1.40 |
IF ( nonlinFreeSurf.NE.0 .AND. |
357 |
jmc |
1.18 |
& deltaTfreesurf.NE.dTtracerLev(1) ) THEN |
358 |
jmc |
1.40 |
WRITE(msgBuf,'(A)') |
359 |
jmc |
1.4 |
& 'CONFIG_CHECK: WARNING: nonlinFreeSurf might cause problems' |
360 |
|
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
361 |
jmc |
1.33 |
& SQUEEZE_RIGHT , myThid) |
362 |
jmc |
1.4 |
WRITE(msgBuf,'(A)') |
363 |
|
|
& 'CONFIG_CHECK: with different FreeSurf & Tracer time-steps' |
364 |
|
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
365 |
jmc |
1.33 |
& SQUEEZE_RIGHT , myThid) |
366 |
jmc |
1.3 |
ENDIF |
367 |
|
|
|
368 |
jmc |
1.15 |
IF ( useRealFreshWaterFlux .AND. exactConserv |
369 |
|
|
& .AND. implicDiv2DFlow.EQ.0. _d 0 |
370 |
jmc |
1.21 |
& .AND. startTime.NE.baseTime .AND. usePickupBeforeC54 ) THEN |
371 |
jmc |
1.40 |
WRITE(msgBuf,'(A)') |
372 |
jmc |
1.3 |
& 'CONFIG_CHECK: RealFreshWaterFlux+implicSurfP=0+exactConserv:' |
373 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
374 |
|
|
WRITE(msgBuf,'(A)') |
375 |
|
|
& 'CONFIG_CHECK: restart not implemented in this config' |
376 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
377 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
378 |
|
|
ENDIF |
379 |
|
|
|
380 |
jmc |
1.40 |
IF ( useRealFreshWaterFlux .AND. .NOT.exactConserv |
381 |
jmc |
1.15 |
& .AND. implicDiv2DFlow.NE.1. ) THEN |
382 |
|
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: **WARNNING** ', |
383 |
|
|
& 'RealFreshWater & implicDiv2DFlow < 1' |
384 |
|
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
385 |
jmc |
1.33 |
& SQUEEZE_RIGHT , myThid) |
386 |
jmc |
1.15 |
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: works better', |
387 |
|
|
& ' with exactConserv=.T. (+ #define EXACT_CONSERV)' |
388 |
|
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
389 |
jmc |
1.33 |
& SQUEEZE_RIGHT , myThid) |
390 |
jmc |
1.15 |
ENDIF |
391 |
|
|
|
392 |
|
|
#ifdef EXACT_CONSERV |
393 |
jmc |
1.4 |
IF (useRealFreshWaterFlux .AND. .NOT.exactConserv |
394 |
|
|
& .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN |
395 |
jmc |
1.40 |
WRITE(msgBuf,'(A)') |
396 |
jmc |
1.4 |
& 'CONFIG_CHECK: RealFreshWaterFlux with OCEANICP' |
397 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
398 |
|
|
WRITE(msgBuf,'(A)') |
399 |
|
|
& 'CONFIG_CHECK: requires exactConserv=T' |
400 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
401 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
402 |
|
|
ENDIF |
403 |
|
|
#else |
404 |
|
|
IF (useRealFreshWaterFlux |
405 |
|
|
& .AND. buoyancyRelation.EQ.'OCEANICP' ) THEN |
406 |
jmc |
1.40 |
WRITE(msgBuf,'(A)') |
407 |
jmc |
1.4 |
& 'CONFIG_CHECK: E-P effects on wVel are not included' |
408 |
|
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
409 |
jmc |
1.33 |
& SQUEEZE_RIGHT , myThid) |
410 |
jmc |
1.4 |
WRITE(msgBuf,'(A)') |
411 |
jmc |
1.15 |
& 'CONFIG_CHECK: ==> use #define EXACT_CONSERV to fix it' |
412 |
jmc |
1.5 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
413 |
jmc |
1.33 |
& SQUEEZE_RIGHT , myThid) |
414 |
jmc |
1.5 |
ENDIF |
415 |
jmc |
1.15 |
#endif /* EXACT_CONSERV */ |
416 |
jmc |
1.5 |
|
417 |
jmc |
1.9 |
IF (.NOT.useCDscheme .AND. (tauCD.NE.0. .OR. rCD.NE.-1.) ) THEN |
418 |
jmc |
1.40 |
C- jmc: since useCDscheme is a new [04-13-03] flag (default=F), |
419 |
|
|
C put this WARNING to stress that even if CD-scheme parameters |
420 |
|
|
C (tauCD,rCD) are set, CD-scheme is not used without useCDscheme=T |
421 |
jmc |
1.9 |
C- and STOP if using mom_fluxform (following Chris advise). |
422 |
|
|
C- jmc: but ultimately, this block can/will be removed. |
423 |
|
|
IF (.NOT.vectorInvariantMomentum.AND.momStepping) THEN |
424 |
jmc |
1.40 |
WRITE(msgBuf,'(A)') |
425 |
jmc |
1.9 |
& 'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set' |
426 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
427 |
|
|
WRITE(msgBuf,'(2A)') |
428 |
|
|
& 'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."', |
429 |
jmc |
1.40 |
& ' in "data", namelist PARM01' |
430 |
jmc |
1.9 |
CALL PRINT_ERROR( msgBuf , myThid) |
431 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
432 |
|
|
ENDIF |
433 |
|
|
WRITE(msgBuf,'(2A)') '**WARNNING** ', |
434 |
|
|
& 'CONFIG_CHECK: CD-scheme is OFF but params(tauCD,rCD) are set' |
435 |
jmc |
1.5 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
436 |
jmc |
1.33 |
& SQUEEZE_RIGHT , myThid) |
437 |
jmc |
1.9 |
WRITE(msgBuf,'(2A)') |
438 |
|
|
& 'CONFIG_CHECK: to turn ON CD-scheme: => "useCDscheme=.TRUE."', |
439 |
jmc |
1.40 |
& ' in "data", namelist PARM01' |
440 |
jmc |
1.4 |
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
441 |
jmc |
1.33 |
& SQUEEZE_RIGHT , myThid) |
442 |
jmc |
1.12 |
ENDIF |
443 |
|
|
|
444 |
|
|
IF ( useCDscheme .AND. useCubedSphereExchange ) THEN |
445 |
|
|
WRITE(msgBuf,'(2A)') |
446 |
|
|
& 'CONFIG_CHECK: CD-scheme not implemented on CubedSphere grid' |
447 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
448 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
449 |
|
|
ENDIF |
450 |
|
|
|
451 |
jmc |
1.40 |
IF ( momForcingOutAB.NE.0 .AND. momForcingOutAB.NE.1 ) THEN |
452 |
jmc |
1.34 |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: momForcingOutAB=', |
453 |
|
|
& momForcingOutAB, ' not allowed' |
454 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
455 |
|
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: momForcingOutAB ', |
456 |
|
|
& 'should be =1 (Out of AB) or =0 (In AB)' |
457 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
458 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
459 |
|
|
ENDIF |
460 |
jmc |
1.40 |
IF ( tracForcingOutAB.NE.0 .AND. tracForcingOutAB.NE.1 ) THEN |
461 |
jmc |
1.34 |
WRITE(msgBuf,'(A,I10,A)') 'CONFIG_CHECK: tracForcingOutAB=', |
462 |
|
|
& tracForcingOutAB, ' not allowed' |
463 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
464 |
|
|
WRITE(msgBuf,'(2A)') 'CONFIG_CHECK: tracForcingOutAB ', |
465 |
|
|
& 'should be =1 (Out of AB) or =0 (In AB)' |
466 |
jmc |
1.12 |
CALL PRINT_ERROR( msgBuf , myThid) |
467 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
468 |
jmc |
1.4 |
ENDIF |
469 |
jmc |
1.1 |
|
470 |
spk |
1.23 |
IF ( useMATRIX .AND. useGCHEM ) THEN |
471 |
|
|
WRITE(msgBuf,'(2A)') |
472 |
|
|
& 'CONFIG_CHECK: cannot set both: useMATRIX & useGCHEM' |
473 |
|
|
CALL PRINT_ERROR( msgBuf , myThid) |
474 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
475 |
|
|
ENDIF |
476 |
|
|
|
477 |
|
|
IF ( useMATRIX .AND. .NOT.usePTRACERS ) THEN |
478 |
|
|
WRITE(msgBuf,'(2A)') |
479 |
edhill |
1.24 |
& 'CONFIG_CHECK: cannot set useMATRIX without ', |
480 |
|
|
& 'setting usePTRACERS' |
481 |
spk |
1.23 |
CALL PRINT_ERROR( msgBuf , myThid) |
482 |
|
|
STOP 'ABNORMAL END: S/R CONFIG_CHECK' |
483 |
heimbach |
1.30 |
ENDIF |
484 |
|
|
|
485 |
jmc |
1.1 |
WRITE(msgBuf,'(A)') 'CONFIG_CHECK: OK' |
486 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
487 |
|
|
& SQUEEZE_RIGHT,myThid) |
488 |
|
|
|
489 |
|
|
RETURN |
490 |
|
|
END |