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

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

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

revision 1.4 by jmc, Tue May 12 19:44:58 2009 UTC revision 1.5 by jmc, Sun Jun 28 00:57:51 2009 UTC
# Line 17  C     *================================= Line 17  C     *=================================
17  C     | SUBROUTINE EXCH2_3D_RX  C     | SUBROUTINE EXCH2_3D_RX
18  C     | o Handle exchanges for _RX, three-dim scalar arrays.  C     | o Handle exchanges for _RX, three-dim scalar arrays.
19  C     *==========================================================*  C     *==========================================================*
 C     | Invoke appropriate exchange routine depending on type  
 C     | of grid (cube or globally indexed) to be operated on.  
 C     *==========================================================*  
20    
21  C     !USES:  C     !USES:
22        IMPLICIT NONE        IMPLICIT NONE
23  C     === Global data ===  C     === Global data ===
24  #include "SIZE.h"  #include "SIZE.h"
25  #include "EEPARAMS.h"  #include "EEPARAMS.h"
 cph-mpi#include "EESUPPORT.h"  
26  #include "W2_EXCH2_SIZE.h"  #include "W2_EXCH2_SIZE.h"
27  #include "W2_EXCH2_TOPOLOGY.h"  #include "W2_EXCH2_TOPOLOGY.h"
28  #ifdef W2_FILL_NULL_REGIONS  #ifdef W2_FILL_NULL_REGIONS
# Line 59  CEOP Line 55  CEOP
55        OLs        = OLy        OLs        = OLy
56        exchWidthX = OLx        exchWidthX = OLx
57        exchWidthY = OLy        exchWidthY = OLy
 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.  
   
       IF (useCubedSphereExchange) THEN  
58    
59         CALL EXCH2_RX1_CUBE( phi, 'T ',        CALL EXCH2_RX1_CUBE( phi, 'T ',
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            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
63    
64  #ifdef W2_FILL_NULL_REGIONS  #ifdef W2_FILL_NULL_REGIONS
65          IF (useCubedSphereExchange) THEN
66         DO bj=myByLo(myThid),myByHi(myThid)         DO bj=myByLo(myThid),myByHi(myThid)
67          DO bi=myBxLo(myThid),myBxHi(myThid)          DO bi=myBxLo(myThid),myBxHi(myThid)
68           myTile = W2_myTileList(bi)           myTile = W2_myTileList(bi,bj)
69  C        South-east corner  C        South-east corner
70           IF ( exch2_isEedge(myTile) .EQ. 1 .AND.           IF ( exch2_isEedge(myTile) .EQ. 1 .AND.
71       &        exch2_isSedge(myTile) .EQ. 1 ) THEN       &        exch2_isSedge(myTile) .EQ. 1 ) THEN
# Line 123  C        North-west corner Line 112  C        North-west corner
112           ENDIF           ENDIF
113          ENDDO          ENDDO
114         ENDDO         ENDDO
115          ENDIF
116  #endif /* W2_FILL_NULL_REGIONS */  #endif /* W2_FILL_NULL_REGIONS */
117    
118         CALL EXCH2_RX1_CUBE( phi, 'T ',        CALL EXCH2_RX1_CUBE( phi, 'T ',
119       I            OLw, OLe, OLs, OLn, myNz,       I            OLw, OLe, OLs, OLn, myNz,
120       I            exchWidthX, exchWidthY,       I            exchWidthX, exchWidthY,
121       I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )       I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
122    
123  #ifdef W2_FILL_NULL_REGIONS  #ifdef W2_FILL_NULL_REGIONS
124          IF (useCubedSphereExchange) THEN
125         DO bj=myByLo(myThid),myByHi(myThid)         DO bj=myByLo(myThid),myByHi(myThid)
126          DO bi=myBxLo(myThid),myBxHi(myThid)          DO bi=myBxLo(myThid),myBxHi(myThid)
127           myTile = W2_myTileList(bi)           myTile = W2_myTileList(bi,bj)
128  C        South-east corner  C        South-east corner
129           IF ( exch2_isEedge(myTile) .EQ. 1 .AND.           IF ( exch2_isEedge(myTile) .EQ. 1 .AND.
130       &        exch2_isSedge(myTile) .EQ. 1 ) THEN       &        exch2_isSedge(myTile) .EQ. 1 ) THEN
# Line 180  C        North-west corner Line 171  C        North-west corner
171           ENDIF           ENDIF
172          ENDDO          ENDDO
173         ENDDO         ENDDO
 #endif /* W2_FILL_NULL_REGIONS */  
   
       ELSE  
   
 #ifndef AUTODIFF_EXCH2  
        CALL EXCH_RX( phi,  
      I            OLw, OLe, OLs, OLn, myNz,  
      I            exchWidthX, exchWidthY,  
      I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )  
 #endif  
   
174        ENDIF        ENDIF
175    #endif /* W2_FILL_NULL_REGIONS */
176    
177        RETURN        RETURN
178        END        END

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22