1 |
C $Header: /u/gcmpack/MITgcm/pkg/pp81/pp81_check.F,v 1.2 2004/09/23 12:02:54 mlosch Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "KL10_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE KL10_CHECK( myThid ) |
7 |
C /==========================================================\ |
8 |
C | SUBROUTINE KL10_CHECK | |
9 |
C | o Validate basic package setup and inter-package | |
10 |
C | dependencies. | |
11 |
C \==========================================================/ |
12 |
IMPLICIT NONE |
13 |
|
14 |
C === Global variables === |
15 |
#include "SIZE.h" |
16 |
#include "EEPARAMS.h" |
17 |
#include "PARAMS.h" |
18 |
|
19 |
C === Routine arguments === |
20 |
C myThid - Number of this instance of KL10_CHECK |
21 |
INTEGER myThid |
22 |
|
23 |
#ifdef ALLOW_KL10 |
24 |
|
25 |
C === Local variables === |
26 |
C msgBuf - Informational/error message buffer |
27 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
28 |
|
29 |
WRITE(msgBuf,'(A)') 'KL10_CHECK: #define ALLOW_KL10' |
30 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
31 |
& SQUEEZE_RIGHT , 1) |
32 |
|
33 |
C So far, KL10 works only with oceanic z-coordinates |
34 |
IF ( buoyancyRelation .NE. 'OCEANIC' ) THEN |
35 |
WRITE(msgBuf,'(A)') |
36 |
& 'KL10 works only with buoyancyRelation = ''OCEANIC''' |
37 |
CALL PRINT_ERROR( msgBuf , 1) |
38 |
STOP 'ABNORMAL END: S/R KL10_CHECK' |
39 |
ENDIF |
40 |
|
41 |
C KL10 needs convection turned off (will be packaged later) |
42 |
IF (cAdjFreq.NE.0. .OR. |
43 |
& ivdc_kappa.NE.0. ) THEN |
44 |
WRITE(msgBuf,'(A)') 'Some form of convection has been enabled' |
45 |
CALL PRINT_ERROR( msgBuf , 1) |
46 |
STOP 'ABNORMAL END: S/R KL10_CHECK' |
47 |
ENDIF |
48 |
|
49 |
C TODO: JMK: Check if this is really necessary. I don't see why they can't |
50 |
C co-exist |
51 |
C IF ( useKPP ) THEN |
52 |
C WRITE(msgBuf,'(A)') |
53 |
C & 'KL10 and KPP cannot be turned on at the same time' |
54 |
C CALL PRINT_ERROR( msgBuf , 1) |
55 |
C STOP 'ABNORMAL END: S/R KL10_CHECK' |
56 |
C ENDIF |
57 |
|
58 |
C KL10 needs implicit vertical diffusion and viscosity |
59 |
IF (.NOT.implicitDiffusion ) THEN |
60 |
WRITE(msgBuf,'(A)') |
61 |
& 'KL10 needs implicitDiffusion to be enabled' |
62 |
CALL PRINT_ERROR( msgBuf , 1) |
63 |
STOP 'ABNORMAL END: S/R KL10_CHECK' |
64 |
ENDIF |
65 |
IF (.NOT.implicitViscosity) THEN |
66 |
WRITE(msgBuf,'(A)') |
67 |
& 'KL10 needs implicitViscosity to be enabled' |
68 |
CALL PRINT_ERROR( msgBuf , 1) |
69 |
STOP 'ABNORMAL END: S/R KL10_CHECK' |
70 |
ENDIF |
71 |
|
72 |
#endif /* ALLOW_KL10 */ |
73 |
|
74 |
return |
75 |
end |