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

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

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


Revision 1.8 - (show annotations) (download)
Fri Aug 17 18:34:17 2007 UTC (16 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62c, checkpoint62a, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint60, checkpoint61, checkpoint62, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59g, checkpoint59f, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint62b, checkpoint61f, checkpoint61n, checkpoint59j, checkpoint61q, checkpoint61e, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.7: +13 -11 lines
cleaning:
 - only 1 RETURN instruction per S/R (to help TAF)
 - comment out #include "EXCH.h" in wrapper EXCH S/R (not necessary)
 - comment out unnecessary #include "EESUPPORT.h" (to make TAF happy)

1 C $Header: /u/gcmpack/MITgcm/eesupp/src/exch_xy_rx.template,v 1.7 2007/07/28 16:07:35 heimbach Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_EEOPTIONS.h"
6
7 CBOP
8
9 C !ROUTINE: EXCH_XY_RX
10
11 C !INTERFACE:
12 SUBROUTINE EXCH_XY_RX(
13 U phi,
14 I myThid )
15 IMPLICIT NONE
16 C !DESCRIPTION:
17 C *==========================================================*
18 C | SUBROUTINE EXCH_XY_RX
19 C | o Handle exchanges for _RX two-dimensional scalar arrays.
20 C *==========================================================*
21 C | Invoke appropriate exchange for a scalar array for either
22 C | global grid, or cube sphere grid.
23 C *==========================================================*
24
25 C !USES:
26 C === Global data ===
27 #include "SIZE.h"
28 #include "EEPARAMS.h"
29 cph-mpi#include "EESUPPORT.h"
30 c#include "EXCH.h"
31
32 C !INPUT/OUTPUT PARAMETERS:
33 C === Routine arguments ===
34 C phi :: Array with overlap regions are to be exchanged
35 C myThid :: My thread id.
36 _RX phi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
37 INTEGER myThid
38
39 C !LOCAL VARIABLES:
40 #ifndef ALLOW_EXCH2
41 C == Local variables ==
42 C OL[wens] :: Overlap extents in west, east, north, south.
43 C exchWidth[XY] :: Extent of regions that will be exchanged.
44 INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz
45 #endif
46 CEOP
47
48 #ifdef ALLOW_EXCH2
49 CALL EXCH2_XY_RX( phi, myThid )
50 RETURN
51 #else /* ALLOW_EXCH2 */
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 IF (useCubedSphereExchange) THEN
67 CALL EXCH_RX_CUBE( phi,
68 I OLw, OLe, OLs, OLn, myNz,
69 I exchWidthX, exchWidthY,
70 I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
71 ELSE
72 CALL EXCH_RX( phi,
73 I OLw, OLe, OLs, OLn, myNz,
74 I exchWidthX, exchWidthY,
75 I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
76 ENDIF
77
78 RETURN
79 #endif /* ALLOW_EXCH2 */
80 END
81
82 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
83
84 CEH3 ;;; Local Variables: ***
85 CEH3 ;;; mode:fortran ***
86 CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22