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

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

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

revision 1.5 by jmc, Tue May 12 19:44:58 2009 UTC revision 1.8 by jmc, Mon Mar 26 19:43:10 2012 UTC
# Line 35  C     !USES: Line 35  C     !USES:
35    
36  #include "SIZE.h"  #include "SIZE.h"
37  #include "EEPARAMS.h"  #include "EEPARAMS.h"
 c#include "EESUPPORT.h"  
38  #include "W2_EXCH2_SIZE.h"  #include "W2_EXCH2_SIZE.h"
39  #include "W2_EXCH2_TOPOLOGY.h"  #include "W2_EXCH2_TOPOLOGY.h"
40    
# Line 71  CEOP Line 70  CEOP
70        negOne = 1.        negOne = 1.
71        IF (withSigns) negOne = -1.        IF (withSigns) negOne = -1.
72    
       IF ( useCubedSphereExchange ) THEN  
 C---  using CubedSphereExchange:  
   
73  C--   First call the exchanges for the two components  C--   First call the exchanges for the two components
74    
75         CALL EXCH2_RX1_CUBE( uPhi, 'T ',         CALL EXCH2_RX1_CUBE( uPhi, .FALSE., 'T ',
76       I            OLw, OLe, OLs, OLn, myNz,       I            OLw, OLe, OLs, OLn, myNz,
77       I            exchWidthX, exchWidthY,       I            exchWidthX, exchWidthY,
78       I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )       I            EXCH_IGNORE_CORNERS, myThid )
79         CALL EXCH2_RX1_CUBE( uPhi, 'T ',         CALL EXCH2_RX1_CUBE( uPhi, .FALSE., 'T ',
80       I            OLw, OLe, OLs, OLn, myNz,       I            OLw, OLe, OLs, OLn, myNz,
81       I            exchWidthX, exchWidthY,       I            exchWidthX, exchWidthY,
82       I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )       I            EXCH_UPDATE_CORNERS, myThid )
83    
84         CALL EXCH2_RX1_CUBE( vPhi, 'T ',         CALL EXCH2_RX1_CUBE( vPhi, .FALSE., 'T ',
85       I            OLw, OLe, OLs, OLn, myNz,       I            OLw, OLe, OLs, OLn, myNz,
86       I            exchWidthX, exchWidthY,       I            exchWidthX, exchWidthY,
87       I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )       I            EXCH_IGNORE_CORNERS, myThid )
88         CALL EXCH2_RX1_CUBE( vPhi, 'T ',         CALL EXCH2_RX1_CUBE( vPhi, .FALSE., 'T ',
89       I            OLw, OLe, OLs, OLn, myNz,       I            OLw, OLe, OLs, OLn, myNz,
90       I            exchWidthX, exchWidthY,       I            exchWidthX, exchWidthY,
91       I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )       I            EXCH_UPDATE_CORNERS, myThid )
92    
93  C- note: can substitute the low-level S/R calls above with:  C- note: can substitute the low-level S/R calls above with:
94  c      CALL EXCH2_3D_RX( uPhi, myNz, myThid )  c      CALL EXCH2_3D_RX( uPhi, myNz, myThid )
95  c      CALL EXCH2_3D_RX( vPhi, myNz, myThid )  c      CALL EXCH2_3D_RX( vPhi, myNz, myThid )
96    
97          IF ( useCubedSphereExchange ) THEN
98    
99  C--   Then we may need to switch u and v components  C--   Then we may need to switch u and v components
100  C     and/or the signs depending on which cube face we are located.  C     and/or the signs depending on which cube face we are located.
101    
# Line 105  C--   Loops on tile indices: Line 103  C--   Loops on tile indices:
103         DO bj = myByLo(myThid), myByHi(myThid)         DO bj = myByLo(myThid), myByHi(myThid)
104          DO bi = myBxLo(myThid), myBxHi(myThid)          DO bi = myBxLo(myThid), myBxHi(myThid)
105    
106  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
107  C     (we assume that bj is always=1)           myTile = W2_myTileList(bi,bj)
          myTile = W2_myTileList(bi)  
108           myFace = exch2_myFace(myTile)           myFace = exch2_myFace(myTile)
109    
110  C--   Loops on level index:  C--   Loops on level index:
# Line 208  C--    end of Loops on tile and level in Line 205  C--    end of Loops on tile and level in
205          ENDDO          ENDDO
206         ENDDO         ENDDO
207    
       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  
   
208  C---  using or not using CubedSphereExchange: end  C---  using or not using CubedSphereExchange: end
209        ENDIF        ENDIF
210    

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

  ViewVC Help
Powered by ViewVC 1.1.22