34 |
INTEGER i,j,k |
INTEGER i,j,k |
35 |
INTEGER ks, kp1 |
INTEGER ks, kp1 |
36 |
_RL numPnts,theVol,tmpVal, mskp1, msk_1 |
_RL numPnts,theVol,tmpVal, mskp1, msk_1 |
37 |
|
_RL weight0, weight1 |
38 |
_RL theMax,theMean,theVolMean,potEnMean |
_RL theMax,theMean,theVolMean,potEnMean |
39 |
_RL uBarC, vBarC, totAMu, totAMs |
_RL uBarC, vBarC, totAMu, totAMs |
40 |
_RL tileMean(nSx,nSy) |
_RL tileMean(nSx,nSy) |
189 |
ENDDO |
ENDDO |
190 |
ENDDO |
ENDDO |
191 |
ENDDO |
ENDDO |
192 |
C- add contribution from mass distribution anomaly (i.e., free-surface) |
C- and contribution from mass distribution anomaly (i.e., free-surface) |
193 |
c IF ( nonlinFreeSurf.GT.0 ) THEN |
c IF ( .FALSE. ) THEN |
194 |
|
IF ( exactConserv ) THEN |
195 |
|
C- To improve balance between zonal-wind (AMu) and mass (AMs) AM, need |
196 |
|
C a consistent time-stepping of meridional mass transport in Coriolis |
197 |
|
C (zonal momentum, go through AB) and mass transport divergence; |
198 |
|
C try to account for AB-2 in AMs the same way it applies to f*v: |
199 |
|
#ifdef ALLOW_ADAMSBASHFORTH_3 |
200 |
|
weight1 = alph_AB |
201 |
|
#else |
202 |
|
weight1 = 0.5 _d 0 + abEps |
203 |
|
#endif |
204 |
|
weight0 = 1.0 _d 0 - weight1 |
205 |
|
DO j=1,sNy |
206 |
|
DO i=1,sNx |
207 |
|
ks = kSurfC(i,j,bi,bj) |
208 |
|
tmpVal = weight1*etaH(i,j,bi,bj) |
209 |
|
#ifdef EXACT_CONSERV |
210 |
|
& + weight0*etaHnm1(i,j,bi,bj) |
211 |
|
#endif |
212 |
|
tmpVal = omega*tmpVal |
213 |
|
& * radDist(i,j)*radDist(i,j)*deepFac2F(ks) |
214 |
|
tileAMs(bi,bj) = tileAMs(bi,bj) |
215 |
|
& + tmpVal*rA(i,j,bi,bj)*deepFac2F(ks)*rhoFacF(ks) |
216 |
|
ENDDO |
217 |
|
ENDDO |
218 |
|
ELSE |
219 |
DO j=1,sNy |
DO j=1,sNy |
220 |
DO i=1,sNx |
DO i=1,sNx |
221 |
ks = kSurfC(i,j,bi,bj) |
ks = kSurfC(i,j,bi,bj) |
225 |
& + tmpVal*rA(i,j,bi,bj)*deepFac2F(ks)*rhoFacF(ks) |
& + tmpVal*rA(i,j,bi,bj)*deepFac2F(ks)*rhoFacF(ks) |
226 |
ENDDO |
ENDDO |
227 |
ENDDO |
ENDDO |
228 |
c ENDIF |
ENDIF |
229 |
C- end bi,bj loops |
C- end bi,bj loops |
230 |
ENDDO |
ENDDO |
231 |
ENDDO |
ENDDO |
232 |
CALL GLOBAL_SUM_TILE_RL( tileAMu , totAMu, myThid ) |
CALL GLOBAL_SUM_TILE_RL( tileAMu , totAMu, myThid ) |
233 |
CALL GLOBAL_SUM_TILE_RL( tileAMs , totAMs, myThid ) |
CALL GLOBAL_SUM_TILE_RL( tileAMs , totAMs, myThid ) |
234 |
|
|
235 |
C-- Print stats for total Angular Momentum: |
C-- Print stats for total Angular Momentum (per unit area, in kg/s): |
236 |
CALL MON_SET_PREF('am',myThid) |
CALL MON_SET_PREF('am',myThid) |
237 |
totAMu = totAMu*rUnit2mass |
totAMu = totAMu*rUnit2mass |
238 |
totAMs = totAMs*rUnit2mass |
totAMs = totAMs*rUnit2mass |