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

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

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

revision 1.8 by adcroft, Thu Feb 19 21:02:39 2004 UTC revision 1.9 by jmc, Fri Mar 5 02:28:11 2004 UTC
# Line 27  C     === Routine arguments === Line 27  C     === Routine arguments ===
27        _RS arrDr(myNr)        _RS arrDr(myNr)
28        _RL theMin        _RL theMin
29        _RL theMax        _RL theMax
30        _RL theMean,theMeanTile        _RL theMean
31        _RL theSD,theSDTile        _RL theSD
32        _RL theDel2,theDel2Tile        _RL theDel2
33        _RL theVol,theVolTile        _RL theVol
34        INTEGER myThid        INTEGER myThid
35    
36  C     === Local variables ====  C     === Local variables ====
# Line 40  C     === Local variables ==== Line 40  C     === Local variables ====
40        _RL tmpVal,rNumPnts        _RL tmpVal,rNumPnts
41        _RL theVar,theVarTile        _RL theVar,theVarTile
42        _RL tmpVol        _RL tmpVol
43          _RL theMeanTile, theSDTile, theDel2Tile, theVolTile
44    
45        theMin=0.        theMin=0.
46        theMax=0.        theMax=0.
# Line 61  C     === Local variables ==== Line 62  C     === Local variables ====
62           DO J=1,sNy           DO J=1,sNy
63            DO I=1,sNx            DO I=1,sNx
64             tmpVal=arr(I,J,K,bi,bj)             tmpVal=arr(I,J,K,bi,bj)
 c          IF (tmpVal.NE.0. .AND. noPnts) THEN  
65             IF (arrMask(I,J,K,bi,bj).NE.0. .AND. noPnts) THEN             IF (arrMask(I,J,K,bi,bj).NE.0. .AND. noPnts) THEN
66              theMin=tmpVal              theMin=tmpVal
67              theMax=tmpVal              theMax=tmpVal
68              noPnts=.FALSE.              noPnts=.FALSE.
69             ENDIF             ENDIF
 c          IF (tmpVal.NE.0.) THEN  
70             IF (arrMask(I,J,K,bi,bj).NE.0.) THEN             IF (arrMask(I,J,K,bi,bj).NE.0.) THEN
71              theMin=min(theMin,tmpVal)              theMin=min(theMin,tmpVal)
72              theMax=max(theMax,tmpVal)              theMax=max(theMax,tmpVal)
# Line 94  c          IF (tmpVal.NE.0.) THEN Line 93  c          IF (tmpVal.NE.0.) THEN
93         ENDDO         ENDDO
94        ENDDO        ENDDO
95    
       theMin=-theMin  
       _GLOBAL_MAX_R8(theMin,myThid)  
       theMin=-theMin  
       _GLOBAL_MAX_R8(theMax,myThid)  
96        _GLOBAL_SUM_R8(theDel2,myThid)        _GLOBAL_SUM_R8(theDel2,myThid)
97        _GLOBAL_SUM_R8(theVol,myThid)        _GLOBAL_SUM_R8(theVol,myThid)
98        _GLOBAL_SUM_R8(theMean,myThid)        _GLOBAL_SUM_R8(theMean,myThid)
99        _GLOBAL_SUM_R8(theVar,myThid)        _GLOBAL_SUM_R8(theVar,myThid)
100        tmpVal=FLOAT(numPnts)        tmpVal=FLOAT(numPnts)
101        _GLOBAL_SUM_R8(tmpVal,myThid)        _GLOBAL_SUM_R8(tmpVal,myThid)
102        numPnts=INT(tmpVal+0.5)        numPnts=NINT(tmpVal)
103    
104        IF (tmpVal.GT.0.) THEN        IF (tmpVal.GT.0.) THEN
105         rNumPnts=1./tmpVal         rNumPnts=1./tmpVal
# Line 114  c          IF (tmpVal.NE.0.) THEN Line 109  c          IF (tmpVal.NE.0.) THEN
109        IF (theVol.GT.0.) THEN        IF (theVol.GT.0.) THEN
110         theMean=theMean/theVol         theMean=theMean/theVol
111         theVar=theVar/theVol         theVar=theVar/theVol
112           IF ( noPnts ) theMin = theMean
113           theMin=-theMin
114           _GLOBAL_MAX_R8(theMin,myThid)
115           theMin=-theMin
116           IF ( noPnts ) theMax = theMean
117           _GLOBAL_MAX_R8(theMax,myThid)
118    
119         DO bj=myByLo(myThid),myByHi(myThid)         DO bj=myByLo(myThid),myByHi(myThid)
120          DO bi=myBxLo(myThid),myBxHi(myThid)          DO bi=myBxLo(myThid),myBxHi(myThid)

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.22