1 |
C $Header: /u/gcmpack/MITgcm/pkg/icefront/icefront_check.F,v 1.4 2010/04/26 22:12:29 dimitri Exp $ |
2 |
C $Name: $ |
3 |
#include "ICEFRONT_OPTIONS.h" |
4 |
|
5 |
SUBROUTINE ICEFRONT_CHECK( myThid ) |
6 |
C /==========================================================\ |
7 |
C | SUBROUTINE ICEFRONT_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 |
#include "ICEFRONT.h" |
18 |
|
19 |
C === Routine arguments === |
20 |
C myThid - Number of this instance of ICEFRONT_CHECK |
21 |
INTEGER myThid |
22 |
|
23 |
#ifdef ALLOW_ICEFRONT |
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 |
WRITE(msgBuf,'(A)') 'ICEFRONT_CHECK: #define ALLOW_ICEFRONT' |
32 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
33 |
& SQUEEZE_RIGHT, myThid ) |
34 |
|
35 |
C So far, ICEFRONT works only with oceanic z-coordinates |
36 |
IF ( buoyancyRelation .NE. 'OCEANIC' ) THEN |
37 |
WRITE(msgBuf,'(A)') |
38 |
& 'ICEFRONT works only with buoyancyRelation = ''OCEANIC''' |
39 |
CALL PRINT_ERROR( msgBuf, myThid ) |
40 |
STOP 'ABNORMAL END: S/R ICEFRONT_CHECK' |
41 |
ENDIF |
42 |
|
43 |
#ifdef ALLOW_SUBGLACIAL_RUNOFF |
44 |
#ifndef ALLOW_ADDFLUID |
45 |
C-- If there is subglacial runoff, addMass (in main code) should be |
46 |
C turned on by setting #define ALLOW_ADDFLUID in 'CPP_OPTIONS.h' |
47 |
WRITE(msgBuf,'(A,A)') |
48 |
& 'SUBGLACIAL_RUNOFF requires ALLOW_ADDFLUID turned on ', |
49 |
& 'in CPP_OPTIONS.h' |
50 |
CALL PRINT_ERROR( msgBuf, myThid ) |
51 |
STOP 'ABNORMAL END: S/R ICEFRONT_CHECK' |
52 |
#endif |
53 |
IF (SGrunoffFile .NE. ' ') THEN |
54 |
C-- If there is subglacial runoff, addMass (in main code) should |
55 |
C be turned on by setting selectAddFluid = 1; |
56 |
IF ( selectAddFluid .NE. 1 ) THEN |
57 |
WRITE(msgBuf,'(A)') |
58 |
& 'SUBGLACIAL_RUNOFF requires selectAddFluid = 1' |
59 |
CALL PRINT_ERROR( msgBuf, myThid ) |
60 |
STOP 'ABNORMAL END: S/R ICEFRONT_CHECK' |
61 |
ENDIF |
62 |
C-- Issue a warning if temp_addMass or salt_addMass are not set. |
63 |
IF ( temp_addMass .EQ. UNSET_RL ) THEN |
64 |
WRITE(msgBuf,'(A)') |
65 |
& 'temp_addMass has not been set; defaults to local value' |
66 |
CALL PRINT_ERROR( msgBuf, myThid ) |
67 |
ENDIF |
68 |
IF ( salt_addMass .EQ. UNSET_RL ) THEN |
69 |
WRITE(msgBuf,'(A)') |
70 |
& 'salt_addMass has not been set; defaults to local value' |
71 |
CALL PRINT_ERROR( msgBuf, myThid ) |
72 |
ENDIF |
73 |
ENDIF |
74 |
#endif /* ALLOW_SUBGLACIAL_RUNOFF*/ |
75 |
|
76 |
CML#ifdef ALLOW_NONHYDROSTATIC |
77 |
CML IF ( nonHydrostatic ) THEN |
78 |
CML WRITE(msgBuf,'(A)') |
79 |
CML & 'Currently ICEFRONT and nonHydrostatic cannot be turned' |
80 |
CML CALL PRINT_ERROR( msgBuf , 1) |
81 |
CML WRITE(msgBuf,'(A)') 'on at the same time' |
82 |
CML CALL PRINT_ERROR( msgBuf , 1) |
83 |
CML STOP 'ABNORMAL END: S/R ICEFRONT_CHECK' |
84 |
CML ENDIF |
85 |
CML#endif /* ALLOW_NONHYDROSTATIC */ |
86 |
|
87 |
_END_MASTER(myThid) |
88 |
|
89 |
#endif /* ALLOW_ICEFRONT */ |
90 |
|
91 |
RETURN |
92 |
END |