49 |
C OL[wens] :: Overlap extents in west, east, north, south. |
C OL[wens] :: Overlap extents in west, east, north, south. |
50 |
C exchWidth[XY] :: Extent of regions that will be exchanged. |
C exchWidth[XY] :: Extent of regions that will be exchanged. |
51 |
INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz |
INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz |
52 |
INTEGER bi, bj, myTile |
INTEGER bi, bj, myTile, i, j |
53 |
CEOP |
CEOP |
54 |
|
|
55 |
OLw = OLx |
OLw = OLx |
79 |
myTile = W2_myTileList(bi) |
myTile = W2_myTileList(bi) |
80 |
IF ( exch2_isEedge(myTile) .EQ. 1 .AND. |
IF ( exch2_isEedge(myTile) .EQ. 1 .AND. |
81 |
& exch2_isSedge(myTile) .EQ. 1 ) THEN |
& exch2_isSedge(myTile) .EQ. 1 ) THEN |
82 |
Uphi(snx+1, 0,bi,bj)= vPhi(snx+1, 1,bi,bj) |
C Uphi(snx+1, 0,bi,bj)= vPhi(snx+1, 1,bi,bj) |
83 |
|
DO j=1-olx,0 |
84 |
|
Uphi(snx+1, j,bi,bj)= vPhi(snx+(1-j), 1,bi,bj) |
85 |
|
ENDDO |
86 |
ENDIF |
ENDIF |
87 |
IF ( withSigns ) THEN |
IF ( withSigns ) THEN |
88 |
IF ( exch2_isEedge(myTile) .EQ. 1 .AND. |
IF ( exch2_isEedge(myTile) .EQ. 1 .AND. |
89 |
& exch2_isNedge(myTile) .EQ. 1 ) THEN |
& exch2_isNedge(myTile) .EQ. 1 ) THEN |
90 |
Uphi(snx+1,sny+1,bi,bj)=-vPhi(snx+1,sny+1,bi,bj) |
C Uphi(snx+1,sny+1,bi,bj)=-vPhi(snx+1,sny+1,bi,bj) |
91 |
|
DO j=1,olx |
92 |
|
Uphi(snx+1,sny+j,bi,bj)=-vPhi(snx+j,sny+1,bi,bj) |
93 |
|
ENDDO |
94 |
ENDIF |
ENDIF |
95 |
ELSE |
ELSE |
96 |
IF ( exch2_isEedge(myTile) .EQ. 1 .AND. |
IF ( exch2_isEedge(myTile) .EQ. 1 .AND. |
97 |
& exch2_isNedge(myTile) .EQ. 1 ) THEN |
& exch2_isNedge(myTile) .EQ. 1 ) THEN |
98 |
Uphi(snx+1,sny+1,bi,bj)= vPhi(snx+1,sny+1,bi,bj) |
C Uphi(snx+1,sny+1,bi,bj)= vPhi(snx+1,sny+1,bi,bj) |
99 |
|
DO j=1,olx |
100 |
|
Uphi(snx+1,sny+j,bi,bj)= vPhi(snx+j,sny+1,bi,bj) |
101 |
|
ENDDO |
102 |
ENDIF |
ENDIF |
103 |
ENDIF |
ENDIF |
104 |
|
|
105 |
|
C Now zero out the null areas that should not be used in the numerics |
106 |
|
IF ( exch2_isWedge(myTile) .EQ. 1 .AND. |
107 |
|
& exch2_isSedge(myTile) .EQ. 1 ) THEN |
108 |
|
C Zero SW corner points |
109 |
|
DO J=1-OLx,0 |
110 |
|
DO I=1-OLx,0 |
111 |
|
uPhi(I,J,bi,bj)=0. |
112 |
|
ENDDO |
113 |
|
ENDDO |
114 |
|
DO J=1-OLx,0 |
115 |
|
DO I=1-OLx,0 |
116 |
|
vPhi(I,J,bi,bj)=0. |
117 |
|
ENDDO |
118 |
|
ENDDO |
119 |
|
ENDIF |
120 |
|
IF ( exch2_isWedge(myTile) .EQ. 1 .AND. |
121 |
|
& exch2_isNedge(myTile) .EQ. 1 ) THEN |
122 |
|
C Zero NW corner points |
123 |
|
DO J=sNy+1,sNy+OLy |
124 |
|
DO I=1-OLx,0 |
125 |
|
uPhi(I,J,bi,bj)=0. |
126 |
|
ENDDO |
127 |
|
ENDDO |
128 |
|
DO J=sNy+2,sNy+OLy |
129 |
|
DO I=1-OLx,0 |
130 |
|
vPhi(I,J,bi,bj)=0. |
131 |
|
ENDDO |
132 |
|
ENDDO |
133 |
|
ENDIF |
134 |
|
IF ( exch2_isEedge(myTile) .EQ. 1 .AND. |
135 |
|
& exch2_isSedge(myTile) .EQ. 1 ) THEN |
136 |
|
C Zero SE corner points |
137 |
|
DO J=1-OLx,0 |
138 |
|
DO I=sNx+2,sNx+OLx |
139 |
|
uPhi(I,J,bi,bj)=0. |
140 |
|
ENDDO |
141 |
|
ENDDO |
142 |
|
DO J=1-OLx,0 |
143 |
|
DO I=sNx+1,sNx+OLx |
144 |
|
vPhi(I,J,bi,bj)=0. |
145 |
|
ENDDO |
146 |
|
ENDDO |
147 |
|
ENDIF |
148 |
|
IF ( exch2_isEedge(myTile) .EQ. 1 .AND. |
149 |
|
& exch2_isNedge(myTile) .EQ. 1 ) THEN |
150 |
|
C Zero NE corner points |
151 |
|
DO J=sNy+1,sNy+OLy |
152 |
|
DO I=sNx+2,sNx+OLx |
153 |
|
uPhi(I,J,bi,bj)=0. |
154 |
|
ENDDO |
155 |
|
ENDDO |
156 |
|
DO J=sNy+2,sNy+OLy |
157 |
|
DO I=sNx+1,sNx+OLx |
158 |
|
vPhi(I,J,bi,bj)=0. |
159 |
|
ENDDO |
160 |
|
ENDDO |
161 |
|
ENDIF |
162 |
ENDDO |
ENDDO |
163 |
ENDDO |
ENDDO |
164 |
|
|