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

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

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


Revision 1.8 - (hide annotations) (download)
Tue Sep 4 00:47:14 2012 UTC (11 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63s, checkpoint64, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.7: +4 -4 lines
remove W2_EXCH2_PARAMS.h (no longer needed)

1 jmc 1.8 C $Header: /u/gcmpack/MITgcm/pkg/exch2/exch2_3d_rx.template,v 1.7 2012/03/26 19:43:10 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4     #include "CPP_EEOPTIONS.h"
5     #include "W2_OPTIONS.h"
6    
7     CBOP
8     C !ROUTINE: EXCH2_3D_RX
9    
10     C !INTERFACE:
11     SUBROUTINE EXCH2_3D_RX(
12     U phi,
13     I myNz, myThid )
14    
15     C !DESCRIPTION:
16     C *==========================================================*
17     C | SUBROUTINE EXCH2_3D_RX
18     C | o Handle exchanges for _RX, three-dim scalar arrays.
19     C *==========================================================*
20    
21     C !USES:
22     IMPLICIT NONE
23     C === Global data ===
24     #include "SIZE.h"
25     #include "EEPARAMS.h"
26 jmc 1.4 #include "W2_EXCH2_SIZE.h"
27 jmc 1.1 #include "W2_EXCH2_TOPOLOGY.h"
28 jmc 1.8 c#ifdef W2_FILL_NULL_REGIONS
29     c#include "W2_EXCH2_PARAMS.h"
30     c#endif
31 jmc 1.1
32     C !INPUT/OUTPUT PARAMETERS:
33     C === Routine arguments ===
34     C phi :: Array with overlap regions are to be exchanged
35     C myNz :: 3rd dimension of array to exchange
36     C myThid :: My thread id.
37     INTEGER myNz
38     _RX phi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,myNz,nSx,nSy)
39     INTEGER myThid
40    
41     C !LOCAL VARIABLES:
42     C == Local variables ==
43     C OL[wens] :: Overlap extents in west, east, north, south.
44     C exchWidth[XY] :: Extent of regions that will be exchanged.
45     INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY
46     #ifdef W2_FILL_NULL_REGIONS
47     INTEGER bi, bj, myTile, i, j, k
48     #endif
49    
50     CEOP
51    
52     OLw = OLx
53     OLe = OLx
54     OLn = OLy
55     OLs = OLy
56     exchWidthX = OLx
57     exchWidthY = OLy
58    
59 jmc 1.6 CALL EXCH2_RX1_CUBE( phi, .FALSE., 'T ',
60 jmc 1.1 I OLw, OLe, OLs, OLn, myNz,
61     I exchWidthX, exchWidthY,
62 jmc 1.7 I EXCH_IGNORE_CORNERS, myThid )
63 jmc 1.1
64 jmc 1.6 CALL EXCH2_RX1_CUBE( phi, .FALSE., 'T ',
65 jmc 1.1 I OLw, OLe, OLs, OLn, myNz,
66     I exchWidthX, exchWidthY,
67 jmc 1.6 I EXCH_UPDATE_CORNERS, myThid )
68 jmc 1.1
69     #ifdef W2_FILL_NULL_REGIONS
70 jmc 1.5 IF (useCubedSphereExchange) THEN
71 jmc 1.1 DO bj=myByLo(myThid),myByHi(myThid)
72     DO bi=myBxLo(myThid),myBxHi(myThid)
73 jmc 1.5 myTile = W2_myTileList(bi,bj)
74 jmc 1.1 C South-east corner
75     IF ( exch2_isEedge(myTile) .EQ. 1 .AND.
76     & exch2_isSedge(myTile) .EQ. 1 ) THEN
77     DO j=1-OLy,0
78     DO i=sNx+1,sNx+OLx
79     DO k=1,myNz
80     phi(i,j,k,bi,bj)=e2FillValue_RX
81     ENDDO
82     ENDDO
83     ENDDO
84     ENDIF
85     C North-east corner
86     IF ( exch2_isEedge(myTile) .EQ. 1 .AND.
87     & exch2_isNedge(myTile) .EQ. 1 ) THEN
88     DO j=sNy+1,sNy+OLy
89     DO i=sNx+1,sNx+OLx
90     DO k=1,myNz
91     phi(i,j,k,bi,bj)=e2FillValue_RX
92     ENDDO
93     ENDDO
94     ENDDO
95     ENDIF
96     C South-west corner
97     IF ( exch2_isWedge(myTile) .EQ. 1 .AND.
98     & exch2_isSedge(myTile) .EQ. 1 ) THEN
99     DO j=1-OLy,0
100     DO i=1-OLx,0
101     DO k=1,myNz
102     phi(i,j,k,bi,bj)=e2FillValue_RX
103     ENDDO
104     ENDDO
105     ENDDO
106     ENDIF
107     C North-west corner
108     IF ( exch2_isWedge(myTile) .EQ. 1 .AND.
109     & exch2_isNedge(myTile) .EQ. 1 ) THEN
110     DO j=sNy+1,sNy+OLy
111     DO i=1-OLx,0
112     DO k=1,myNz
113     phi(i,j,k,bi,bj)=e2FillValue_RX
114     ENDDO
115     ENDDO
116     ENDDO
117     ENDIF
118     ENDDO
119     ENDDO
120 jmc 1.5 ENDIF
121 jmc 1.1 #endif /* W2_FILL_NULL_REGIONS */
122    
123     RETURN
124     END
125    
126     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
127    
128     CEH3 ;;; Local Variables: ***
129     CEH3 ;;; mode:fortran ***
130     CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22