Back to home page

MITgcm

 
 

    


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