Back to home page

MITgcm

 
 

    


File indexing completed on 2023-05-28 05:10:12 UTC

view on githubraw file Latest commit b4daa243 on 2023-05-28 03:53:22 UTC
b4daa24319 Shre*0001 #include "CPP_EEOPTIONS.h"
                0002 
                0003 CBOP
                0004 C     !ROUTINE: EXCH2_RL2_CUBE_B
                0005 
                0006 C     !INTERFACE:
                0007       SUBROUTINE EXCH2_RL2_CUBE_B(
                0008      U            array1, array1b,
                0009      U            array2, array2b,
                0010      I            signOption, fieldCode,
                0011      I            myOLw, myOLe, myOLs, myOLn, myNz,
                0012      I            exchWidthX, exchWidthY,
                0013      I            cornerMode, myThid )
                0014 
                0015 C     !DESCRIPTION:
                0016 C     Two components vector field AD-Exchange:
                0017 C     Tile-edge overlap-region of a 2 component vector field is added to
                0018 C     corresponding near-edge interior data point and then zero out.
                0019 
                0020 C     !USES:
                0021       IMPLICIT NONE
                0022 
                0023 C     == Global data ==
                0024 #include "SIZE.h"
                0025 #include "EEPARAMS.h"
                0026 #include "EESUPPORT.h"
                0027 #include "W2_EXCH2_SIZE.h"
                0028 #include "W2_EXCH2_TOPOLOGY.h"
                0029 #include "W2_EXCH2_BUFFER.h"
                0030 
                0031 C     !INPUT/OUTPUT PARAMETERS:
                0032 C     array1      :: 1rst component array with edges to exchange.
                0033 C     array2      :: 2nd  component array with edges to exchange.
                0034 C     signOption  :: Flag controlling whether vector is signed.
                0035 C     fieldCode   :: field code (position on staggered grid)
                0036 C     myOLw,myOLe :: West and East overlap region sizes.
                0037 C     myOLs,myOLn :: South and North overlap region sizes.
                0038 C     exchWidthX  :: Width of data region exchanged in X.
                0039 C     exchWidthY  :: Width of data region exchanged in Y.
                0040 C     cornerMode  :: halo-corner-region treatment: update/ignore corner region
                0041 C     myThid      :: Thread number of this instance of S/R EXCH...
                0042 
                0043       INTEGER myOLw, myOLe, myOLs, myOLn, myNz
                0044       _RL array1(1-myOLw:sNx+myOLe,
                0045      &           1-myOLs:sNy+myOLn,
                0046      &           myNz, nSx, nSy)
                0047       _RL array2(1-myOLw:sNx+myOLe,
                0048      &           1-myOLs:sNy+myOLn,
                0049      &           myNz, nSx, nSy)
                0050       _RL array1b(1-myOLw:sNx+myOLe,
                0051      &           1-myOLs:sNy+myOLn,
                0052      &           myNz, nSx, nSy)
                0053       _RL array2b(1-myOLw:sNx+myOLe,
                0054      &           1-myOLs:sNy+myOLn,
                0055      &           myNz, nSx, nSy)
                0056       LOGICAL signOption
                0057       CHARACTER*2 fieldCode
                0058       INTEGER exchWidthX
                0059       INTEGER exchWidthY
                0060       INTEGER cornerMode
                0061       INTEGER myThid
                0062 
                0063 C     !LOCAL VARIABLES:
                0064 CEOP
                0065       CALL EXCH2_RL2_CUBE_AD(
                0066      U            array1b, array2b,
                0067      I            signOption, fieldCode,
                0068      I            myOLw, myOLe, myOLs, myOLn, myNz,
                0069      I            exchWidthX, exchWidthY,
                0070      I            cornerMode, myThid )
                0071       RETURN
                0072       END