Back to home page

MITgcm

 
 

    


Warning, /eesupp/src/exch_s3d_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
056a52ae18 Jean*0001 #include "PACKAGES_CONFIG.h"
                0002 #include "CPP_EEOPTIONS.h"
                0003 
ce7304455e Jean*0004 CBOP
056a52ae18 Jean*0005 C     !ROUTINE: EXCH_S3D_RX
                0006 
                0007 C     !INTERFACE:
                0008       SUBROUTINE EXCH_S3D_RX(
                0009      U                       phi,
ce7304455e Jean*0010      I                       myNz, myThid )
056a52ae18 Jean*0011 
                0012 C     !DESCRIPTION:
                0013 C     *==========================================================*
                0014 C     | SUBROUTINE EXCH_S3D_RX
                0015 C     | o Handle Simple exchanges (= that ignore corners)
                0016 C     |   for _RX, 3-dim scalar arrays with overlap size = 1
                0017 C     *==========================================================*
                0018 C     | Invoke appropriate exchange routine depending on type
                0019 C     | of grid (cube or globally indexed) to be operated on.
                0020 C     *==========================================================*
                0021 
                0022 C     !USES:
ce7304455e Jean*0023       IMPLICIT NONE
056a52ae18 Jean*0024 C     === Global data ===
                0025 #include "SIZE.h"
                0026 #include "EEPARAMS.h"
                0027 
                0028 C     !INPUT/OUTPUT PARAMETERS:
                0029 C     === Routine arguments ===
                0030 C     phi    :: Array with overlap regions are to be exchanged
ce7304455e Jean*0031 C     myNz   :: 3rd dimension of array to exchange
056a52ae18 Jean*0032 C     myThid :: My thread id.
ce7304455e Jean*0033       INTEGER myNz
                0034       _RX phi(0:sNx+1,0:sNy+1,myNz,nSx,nSy)
056a52ae18 Jean*0035       INTEGER myThid
                0036 
                0037 C     !LOCAL VARIABLES:
3e943aa97a Jean*0038 #ifndef ALLOW_EXCH2
056a52ae18 Jean*0039 C     == Local variables ==
                0040 C     OL[wens]       :: Overlap extents in west, east, north, south.
                0041 C     exchWidth[XY]  :: Extent of regions that will be exchanged.
ce7304455e Jean*0042       INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY
3e943aa97a Jean*0043 #endif
056a52ae18 Jean*0044 CEOP
                0045 
                0046 #ifdef ALLOW_EXCH2
ce7304455e Jean*0047       CALL EXCH2_S3D_RX( phi, myNz, myThid )
3e943aa97a Jean*0048 #else /* ALLOW_EXCH2 */
056a52ae18 Jean*0049 
                0050       OLw        = 1
                0051       OLe        = 1
                0052       OLn        = 1
                0053       OLs        = 1
                0054       exchWidthX = 1
                0055       exchWidthY = 1
                0056       IF (useCubedSphereExchange) THEN
45d7b5cc4e Jean*0057        CALL EXCH1_RX_CUBE( phi, .FALSE.,
056a52ae18 Jean*0058      I            OLw, OLe, OLs, OLn, myNz,
                0059      I            exchWidthX, exchWidthY,
45d7b5cc4e Jean*0060      I            EXCH_IGNORE_CORNERS, myThid )
056a52ae18 Jean*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_IGNORE_CORNERS, myThid )
                0067 #else /* DISCONNECTED_TILES */
45d7b5cc4e Jean*0068        CALL EXCH1_RX( phi,
056a52ae18 Jean*0069      I            OLw, OLe, OLs, OLn, myNz,
                0070      I            exchWidthX, exchWidthY,
45d7b5cc4e Jean*0071      I            EXCH_IGNORE_CORNERS, myThid )
6979a1789e Jean*0072 #endif /* DISCONNECTED_TILES */
056a52ae18 Jean*0073       ENDIF
                0074 
3e943aa97a Jean*0075 #endif /* ALLOW_EXCH2 */
6979a1789e Jean*0076 
                0077       RETURN
056a52ae18 Jean*0078       END