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

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

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

revision 1.8 by jmc, Thu Nov 8 16:47:34 2001 UTC revision 1.9 by jmc, Sat Jun 15 03:14:53 2002 UTC
# Line 24  C     === Routine arguments === Line 24  C     === Routine arguments ===
24    
25  C     === Local variables ====  C     === Local variables ====
26        INTEGER bi,bj,I,J,K        INTEGER bi,bj,I,J,K
27        _RL tmpVal,theMax,theMean,theVolMean,theVol        _RL tmpVal,tmpVol,theMax,theMean,theVolMean,theVol
28        INTEGER numPnts        INTEGER numPnts
29    
30        theMax=0.        theMax=0.
# Line 38  C     === Local variables ==== Line 38  C     === Local variables ====
38          DO K=1,Nr          DO K=1,Nr
39           DO J=1,sNy           DO J=1,sNy
40            DO I=1,sNx            DO I=1,sNx
41             theVol=theVol+ra(i,j,bi,bj)*drf(k)*hFacC(i,j,k,bi,bj)             theVol=theVol+rA(i,j,bi,bj)*drF(k)*hFacC(i,j,k,bi,bj)
42             tmpVal=0.25*( uVel( I , J ,K,bi,bj)*uVel( I , J ,K,bi,bj)  
43       &                  +uVel(I+1, J ,K,bi,bj)*uVel(I+1, J ,K,bi,bj)  C- Vector Invariant form (like in pkg/mom_vecinv/mom_vi_calc_ke.F)
44       &                  +vVel( I , J ,K,bi,bj)*vVel( I , J ,K,bi,bj)  c          tmpVal=0.25*( uVel( I , J ,K,bi,bj)*uVel( I , J ,K,bi,bj)
45       &                  +vVel( I ,J+1,K,bi,bj)*vVel( I ,J+1,K,bi,bj) )  c    &                  +uVel(I+1, J ,K,bi,bj)*uVel(I+1, J ,K,bi,bj)
46    c    &                  +vVel( I , J ,K,bi,bj)*vVel( I , J ,K,bi,bj)
47    c    &                  +vVel( I ,J+1,K,bi,bj)*vVel( I ,J+1,K,bi,bj) )
48    c          theVolMean=theVolMean+tmpVal
49    c    &           *ra(i,j,bi,bj)*drf(k)*hFacC(i,j,k,bi,bj)
50    
51    C- Energy conservative form (like in pkg/mom_fluxform/mom_calc_ke.F)
52    C    this is the safe way to check the energy conservation
53    C    with no assumption on how grid spacing & area are defined.
54               tmpVal=0.25*(
55         &       uVel( i ,j,k,bi,bj)*uVel( i ,j,k,bi,bj)
56         &         *dyG( i ,j,bi,bj)*dxC( i ,j,bi,bj)*hFacW( i ,j,k,bi,bj)
57         &      +uVel(i+1,j,k,bi,bj)*uVel(i+1,j,k,bi,bj)
58         &         *dyG(i+1,j,bi,bj)*dxC(i+1,j,bi,bj)*hFacW(i+1,j,k,bi,bj)
59         &      +vVel(i, j ,k,bi,bj)*vVel(i, j ,k,bi,bj)
60         &         *dxG(i, j ,bi,bj)*dyC(i, j ,bi,bj)*hFacS(i, j ,k,bi,bj)
61         &      +vVel(i,j+1,k,bi,bj)*vVel(i,j+1,k,bi,bj)
62         &         *dxG(i,j+1,bi,bj)*dyC(i,j+1,bi,bj)*hFacS(i,j+1,k,bi,bj)
63         &        )
64               theVolMean= theVolMean + tmpVal*drF(k)
65               tmpVal= tmpVal*recip_hFacC(i,j,k,bi,bj)*recip_rA(i,j,bi,bj)
66    
67             theMax=max(theMax,tmpVal)             theMax=max(theMax,tmpVal)
68             IF (tmpVal.NE.0.) THEN             IF (tmpVal.NE.0.) THEN
69              theMean=theMean+tmpVal              theMean=theMean+tmpVal
70              numPnts=numPnts+1              numPnts=numPnts+1
71             ENDIF             ENDIF
72             theVolMean=theVolMean+tmpVal  
      &           *ra(i,j,bi,bj)*drf(k)*hFacC(i,j,k,bi,bj)  
73            ENDDO            ENDDO
74           ENDDO           ENDDO
75          ENDDO          ENDDO
# Line 70  C     === Local variables ==== Line 90  C     === Local variables ====
90        IF (theVol.NE.0.) theVolMean=theVolMean/theVol        IF (theVol.NE.0.) theVolMean=theVolMean/theVol
91        CALL MON_OUT_RL(mon_string_none,theVolMean,        CALL MON_OUT_RL(mon_string_none,theVolMean,
92       &         mon_foot_volmean,myThid)       &         mon_foot_volmean,myThid)
93          CALL MON_OUT_RL(mon_string_none,theVol,
94         &         mon_foot_vol,myThid)
95    
96        RETURN        RETURN
97        END        END

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

  ViewVC Help
Powered by ViewVC 1.1.22