/[MITgcm]/MITgcm/pkg/monitor/mon_vort3.F
ViewVC logotype

Diff of /MITgcm/pkg/monitor/mon_vort3.F

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

revision 1.2 by adcroft, Tue May 13 18:18:05 2003 UTC revision 1.3 by afe, Thu Jan 22 17:17:19 2004 UTC
# Line 1  Line 1 
1    #ifndef USE_W2
2  C $Header$  C $Header$
3    #else /* USE_W2 */
4    C $Header$
5    #endif /* USE_W2 */
6  C $Name$  C $Name$
7    
8  #include "MONITOR_OPTIONS.h"  #include "MONITOR_OPTIONS.h"
# Line 18  C     === Global data === Line 22  C     === Global data ===
22  #include "DYNVARS.h"  #include "DYNVARS.h"
23  #include "MONITOR.h"  #include "MONITOR.h"
24  #include "GRID.h"  #include "GRID.h"
25    #ifdef USE_W2
26    #include "W2_EXCH2_TOPOLOGY.h"
27    #include "W2_EXCH2_PARAMS.h"
28    #endif /* USE_W2 */
29    
30  C     === Routine arguments ===  C     === Routine arguments ===
31        INTEGER myIter, myThid        INTEGER myIter, myThid
# Line 34  C     === Local variables ==== Line 42  C     === Local variables ====
42        _RL tmpFac        _RL tmpFac
43        _RL etaFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL etaFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
44  #endif  #endif
45    #ifdef USE_W2
46          LOGICAL northWestCorner, northEastCorner,
47         &        southWestCorner, southEastCorner,
48         &        northEdge, eastEdge
49          INTEGER myTile
50    
51    #endif /* USE_W2 */
52    
53        theMin = 1. _d 20        theMin = 1. _d 20
54        theMax =-1. _d 20        theMax =-1. _d 20
# Line 61  C     === Local variables ==== Line 76  C     === Local variables ====
76  #endif  #endif
77          DO k=1,Nr          DO k=1,Nr
78    
79    #ifndef USE_W2
80           iMax = sNx           iMax = sNx
81           jMax = sNy           jMax = sNy
82           DO j=1,sNy           DO j=1,sNy
83            DO i=1,sNx            DO i=1,sNx
84    #else /* USE_W2 */
85             iMax = sNx + 1
86             jMax = sNy + 1
87             DO j=1,jMax
88              DO i=1,iMax
89    #endif /* USE_W2 */
90  #ifdef MONITOR_TEST_HFACZ  #ifdef MONITOR_TEST_HFACZ
91  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
92  C-    Test various definitions of hFacZ (for 1 layer, flat bottom ocean):  C-    Test various definitions of hFacZ (for 1 layer, flat bottom ocean):
# Line 116  C-    Standard definition of hFac at vor Line 138  C-    Standard definition of hFac at vor
138  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
139  C     Special stuff for Cubed Sphere:  C     Special stuff for Cubed Sphere:
140           IF (useCubedSphereExchange) THEN           IF (useCubedSphereExchange) THEN
141    #ifndef USE_W2
142  c          AZcorner = 0.75 _d 0  c          AZcorner = 0.75 _d 0
143             iMax = sNx+1             iMax = sNx+1
144             jMax = sNy+1             jMax = sNy+1
145    #else /* USE_W2 */
146              southWestCorner = .FALSE.
147              southEastCorner = .FALSE.
148              northWestCorner = .FALSE.
149              northEastCorner = .FALSE.
150              eastEdge        = .FALSE.
151              northEdge       = .FALSE.
152              myTile = W2_myTileList(bi)
153              IF ( exch2_isWedge(myTile) .EQ. 1 .AND.
154         &         exch2_isSedge(myTile) .EQ. 1 ) THEN
155               southWestCorner = .TRUE.
156              ENDIF
157              IF ( exch2_isEedge(myTile) .EQ. 1 .AND.
158         &         exch2_isSedge(myTile) .EQ. 1 ) THEN
159               southEastCorner = .TRUE.
160              ENDIF
161              IF ( exch2_isEedge(myTile) .EQ. 1 .AND.
162         &         exch2_isNedge(myTile) .EQ. 1 ) THEN
163               northEastCorner = .TRUE.
164              ENDIF
165              IF ( exch2_isWedge(myTile) .EQ. 1 .AND.
166         &         exch2_isNedge(myTile) .EQ. 1 ) THEN
167               northWestCorner = .TRUE.
168              ENDIF
169              IF ( exch2_isEedge(myTile) .EQ. 1 ) THEN
170               eastEdge  = .TRUE.
171              ENDIF
172              IF ( exch2_isNedge(myTile) .EQ. 1 ) THEN
173               northEdge = .TRUE.
174              ENDIF
175    
176    c         AZcorner = 0.75 _d 0
177              IF ( northEdge ) THEN
178    #endif /* USE_W2 */
179             DO i=1,iMax             DO i=1,iMax
180              hFacZ(i,jMax)=0.              hFacZ(i,jMax)=0.
181              vort3(i,jMax)=0.              vort3(i,jMax)=0.
182             ENDDO             ENDDO
183    #ifdef USE_W2
184              ENDIF
185              IF ( eastEdge ) THEN
186    #endif /* USE_W2 */
187             DO j=1,jMax             DO j=1,jMax
188              hFacZ(iMax,j)=0.              hFacZ(iMax,j)=0.
189              vort3(iMax,j)=0.              vort3(iMax,j)=0.
190             ENDDO             ENDDO
191    #ifndef USE_W2
192  C--        S.W. corner:  C--        S.W. corner:
193    #else /* USE_W2 */
194              ENDIF
195    C--       S.W. corner:
196              IF ( southWestCorner ) THEN
197    #endif /* USE_W2 */
198             i=1             i=1
199             j=1             j=1
200             vort3(i,j)=             vort3(i,j)=
# Line 140  C--        S.W. corner: Line 207  C--        S.W. corner:
207       &                  + _hFacW(i, j ,k,bi,bj)       &                  + _hFacW(i, j ,k,bi,bj)
208       &                  + _hFacS( i ,j,k,bi,bj)       &                  + _hFacS( i ,j,k,bi,bj)
209       &                  )/3. _d 0       &                  )/3. _d 0
210    #ifdef USE_W2
211              ENDIF
212              IF ( southEastCorner ) THEN
213    #endif /* USE_W2 */
214  C--        S.E. corner:  C--        S.E. corner:
215             i=iMax             i=iMax
216             j=1             j=1
# Line 153  C--        S.E. corner: Line 224  C--        S.E. corner:
224       &                  + _hFacW(i, j ,k,bi,bj)       &                  + _hFacW(i, j ,k,bi,bj)
225       &                  + _hFacS(i-1,j,k,bi,bj)       &                  + _hFacS(i-1,j,k,bi,bj)
226       &                  )/3. _d 0       &                  )/3. _d 0
227    #ifdef USE_W2
228              ENDIF
229              IF ( northWestCorner ) THEN
230    #endif /* USE_W2 */
231  C--        N.W. corner:  C--        N.W. corner:
232             i=1             i=1
233             j=jMax             j=jMax
# Line 166  C--        N.W. corner: Line 241  C--        N.W. corner:
241       &                  + _hFacW(i, j ,k,bi,bj)       &                  + _hFacW(i, j ,k,bi,bj)
242       &                  + _hFacS( i ,j,k,bi,bj)       &                  + _hFacS( i ,j,k,bi,bj)
243       &                  )/3. _d 0       &                  )/3. _d 0
244    #ifdef USE_W2
245              ENDIF
246              IF ( northEastCorner ) THEN
247    #endif /* USE_W2 */
248  C--        N.E. corner:  C--        N.E. corner:
249             i=iMax             i=iMax
250             j=jMax             j=jMax
# Line 179  C--        N.E. corner: Line 258  C--        N.E. corner:
258       &                  + _hFacW(i, j ,k,bi,bj)       &                  + _hFacW(i, j ,k,bi,bj)
259       &                  + _hFacS(i-1,j,k,bi,bj)       &                  + _hFacS(i-1,j,k,bi,bj)
260       &                  )/3. _d 0       &                  )/3. _d 0
261    #ifdef USE_W2
262              ENDIF
263    #endif /* USE_W2 */
264           ENDIF           ENDIF
265    
266  C-    Special stuff for North & South Poles, LatLon grid  C-    Special stuff for North & South Poles, LatLon grid
267           IF ( usingSphericalPolarGrid ) THEN           IF ( usingSphericalPolarGrid ) THEN
268            IF (yG(1,sNy+1,bi,bj).EQ.90.) THEN            IF (yG(1,sNy+1,bi,bj).EQ.90.) THEN
269    #ifndef USE_W2
270             jMax = sNy+1             jMax = sNy+1
271    #endif /* not USE_W2 */
272             j = jMax             j = jMax
273             DO i=1,sNx             DO i=1,sNx
274              vort3(i,j) = 0.              vort3(i,j) = 0.

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22