Back to home page

MITgcm

 
 

    


Warning, /eesupp/src/exch_xy_rx.template is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
096bb2e204 Jean*0001 #include "PACKAGES_CONFIG.h"
aea29c8517 Alis*0002 #include "CPP_EEOPTIONS.h"
                0003 
4c563c2ee9 Chri*0004 CBOP
                0005 
                0006 C     !ROUTINE: EXCH_XY_RX
                0007 
                0008 C     !INTERFACE:
3e943aa97a Jean*0009       SUBROUTINE EXCH_XY_RX(
                0010      U                       phi,
aea29c8517 Alis*0011      I                       myThid )
45d7b5cc4e Jean*0012 
4c563c2ee9 Chri*0013 C     !DESCRIPTION:
                0014 C     *==========================================================*
3e943aa97a Jean*0015 C     | SUBROUTINE EXCH_XY_RX
4c563c2ee9 Chri*0016 C     | o Handle exchanges for _RX two-dimensional scalar arrays.
                0017 C     *==========================================================*
45d7b5cc4e Jean*0018 C     | Invoke appropriate exchange routine depending on type
                0019 C     | of grid (cube or globally indexed) to be operated on.
4c563c2ee9 Chri*0020 C     *==========================================================*
aea29c8517 Alis*0021 
4c563c2ee9 Chri*0022 C     !USES:
45d7b5cc4e Jean*0023       IMPLICIT NONE
                0024 
aea29c8517 Alis*0025 C     === Global data ===
                0026 #include "SIZE.h"
                0027 #include "EEPARAMS.h"
                0028 
4c563c2ee9 Chri*0029 C     !INPUT/OUTPUT PARAMETERS:
aea29c8517 Alis*0030 C     === Routine arguments ===
4c563c2ee9 Chri*0031 C     phi    :: Array with overlap regions are to be exchanged
                0032 C     myThid :: My thread id.
aea29c8517 Alis*0033       _RX phi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0034       INTEGER myThid
                0035 
4c563c2ee9 Chri*0036 C     !LOCAL VARIABLES:
3e943aa97a Jean*0037 #ifndef ALLOW_EXCH2
aea29c8517 Alis*0038 C     == Local variables ==
4c563c2ee9 Chri*0039 C     OL[wens]       :: Overlap extents in west, east, north, south.
                0040 C     exchWidth[XY]  :: Extent of regions that will be exchanged.
aea29c8517 Alis*0041       INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz
3e943aa97a Jean*0042 #endif
4c563c2ee9 Chri*0043 CEOP
aea29c8517 Alis*0044 
096bb2e204 Jean*0045 #ifdef ALLOW_EXCH2
45d7b5cc4e Jean*0046       CALL EXCH2_3D_RX( phi, 1, myThid )
3e943aa97a Jean*0047 #else /* ALLOW_EXCH2 */
096bb2e204 Jean*0048 
aea29c8517 Alis*0049       OLw        = OLx
                0050       OLe        = OLx
                0051       OLn        = OLy
                0052       OLs        = OLy
                0053       exchWidthX = OLx
                0054       exchWidthY = OLy
                0055       myNz       = 1
                0056       IF (useCubedSphereExchange) THEN
45d7b5cc4e Jean*0057        CALL EXCH1_RX_CUBE( phi, .FALSE.,
aea29c8517 Alis*0058      I            OLw, OLe, OLs, OLn, myNz,
                0059      I            exchWidthX, exchWidthY,
45d7b5cc4e Jean*0060      I            EXCH_UPDATE_CORNERS, myThid )
aea29c8517 Alis*0061       ELSE
6979a1789e Jean*0062 #ifdef DISCONNECTED_TILES
                0063        CALL EXCH0_RX( phi,
                0064      I            OLw, OLe, OLs, OLn, myNz,
                0065      I            exchWidthX, exchWidthY,
                0066      I            EXCH_UPDATE_CORNERS, myThid )
                0067 #else /* DISCONNECTED_TILES */
45d7b5cc4e Jean*0068        CALL EXCH1_RX( phi,
aea29c8517 Alis*0069      I            OLw, OLe, OLs, OLn, myNz,
                0070      I            exchWidthX, exchWidthY,
45d7b5cc4e Jean*0071      I            EXCH_UPDATE_CORNERS, myThid )
6979a1789e Jean*0072 #endif /* DISCONNECTED_TILES */
aea29c8517 Alis*0073       ENDIF
                0074 
3e943aa97a Jean*0075 #endif /* ALLOW_EXCH2 */
6979a1789e Jean*0076 
                0077       RETURN
aea29c8517 Alis*0078       END
096bb2e204 Jean*0079 
                0080 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0081 
                0082 CEH3 ;;; Local Variables: ***
                0083 CEH3 ;;; mode:fortran ***
                0084 CEH3 ;;; End: ***