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

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

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


Revision 1.5 - (hide annotations) (download)
Tue Nov 16 17:21:40 2004 UTC (19 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint57g_pre, checkpoint57s_post, checkpoint58b_post, checkpoint57b_post, checkpoint57g_post, checkpoint56b_post, checkpoint57y_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint58, checkpoint57, checkpoint56, checkpoint58f_post, checkpoint57n_post, checkpoint58d_post, checkpoint58a_post, checkpoint57z_post, checkpoint58m_post, checkpoint57l_post, checkpoint57t_post, checkpoint57v_post, checkpoint57f_post, checkpoint57a_post, checkpoint57h_pre, checkpoint57h_post, checkpoint57y_pre, checkpoint58o_post, checkpoint57c_post, checkpoint58p_post, checkpoint58q_post, checkpoint58e_post, checkpoint57c_pre, checkpoint58r_post, checkpoint58n_post, checkpoint57e_post, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, eckpoint57e_pre, checkpoint58k_post, checkpoint56a_post, checkpoint58l_post, checkpoint57h_done, checkpoint57j_post, checkpoint57f_pre, checkpoint58g_post, checkpoint58h_post, checkpoint56c_post, checkpoint58j_post, checkpoint57a_pre, checkpoint57o_post, checkpoint57k_post, checkpoint57w_post, checkpoint58i_post, checkpoint57x_post, checkpoint58c_post
Changes since 1.4: +17 -3 lines
call exch2 equivalent (within #ifdef ALLOW_EXCH2 / #endif)

1 jmc 1.5 C $Header: /u/gcmpack/MITgcm/pkg/exch2/exch_uv_xy_rx.template,v 1.2 2004/04/05 15:27:06 edhill 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     C !ROUTINE: EXCH_UV_XY_RX
9    
10     C !INTERFACE:
11 adcroft 1.2 SUBROUTINE EXCH_UV_XY_RX(
12 jmc 1.5 U Uphi, Vphi,
13     I withSigns, myThid )
14 adcroft 1.2 IMPLICIT NONE
15 cnh 1.3 C !DESCRIPTION:
16     C *==========================================================*
17     C | SUBROUTINE EXCH_UV_XY_RX
18     C | o Handle exchanges for _RX, two-dimensional arrays.
19     C *==========================================================*
20     C | Driver exchange routine which branches to cube sphere or
21     C | global, simple cartesian index grid. Exchange routine is
22     C | called with two arrays that are components of a vector.
23     C | These components are rotated and interchanged on the
24     C | rotated grid during cube exchanges.
25     C *==========================================================*
26 adcroft 1.2
27 cnh 1.3 C !USES:
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 Uphi :: Arrays with overlap regions are to be exchanged
37     C Vphi Note - The interface to EXCH_ assumes that
38     C the standard Fortran 77 sequence association rules
39     C apply.
40     C myThid :: My thread id.
41     C withSigns :: Flag controlling whether vector is signed.
42 adcroft 1.2 _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    
47 cnh 1.3 C !LOCAL VARIABLES:
48 adcroft 1.2 C == Local variables ==
49 cnh 1.3 C OL[wens] :: Overlap extents in west, east, north, south.
50     C exchWidth[XY] :: Extent of regions that will be exchanged.
51 adcroft 1.2 INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz
52 cnh 1.3 CEOP
53 adcroft 1.2
54 jmc 1.5 #ifdef ALLOW_EXCH2
55     CALL EXCH2_UV_XY_RX(
56     U Uphi, Vphi,
57     I withSigns, myThid )
58     RETURN
59     #endif
60    
61 adcroft 1.2 OLw = OLx
62     OLe = OLx
63     OLn = OLy
64     OLs = OLy
65     exchWidthX = OLx
66     exchWidthY = OLy
67     myNz = 1
68     C ** NOTE ** The exchange routine we use here does not
69     C require the preceeding and following barriers.
70     C However, the slow, simple exchange interface
71     C that is calling it here is meant to ensure
72     C that threads are synchronised before exchanges
73     C begine.
74     IF (useCubedSphereExchange) THEN
75     CALL EXCH_UV_RX_CUBE( Uphi, Vphi, withSigns,
76     I OLw, OLe, OLs, OLn, myNz,
77     I exchWidthX, exchWidthY,
78     I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
79     ELSE
80     c CALL EXCH_RX( Uphi,
81     c I OLw, OLe, OLs, OLn, myNz,
82     c I exchWidthX, exchWidthY,
83     c I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
84     c CALL EXCH_RX( Vphi,
85     c I OLw, OLe, OLs, OLn, myNz,
86     c I exchWidthX, exchWidthY,
87     c I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
88     c_jmc: for JAM compatibility, replace the 2 CALLs above by the 2 CPP_MACROs:
89     _EXCH_XY_RX( Uphi, myThid )
90     _EXCH_XY_RX( Vphi, myThid )
91     ENDIF
92    
93     RETURN
94     END
95 jmc 1.5
96     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
97    
98     CEH3 ;;; Local Variables: ***
99     CEH3 ;;; mode:fortran ***
100     CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22