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

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

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


Revision 1.7.4.1 - (show annotations) (download)
Wed Feb 6 15:48:09 2002 UTC (22 years, 3 months ago) by heimbach
Branch: ecco-branch
CVS Tags: icebear5, icebear4, icebear3, icebear2, ecco_c44_e19, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, ecco_ice2, ecco_ice1, ecco_c44_e22, ecco_c44_e25, ecco_c44_e23, ecco_c44_e20, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5
Branch point for: c24_e25_ice, icebear
Changes since 1.7: +18 -5 lines
Updating ecco-branch-mod1 to checkpoint44.
Will be tagged ecco-branch-mod2.

1 C $Header: /u/gcmpack/MITgcm/pkg/monitor/mon_ke.F,v 1.8 2001/11/08 16:47:34 jmc Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 SUBROUTINE MON_KE(
7 I myThid )
8 C /==========================================================\
9 C | SUBROUTINE MON_KE |
10 C | o Calculates stats for Kinetic energy |
11 C |==========================================================|
12 C \==========================================================/
13 IMPLICIT NONE
14
15 C === Global data ===
16 #include "SIZE.h"
17 #include "EEPARAMS.h"
18 #include "DYNVARS.h"
19 #include "MONITOR.h"
20 #include "GRID.h"
21
22 C === Routine arguments ===
23 INTEGER myThid
24
25 C === Local variables ====
26 INTEGER bi,bj,I,J,K
27 _RL tmpVal,theMax,theMean,theVolMean,theVol
28 INTEGER numPnts
29
30 theMax=0.
31 numPnts=0
32 theMean=0.
33 theVolMean=0.
34 theVol=0.
35
36 DO bj=myByLo(myThid),myByHi(myThid)
37 DO bi=myBxLo(myThid),myBxHi(myThid)
38 DO K=1,Nr
39 DO J=1,sNy
40 DO I=1,sNx
41 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)
44 & +vVel( I , J ,K,bi,bj)*vVel( I , J ,K,bi,bj)
45 & +vVel( I ,J+1,K,bi,bj)*vVel( I ,J+1,K,bi,bj) )
46 theMax=max(theMax,tmpVal)
47 IF (tmpVal.NE.0.) THEN
48 theMean=theMean+tmpVal
49 numPnts=numPnts+1
50 ENDIF
51 theVolMean=theVolMean+tmpVal
52 & *ra(i,j,bi,bj)*drf(k)*hFacC(i,j,k,bi,bj)
53 ENDDO
54 ENDDO
55 ENDDO
56 ENDDO
57 ENDDO
58 _GLOBAL_MAX_R8(theMax,myThid)
59 _GLOBAL_SUM_R8(theMean,myThid)
60 tmpVal=float(numPnts)
61 _GLOBAL_SUM_R8(tmpVal,myThid)
62 IF (tmpVal.NE.0.) theMean=theMean/tmpVal
63 _GLOBAL_SUM_R8(theVol,myThid)
64 _GLOBAL_SUM_R8(theVolMean,myThid)
65
66 CALL MON_OUT_RL(mon_string_none,theMax,mon_foot_max,myThid)
67 CALL MON_OUT_RL(mon_string_none,theMean,mon_foot_mean,myThid)
68 CALL MON_OUT_RL(mon_string_none,theVolMean,
69 & mon_foot_volint,myThid)
70 IF (theVol.NE.0.) theVolMean=theVolMean/theVol
71 CALL MON_OUT_RL(mon_string_none,theVolMean,
72 & mon_foot_volmean,myThid)
73
74 RETURN
75 END

  ViewVC Help
Powered by ViewVC 1.1.22