1 |
C $Header: /u/gcmpack/models/MITgcmUV/eesupp/src/exch_z_xyz_rx.template,v 1.2 2001/05/29 14:01:36 adcroft Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "CPP_EEOPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
C !ROUTINE: EXCH_Z_XYZ_RX |
8 |
|
9 |
C !INTERFACE: |
10 |
SUBROUTINE EXCH_Z_XYZ_RX( |
11 |
U phi, |
12 |
I myThid ) |
13 |
IMPLICIT NONE |
14 |
C !DESCRIPTION: |
15 |
C *==========================================================* |
16 |
C | SUBROUTINE EXCH_Z_XYZ_RX |
17 |
C | o Handle exchanges for _RX, 3-dim, zeta coord arrays. |
18 |
C *==========================================================* |
19 |
C | Branch to appropriate exchange routine for a zeta coord |
20 |
C | array on the current grid scheme. |
21 |
C *==========================================================* |
22 |
|
23 |
C !USES: |
24 |
C == Global variables == |
25 |
#include "SIZE.h" |
26 |
#include "EEPARAMS.h" |
27 |
#include "EESUPPORT.h" |
28 |
|
29 |
C !INPUT/OUTPUT PARAMETERS: |
30 |
C == Routine arguments == |
31 |
C phi :: Array with overlap regions are to be exchanged |
32 |
C Note - The interface to EXCH_RX assumes that |
33 |
C the standard Fortran 77 sequence association rules |
34 |
C apply. |
35 |
C myThid :: My thread id. |
36 |
_RX phi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
37 |
INTEGER myThid |
38 |
|
39 |
C !LOCAL VARIABLES: |
40 |
C == Local variables == |
41 |
C OL[wens] :: Overlap extents in west, east, north, south. |
42 |
C exchWidth[XY] :: Extent of regions that will be exchanged. |
43 |
INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz |
44 |
CEOP |
45 |
|
46 |
OLw = OLx |
47 |
OLe = OLx |
48 |
OLn = OLy |
49 |
OLs = OLy |
50 |
exchWidthX = OLx |
51 |
exchWidthY = OLy |
52 |
myNz = Nr |
53 |
C ** NOTE ** The exchange routine we use here does not |
54 |
C require the preceeding and following barriers. |
55 |
C However, the slow, simple exchange interface |
56 |
C that is calling it here is meant to ensure |
57 |
C that threads are synchronised before exchanges |
58 |
C begine. |
59 |
IF (useCubedSphereExchange) THEN |
60 |
CALL EXCH_Z_RX_CUBE( phi, |
61 |
I OLw, OLe, OLs, OLn, myNz, |
62 |
I exchWidthX, exchWidthY, |
63 |
I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid ) |
64 |
ELSE |
65 |
CALL EXCH_RX( phi, |
66 |
I OLw, OLe, OLs, OLn, myNz, |
67 |
I exchWidthX, exchWidthY, |
68 |
I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid ) |
69 |
ENDIF |
70 |
|
71 |
RETURN |
72 |
END |