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

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

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


Revision 1.10 - (hide annotations) (download)
Thu May 27 14:40:09 2010 UTC (14 years ago) by jmc
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
remove exch2_*xy_rx files (call was replaced with exch_*3d_rx(myNz=1))

1 jmc 1.10 C $Header: /u/gcmpack/MITgcm/pkg/exch2/exch2_xy_rx.template,v 1.9 2010/05/06 23:28:46 jmc Exp $
2 afe 1.1 C $Name: $
3    
4     #include "CPP_EEOPTIONS.h"
5 jmc 1.3 #include "W2_OPTIONS.h"
6 afe 1.1
7     CBOP
8    
9     C !ROUTINE: EXCH_XY_RX
10    
11     C !INTERFACE:
12 jmc 1.3 SUBROUTINE EXCH2_XY_RX(
13     U phi,
14 afe 1.1 I myThid )
15     IMPLICIT NONE
16     C !DESCRIPTION:
17     C *==========================================================*
18 jmc 1.3 C | SUBROUTINE EXCH_XY_RX
19 afe 1.1 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 jmc 1.7 #include "W2_EXCH2_SIZE.h"
27 afe 1.1 #include "W2_EXCH2_TOPOLOGY.h"
28 jmc 1.7 #ifdef W2_FILL_NULL_REGIONS
29 afe 1.1 #include "W2_EXCH2_PARAMS.h"
30 jmc 1.7 #endif
31 afe 1.1
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 jmc 1.4 #ifdef W2_FILL_NULL_REGIONS
45 afe 1.1 INTEGER bi, bj, myTile, i, j
46 jmc 1.4 #endif
47 afe 1.1 CEOP
48 jmc 1.3
49 afe 1.1
50     OLw = OLx
51     OLe = OLx
52     OLn = OLy
53     OLs = OLy
54     exchWidthX = OLx
55     exchWidthY = OLy
56     myNz = 1
57 jmc 1.3
58 jmc 1.9 CALL EXCH2_RX1_CUBE( phi, .FALSE., 'T ',
59 afe 1.1 I OLw, OLe, OLs, OLn, myNz,
60     I exchWidthX, exchWidthY,
61 jmc 1.9 I EXCH_UPDATE_CORNERS, myThid )
62 jmc 1.3
63 jmc 1.9 CALL EXCH2_RX1_CUBE( phi, .FALSE., 'T ',
64 afe 1.1 I OLw, OLe, OLs, OLn, myNz,
65     I exchWidthX, exchWidthY,
66 jmc 1.9 I EXCH_UPDATE_CORNERS, myThid )
67 jmc 1.3
68     #ifdef W2_FILL_NULL_REGIONS
69 jmc 1.8 IF (useCubedSphereExchange) THEN
70 afe 1.1 DO bj=myByLo(myThid),myByHi(myThid)
71     DO bi=myBxLo(myThid),myBxHi(myThid)
72 jmc 1.8 myTile = W2_myTileList(bi,bj)
73 afe 1.1 C South-east corner
74     IF ( exch2_isEedge(myTile) .EQ. 1 .AND.
75     & exch2_isSedge(myTile) .EQ. 1 ) THEN
76     DO j=1-OLy,0
77     DO i=sNx+1,sNx+OLx
78 jmc 1.3 phi(i,j,bi,bj)=e2FillValue_RX
79 afe 1.1 ENDDO
80     ENDDO
81     ENDIF
82     C North-east corner
83     IF ( exch2_isEedge(myTile) .EQ. 1 .AND.
84     & exch2_isNedge(myTile) .EQ. 1 ) THEN
85     DO j=sNy+1,sNy+OLy
86     DO i=sNx+1,sNx+OLx
87 jmc 1.3 phi(i,j,bi,bj)=e2FillValue_RX
88 afe 1.1 ENDDO
89     ENDDO
90     ENDIF
91     C South-west corner
92     IF ( exch2_isWedge(myTile) .EQ. 1 .AND.
93     & exch2_isSedge(myTile) .EQ. 1 ) THEN
94     DO j=1-OLy,0
95     DO i=1-OLx,0
96 jmc 1.3 phi(i,j,bi,bj)=e2FillValue_RX
97 afe 1.1 ENDDO
98     ENDDO
99     ENDIF
100     C North-west corner
101     IF ( exch2_isWedge(myTile) .EQ. 1 .AND.
102     & exch2_isNedge(myTile) .EQ. 1 ) THEN
103     DO j=sNy+1,sNy+OLy
104     DO i=1-OLx,0
105 jmc 1.3 phi(i,j,bi,bj)=e2FillValue_RX
106 afe 1.1 ENDDO
107     ENDDO
108     ENDIF
109     ENDDO
110     ENDDO
111 jmc 1.8 ENDIF
112 jmc 1.3 #endif /* W2_FILL_NULL_REGIONS */
113 afe 1.1
114     RETURN
115     END
116 edhill 1.2
117     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
118    
119     CEH3 ;;; Local Variables: ***
120     CEH3 ;;; mode:fortran ***
121     CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22