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

Diff of /MITgcm/eesupp/src/exch_uv_agrid_xy_rx.template

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

revision 1.5 by molod, Wed Nov 17 16:29:22 2004 UTC revision 1.6 by jmc, Fri Nov 19 02:32:04 2004 UTC
# Line 16  C Line 16  C
16  C  Input: component1(lon,lat,bi,bj) - first component of vector  C  Input: component1(lon,lat,bi,bj) - first component of vector
17  C         component2(lon,lat,bi,bj) - second component of vector  C         component2(lon,lat,bi,bj) - second component of vector
18  C         withSigns (logical)       - true to use signs of components  C         withSigns (logical)       - true to use signs of components
19  C         myThid                    - tile number  C         myThid                    - Thread number
20  C  C
21  C  Output: component1 and component2 are updated (halo regions filled)  C  Output: component1 and component2 are updated (halo regions filled)
22  C  C
# Line 48  C     b[nsew] - indices of the [nswe] ne Line 48  C     b[nsew] - indices of the [nswe] ne
48    
49        integer i,j,L,bi,bj        integer i,j,L,bi,bj
50        integer OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz        integer OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz
51        _RX dummy1(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RX dummy1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
52        _RX dummy2(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RX dummy2(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
53          _RX negOne
54    
55  #ifdef ALLOW_EXCH2  #ifdef ALLOW_EXCH2
56        CALL EXCH2_UV_AGRID_XY_RX( component1,component2, withSigns,        CALL EXCH2_UV_AGRID_XY_RX(
57       .                                                       myThid )       U                           component1, component2,
58         I                           withSigns, myThid )
59        RETURN        RETURN
60  #endif  #endif
61    
# Line 64  C     b[nsew] - indices of the [nswe] ne Line 66  C     b[nsew] - indices of the [nswe] ne
66        exchWidthX = OLx        exchWidthX = OLx
67        exchWidthY = OLy        exchWidthY = OLy
68        myNz       = 1        myNz       = 1
69          negOne = 1.
70          IF (withSigns) negOne = -1.
71    
72  C First call the exchanges for the two components  C First call the exchanges for the two components
73    
# Line 98  C and/or the signs depending on which cu Line 102  C and/or the signs depending on which cu
102  C First we need to copy the component info into dummy arrays  C First we need to copy the component info into dummy arrays
103         do j = 1-OLy,sNy+OLy         do j = 1-OLy,sNy+OLy
104         do i = 1-OLx,sNx+OLx         do i = 1-OLx,sNx+OLx
105          dummy1(i,j,bi,bj) = component1(i,j,bi,bj)          dummy1(i,j) = component1(i,j,bi,bj)
106          dummy2(i,j,bi,bj) = component2(i,j,bi,bj)          dummy2(i,j) = component2(i,j,bi,bj)
107         enddo         enddo
108         enddo         enddo
109    
# Line 111  C odd faces share disposition of all sec Line 115  C odd faces share disposition of all sec
115           do j = 1,sNy           do j = 1,sNy
116           do i = 1,exchWidthX           do i = 1,exchWidthX
117  C east  C east
118            component1(sNx+i,j,bi,bj) = dummy1(sNx+i,j,bi,bj)            component1(sNx+i,j,bi,bj) = dummy1(sNx+i,j)
119            component2(sNx+i,j,bi,bj) = dummy2(sNx+i,j,bi,bj)            component2(sNx+i,j,bi,bj) = dummy2(sNx+i,j)
120  C west  C west
121            component1(i-OLx,j,bi,bj) = dummy2(i-OLx,j,bi,bj)            component1(i-OLx,j,bi,bj) = dummy2(i-OLx,j)
122            component2(i-OLx,j,bi,bj) = -dummy1(i-OLx,j,bi,bj)            component2(i-OLx,j,bi,bj) = negOne*dummy1(i-OLx,j)
123  C north  C north
124            component1(j,sNy+i,bi,bj) = -dummy2(j,sNy+i,bi,bj)            component1(j,sNy+i,bi,bj) = negOne*dummy2(j,sNy+i)
125            component2(j,sNy+i,bi,bj) = dummy1(j,sNy+i,bi,bj)            component2(j,sNy+i,bi,bj) = dummy1(j,sNy+i)
126  C south  C south
127            component1(j,i-OLx,bi,bj) = dummy1(j,i-OLx,bi,bj)            component1(j,i-OLx,bi,bj) = dummy1(j,i-OLx)
128            component2(j,i-OLx,bi,bj) = dummy2(j,i-OLx,bi,bj)            component2(j,i-OLx,bi,bj) = dummy2(j,i-OLx)
129           enddo           enddo
130           enddo           enddo
131  C now the even faces (share disposition of all sections of the halo)  C now the even faces (share disposition of all sections of the halo)
# Line 129  C now the even faces (share disposition Line 133  C now the even faces (share disposition
133           do j = 1,sNy           do j = 1,sNy
134           do i = 1,exchWidthX           do i = 1,exchWidthX
135  C east  C east
136            component1(sNx+i,j,bi,bj) = dummy2(sNx+i,j,bi,bj)            component1(sNx+i,j,bi,bj) = dummy2(sNx+i,j)
137            component2(sNx+i,j,bi,bj) = -dummy1(sNx+i,j,bi,bj)            component2(sNx+i,j,bi,bj) = negOne*dummy1(sNx+i,j)
138  C west  C west
139            component1(i-OLx,j,bi,bj) = dummy1(i-OLx,j,bi,bj)            component1(i-OLx,j,bi,bj) = dummy1(i-OLx,j)
140            component2(i-OLx,j,bi,bj) = dummy2(i-OLx,j,bi,bj)            component2(i-OLx,j,bi,bj) = dummy2(i-OLx,j)
141  C north  C north
142            component1(j,sNy+i,bi,bj) = dummy1(j,sNy+i,bi,bj)            component1(j,sNy+i,bi,bj) = dummy1(j,sNy+i)
143            component2(j,sNy+i,bi,bj) = dummy2(j,sNy+i,bi,bj)            component2(j,sNy+i,bi,bj) = dummy2(j,sNy+i)
144  C south  C south
145            component1(j,i-OLy,bi,bj) = -dummy2(j,i-OLy,bi,bj)            component1(j,i-OLy,bi,bj) = negOne*dummy2(j,i-OLy)
146            component2(j,i-OLy,bi,bj) = dummy1(j,i-OLy,bi,bj)            component2(j,i-OLy,bi,bj) = dummy1(j,i-OLy)
147           enddo           enddo
148           enddo           enddo
149         endif         endif

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22