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

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

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

revision 1.1 by jmc, Wed Jul 25 21:11:48 2007 UTC revision 1.5 by jmc, Thu May 6 23:28:45 2010 UTC
# Line 35  C     !USES: Line 35  C     !USES:
35    
36  #include "SIZE.h"  #include "SIZE.h"
37  #include "EEPARAMS.h"  #include "EEPARAMS.h"
38  #include "EESUPPORT.h"  #include "W2_EXCH2_SIZE.h"
39  #include "W2_EXCH2_TOPOLOGY.h"  #include "W2_EXCH2_TOPOLOGY.h"
40    #ifdef W2_FILL_NULL_REGIONS
41  #include "W2_EXCH2_PARAMS.h"  #include "W2_EXCH2_PARAMS.h"
42    #endif
43    
44  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
45  C     == Argument list variables ==  C     == Argument list variables ==
# Line 71  CEOP Line 73  CEOP
73        negOne = 1.        negOne = 1.
74        IF (withSigns) negOne = -1.        IF (withSigns) negOne = -1.
75    
       IF ( useCubedSphereExchange ) THEN  
 C---  using CubedSphereExchange:  
   
76  C--   First call the exchanges for the two components  C--   First call the exchanges for the two components
77    
78         CALL EXCH2_RX1_CUBE( uPhi, 'T ',         CALL EXCH2_RX1_CUBE( uPhi, .FALSE., 'T ',
79       I            OLw, OLe, OLs, OLn, myNz,       I            OLw, OLe, OLs, OLn, myNz,
80       I            exchWidthX, exchWidthY,       I            exchWidthX, exchWidthY,
81       I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )       I            EXCH_UPDATE_CORNERS, myThid )
82         CALL EXCH2_RX1_CUBE( uPhi, 'T ',         CALL EXCH2_RX1_CUBE( uPhi, .FALSE., 'T ',
83       I            OLw, OLe, OLs, OLn, myNz,       I            OLw, OLe, OLs, OLn, myNz,
84       I            exchWidthX, exchWidthY,       I            exchWidthX, exchWidthY,
85       I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )       I            EXCH_UPDATE_CORNERS, myThid )
86    
87         CALL EXCH2_RX1_CUBE( vPhi, 'T ',         CALL EXCH2_RX1_CUBE( vPhi, .FALSE., 'T ',
88       I            OLw, OLe, OLs, OLn, myNz,       I            OLw, OLe, OLs, OLn, myNz,
89       I            exchWidthX, exchWidthY,       I            exchWidthX, exchWidthY,
90       I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )       I            EXCH_UPDATE_CORNERS, myThid )
91         CALL EXCH2_RX1_CUBE( vPhi, 'T ',         CALL EXCH2_RX1_CUBE( vPhi, .FALSE., 'T ',
92       I            OLw, OLe, OLs, OLn, myNz,       I            OLw, OLe, OLs, OLn, myNz,
93       I            exchWidthX, exchWidthY,       I            exchWidthX, exchWidthY,
94       I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )       I            EXCH_UPDATE_CORNERS, myThid )
95    
96  C- note: can substitute the low-level S/R calls above with:  C- note: can substitute the low-level S/R calls above with:
97  c      CALL EXCH2_3D_RX( uPhi, myNz, myThid )  c      CALL EXCH2_3D_RX( uPhi, myNz, myThid )
98  c      CALL EXCH2_3D_RX( vPhi, myNz, myThid )  c      CALL EXCH2_3D_RX( vPhi, myNz, myThid )
99    
100          IF ( useCubedSphereExchange ) THEN
101    
102  C--   Then, depending on which tile we are, we may need  C--   Then, depending on which tile we are, we may need
103  C     1) to switch u and v components and also to switch the signs  C     1) to switch u and v components and also to switch the signs
104  C     2) to shift the index along the face edge.  C     2) to shift the index along the face edge.
# Line 111  C--   Loops on tile indices: Line 112  C--   Loops on tile indices:
112         DO bj = myByLo(myThid), myByHi(myThid)         DO bj = myByLo(myThid), myByHi(myThid)
113          DO bi = myBxLo(myThid), myBxHi(myThid)          DO bi = myBxLo(myThid), myBxHi(myThid)
114    
115  C-    Now choose what to do at each edge of the halo based on which face  C-    Choose what to do at each edge of the halo based on which face we are
116  C    (we assume that bj is always=1)           myTile = W2_myTileList(bi,bj)
          myTile = W2_myTileList(bi)  
117           myFace = exch2_myFace(myTile)           myFace = exch2_myFace(myTile)
118    
119  C--   Loops on level index:  C--   Loops on level index:
# Line 402  C--   end of Loops on tile indices (bi,b Line 402  C--   end of Loops on tile indices (bi,b
402          ENDDO          ENDDO
403         ENDDO         ENDDO
404    
 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  
   
       ELSE  
 C---  not using CubedSphereExchange:  
   
 #ifndef AUTODIFF_EXCH2  
        CALL EXCH_RX( uPhi,  
      I            OLw, OLe, OLs, OLn, myNz,  
      I            exchWidthX, exchWidthY,  
      I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )  
        CALL EXCH_RX( vPhi,  
      I            OLw, OLe, OLs, OLn, myNz,  
      I            exchWidthX, exchWidthY,  
      I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )  
 #endif  
   
405  C---  using or not using CubedSphereExchange: end  C---  using or not using CubedSphereExchange: end
406        ENDIF        ENDIF
407    

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

  ViewVC Help
Powered by ViewVC 1.1.22