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