1 |
jmc |
1.8 |
C $Header: /u/gcmpack/MITgcm/pkg/obcs/obcs_check.F,v 1.7 2005/10/10 05:53:48 mlosch Exp $ |
2 |
jmc |
1.3 |
C $Name: $ |
3 |
adcroft |
1.2 |
|
4 |
|
|
#include "OBCS_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
SUBROUTINE OBCS_CHECK( myThid ) |
7 |
|
|
C /==========================================================\ |
8 |
|
|
C | SUBROUTINE OBCS_CHECK | |
9 |
|
|
C | o Check dependances with other packages | |
10 |
|
|
C |==========================================================| |
11 |
|
|
C \==========================================================/ |
12 |
|
|
IMPLICIT NONE |
13 |
|
|
|
14 |
|
|
C === Global variables === |
15 |
|
|
#include "SIZE.h" |
16 |
|
|
#include "EEPARAMS.h" |
17 |
jmc |
1.3 |
#include "PARAMS.h" |
18 |
adcroft |
1.2 |
#include "OBCS.h" |
19 |
|
|
|
20 |
|
|
C === Routine arguments === |
21 |
|
|
C myThid - Number of this instances |
22 |
|
|
INTEGER myThid |
23 |
|
|
|
24 |
|
|
#ifdef ALLOW_OBCS |
25 |
|
|
|
26 |
|
|
C === Local variables === |
27 |
|
|
C msgBuf - Informational/error meesage buffer |
28 |
|
|
CHARACTER*(MAX_LEN_MBUF) msgBuf |
29 |
|
|
|
30 |
|
|
WRITE(msgBuf,'(A)') 'OBCS_CHECK: #define ALLOW_OBCS' |
31 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
32 |
|
|
& SQUEEZE_RIGHT,myThid) |
33 |
|
|
|
34 |
|
|
#ifdef ALLOW_ORLANSKI |
35 |
|
|
WRITE(msgBuf,'(A)') 'OBCS_CHECK: #define ALLOW_ORLANSKI' |
36 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
37 |
|
|
& SQUEEZE_RIGHT,myThid) |
38 |
|
|
#else |
39 |
|
|
IF (useOrlanskiNorth.OR.useOrlanskiSouth.OR. |
40 |
|
|
& useOrlanskiEast.OR.useOrlanskiWest) THEN |
41 |
|
|
WRITE(msgBuf,'(A)') |
42 |
|
|
& 'OBCS_CHECK: ERROR: #undef OBCS_RADIATE_ORLANSKI and' |
43 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
44 |
|
|
WRITE(msgBuf,'(A)') |
45 |
|
|
& 'OBCS_CHECK: ERROR: one of useOrlanski* logicals is true' |
46 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
47 |
|
|
STOP 'ABNORMAL END: S/R OBCS_CHECK' |
48 |
|
|
ENDIF |
49 |
|
|
#endif /* ALLOW_ORLANSKI */ |
50 |
jmc |
1.3 |
|
51 |
|
|
IF (useOrlanskiNorth.OR.useOrlanskiSouth.OR. |
52 |
|
|
& useOrlanskiEast.OR.useOrlanskiWest) THEN |
53 |
|
|
IF (nonlinFreeSurf.GT.0) THEN |
54 |
|
|
WRITE(msgBuf,'(A)') |
55 |
|
|
& 'OBCS_CHECK: ERROR: useOrlanski* Rad OBC with' |
56 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
57 |
|
|
WRITE(msgBuf,'(A)') |
58 |
|
|
& 'OBCS_CHECK: ERROR: nonlinFreeSurf not yet implemented' |
59 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
60 |
|
|
STOP 'ABNORMAL END: S/R OBCS_CHECK' |
61 |
|
|
ENDIF |
62 |
mlosch |
1.7 |
#ifdef ALLOW_PTRACERS |
63 |
|
|
IF (usePTracers) THEN |
64 |
|
|
WRITE(msgBuf,'(A)') |
65 |
|
|
& 'OBCS_CHECK: ERROR: useOrlanski* Rad OBC with' |
66 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
67 |
|
|
WRITE(msgBuf,'(A)') |
68 |
|
|
& 'OBCS_CHECK: ERROR: pTracers not yet implemented' |
69 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
70 |
|
|
STOP 'ABNORMAL END: S/R OBCS_CHECK' |
71 |
|
|
ENDIF |
72 |
|
|
#endif ALLOW_PTRACERS |
73 |
jmc |
1.3 |
ENDIF |
74 |
adcroft |
1.2 |
|
75 |
mlosch |
1.6 |
#ifndef ALLOW_OBCS_PRESCRIBE |
76 |
heimbach |
1.4 |
IF (useOBCSprescribe) THEN |
77 |
|
|
WRITE(msgBuf,'(A)') |
78 |
|
|
& 'OBCS_CHECK: ERROR: useOBCSprescribe = .TRUE. for' |
79 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
80 |
|
|
WRITE(msgBuf,'(A)') |
81 |
jmc |
1.5 |
& 'OBCS_CHECK: undef ALLOW_OBCS_PRESCRIBE' |
82 |
jmc |
1.8 |
CALL PRINT_ERROR( msgBuf , 1) |
83 |
heimbach |
1.4 |
STOP 'ABNORMAL END: S/R OBCS_CHECK' |
84 |
|
|
ENDIF |
85 |
|
|
#endif |
86 |
|
|
|
87 |
adcroft |
1.2 |
WRITE(msgBuf,'(A)') 'OBCS_CHECK: OK' |
88 |
|
|
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
89 |
|
|
& SQUEEZE_RIGHT,myThid) |
90 |
|
|
|
91 |
|
|
#endif /* ALLOW_OBCS */ |
92 |
jmc |
1.8 |
RETURN |
93 |
|
|
END |