27 |
_RS arrDr(myNr) |
_RS arrDr(myNr) |
28 |
_RL theMin |
_RL theMin |
29 |
_RL theMax |
_RL theMax |
30 |
_RL theMean |
_RL theMean,theMeanTile |
31 |
_RL theSD |
_RL theSD,theSDTile |
32 |
_RL theDel2 |
_RL theDel2,theDel2Tile |
33 |
_RL theVol |
_RL theVol,theVolTile |
34 |
INTEGER myThid |
INTEGER myThid |
35 |
|
|
36 |
C === Local variables ==== |
C === Local variables ==== |
38 |
INTEGER numPnts |
INTEGER numPnts |
39 |
LOGICAL noPnts |
LOGICAL noPnts |
40 |
_RL tmpVal,rNumPnts |
_RL tmpVal,rNumPnts |
41 |
_RL theVar |
_RL theVar,theVarTile |
42 |
_RL tmpVol |
_RL tmpVol |
43 |
|
|
44 |
theMin=0. |
theMin=0. |
53 |
|
|
54 |
DO bj=myByLo(myThid),myByHi(myThid) |
DO bj=myByLo(myThid),myByHi(myThid) |
55 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
DO bi=myBxLo(myThid),myBxHi(myThid) |
56 |
|
theDel2 = 0. |
57 |
|
theVol = 0. |
58 |
|
theMean = 0. |
59 |
|
theVar = 0. |
60 |
DO K=1,myNr |
DO K=1,myNr |
61 |
DO J=1,sNy |
DO J=1,sNy |
62 |
DO I=1,sNx |
DO I=1,sNx |
71 |
IF (arrMask(I,J,K,bi,bj).NE.0.) THEN |
IF (arrMask(I,J,K,bi,bj).NE.0.) THEN |
72 |
theMin=min(theMin,tmpVal) |
theMin=min(theMin,tmpVal) |
73 |
theMax=max(theMax,tmpVal) |
theMax=max(theMax,tmpVal) |
74 |
theDel2 = theDel2+0.25*ABS( |
theDel2Tile = theDel2Tile+0.25*ABS( |
75 |
& (arr(I+1,J,K,bi,bj)-tmpVal)*arrMask(I+1,J,K,bi,bj) |
& (arr(I+1,J,K,bi,bj)-tmpVal)*arrMask(I+1,J,K,bi,bj) |
76 |
& +(arr(I-1,J,K,bi,bj)-tmpVal)*arrMask(I-1,J,K,bi,bj) |
& +(arr(I-1,J,K,bi,bj)-tmpVal)*arrMask(I-1,J,K,bi,bj) |
77 |
& +(arr(I,J+1,K,bi,bj)-tmpVal)*arrMask(I,J+1,K,bi,bj) |
& +(arr(I,J+1,K,bi,bj)-tmpVal)*arrMask(I,J+1,K,bi,bj) |
80 |
numPnts=numPnts+1 |
numPnts=numPnts+1 |
81 |
tmpVol = arrArea(I,J,bi,bj)*arrhFac(I,J,K,bi,bj)*arrDr(K) |
tmpVol = arrArea(I,J,bi,bj)*arrhFac(I,J,K,bi,bj)*arrDr(K) |
82 |
& *arrMask(I,J,K,bi,bj) |
& *arrMask(I,J,K,bi,bj) |
83 |
theVol = theVol + tmpVol |
theVolTile = theVolTile + tmpVol |
84 |
theMean = theMean + tmpVol*tmpVal |
theMeanTile = theMeanTile + tmpVol*tmpVal |
85 |
theVar = theVar + tmpVol*tmpVal**2 |
theVarTile = theVarTile + tmpVol*tmpVal**2 |
86 |
ENDIF |
ENDIF |
87 |
ENDDO |
ENDDO |
88 |
ENDDO |
ENDDO |
89 |
ENDDO |
ENDDO |
90 |
|
theDel2 = theDel2 + theDel2Tile |
91 |
|
theVol = theVol + theVolTile |
92 |
|
theMean = theMean + theMeanTile |
93 |
|
theVar = theVar + theVarTile |
94 |
ENDDO |
ENDDO |
95 |
ENDDO |
ENDDO |
96 |
|
|
117 |
|
|
118 |
DO bj=myByLo(myThid),myByHi(myThid) |
DO bj=myByLo(myThid),myByHi(myThid) |
119 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
DO bi=myBxLo(myThid),myBxHi(myThid) |
120 |
|
theSDtile=0. |
121 |
DO K=1,myNr |
DO K=1,myNr |
122 |
DO J=1,sNy |
DO J=1,sNy |
123 |
DO I=1,sNx |
DO I=1,sNx |
126 |
IF (arrMask(I,J,K,bi,bj).NE.0.) THEN |
IF (arrMask(I,J,K,bi,bj).NE.0.) THEN |
127 |
tmpVol=arrArea(I,J,bi,bj)*arrhFac(I,J,K,bi,bj)*arrDr(K) |
tmpVol=arrArea(I,J,bi,bj)*arrhFac(I,J,K,bi,bj)*arrDr(K) |
128 |
& *arrMask(I,J,K,bi,bj) |
& *arrMask(I,J,K,bi,bj) |
129 |
theSD = theSD + tmpVol*(tmpVal-theMean)**2 |
theSDtile = theSDtile + tmpVol*(tmpVal-theMean)**2 |
130 |
ENDIF |
ENDIF |
131 |
ENDDO |
ENDDO |
132 |
ENDDO |
ENDDO |
133 |
ENDDO |
ENDDO |
134 |
|
theSD = theSD + theSDtile |
135 |
ENDDO |
ENDDO |
136 |
ENDDO |
ENDDO |
137 |
|
|