/[MITgcm]/MITgcm/eesupp/src/exch_uv_xy_rx.template
ViewVC logotype

Contents of /MITgcm/eesupp/src/exch_uv_xy_rx.template

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1.2.1 - (show annotations) (download)
Wed Mar 28 19:48:51 2001 UTC (24 years, 4 months ago) by adcroft
Branch: pre38
Changes since 1.1: +85 -0 lines
Re-arranged, re-named and tidied up the exchange stuff and
added hooks for calling cubed-sphere exchange routines (which
currently are hard-wired place holders).

1 C $Header: $
2 C $Name: $
3
4 #include "CPP_EEOPTIONS.h"
5
6 SUBROUTINE EXCH_UV_XY_RX(
7 U Uphi, Vphi, withSigns,
8 I myThid )
9 C /==========================================================\
10 C | SUBROUTINE EXCH_UV_XY_RX |
11 C | o Handle exchanges for _RX, two-dimensional arrays. |
12 C |==========================================================|
13 C | Do true shared-memory data transfers and "messaging" |
14 C | tranfers for blocking case of data transfers. |
15 C | Applications call this routine using |
16 C | CALL EXCH..( x, myThid ) |
17 C | where x is a two-dimensional array with overlaps. |
18 C | This routine does true-shared-memory copies for blocks |
19 C | within a thread. It will also do MPI meesaging between |
20 C | different processes. |
21 C | Note: |
22 C | ===== |
23 C | This routine is a default mode interface to the more |
24 C | general exchange routine. Under default mode the |
25 C | exchange is for an edge width of OLx, and OLy and |
26 C | updates corner points as well as edges ( slightly more |
27 C | synchronisation required). |
28 C \==========================================================/
29 IMPLICIT NONE
30
31 C === Global data ===
32 #include "SIZE.h"
33 #include "EEPARAMS.h"
34 #include "EESUPPORT.h"
35
36 C === Routine arguments ===
37 C phi - Array with overlap regions are to be exchanged
38 C Note - The interface to EXCH_RL assumes that
39 C the standard Fortran 77 sequence association rules
40 C apply.
41 C myThid - My thread id.
42 _RX Uphi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
43 _RX Vphi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
44 LOGICAL withSigns
45 INTEGER myThid
46 CEndOfInterface
47
48 C == Local variables ==
49 C OL[wens] - Overlap extents in west, east, north, south.
50 C exchWidth[XY] - Extent of regions that will be exchanged.
51 INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz
52
53 OLw = OLx
54 OLe = OLx
55 OLn = OLy
56 OLs = OLy
57 exchWidthX = OLx
58 exchWidthY = OLy
59 myNz = 1
60 C ** NOTE ** The exchange routine we use here does not
61 C require the preceeding and following barriers.
62 C However, the slow, simple exchange interface
63 C that is calling it here is meant to ensure
64 C that threads are synchronised before exchanges
65 C begine.
66 _BARRIER
67 IF (useCubedSphereExchange) THEN
68 CALL EXCH_UV_RX_CUBE( Uphi, Vphi, withSigns,
69 I OLw, OLe, OLs, OLn, myNz,
70 I exchWidthX, exchWidthY,
71 I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
72 ELSE
73 CALL EXCH_RX( Uphi,
74 I OLw, OLe, OLs, OLn, myNz,
75 I exchWidthX, exchWidthY,
76 I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
77 CALL EXCH_RX( Vphi,
78 I OLw, OLe, OLs, OLn, myNz,
79 I exchWidthX, exchWidthY,
80 I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
81 ENDIF
82 _BARRIER
83
84 RETURN
85 END

  ViewVC Help
Powered by ViewVC 1.1.22