17 |
C | SUBROUTINE EXCH_Z_3D_RX |
C | SUBROUTINE EXCH_Z_3D_RX |
18 |
C | o Handle exchanges for _RX three-dim zeta-point array. |
C | o Handle exchanges for _RX three-dim zeta-point array. |
19 |
C *==========================================================* |
C *==========================================================* |
|
C | Invoke appropriate exchange for a zeta-point array |
|
|
C | for either global grid, or cube sphere grid. |
|
|
C *==========================================================* |
|
20 |
|
|
21 |
C !USES: |
C !USES: |
22 |
C === Global data === |
C === Global data === |
23 |
#include "SIZE.h" |
#include "SIZE.h" |
24 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
|
cph-mpi#include "EESUPPORT.h" |
|
25 |
#include "W2_EXCH2_SIZE.h" |
#include "W2_EXCH2_SIZE.h" |
26 |
#include "W2_EXCH2_TOPOLOGY.h" |
#include "W2_EXCH2_TOPOLOGY.h" |
27 |
#ifdef W2_FILL_NULL_REGIONS |
#ifdef W2_FILL_NULL_REGIONS |
62 |
OLs = OLy |
OLs = OLy |
63 |
exchWidthX = OLx |
exchWidthX = OLx |
64 |
exchWidthY = OLy |
exchWidthY = OLy |
|
C ** NOTE ** The exchange routine we use here does not |
|
|
C require the preceeding and following barriers. |
|
|
C However, the slow, simple exchange interface |
|
|
C that is calling it here is meant to ensure |
|
|
C that threads are synchronised before exchanges |
|
|
C begine. |
|
65 |
|
|
66 |
IF (useCubedSphereExchange) THEN |
IF (useCubedSphereExchange) THEN |
67 |
IF ( myNz.GT.local_maxDim ) THEN |
IF ( myNz.GT.local_maxDim ) THEN |
84 |
ENDDO |
ENDDO |
85 |
ENDDO |
ENDDO |
86 |
ENDDO |
ENDDO |
87 |
|
ENDIF |
88 |
|
|
89 |
CALL EXCH2_RX1_CUBE( phi, 'T ', |
CALL EXCH2_RX1_CUBE( phi, 'T ', |
90 |
I OLw, OLe, OLs, OLn, myNz, |
I OLw, OLe, OLs, OLn, myNz, |
95 |
I exchWidthX, exchWidthY, |
I exchWidthX, exchWidthY, |
96 |
I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid ) |
I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid ) |
97 |
|
|
98 |
|
IF (useCubedSphereExchange) THEN |
99 |
|
|
100 |
DO bj=myByLo(myThid),myByHi(myThid) |
DO bj=myByLo(myThid),myByHi(myThid) |
101 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
DO bi=myBxLo(myThid),myBxHi(myThid) |
102 |
myTile = W2_myTileList(bi) |
myTile = W2_myTileList(bi,bj) |
103 |
mFace = exch2_myFace(myTile) |
mFace = exch2_myFace(myTile) |
104 |
|
|
105 |
C--- Face 2,4,6: |
C--- Face 2,4,6: |
286 |
ENDDO |
ENDDO |
287 |
ENDDO |
ENDDO |
288 |
|
|
289 |
ELSE |
C--- using or not using CubedSphereExchange: end |
|
|
|
|
CALL EXCH_RX( phi, |
|
|
I OLw, OLe, OLs, OLn, myNz, |
|
|
I exchWidthX, exchWidthY, |
|
|
I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid ) |
|
|
|
|
290 |
ENDIF |
ENDIF |
291 |
|
|
292 |
RETURN |
RETURN |