23 |
|
|
24 |
C !USES: |
C !USES: |
25 |
IMPLICIT NONE |
IMPLICIT NONE |
26 |
|
|
27 |
C === Global data === |
C === Global data === |
28 |
#include "SIZE.h" |
#include "SIZE.h" |
29 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
|
cph-mpi#include "EESUPPORT.h" |
|
|
#include "EXCH.h" |
|
30 |
|
|
31 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
32 |
C === Routine arguments === |
C === Routine arguments === |
36 |
INTEGER myThid |
INTEGER myThid |
37 |
|
|
38 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
39 |
|
#ifndef ALLOW_EXCH2 |
40 |
C == Local variables == |
C == Local variables == |
41 |
C OL[wens] :: Overlap extents in west, east, north, south. |
C OL[wens] :: Overlap extents in west, east, north, south. |
42 |
C exchWidth[XY] :: Extent of regions that will be exchanged. |
C exchWidth[XY] :: Extent of regions that will be exchanged. |
43 |
INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz |
INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz |
44 |
|
#endif |
45 |
CEOP |
CEOP |
46 |
|
|
47 |
#ifdef ALLOW_EXCH2 |
#ifdef ALLOW_EXCH2 |
48 |
CALL EXCH2_3D_RX( phi, Nr, myThid ) |
CALL EXCH2_3D_RX( phi, Nr, myThid ) |
49 |
RETURN |
#else /* ALLOW_EXCH2 */ |
|
#else |
|
50 |
|
|
51 |
OLw = OLx |
OLw = OLx |
52 |
OLe = OLx |
OLe = OLx |
55 |
exchWidthX = OLx |
exchWidthX = OLx |
56 |
exchWidthY = OLy |
exchWidthY = OLy |
57 |
myNz = Nr |
myNz = Nr |
|
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. |
|
58 |
IF (useCubedSphereExchange) THEN |
IF (useCubedSphereExchange) THEN |
59 |
CALL EXCH_RX_CUBE( phi, |
CALL EXCH1_RX_CUBE( phi, .FALSE., |
60 |
I OLw, OLe, OLs, OLn, myNz, |
I OLw, OLe, OLs, OLn, myNz, |
61 |
I exchWidthX, exchWidthY, |
I exchWidthX, exchWidthY, |
62 |
I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid ) |
I EXCH_UPDATE_CORNERS, myThid ) |
63 |
ELSE |
ELSE |
64 |
CALL EXCH_RX( phi, |
#ifdef DISCONNECTED_TILES |
65 |
|
CALL EXCH0_RX( phi, |
66 |
I OLw, OLe, OLs, OLn, myNz, |
I OLw, OLe, OLs, OLn, myNz, |
67 |
I exchWidthX, exchWidthY, |
I exchWidthX, exchWidthY, |
68 |
I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid ) |
I EXCH_UPDATE_CORNERS, myThid ) |
69 |
|
#else /* DISCONNECTED_TILES */ |
70 |
|
CALL EXCH1_RX( phi, |
71 |
|
I OLw, OLe, OLs, OLn, myNz, |
72 |
|
I exchWidthX, exchWidthY, |
73 |
|
I EXCH_UPDATE_CORNERS, myThid ) |
74 |
|
#endif /* DISCONNECTED_TILES */ |
75 |
ENDIF |
ENDIF |
76 |
|
|
77 |
|
#endif /* ALLOW_EXCH2 */ |
78 |
|
|
79 |
RETURN |
RETURN |
|
#endif |
|
80 |
END |
END |