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