/[MITgcm]/MITgcm/pkg/exch2/exch2_xy_rx.template
ViewVC logotype

Contents of /MITgcm/pkg/exch2/exch2_xy_rx.template

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (show annotations) (download)
Sun Jun 28 00:57:51 2009 UTC (14 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61s, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.7: +7 -26 lines
-always call exch2_*_cube, not exch-1 anymore, if useCubedSphereExchange=F
-add bj in exch2 arrays and S/R.

1 C $Header: /u/gcmpack/MITgcm/pkg/exch2/exch2_xy_rx.template,v 1.7 2009/05/12 19:44:59 jmc Exp $
2 C $Name: $
3
4 #include "CPP_EEOPTIONS.h"
5 #include "W2_OPTIONS.h"
6
7 CBOP
8
9 C !ROUTINE: EXCH_XY_RX
10
11 C !INTERFACE:
12 SUBROUTINE EXCH2_XY_RX(
13 U phi,
14 I myThid )
15 IMPLICIT NONE
16 C !DESCRIPTION:
17 C *==========================================================*
18 C | SUBROUTINE EXCH_XY_RX
19 C | o Handle exchanges for _RX two-dimensional scalar arrays.
20 C *==========================================================*
21
22 C !USES:
23 C === Global data ===
24 #include "SIZE.h"
25 #include "EEPARAMS.h"
26 #include "W2_EXCH2_SIZE.h"
27 #include "W2_EXCH2_TOPOLOGY.h"
28 #ifdef W2_FILL_NULL_REGIONS
29 #include "W2_EXCH2_PARAMS.h"
30 #endif
31
32 C !INPUT/OUTPUT PARAMETERS:
33 C === Routine arguments ===
34 C phi :: Array with overlap regions are to be exchanged
35 C myThid :: My thread id.
36 _RX phi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,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 #ifdef W2_FILL_NULL_REGIONS
45 INTEGER bi, bj, myTile, i, j
46 #endif
47 CEOP
48
49
50 OLw = OLx
51 OLe = OLx
52 OLn = OLy
53 OLs = OLy
54 exchWidthX = OLx
55 exchWidthY = OLy
56 myNz = 1
57
58 CALL EXCH2_RX1_CUBE( phi, 'T ',
59 I OLw, OLe, OLs, OLn, myNz,
60 I exchWidthX, exchWidthY,
61 I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
62
63 #ifdef W2_FILL_NULL_REGIONS
64 IF (useCubedSphereExchange) THEN
65 DO bj=myByLo(myThid),myByHi(myThid)
66 DO bi=myBxLo(myThid),myBxHi(myThid)
67 myTile = W2_myTileList(bi,bj)
68 C South-east corner
69 IF ( exch2_isEedge(myTile) .EQ. 1 .AND.
70 & exch2_isSedge(myTile) .EQ. 1 ) THEN
71 DO j=1-OLy,0
72 DO i=sNx+1,sNx+OLx
73 phi(i,j,bi,bj)=e2FillValue_RX
74 ENDDO
75 ENDDO
76 ENDIF
77 C North-east corner
78 IF ( exch2_isEedge(myTile) .EQ. 1 .AND.
79 & exch2_isNedge(myTile) .EQ. 1 ) THEN
80 DO j=sNy+1,sNy+OLy
81 DO i=sNx+1,sNx+OLx
82 phi(i,j,bi,bj)=e2FillValue_RX
83 ENDDO
84 ENDDO
85 ENDIF
86 C South-west corner
87 IF ( exch2_isWedge(myTile) .EQ. 1 .AND.
88 & exch2_isSedge(myTile) .EQ. 1 ) THEN
89 DO j=1-OLy,0
90 DO i=1-OLx,0
91 phi(i,j,bi,bj)=e2FillValue_RX
92 ENDDO
93 ENDDO
94 ENDIF
95 C North-west corner
96 IF ( exch2_isWedge(myTile) .EQ. 1 .AND.
97 & exch2_isNedge(myTile) .EQ. 1 ) THEN
98 DO j=sNy+1,sNy+OLy
99 DO i=1-OLx,0
100 phi(i,j,bi,bj)=e2FillValue_RX
101 ENDDO
102 ENDDO
103 ENDIF
104 ENDDO
105 ENDDO
106 ENDIF
107 #endif /* W2_FILL_NULL_REGIONS */
108
109 CALL EXCH2_RX1_CUBE( phi, 'T ',
110 I OLw, OLe, OLs, OLn, myNz,
111 I exchWidthX, exchWidthY,
112 I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
113
114 #ifdef W2_FILL_NULL_REGIONS
115 IF (useCubedSphereExchange) THEN
116 DO bj=myByLo(myThid),myByHi(myThid)
117 DO bi=myBxLo(myThid),myBxHi(myThid)
118 myTile = W2_myTileList(bi,bj)
119 C South-east corner
120 IF ( exch2_isEedge(myTile) .EQ. 1 .AND.
121 & exch2_isSedge(myTile) .EQ. 1 ) THEN
122 DO j=1-OLy,0
123 DO i=sNx+1,sNx+OLx
124 phi(i,j,bi,bj)=e2FillValue_RX
125 ENDDO
126 ENDDO
127 ENDIF
128 C North-east corner
129 IF ( exch2_isEedge(myTile) .EQ. 1 .AND.
130 & exch2_isNedge(myTile) .EQ. 1 ) THEN
131 DO j=sNy+1,sNy+OLy
132 DO i=sNx+1,sNx+OLx
133 phi(i,j,bi,bj)=e2FillValue_RX
134 ENDDO
135 ENDDO
136 ENDIF
137 C South-west corner
138 IF ( exch2_isWedge(myTile) .EQ. 1 .AND.
139 & exch2_isSedge(myTile) .EQ. 1 ) THEN
140 DO j=1-OLy,0
141 DO i=1-OLx,0
142 phi(i,j,bi,bj)=e2FillValue_RX
143 ENDDO
144 ENDDO
145 ENDIF
146 C North-west corner
147 IF ( exch2_isWedge(myTile) .EQ. 1 .AND.
148 & exch2_isNedge(myTile) .EQ. 1 ) THEN
149 DO j=sNy+1,sNy+OLy
150 DO i=1-OLx,0
151 phi(i,j,bi,bj)=e2FillValue_RX
152 ENDDO
153 ENDDO
154 ENDIF
155 ENDDO
156 ENDDO
157 ENDIF
158 #endif /* W2_FILL_NULL_REGIONS */
159
160 RETURN
161 END
162
163 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
164
165 CEH3 ;;; Local Variables: ***
166 CEH3 ;;; mode:fortran ***
167 CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22