1 |
C $Header: /u/gcmpack/MITgcm/pkg/obcs/obcs_check.F,v 1.8 2005/10/12 02:51:00 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
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 |
#include "PARAMS.h" |
18 |
#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 |
INTEGER i,j,bi,bj |
30 |
|
31 |
WRITE(msgBuf,'(A)') 'OBCS_CHECK: #define ALLOW_OBCS' |
32 |
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
33 |
& SQUEEZE_RIGHT,myThid) |
34 |
|
35 |
#ifdef ALLOW_ORLANSKI |
36 |
WRITE(msgBuf,'(A)') 'OBCS_CHECK: #define ALLOW_ORLANSKI' |
37 |
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
38 |
& SQUEEZE_RIGHT,myThid) |
39 |
#else |
40 |
IF (useOrlanskiNorth.OR.useOrlanskiSouth.OR. |
41 |
& useOrlanskiEast.OR.useOrlanskiWest) THEN |
42 |
WRITE(msgBuf,'(A)') |
43 |
& 'OBCS_CHECK: ERROR: #undef OBCS_RADIATE_ORLANSKI and' |
44 |
CALL PRINT_ERROR( msgBuf , 1) |
45 |
WRITE(msgBuf,'(A)') |
46 |
& 'OBCS_CHECK: ERROR: one of useOrlanski* logicals is true' |
47 |
CALL PRINT_ERROR( msgBuf , 1) |
48 |
STOP 'ABNORMAL END: S/R OBCS_CHECK' |
49 |
ENDIF |
50 |
#endif /* ALLOW_ORLANSKI */ |
51 |
|
52 |
IF (useOrlanskiNorth.OR.useOrlanskiSouth.OR. |
53 |
& useOrlanskiEast.OR.useOrlanskiWest) THEN |
54 |
IF (nonlinFreeSurf.GT.0) THEN |
55 |
WRITE(msgBuf,'(A)') |
56 |
& 'OBCS_CHECK: ERROR: useOrlanski* Rad OBC with' |
57 |
CALL PRINT_ERROR( msgBuf , 1) |
58 |
WRITE(msgBuf,'(A)') |
59 |
& 'OBCS_CHECK: ERROR: nonlinFreeSurf not yet implemented' |
60 |
CALL PRINT_ERROR( msgBuf , 1) |
61 |
STOP 'ABNORMAL END: S/R OBCS_CHECK' |
62 |
ENDIF |
63 |
#ifdef ALLOW_PTRACERS |
64 |
IF (usePTracers) THEN |
65 |
WRITE(msgBuf,'(A)') |
66 |
& 'OBCS_CHECK: ERROR: useOrlanski* Rad OBC with' |
67 |
CALL PRINT_ERROR( msgBuf , 1) |
68 |
WRITE(msgBuf,'(A)') |
69 |
& 'OBCS_CHECK: ERROR: pTracers not yet implemented' |
70 |
CALL PRINT_ERROR( msgBuf , 1) |
71 |
STOP 'ABNORMAL END: S/R OBCS_CHECK' |
72 |
ENDIF |
73 |
#endif ALLOW_PTRACERS |
74 |
ENDIF |
75 |
|
76 |
#ifndef ALLOW_OBCS_PRESCRIBE |
77 |
IF (useOBCSprescribe) THEN |
78 |
WRITE(msgBuf,'(A)') |
79 |
& 'OBCS_CHECK: ERROR: useOBCSprescribe = .TRUE. for' |
80 |
CALL PRINT_ERROR( msgBuf , 1) |
81 |
WRITE(msgBuf,'(A)') |
82 |
& 'OBCS_CHECK: undef ALLOW_OBCS_PRESCRIBE' |
83 |
CALL PRINT_ERROR( msgBuf , 1) |
84 |
STOP 'ABNORMAL END: S/R OBCS_CHECK' |
85 |
ENDIF |
86 |
#endif |
87 |
|
88 |
IF ( debugLevel.GE.debLevB ) THEN |
89 |
_BEGIN_MASTER( myThid ) |
90 |
DO bj = 1,nSy |
91 |
DO bi = 1,nSx |
92 |
write(*,*) 'bi,bj:',bi,bj,' OB_Jn=',(OB_Jn(i,bi,bj),i=1,sNx) |
93 |
write(*,*) 'bi,bj:',bi,bj,' OB_Js=',(OB_Js(i,bi,bj),i=1,sNx) |
94 |
write(*,*) 'bi,bj:',bi,bj,' OB_Ie=',(OB_Ie(j,bi,bj),j=1,sNy) |
95 |
write(*,*) 'bi,bj:',bi,bj,' OB_Iw=',(OB_Iw(j,bi,bj),j=1,sNy) |
96 |
ENDDO |
97 |
ENDDO |
98 |
_END_MASTER(myThid) |
99 |
ENDIF |
100 |
|
101 |
WRITE(msgBuf,'(A)') 'OBCS_CHECK: OK' |
102 |
CALL PRINT_MESSAGE(msgBuf,standardMessageUnit, |
103 |
& SQUEEZE_RIGHT,myThid) |
104 |
|
105 |
#endif /* ALLOW_OBCS */ |
106 |
RETURN |
107 |
END |