1 |
edhill |
1.5 |
C |
2 |
|
|
C $Header: $ |
3 |
|
|
C $Name: $ |
4 |
heimbach |
1.2 |
|
5 |
edhill |
1.5 |
#include "AD_CONFIG.h" |
6 |
heimbach |
1.2 |
#include "CTRL_CPPOPTIONS.h" |
7 |
|
|
|
8 |
|
|
SUBROUTINE CTRL_CHECK( myThid ) |
9 |
|
|
C /==========================================================\ |
10 |
|
|
C | SUBROUTINE CTRK_CHECK | |
11 |
|
|
C | o Validate basic package setup and inter-package | |
12 |
|
|
C | dependencies. | |
13 |
|
|
C \==========================================================/ |
14 |
|
|
IMPLICIT NONE |
15 |
|
|
|
16 |
|
|
C === Global variables === |
17 |
|
|
#include "SIZE.h" |
18 |
|
|
#include "EEPARAMS.h" |
19 |
|
|
#include "PARAMS.h" |
20 |
|
|
|
21 |
|
|
#include "ctrl.h" |
22 |
|
|
|
23 |
|
|
C === Routine arguments === |
24 |
|
|
C myThid - Number of this instance |
25 |
|
|
INTEGER myThid |
26 |
|
|
|
27 |
|
|
C === Local variables === |
28 |
|
|
C msgBuf - Informational/error meesage buffer |
29 |
|
|
CHARACTER*(MAX_LEN_MBUF) msgBuf |
30 |
|
|
|
31 |
|
|
WRITE(msgBuf,'(A)') 'CTRL_CHECK: ctrl package' |
32 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
33 |
|
|
& SQUEEZE_RIGHT , 1) |
34 |
|
|
|
35 |
|
|
C KPP needs convection turned off (will be packaged later) |
36 |
edhill |
1.4 |
C Can not have both atmos. state and flux field as control |
37 |
heimbach |
1.2 |
|
38 |
|
|
#ifdef ALLOW_TANGENTLINEAR_RUN |
39 |
|
|
if ( yadmark .NE. 'g_' ) then |
40 |
|
|
WRITE(msgBuf,'(A)') |
41 |
|
|
& 'yadmark very likely wrong in data.ctrl for case ' |
42 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
43 |
|
|
WRITE(msgBuf,'(A)') |
44 |
|
|
& 'ALLOW_TANGENTLINEAR_RUN; should be g_ ' |
45 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
46 |
|
|
STOP 'ABNORMAL END: S/R CTRL_CHECK' |
47 |
|
|
end if |
48 |
|
|
#endif |
49 |
|
|
|
50 |
|
|
#if (defined (ALLOW_HFLUX_CONTROL) && defined (ALLOW_ATEMP_CONTROL)) |
51 |
|
|
WRITE(msgBuf,'(A)') |
52 |
edhill |
1.3 |
& 'Cannot have both ALLOW_HFLUX_CONTROL & ALLOW_ATEMP_CONTROL' |
53 |
heimbach |
1.2 |
CALL PRINT_ERROR( msgBuf , 1) |
54 |
|
|
STOP 'ABNORMAL END: S/R CTRL_CHECK' |
55 |
|
|
#endif |
56 |
|
|
|
57 |
|
|
#if (defined (ALLOW_SFLUX_CONTROL) && defined (ALLOW_AQH_CONTROL)) |
58 |
|
|
WRITE(msgBuf,'(A)') |
59 |
edhill |
1.3 |
& 'Cannot have both ALLOW_SFLUX_CONTROL & ALLOW_AQH_CONTROL' |
60 |
heimbach |
1.2 |
CALL PRINT_ERROR( msgBuf , 1) |
61 |
|
|
STOP 'ABNORMAL END: S/R CTRL_CHECK' |
62 |
|
|
#endif |
63 |
|
|
|
64 |
|
|
#if (defined (ALLOW_USTRESS_CONTROL) && defined (ALLOW_UWIND_CONTROL)) |
65 |
|
|
WRITE(msgBuf,'(A)') |
66 |
edhill |
1.3 |
& 'Cannot have both ALLOW_USTRESS_CONTROL & ALLOW_UWIND_CONTROL' |
67 |
heimbach |
1.2 |
CALL PRINT_ERROR( msgBuf , 1) |
68 |
|
|
STOP 'ABNORMAL END: S/R CTRL_CHECK' |
69 |
|
|
#endif |
70 |
|
|
|
71 |
|
|
#if (defined (ALLOW_VSTRESS_CONTROL) && defined (ALLOW_VWIND_CONTROL)) |
72 |
|
|
WRITE(msgBuf,'(A)') |
73 |
edhill |
1.3 |
& 'Cannot have both ALLOW_VSTRESS_CONTROL & ALLOW_VWIND_CONTROL' |
74 |
heimbach |
1.2 |
CALL PRINT_ERROR( msgBuf , 1) |
75 |
|
|
STOP 'ABNORMAL END: S/R CTRL_CHECK' |
76 |
|
|
#endif |
77 |
|
|
|
78 |
|
|
#ifdef ALLOW_ATEMP_CONTROL |
79 |
|
|
#ifndef ALLOW_ATM_TEMP |
80 |
|
|
WRITE(msgBuf,'(A)') |
81 |
|
|
& 'ALLOW_ATEMP_CONTROL used without ALLOW_ATM_TEMP' |
82 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
83 |
|
|
STOP 'ABNORMAL END: S/R CTRL_CHECK' |
84 |
|
|
#endif |
85 |
|
|
#endif |
86 |
|
|
|
87 |
|
|
#ifdef ALLOW_AQH_CONTROL |
88 |
|
|
#ifndef ALLOW_ATM_TEMP |
89 |
|
|
WRITE(msgBuf,'(A)') |
90 |
|
|
& 'ALLOW_AQH_CONTROL used without ALLOW_ATM_TEMP' |
91 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
92 |
|
|
STOP 'ABNORMAL END: S/R CTRL_CHECK' |
93 |
|
|
#endif |
94 |
|
|
#endif |
95 |
|
|
|
96 |
|
|
#ifdef ALLOW_UWIND_CONTROL |
97 |
|
|
#ifndef ALLOW_ATM_WIND |
98 |
|
|
WRITE(msgBuf,'(A)') |
99 |
|
|
& 'ALLOW_UWIND_CONTROL used without ALLOW_ATM_WIND' |
100 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
101 |
|
|
STOP 'ABNORMAL END: S/R CTRL_CHECK' |
102 |
|
|
#endif |
103 |
|
|
#endif |
104 |
|
|
|
105 |
|
|
#ifdef ALLOW_VWIND_CONTROL |
106 |
|
|
#ifndef ALLOW_ATM_WIND |
107 |
|
|
WRITE(msgBuf,'(A)') |
108 |
|
|
& 'ALLOW_VWIND_CONTROL used without ALLOW_ATM_WIND' |
109 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
110 |
|
|
STOP 'ABNORMAL END: S/R CTRL_CHECK' |
111 |
|
|
#endif |
112 |
|
|
#endif |
113 |
|
|
|
114 |
|
|
return |
115 |
|
|
end |