forked from altMITgcm/MITgcm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
exch_s3d_rx.template
81 lines (70 loc) · 2.35 KB
/
exch_s3d_rx.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
C $Header: /u/gcmpack/MITgcm/eesupp/src/exch_s3d_rx.template,v 1.6 2012/05/14 13:15:05 jmc Exp $
C $Name: $
#include "PACKAGES_CONFIG.h"
#include "CPP_EEOPTIONS.h"
CBOP
C !ROUTINE: EXCH_S3D_RX
C !INTERFACE:
SUBROUTINE EXCH_S3D_RX(
U phi,
I myNz, myThid )
C !DESCRIPTION:
C *==========================================================*
C | SUBROUTINE EXCH_S3D_RX
C | o Handle Simple exchanges (= that ignore corners)
C | for _RX, 3-dim scalar arrays with overlap size = 1
C *==========================================================*
C | Invoke appropriate exchange routine depending on type
C | of grid (cube or globally indexed) to be operated on.
C *==========================================================*
C !USES:
IMPLICIT NONE
C === Global data ===
#include "SIZE.h"
#include "EEPARAMS.h"
C !INPUT/OUTPUT PARAMETERS:
C === Routine arguments ===
C phi :: Array with overlap regions are to be exchanged
C myNz :: 3rd dimension of array to exchange
C myThid :: My thread id.
INTEGER myNz
_RX phi(0:sNx+1,0:sNy+1,myNz,nSx,nSy)
INTEGER myThid
C !LOCAL VARIABLES:
#ifndef ALLOW_EXCH2
C == Local variables ==
C OL[wens] :: Overlap extents in west, east, north, south.
C exchWidth[XY] :: Extent of regions that will be exchanged.
INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY
#endif
CEOP
#ifdef ALLOW_EXCH2
CALL EXCH2_S3D_RX( phi, myNz, myThid )
#else /* ALLOW_EXCH2 */
OLw = 1
OLe = 1
OLn = 1
OLs = 1
exchWidthX = 1
exchWidthY = 1
IF (useCubedSphereExchange) THEN
CALL EXCH1_RX_CUBE( phi, .FALSE.,
I OLw, OLe, OLs, OLn, myNz,
I exchWidthX, exchWidthY,
I EXCH_IGNORE_CORNERS, myThid )
ELSE
#ifdef DISCONNECTED_TILES
CALL EXCH0_RX( phi,
I OLw, OLe, OLs, OLn, myNz,
I exchWidthX, exchWidthY,
I EXCH_IGNORE_CORNERS, myThid )
#else /* DISCONNECTED_TILES */
CALL EXCH1_RX( phi,
I OLw, OLe, OLs, OLn, myNz,
I exchWidthX, exchWidthY,
I EXCH_IGNORE_CORNERS, myThid )
#endif /* DISCONNECTED_TILES */
ENDIF
#endif /* ALLOW_EXCH2 */
RETURN
END