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

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

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


Revision 1.1 - (hide annotations) (download)
Wed Aug 23 15:18:46 2006 UTC (17 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: mitgcm_mapl_00, checkpoint58u_post, checkpoint58w_post, checkpoint58r_post, checkpoint58x_post, checkpoint58t_post, checkpoint58q_post, checkpoint59e, checkpoint59d, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59, checkpoint58o_post, checkpoint58y_post, checkpoint58v_post, checkpoint58s_post, checkpoint58p_post
add _3D_ EXCH interface (=3.D version with 3rd dim in argument list)

1 jmc 1.1 C $Header: /u/gcmpack/MITgcm/eesupp/src/exch_xyz_rx.template,v 1.5 2004/11/18 15:05:38 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     #include "EESUPPORT.h"
30     #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     C == Local variables ==
43     C OL[wens] :: Overlap extents in west, east, north, south.
44     C exchWidth[XY] :: Extent of regions that will be exchanged.
45     INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY
46    
47     CEOP
48    
49     #ifdef ALLOW_EXCH2
50     CALL EXCH2_3D_RX( phi, myNz, myThid )
51     RETURN
52     #endif
53    
54     OLw = OLx
55     OLe = OLx
56     OLn = OLy
57     OLs = OLy
58     exchWidthX = OLx
59     exchWidthY = OLy
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     END

  ViewVC Help
Powered by ViewVC 1.1.22