1 |
C $Header: /u/gcmpack/MITgcm_contrib/atnguyen/code_21Dec2012_saltplume/salt_plume_check.F,v 1.2 2014/04/29 06:49:40 atn Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "SALT_PLUME_OPTIONS.h" |
5 |
|
6 |
CBOP 0 |
7 |
C !ROUTINE: SALT_PLUME_CHECK |
8 |
C !INTERFACE: |
9 |
SUBROUTINE SALT_PLUME_CHECK( myThid ) |
10 |
|
11 |
C !DESCRIPTION: |
12 |
C Check dependances with other packages |
13 |
|
14 |
C !USES: |
15 |
IMPLICIT NONE |
16 |
#include "EEPARAMS.h" |
17 |
#include "SIZE.h" |
18 |
#include "SALT_PLUME.h" |
19 |
|
20 |
C !INPUT PARAMETERS: |
21 |
C myThid :: my Thread Id number |
22 |
INTEGER myThid |
23 |
CEOP |
24 |
|
25 |
#ifdef ALLOW_SALT_PLUME |
26 |
|
27 |
C !LOCAL VARIABLES: |
28 |
C msgBuf - Informational/error meesage buffer |
29 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
30 |
|
31 |
_BEGIN_MASTER(myThid) |
32 |
|
33 |
WRITE(msgBuf,'(A)') 'SALT_PLUME_CHECK: #define SALT_PLUME' |
34 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
35 |
& SQUEEZE_RIGHT , myThid ) |
36 |
|
37 |
#ifdef SALT_PLUME_SPLIT_BASIN |
38 |
IF ( (SPsalFRAC(1) .LT. 0. _d 0).OR. |
39 |
& (SPsalFRAC(1) .GT. 1. _d 0) ) then |
40 |
WRITE(msgBuf,'(2A)') 'SALT_PLUME_CHECK:', |
41 |
& ' SPsalFRAC(1) needs to lie between 0. and 1.' |
42 |
CALL PRINT_ERROR( msgBuf, myThid ) |
43 |
STOP 'ABNORMAL END: S/R SALT_PLUME_CHECK' |
44 |
ENDIF |
45 |
IF ( (SPsalFRAC(2) .LT. 0. _d 0).OR. |
46 |
& (SPsalFRAC(2) .GT. 1. _d 0) ) then |
47 |
WRITE(msgBuf,'(2A)') 'SALT_PLUME_CHECK:', |
48 |
& ' SPsalFRAC(2) needs to lie between 0. and 1.' |
49 |
CALL PRINT_ERROR( msgBuf, myThid ) |
50 |
STOP 'ABNORMAL END: S/R SALT_PLUME_CHECK' |
51 |
ENDIF |
52 |
#else |
53 |
IF ( (SPsalFRAC .LT. 0. _d 0).OR.(SPsalFRAC .GT. 1. _d 0) ) then |
54 |
WRITE(msgBuf,'(2A)') 'SALT_PLUME_CHECK:', |
55 |
& ' SPsalFRAC needs to lie between 0. and 1.' |
56 |
CALL PRINT_ERROR( msgBuf, myThid ) |
57 |
STOP 'ABNORMAL END: S/R SALT_PLUME_CHECK' |
58 |
ENDIF |
59 |
#endif |
60 |
|
61 |
#ifdef SALT_PLUME_IN_LEADS |
62 |
IF ( (SPinflectionPoint .LT. 0. _d 0).OR. |
63 |
& (SPinflectionPoint .GT. 1. _d 0) ) then |
64 |
WRITE(msgBuf,'(2A)') 'SALT_PLUME_CHECK:', |
65 |
& ' SPinflectionPoint needs to lie between 0. and 1.' |
66 |
CALL PRINT_ERROR( msgBuf, myThid ) |
67 |
STOP 'ABNORMAL END: S/R SALT_PLUME_CHECK' |
68 |
ENDIF |
69 |
#endif |
70 |
#ifdef SALT_PLUME_VOLUME |
71 |
IF ( (SPbrineSconst .LT. 0. _d 0).OR. |
72 |
& (SPbrineSconst .GT. SPbrineSaltmax) ) then |
73 |
WRITE(msgBuf,'(2A,F6.1,A)') 'SALT_PLUME_CHECK:', |
74 |
& ' SPbrineSconst valid range: [0.,',SPbrineSaltmax,']' |
75 |
CALL PRINT_ERROR( msgBuf, myThid ) |
76 |
STOP 'ABNORMAL END: S/R SALT_PLUME_CHECK' |
77 |
ENDIF |
78 |
#endif |
79 |
|
80 |
_END_MASTER(myThid) |
81 |
|
82 |
#endif /* ALLOW_SALT_PLUME */ |
83 |
|
84 |
RETURN |
85 |
END |