11 |
C | These arrays are purely a function of the basin geom. | |
C | These arrays are purely a function of the basin geom. | |
12 |
C | We set then here once and them use then repeatedly. | |
C | We set then here once and them use then repeatedly. | |
13 |
C \==========================================================/ |
C \==========================================================/ |
14 |
|
IMPLICIT NONE |
15 |
|
|
16 |
C === Global variables === |
C === Global variables === |
17 |
#include "SIZE.h" |
#include "SIZE.h" |
20 |
#include "GRID.h" |
#include "GRID.h" |
21 |
#include "DYNVARS.h" |
#include "DYNVARS.h" |
22 |
#include "CG2D.h" |
#include "CG2D.h" |
23 |
|
#include "OBCS.h" |
24 |
|
|
25 |
C === Routine arguments === |
C === Routine arguments === |
26 |
C myThid - Thread no. that called this routine. |
C myThid - Thread no. that called this routine. |
68 |
ENDDO |
ENDDO |
69 |
ENDDO |
ENDDO |
70 |
ENDDO |
ENDDO |
71 |
|
IF (openBoundaries) THEN |
72 |
|
DO I=1,sNx |
73 |
|
IF (OB_Jn(I,bi,bj).NE.0) aS2d(I,OB_Jn(I,bi,bj),bi,bj)=0. |
74 |
|
IF (OB_Jn(I,bi,bj).NE.0) aS2d(I,OB_Jn(I,bi,bj)+1,bi,bj)=0. |
75 |
|
IF (OB_Js(I,bi,bj).NE.0) aS2d(I,OB_Js(I,bi,bj)+1,bi,bj)=0. |
76 |
|
IF (OB_Js(I,bi,bj).NE.0) aS2d(I,OB_Js(I,bi,bj),bi,bj)=0. |
77 |
|
ENDDO |
78 |
|
DO J=1,sNy |
79 |
|
IF (OB_Ie(J,bi,bj).NE.0) aW2d(OB_Ie(J,bi,bj),J,bi,bj)=0. |
80 |
|
IF (OB_Ie(J,bi,bj).NE.0) aW2d(OB_Ie(J,bi,bj)+1,J,bi,bj)=0. |
81 |
|
IF (OB_Iw(J,bi,bj).NE.0) aW2d(OB_Iw(J,bi,bj)+1,J,bi,bj)=0. |
82 |
|
IF (OB_Iw(J,bi,bj).NE.0) aW2d(OB_Iw(J,bi,bj),J,bi,bj)=0. |
83 |
|
ENDDO |
84 |
|
ENDIF |
85 |
DO J=1,sNy |
DO J=1,sNy |
86 |
DO I=1,sNx |
DO I=1,sNx |
87 |
myNorm = MAX(ABS(aW2d(I,J,bi,bj)),myNorm) |
myNorm = MAX(ABS(aW2d(I,J,bi,bj)),myNorm) |
209 |
DO I=1,sNx |
DO I=1,sNx |
210 |
cg2d_x(I,J,bi,bj) = 0. _d 0 |
cg2d_x(I,J,bi,bj) = 0. _d 0 |
211 |
cg2d_b(I,J,bi,bj) = 0. _d 0 |
cg2d_b(I,J,bi,bj) = 0. _d 0 |
212 |
#ifdef ALLOW_CD |
#ifdef INCLUDE_CD_CODE |
213 |
cg2d_xNM1(I,J,bi,bj) = 0. _d 0 |
cg2d_xNM1(I,J,bi,bj) = 0. _d 0 |
214 |
#endif |
#endif |
215 |
ENDDO |
ENDDO |
219 |
C-- Update overlap regions |
C-- Update overlap regions |
220 |
_EXCH_XY_R8(cg2d_x, myThid) |
_EXCH_XY_R8(cg2d_x, myThid) |
221 |
_EXCH_XY_R8(cg2d_b, myThid) |
_EXCH_XY_R8(cg2d_b, myThid) |
222 |
#ifdef ALLOW_CD |
#ifdef INCLUDE_CD_CODE |
223 |
_EXCH_XY_R8(cg2d_xNM1, myThid) |
_EXCH_XY_R8(cg2d_xNM1, myThid) |
224 |
#endif |
#endif |
225 |
ENDIF |
ENDIF |