1 |
C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_check.F,v 1.15 2006/12/22 11:52:21 heimbach Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "SEAICE_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE SEAICE_CHECK( myThid ) |
7 |
C /==========================================================\ |
8 |
C | SUBROUTINE SEAICE_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 |
#include "SEAICE_PARAMS.h" |
19 |
#include "SEAICE.h" |
20 |
|
21 |
C === Routine arguments === |
22 |
C myThid - Number of this instance of SEAICE_CHECK |
23 |
INTEGER myThid |
24 |
|
25 |
C === Local variables === |
26 |
C msgBuf - Informational/error meesage buffer |
27 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
28 |
|
29 |
_BEGIN_MASTER(myThid) |
30 |
|
31 |
C-- ALLOW_SEAICE |
32 |
WRITE(msgBuf,'(A)') 'SEAICE_CHECK: #define ALLOW_SEAICE' |
33 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
34 |
& SQUEEZE_RIGHT , myThid ) |
35 |
|
36 |
C-- SEAICE needs forcing_In_AB FALSE |
37 |
IF (tracForcingOutAB.NE.1) THEN |
38 |
WRITE(msgBuf,'(2A)') 'SEAICE_CHECK:', |
39 |
& ' Need T,S forcing out of AB (tracForcingOutAB=1)' |
40 |
CALL PRINT_ERROR( msgBuf, myThid ) |
41 |
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
42 |
ENDIF |
43 |
|
44 |
C-- SEAICEadvSnow doees one work with LAD = 2 |
45 |
IF (SEAICEadvSnow .AND. SEAICEadvSchSnow .EQ. 2 |
46 |
& .AND. LAD .EQ. 1) THEN |
47 |
WRITE(msgBuf,'(2A)') 'SEAICE_CHECK:', |
48 |
& ' 2nd order snow advection does not work with Leap frog (LAD==1)' |
49 |
CALL PRINT_ERROR( msgBuf, myThid ) |
50 |
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
51 |
ENDIF |
52 |
|
53 |
C-- SEAICE_ALLOW_DYNAMICS and SEAICEuseDYNAMICS |
54 |
#ifndef SEAICE_ALLOW_DYNAMICS |
55 |
IF (SEAICEuseDYNAMICS) THEN |
56 |
WRITE(msgBuf,'(A)') |
57 |
& 'SEAICE_ALLOW_DYNAMICS needed for SEAICEuseDYNAMICS' |
58 |
CALL PRINT_ERROR( msgBuf, myThid ) |
59 |
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
60 |
ENDIF |
61 |
#endif |
62 |
|
63 |
C-- SEAICE_EXTERNAL_FORCING |
64 |
C At present this option is hardwired for pkg/exf. |
65 |
#ifdef SEAICE_EXTERNAL_FORCING |
66 |
#ifndef ALLOW_EXF |
67 |
WRITE(msgBuf,'(A)') |
68 |
& 'need to define ALLOW_EXF' |
69 |
CALL PRINT_ERROR( msgBuf, myThid ) |
70 |
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
71 |
#else /* ALLOW_EXF */ |
72 |
#ifndef ALLOW_ATM_TEMP |
73 |
WRITE(msgBuf,'(A)') |
74 |
& 'need to define pkg/exf ALLOW_ATM_TEMP' |
75 |
CALL PRINT_ERROR( msgBuf, myThid ) |
76 |
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
77 |
#endif |
78 |
#ifndef ALLOW_DOWNWARD_RADIATION |
79 |
WRITE(msgBuf,'(A)') |
80 |
& 'need to define pkg/exf ALLOW_DOWNWARD_RADIATION' |
81 |
CALL PRINT_ERROR( msgBuf, myThid ) |
82 |
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
83 |
#endif |
84 |
#if !defined(EXF_READ_EVAP) && !defined(ALLOW_BULKFORMULAE) |
85 |
WRITE(msgBuf,'(A)') |
86 |
& 'need to set EXF_READ_EVAP or ALLOW_BULKFORMULAE in pkg/exf ' |
87 |
CALL PRINT_ERROR( msgBuf, myThid ) |
88 |
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
89 |
#endif |
90 |
#endif /* ALLOW_EXF */ |
91 |
#endif /* SEAICE_EXTERNAL_FORCING */ |
92 |
|
93 |
C-- SEAICE_EXTERNAL_FLUXES |
94 |
C At present this option is hardwired for pkg/exf. |
95 |
#ifdef SEAICE_EXTERNAL_FLUXES |
96 |
#ifndef ALLOW_EXF |
97 |
WRITE(msgBuf,'(A)') |
98 |
& 'need to define ALLOW_EXF' |
99 |
CALL PRINT_ERROR( msgBuf, myThid ) |
100 |
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
101 |
#endif |
102 |
#endif /* SEAICE_EXTERNAL_FLUXES */ |
103 |
|
104 |
#ifdef SEAICE_ALLOW_EVP |
105 |
# ifdef ALLOW_AUTODIFF_TAMC |
106 |
IF ( INT(SEAICE_deltaTdyn/SEAICE_deltaTevp).GT.nEVPstepMax ) THEN |
107 |
WRITE(msgBuf,'(A)') |
108 |
& 'SEAICE_ALLOW_EVP: need to set nEVPstepMax to >= nEVPstep' |
109 |
CALL PRINT_ERROR( msgBuf, myThid ) |
110 |
WRITE(msgBuf,'(A,I4)') |
111 |
& 'nEVPstep = INT(SEAICE_deltaTdyn/SEAICE_deltaTevp) = ', |
112 |
& INT(SEAICE_deltaTdyn/SEAICE_deltaTevp) |
113 |
CALL PRINT_ERROR( msgBuf, myThid ) |
114 |
STOP 'ABNORMAL END: S/R SEAICE_CHECK' |
115 |
ENDIF |
116 |
# endif |
117 |
#endif |
118 |
|
119 |
_END_MASTER(myThid) |
120 |
|
121 |
RETURN |
122 |
END |