1 |
heimbach |
1.2 |
C $Header: |
2 |
|
|
|
3 |
|
|
#include "SEAICE_OPTIONS.h" |
4 |
|
|
|
5 |
|
|
SUBROUTINE SEAICE_CHECK( myThid ) |
6 |
|
|
C /==========================================================\ |
7 |
|
|
C | SUBROUTINE SEAICE_CHECK | |
8 |
|
|
C | o Validate basic package setup and inter-package | |
9 |
|
|
C | dependencies. | |
10 |
|
|
C \==========================================================/ |
11 |
|
|
IMPLICIT NONE |
12 |
|
|
|
13 |
|
|
C === Global variables === |
14 |
|
|
#include "SIZE.h" |
15 |
|
|
#include "EEPARAMS.h" |
16 |
|
|
#include "PARAMS.h" |
17 |
dimitri |
1.4 |
#include "SEAICE_PARAMS.h" |
18 |
|
|
#ifdef INCLUDE_EXTERNAL_FORCING_PACKAGE |
19 |
|
|
LOGICAL EXFwindOnBgrid |
20 |
|
|
COMMON /EXF_PARM_L/ EXFwindOnBgrid |
21 |
|
|
#endif |
22 |
heimbach |
1.2 |
|
23 |
|
|
C === Routine arguments === |
24 |
|
|
C myThid - Number of this instance of SEAICE_CHECK |
25 |
|
|
INTEGER myThid |
26 |
|
|
|
27 |
|
|
#ifdef ALLOW_SEAICE |
28 |
|
|
|
29 |
|
|
C === Local variables === |
30 |
|
|
C msgBuf - Informational/error meesage buffer |
31 |
|
|
CHARACTER*(MAX_LEN_MBUF) msgBuf |
32 |
|
|
|
33 |
dimitri |
1.3 |
C-- ALLOW_SEAICE |
34 |
heimbach |
1.2 |
WRITE(msgBuf,'(A)') 'SEAICE_CHECK: #define ALLOW_SEAICE' |
35 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
36 |
|
|
& SQUEEZE_RIGHT , myThid ) |
37 |
dimitri |
1.3 |
|
38 |
|
|
C-- SEAICE_ALLOW_DYNAMICS and SEAICEuseDYNAMICS |
39 |
|
|
#ifndef SEAICE_ALLOW_DYNAMICS |
40 |
|
|
IF (SEAICEuseDYNAMICS) THEN |
41 |
|
|
WRITE(msgBuf,'(A)') |
42 |
|
|
& 'SEAICE_ALLOW_DYNAMICS needed for SEAICEuseDYNAMICS' |
43 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
44 |
|
|
& SQUEEZE_RIGHT , myThid ) |
45 |
|
|
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
46 |
|
|
ENDIF |
47 |
dimitri |
1.4 |
#endif |
48 |
dimitri |
1.3 |
|
49 |
|
|
C-- SEAICE_EXTERNAL_FORCING |
50 |
|
|
C At present this option is hardwired for pkg/exf. |
51 |
|
|
#ifdef SEAICE_EXTERNAL_FORCING |
52 |
|
|
#ifndef INCLUDE_EXTERNAL_FORCING_PACKAGE |
53 |
|
|
WRITE(msgBuf,'(A)') |
54 |
|
|
& 'need to define INCLUDE_EXTERNAL_FORCING_PACKAGE' |
55 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
56 |
|
|
& SQUEEZE_RIGHT , myThid ) |
57 |
|
|
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
58 |
dimitri |
1.4 |
#else /* INCLUDE_EXTERNAL_FORCING_PACKAGE */ |
59 |
|
|
#ifndef ALLOW_ATM_TEMP |
60 |
|
|
WRITE(msgBuf,'(A)') |
61 |
|
|
& 'need to define pkg/exf ALLOW_ATM_TEMP' |
62 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
63 |
|
|
& SQUEEZE_RIGHT , myThid ) |
64 |
|
|
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
65 |
|
|
#endif |
66 |
|
|
#ifndef ALLOW_ATM_WIND |
67 |
|
|
WRITE(msgBuf,'(A)') |
68 |
|
|
& 'need to define pkg/exf ALLOW_ATM_WIND' |
69 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
70 |
|
|
& SQUEEZE_RIGHT , myThid ) |
71 |
|
|
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
72 |
|
|
#endif |
73 |
|
|
#ifndef ALLOW_DOWNWARD_RADIATION |
74 |
|
|
WRITE(msgBuf,'(A)') |
75 |
|
|
& 'need to define pkg/exf ALLOW_DOWNWARD_RADIATION' |
76 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
77 |
|
|
& SQUEEZE_RIGHT , myThid ) |
78 |
|
|
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
79 |
|
|
#endif |
80 |
|
|
#if !defined(EXF_READ_EVAP) && !defined(ALLOW_BULKFORMULAE) |
81 |
dimitri |
1.3 |
WRITE(msgBuf,'(A)') |
82 |
dimitri |
1.4 |
& 'need to set EXF_READ_EVAP or ALLOW_BULKFORMULAE in pkg/exf ' |
83 |
dimitri |
1.3 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
84 |
|
|
& SQUEEZE_RIGHT , myThid ) |
85 |
|
|
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
86 |
dimitri |
1.4 |
#endif |
87 |
|
|
IF(.NOT.SEAICEwindOnCgrid .AND. .NOT.EXFwindOnBgrid) THEN |
88 |
|
|
WRITE(msgBuf,'(A)') |
89 |
|
|
& 'please set either SEAICEwindOnCgrid or EXFwindOnBgrid ' |
90 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
91 |
|
|
& SQUEEZE_RIGHT , myThid ) |
92 |
|
|
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
93 |
|
|
ENDIF |
94 |
|
|
IF(SEAICEwindOnCgrid .AND. EXFwindOnBgrid) THEN |
95 |
|
|
WRITE(msgBuf,'(A)') |
96 |
|
|
& 'please unset either SEAICEwindOnCgrid or EXFwindOnBgrid ' |
97 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
98 |
|
|
& SQUEEZE_RIGHT , myThid ) |
99 |
|
|
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
100 |
|
|
ENDIF |
101 |
|
|
#endif /* INCLUDE_EXTERNAL_FORCING_PACKAGE */ |
102 |
|
|
#endif /* SEAICE_EXTERNAL_FORCING */ |
103 |
|
|
|
104 |
|
|
C-- SEAICE_EXTERNAL_FLUXES |
105 |
|
|
C At present this option is hardwired for pkg/exf. |
106 |
|
|
#ifdef SEAICE_EXTERNAL_FLUXES |
107 |
|
|
#ifndef INCLUDE_EXTERNAL_FORCING_PACKAGE |
108 |
dimitri |
1.3 |
WRITE(msgBuf,'(A)') |
109 |
dimitri |
1.4 |
& 'need to define INCLUDE_EXTERNAL_FORCING_PACKAGE' |
110 |
dimitri |
1.3 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
111 |
|
|
& SQUEEZE_RIGHT , myThid ) |
112 |
|
|
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
113 |
dimitri |
1.4 |
#else /* INCLUDE_EXTERNAL_FORCING_PACKAGE */ |
114 |
|
|
IF(.NOT.SEAICEwindOnCgrid .AND. .NOT.EXFwindOnBgrid) THEN |
115 |
dimitri |
1.3 |
WRITE(msgBuf,'(A)') |
116 |
dimitri |
1.4 |
& 'please set either SEAICEwindOnCgrid or EXFwindOnBgrid ' |
117 |
dimitri |
1.3 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
118 |
|
|
& SQUEEZE_RIGHT , myThid ) |
119 |
|
|
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
120 |
dimitri |
1.4 |
ENDIF |
121 |
|
|
IF(SEAICEwindOnCgrid .AND. EXFwindOnBgrid) THEN |
122 |
dimitri |
1.3 |
WRITE(msgBuf,'(A)') |
123 |
dimitri |
1.4 |
& 'please unset either SEAICEwindOnCgrid or EXFwindOnBgrid ' |
124 |
dimitri |
1.3 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
125 |
|
|
& SQUEEZE_RIGHT , myThid ) |
126 |
|
|
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
127 |
dimitri |
1.4 |
ENDIF |
128 |
|
|
#endif /* INCLUDE_EXTERNAL_FORCING_PACKAGE */ |
129 |
|
|
#endif /* SEAICE_EXTERNAL_FLUXES */ |
130 |
heimbach |
1.2 |
|
131 |
dimitri |
1.4 |
#endif /* ALLOW_SEAICE */ |
132 |
heimbach |
1.2 |
|
133 |
|
|
return |
134 |
|
|
end |