Back to home page

MITgcm

 
 

    


Warning, /eesupp/src/exch_uv_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"
b8f938cfc6 Jean*0003 #ifdef ALLOW_EXCH2
                0004 #include "W2_OPTIONS.h"
                0005 #endif
ce7304455e Jean*0006 
                0007 CBOP
                0008 C     !ROUTINE: EXCH_UV_3D_RX
                0009 
                0010 C     !INTERFACE:
                0011       SUBROUTINE EXCH_UV_3D_RX(
6979a1789e Jean*0012      U                          uPhi, vPhi,
ce7304455e Jean*0013      I                          withSigns, myNz, myThid )
                0014 
                0015 C     !DESCRIPTION:
                0016 C     *==========================================================*
                0017 C     | SUBROUTINE EXCH_UV_3D_RX
                0018 C     | o Handle exchanges for _RX, 3-dimensional vector arrays.
                0019 C     *==========================================================*
                0020 C     | Vector arrays need to be rotated and interchaged for
                0021 C     | exchange operations on some grids. This driver routine
                0022 C     | branches to support this.
                0023 C     *==========================================================*
                0024 
                0025 C     !USES:
                0026       IMPLICIT NONE
45d7b5cc4e Jean*0027 
ce7304455e Jean*0028 C     === Global data ===
                0029 #include "SIZE.h"
                0030 #include "EEPARAMS.h"
                0031 
                0032 C     !INPUT/OUTPUT PARAMETERS:
                0033 C     === Routine arguments ===
6979a1789e Jean*0034 C     uPhi      :: 2 components of a vector field with overlap regions
                0035 C     vPhi      :: to be exchanged
45d7b5cc4e Jean*0036 C     withSigns :: Flag controlling whether vector is signed.
                0037 C     myNz      :: 3rd dimension of array to exchange
                0038 C     myThid    :: my Thread Id. number
ce7304455e Jean*0039       INTEGER myNz
6979a1789e Jean*0040       _RX uPhi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,myNz,nSx,nSy)
                0041       _RX vPhi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,myNz,nSx,nSy)
ce7304455e Jean*0042       LOGICAL withSigns
                0043       INTEGER myThid
                0044 
                0045 C     !LOCAL VARIABLES:
3e943aa97a Jean*0046 #ifndef ALLOW_EXCH2
ce7304455e Jean*0047 C     == Local variables ==
                0048 C     OL[wens]       :: Overlap extents in west, east, north, south.
                0049 C     exchWidth[XY]  :: Extent of regions that will be exchanged.
                0050       INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY
3e943aa97a Jean*0051 #endif
ce7304455e Jean*0052 CEOP
3e943aa97a Jean*0053 
ce7304455e Jean*0054 #ifdef ALLOW_EXCH2
b8f938cfc6 Jean*0055 #ifdef W2_USE_R1_ONLY
                0056       CALL EXCH2_UV_CGRID_3D_RX(
6979a1789e Jean*0057      U                     uPhi, vPhi,
b8f938cfc6 Jean*0058      I                     withSigns, myNz, myThid )
                0059 #else
ce7304455e Jean*0060       CALL EXCH2_UV_3D_RX(
6979a1789e Jean*0061      U                     uPhi, vPhi,
ce7304455e Jean*0062      I                     withSigns, myNz, myThid )
b8f938cfc6 Jean*0063 #endif
                0064 #else /* ALLOW_EXCH2 */
ce7304455e Jean*0065 
                0066       OLw        = OLx
                0067       OLe        = OLx
                0068       OLn        = OLy
                0069       OLs        = OLy
                0070       exchWidthX = OLx
                0071       exchWidthY = OLy
                0072       IF (useCubedSphereExchange) THEN
6979a1789e Jean*0073        CALL EXCH1_UV_RX_CUBE( uPhi, vPhi, withSigns,
ce7304455e Jean*0074      I            OLw, OLe, OLs, OLn, myNz,
                0075      I            exchWidthX, exchWidthY,
45d7b5cc4e Jean*0076      I            EXCH_UPDATE_CORNERS, myThid )
ce7304455e Jean*0077       ELSE
6979a1789e Jean*0078 #ifdef DISCONNECTED_TILES
                0079        CALL EXCH0_RX( uPhi,
                0080      I            OLw, OLe, OLs, OLn, myNz,
                0081      I            exchWidthX, exchWidthY,
                0082      I            EXCH_UPDATE_CORNERS, myThid )
                0083        CALL EXCH0_RX( vPhi,
                0084      I            OLw, OLe, OLs, OLn, myNz,
                0085      I            exchWidthX, exchWidthY,
                0086      I            EXCH_UPDATE_CORNERS, myThid )
                0087 #else /* DISCONNECTED_TILES */
                0088        CALL EXCH1_RX( uPhi,
ce7304455e Jean*0089      I            OLw, OLe, OLs, OLn, myNz,
                0090      I            exchWidthX, exchWidthY,
45d7b5cc4e Jean*0091      I            EXCH_UPDATE_CORNERS, myThid )
6979a1789e Jean*0092        CALL EXCH1_RX( vPhi,
ce7304455e Jean*0093      I            OLw, OLe, OLs, OLn, myNz,
                0094      I            exchWidthX, exchWidthY,
45d7b5cc4e Jean*0095      I            EXCH_UPDATE_CORNERS, myThid )
6979a1789e Jean*0096 #endif /* DISCONNECTED_TILES */
ce7304455e Jean*0097       ENDIF
                0098 
b8f938cfc6 Jean*0099 #endif /* ALLOW_EXCH2 */
6979a1789e Jean*0100 
                0101       RETURN
ce7304455e Jean*0102       END
                0103 
                0104 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0105 
                0106 CEH3 ;;; Local Variables: ***
                0107 CEH3 ;;; mode:fortran ***
                0108 CEH3 ;;; End: ***