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