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

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

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

revision 1.2 by jmc, Tue May 12 19:44:58 2009 UTC revision 1.4 by jmc, Thu May 6 23:28:46 2010 UTC
# Line 36  C     !USES: Line 36  C     !USES:
36    
37  #include "SIZE.h"  #include "SIZE.h"
38  #include "EEPARAMS.h"  #include "EEPARAMS.h"
 c#include "EESUPPORT.h"  
39  #include "W2_EXCH2_SIZE.h"  #include "W2_EXCH2_SIZE.h"
40  #include "W2_EXCH2_TOPOLOGY.h"  #include "W2_EXCH2_TOPOLOGY.h"
41    
# Line 69  CEOP Line 68  CEOP
68        negOne = 1.        negOne = 1.
69        IF (withSigns) negOne = -1.        IF (withSigns) negOne = -1.
70    
       IF ( useCubedSphereExchange ) THEN  
 C---  using CubedSphereExchange:  
   
71  C--   First call the exchanges for the two components, ignoring the Sign  C--   First call the exchanges for the two components, ignoring the Sign
72  C     note the order: vPhi,uPhi on D-grid are co-located with (u,v)_Cgrid  C     note the order: vPhi,uPhi on D-grid are co-located with (u,v)_Cgrid
73    
74  c      CALL EXCH2_RX2_CUBE( vPhi, uPhi, .FALSE., 'UV',  c      CALL EXCH2_RX2_CUBE( vPhi, uPhi, .FALSE., 'Cg',
75  c    I            OLw, OLe, OLs, OLn, myNz,  c    I            OLw, OLe, OLs, OLn, myNz,
76  c    I            exchWidthX, exchWidthY,  c    I            exchWidthX, exchWidthY,
77  c    I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )  c    I            EXCH_UPDATE_CORNERS, myThid )
78  c      CALL EXCH2_RX2_CUBE( vPhi, uPhi, .FALSE., 'UV',  c      CALL EXCH2_RX2_CUBE( vPhi, uPhi, .FALSE., 'Cg',
79  c    I            OLw, OLe, OLs, OLn, myNz,  c    I            OLw, OLe, OLs, OLn, myNz,
80  c    I            exchWidthX, exchWidthY,  c    I            exchWidthX, exchWidthY,
81  c    I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )  c    I            EXCH_UPDATE_CORNERS, myThid )
 c      CALL EXCH2_RX2_CUBE( vPhi, uPhi, .FALSE., 'UV',  
 c    I            OLw, OLe, OLs, OLn, myNz,  
 c    I            exchWidthX, exchWidthY,  
 c    I            FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )  
82    
83  C- note: can substitute the low-level S/R calls above with:  C- note: can substitute the low-level S/R calls above with:
84  #ifdef W2_USE_R1_ONLY  #ifdef W2_USE_R1_ONLY
# Line 99  C- note: can substitute the low-level S/ Line 91  C- note: can substitute the low-level S/
91       I                     .FALSE., myNz, myThid )       I                     .FALSE., myNz, myThid )
92  #endif  #endif
93    
94          IF ( useCubedSphereExchange ) THEN
95    C---  using CubedSphereExchange:
96    
97  C--   Then we may need to switch the signs depending on which cube face  C--   Then we may need to switch the signs depending on which cube face
98  C     we are located.  C     we are located.
99    
# Line 106  C--   Loops on tile indices: Line 101  C--   Loops on tile indices:
101         DO bj = myByLo(myThid), myByHi(myThid)         DO bj = myByLo(myThid), myByHi(myThid)
102          DO bi = myBxLo(myThid), myBxHi(myThid)          DO bi = myBxLo(myThid), myBxHi(myThid)
103    
104  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
105  C     (we assume that bj is always=1)           myTile = W2_myTileList(bi,bj)
          myTile = W2_myTileList(bi)  
106           myFace = exch2_myFace(myTile)           myFace = exch2_myFace(myTile)
107    
108  C--   Loops on level index:  C--   Loops on level index:
# Line 201  C--    end of Loops on tile and level in Line 195  C--    end of Loops on tile and level in
195          ENDDO          ENDDO
196         ENDDO         ENDDO
197    
       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  
   
198  C---  using or not using CubedSphereExchange: end  C---  using or not using CubedSphereExchange: end
199        ENDIF        ENDIF
200    

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

  ViewVC Help
Powered by ViewVC 1.1.22