1 |
jmc |
1.4 |
C $Header: /u/gcmpack/MITgcm/pkg/shelfice/shelfice_check.F,v 1.3 2006/09/01 10:15:33 mlosch Exp $ |
2 |
mlosch |
1.1 |
C $Name: $ |
3 |
|
|
#include "SHELFICE_OPTIONS.h" |
4 |
|
|
|
5 |
|
|
SUBROUTINE SHELFICE_CHECK( myThid ) |
6 |
|
|
C /==========================================================\ |
7 |
|
|
C | SUBROUTINE SHELFICE_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 |
|
|
|
18 |
|
|
C === Routine arguments === |
19 |
|
|
C myThid - Number of this instance of SHELFICE_CHECK |
20 |
|
|
INTEGER myThid |
21 |
|
|
|
22 |
|
|
#ifdef ALLOW_SHELFICE |
23 |
|
|
|
24 |
|
|
C === Local variables === |
25 |
|
|
C msgBuf - Informational/error meesage buffer |
26 |
|
|
CHARACTER*(MAX_LEN_MBUF) msgBuf |
27 |
|
|
|
28 |
jmc |
1.4 |
_BEGIN_MASTER(myThid) |
29 |
|
|
|
30 |
mlosch |
1.1 |
WRITE(msgBuf,'(A)') 'SHELFICE_CHECK: #define ALLOW_SHELFICE' |
31 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
32 |
jmc |
1.4 |
& SQUEEZE_RIGHT, myThid ) |
33 |
mlosch |
1.1 |
|
34 |
|
|
C So far, SHELFICE works only with oceanic z-coordinates |
35 |
|
|
IF ( buoyancyRelation .NE. 'OCEANIC' ) THEN |
36 |
|
|
WRITE(msgBuf,'(A)') |
37 |
|
|
& 'SHELFICE works only with buoyancyRelation = ''OCEANIC''' |
38 |
jmc |
1.4 |
CALL PRINT_ERROR( msgBuf, myThid ) |
39 |
mlosch |
1.1 |
STOP 'ABNORMAL END: S/R SHELFICE_CHECK' |
40 |
|
|
ENDIF |
41 |
|
|
|
42 |
mlosch |
1.3 |
CML#ifdef ALLOW_NONHYDROSTATIC |
43 |
|
|
CML IF ( nonHydrostatic ) THEN |
44 |
|
|
CML WRITE(msgBuf,'(A)') |
45 |
|
|
CML & 'Currently SHELFICE and nonHydrostatic cannot be turned' |
46 |
|
|
CML CALL PRINT_ERROR( msgBuf , 1) |
47 |
|
|
CML WRITE(msgBuf,'(A)') 'on at the same time' |
48 |
|
|
CML CALL PRINT_ERROR( msgBuf , 1) |
49 |
|
|
CML STOP 'ABNORMAL END: S/R SHELFICE_CHECK' |
50 |
|
|
CML ENDIF |
51 |
|
|
CML#endif /* ALLOW_NONHYDROSTATIC */ |
52 |
mlosch |
1.2 |
|
53 |
mlosch |
1.3 |
C SHELFICE may not work with many other packages, |
54 |
|
|
C e.g. vertical mixing schemes, in particular KPP will not work properly, |
55 |
|
|
C as KPP requires surface fluxes at the surface, whereas shelfice will |
56 |
|
|
C provide interfacial fluxes at some depth. Richardson flux number based |
57 |
|
|
C schemes such as Packanowski-Philander (PP81) should be no problem. |
58 |
|
|
CML#ifdef ALLOW_KPP |
59 |
mlosch |
1.1 |
CML IF ( useKPP ) THEN |
60 |
|
|
CML WRITE(msgBuf,'(A)') |
61 |
|
|
CML & 'SHELFICE and KPP cannot be turned on at the same time' |
62 |
|
|
CML CALL PRINT_ERROR( msgBuf , 1) |
63 |
|
|
CML STOP 'ABNORMAL END: S/R SHELFICE_CHECK' |
64 |
|
|
CML ENDIF |
65 |
mlosch |
1.3 |
CML#endif ALLOW_KPP |
66 |
mlosch |
1.2 |
|
67 |
|
|
#ifndef ALLOW_ISOMIP_TD |
68 |
|
|
IF ( useISOMIPTD ) THEN |
69 |
|
|
WRITE(msgBuf,'(A,A,A)') |
70 |
|
|
& 'Run-time control flag useISOMIPTD was used' |
71 |
jmc |
1.4 |
CALL PRINT_ERROR( msgBuf, myThid ) |
72 |
|
|
WRITE(msgBuf,'(A,A,A)') |
73 |
mlosch |
1.2 |
& 'when CPP flag ALLOW_ISOMIP_TD was unset' |
74 |
jmc |
1.4 |
CALL PRINT_ERROR( msgBuf, myThid ) |
75 |
mlosch |
1.2 |
STOP 'ABNORMAL END: S/R SHELFICE_CHECK' |
76 |
jmc |
1.4 |
ENDIF |
77 |
mlosch |
1.2 |
#endif /* ALLOW_ISOMIP_TD */ |
78 |
mlosch |
1.1 |
|
79 |
jmc |
1.4 |
_END_MASTER(myThid) |
80 |
|
|
|
81 |
mlosch |
1.1 |
#endif /* ALLOW_SHELFICE */ |
82 |
|
|
|
83 |
jmc |
1.4 |
RETURN |
84 |
|
|
END |