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

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

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


Revision 1.6 - (hide annotations) (download)
Wed Aug 23 15:20:37 2006 UTC (17 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58o_post, checkpoint58p_post, checkpoint58q_post, checkpoint58r_post
Changes since 1.5: +9 -8 lines
updated after changing some of EXCH2 S/R.

1 jmc 1.6 C $Header: /u/gcmpack/MITgcm/eesupp/src/exch_uv_xyz_rx.template,v 1.5 2004/11/16 17:21:40 jmc Exp $
2 cnh 1.3 C $Name: $
3 adcroft 1.2
4 jmc 1.5 #include "PACKAGES_CONFIG.h"
5 adcroft 1.2 #include "CPP_EEOPTIONS.h"
6    
7 cnh 1.3 CBOP
8    
9     C !ROUTINE: EXCH_UV_XYZ_RX
10    
11     C !INTERFACE:
12 adcroft 1.2 SUBROUTINE EXCH_UV_XYZ_RX(
13 jmc 1.5 U Uphi, Vphi,
14     I withSigns, myThid )
15 jmc 1.6
16 cnh 1.3 C !DESCRIPTION:
17     C *==========================================================*
18 jmc 1.6 C | SUBROUTINE EXCH_UV_XYZ_RX
19     C | o Handle exchanges for _RX, 3-dimensional vector arrays.
20 cnh 1.3 C *==========================================================*
21 jmc 1.6 C | Vector arrays need to be rotated and interchaged for
22 cnh 1.3 C | exchange operations on some grids. This driver routine
23     C | branches to support this.
24     C *==========================================================*
25 adcroft 1.2
26 cnh 1.3 C !USES:
27 jmc 1.6 IMPLICIT NONE
28 adcroft 1.2 C === Global data ===
29     #include "SIZE.h"
30     #include "EEPARAMS.h"
31     #include "EESUPPORT.h"
32 edhill 1.4 #include "EXCH.h"
33 adcroft 1.2
34 cnh 1.3 C !INPUT/OUTPUT PARAMETERS:
35 adcroft 1.2 C === Routine arguments ===
36 cnh 1.3 C phi :: Array with overlap regions are to be exchanged
37 jmc 1.5 C Note - The interface to EXCH_RX assumes that
38 cnh 1.3 C the standard Fortran 77 sequence association rules
39     C apply.
40     C myThid :: My thread id.
41 adcroft 1.2 _RX Uphi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
42     _RX Vphi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
43     LOGICAL withSigns
44     INTEGER myThid
45    
46 cnh 1.3 C !LOCAL VARIABLES:
47 adcroft 1.2 C == Local variables ==
48 cnh 1.3 C OL[wens] :: Overlap extents in west, east, north, south.
49     C exchWidth[XY] :: Extent of regions that will be exchanged.
50 adcroft 1.2 INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz
51 cnh 1.3
52     CEOP
53 jmc 1.5 #ifdef ALLOW_EXCH2
54 jmc 1.6 CALL EXCH2_UV_3D_RX(
55     U Uphi, Vphi,
56     I withSigns, Nr, myThid )
57 jmc 1.5 RETURN
58     #endif
59 adcroft 1.2
60     OLw = OLx
61     OLe = OLx
62     OLn = OLy
63     OLs = OLy
64     exchWidthX = OLx
65     exchWidthY = OLy
66     myNz = Nr
67     C ** NOTE ** The exchange routine we use here does not
68     C require the preceeding and following barriers.
69     C However, the slow, simple exchange interface
70     C that is calling it here is meant to ensure
71     C that threads are synchronised before exchanges
72     C begine.
73     IF (useCubedSphereExchange) THEN
74     CALL EXCH_UV_RX_CUBE( Uphi, Vphi, withSigns,
75     I OLw, OLe, OLs, OLn, myNz,
76     I exchWidthX, exchWidthY,
77     I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
78     ELSE
79     c CALL EXCH_RX( Uphi,
80     c I OLw, OLe, OLs, OLn, myNz,
81     c I exchWidthX, exchWidthY,
82     c I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
83     c CALL EXCH_RX( Vphi,
84     c I OLw, OLe, OLs, OLn, myNz,
85     c I exchWidthX, exchWidthY,
86     c I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
87     c_jmc: for JAM compatibility, replace the 2 CALLs above by the 2 CPP_MACROs:
88     _EXCH_XYZ_RX( Uphi, myThid )
89     _EXCH_XYZ_RX( Vphi, myThid )
90     ENDIF
91    
92     RETURN
93     END
94 jmc 1.5
95     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
96    
97     CEH3 ;;; Local Variables: ***
98     CEH3 ;;; mode:fortran ***
99     CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22