1 |
C $Header: /u/gcmpack/MITgcm/pkg/icefront/icefront_check.F,v 1.3 2010/01/29 01:05:27 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 |
IF (SGrunoffFile .NE. ' ') THEN |
45 |
C-- If there is subglacial runoff, addMass (in main code) should |
46 |
C be turned on by setting selectAddFluid = 1; |
47 |
IF ( selectAddFluid .NE. 1 ) THEN |
48 |
WRITE(msgBuf,'(A)') |
49 |
& 'SUBGLACIAL_RUNOFF requires selectAddFluid = 1' |
50 |
CALL PRINT_ERROR( msgBuf, myThid ) |
51 |
STOP 'ABNORMAL END: S/R ICEFRONT_CHECK' |
52 |
ENDIF |
53 |
C-- Issue a warning if temp_addMass or salt_addMass are not set. |
54 |
IF ( temp_addMass .EQ. UNSET_RL ) THEN |
55 |
WRITE(msgBuf,'(A)') |
56 |
& 'temp_addMass has not been set; defaults to local value' |
57 |
CALL PRINT_ERROR( msgBuf, myThid ) |
58 |
ENDIF |
59 |
IF ( salt_addMass .EQ. UNSET_RL ) THEN |
60 |
WRITE(msgBuf,'(A)') |
61 |
& 'salt_addMass has not been set; defaults to local value' |
62 |
CALL PRINT_ERROR( msgBuf, myThid ) |
63 |
ENDIF |
64 |
ENDIF |
65 |
#endif /* ALLOW_SUBGLACIAL_RUNOFF*/ |
66 |
|
67 |
CML#ifdef ALLOW_NONHYDROSTATIC |
68 |
CML IF ( nonHydrostatic ) THEN |
69 |
CML WRITE(msgBuf,'(A)') |
70 |
CML & 'Currently ICEFRONT and nonHydrostatic cannot be turned' |
71 |
CML CALL PRINT_ERROR( msgBuf , 1) |
72 |
CML WRITE(msgBuf,'(A)') 'on at the same time' |
73 |
CML CALL PRINT_ERROR( msgBuf , 1) |
74 |
CML STOP 'ABNORMAL END: S/R ICEFRONT_CHECK' |
75 |
CML ENDIF |
76 |
CML#endif /* ALLOW_NONHYDROSTATIC */ |
77 |
|
78 |
_END_MASTER(myThid) |
79 |
|
80 |
#endif /* ALLOW_ICEFRONT */ |
81 |
|
82 |
RETURN |
83 |
END |