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_RS1_CUBE_B
                0005 
                0006 C     !INTERFACE:
                0007       SUBROUTINE EXCH2_RS1_CUBE_B(
                0008      U            array, arrayb,
                0009      I            signOption, fieldCode,
                0010      I            myOLw, myOLe, myOLs, myOLn, myNz,
                0011      I            exchWidthX, exchWidthY,
                0012      I            cornerMode, myThid )
                0013 
                0014 C     !DESCRIPTION:
                0015 C     Scalar field (1 component) AD-Exchange:
                0016 C     Tile-edge overlap-region of a 1 component scalar field is added to
                0017 C     corresponding near-edge interior data point and then zero out.
                0018 
                0019 C     !USES:
                0020       IMPLICIT NONE
                0021 
                0022 C     == Global data ==
                0023 #include "SIZE.h"
                0024 #include "EEPARAMS.h"
                0025 #include "EESUPPORT.h"
                0026 #include "W2_EXCH2_SIZE.h"
                0027 #include "W2_EXCH2_TOPOLOGY.h"
                0028 #include "W2_EXCH2_BUFFER.h"
                0029 
                0030 C     !INPUT/OUTPUT PARAMETERS:
                0031 C     array       :: Array with edges to exchange.
                0032 C     signOption  :: Flag controlling whether field sign depends on orientation
                0033 C                 :: (signOption not yet implemented but needed for SM exch)
                0034 C     fieldCode   :: field code (position on staggered grid)
                0035 C     myOLw,myOLe :: West and East overlap region sizes.
                0036 C     myOLs,myOLn :: South and North overlap region sizes.
                0037 C     exchWidthX  :: Width of data regi exchanged in X.
                0038 C     exchWidthY  :: Width of data region exchanged in Y.
                0039 C     cornerMode  :: halo-corner-region treatment: update/ignore corner region
                0040 C     myThid      :: Thread number of this instance of S/R EXCH...
                0041 
                0042       INTEGER myOLw, myOLe, myOLs, myOLn, myNz
                0043       _RS array(1-myOLw:sNx+myOLe,
                0044      &          1-myOLs:sNy+myOLn,
                0045      &          myNZ, nSx, nSy)
                0046       _RS arrayb(1-myOLw:sNx+myOLe,
                0047      &          1-myOLs:sNy+myOLn,
                0048      &          myNZ, nSx, nSy)
                0049       LOGICAL signOption
                0050       CHARACTER*2 fieldCode
                0051       INTEGER exchWidthX
                0052       INTEGER exchWidthY
                0053       INTEGER cornerMode
                0054       INTEGER myThid
                0055 
                0056 C     !LOCAL VARIABLES:
                0057 CEOP
                0058       CALL EXCH2_RS1_CUBE_AD(
                0059      U            arrayb,
                0060      I            signOption, fieldCode,
                0061      I            myOLw, myOLe, myOLs, myOLn, myNz,
                0062      I            exchWidthX, exchWidthY,
                0063      I            cornerMode, myThid )
                0064       RETURN
                0065       END