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

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

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


Revision 1.2 - (show annotations) (download)
Fri Aug 17 18:34:17 2007 UTC (16 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint60, checkpoint61, checkpoint62, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59g, checkpoint59f, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.1: +7 -5 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_3d_rx.template,v 1.1 2006/08/23 15:18:46 jmc Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_EEOPTIONS.h"
6
7 CBOP
8 C !ROUTINE: EXCH_3D_RX
9
10 C !INTERFACE:
11 SUBROUTINE EXCH_3D_RX(
12 U phi,
13 I myNz, myThid )
14
15 C !DESCRIPTION:
16 C *==========================================================*
17 C | SUBROUTINE EXCH_3D_RX
18 C | o Handle exchanges for _RX, three-dim scalar arrays.
19 C *==========================================================*
20 C | Invoke appropriate exchange routine depending on type
21 C | of grid (cube or globally indexed) to be operated on.
22 C *==========================================================*
23
24 C !USES:
25 IMPLICIT NONE
26 C === Global data ===
27 #include "SIZE.h"
28 #include "EEPARAMS.h"
29 c#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 myNz :: 3rd dimension of array to exchange
36 C myThid :: My thread id.
37 INTEGER myNz
38 _RX phi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:myNz,nSx,nSy)
39 INTEGER myThid
40
41 C !LOCAL VARIABLES:
42 #ifndef ALLOW_EXCH2
43 C == Local variables ==
44 C OL[wens] :: Overlap extents in west, east, north, south.
45 C exchWidth[XY] :: Extent of regions that will be exchanged.
46 INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY
47 #endif
48 CEOP
49
50 #ifdef ALLOW_EXCH2
51 CALL EXCH2_3D_RX( phi, myNz, myThid )
52 RETURN
53 #else /* ALLOW_EXCH2 */
54
55 OLw = OLx
56 OLe = OLx
57 OLn = OLy
58 OLs = OLy
59 exchWidthX = OLx
60 exchWidthY = OLy
61 C ** NOTE ** The exchange routine we use here does not
62 C require the preceeding and following barriers.
63 C However, the slow, simple exchange interface
64 C that is calling it here is meant to ensure
65 C that threads are synchronised before exchanges
66 C begine.
67 IF (useCubedSphereExchange) THEN
68 CALL EXCH_RX_CUBE( phi,
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( phi,
74 I OLw, OLe, OLs, OLn, myNz,
75 I exchWidthX, exchWidthY,
76 I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
77 ENDIF
78
79 RETURN
80 #endif /* ALLOW_EXCH2 */
81 END

  ViewVC Help
Powered by ViewVC 1.1.22