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

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

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


Revision 1.5 - (hide annotations) (download)
Mon Jun 18 17:39:59 2001 UTC (22 years, 11 months ago) by cnh
Branch: MAIN
Changes since 1.4: +4 -7 lines
Add to main branch of
  o CS atmos with AIM physics
  o Multi-threaded AIM physics for LatLon and CS tests
  o Tidied up monitor() output

1 cnh 1.5 C $Header: /u/gcmpack/models/MITgcmUV/pkg/monitor/mon_ke.F,v 1.4 2001/06/06 14:50:23 adcroft Exp $
2 adcroft 1.1 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 cnh 1.5 #include "MONITOR.h"
20 adcroft 1.1
21     C === Routine arguments ===
22     INTEGER myThid
23    
24     C === Local variables ====
25     INTEGER bi,bj,I,J,K
26     _RL tmpVal,theMax,theMean
27     INTEGER numPnts
28    
29     theMax=0.
30     theMean=0.
31     numPnts=0
32    
33     DO bj=myByLo(myThid),myByHi(myThid)
34     DO bi=myBxLo(myThid),myBxHi(myThid)
35     DO K=1,Nr
36     DO J=1,sNy
37     DO I=1,sNx
38     tmpVal=0.25*( uVel( I , J ,K,bi,bj)*uVel( I , J ,K,bi,bj)
39     & +uVel(I+1, J ,K,bi,bj)*uVel(I+1, J ,K,bi,bj)
40     & +vVel( I , J ,K,bi,bj)*vVel( I , J ,K,bi,bj)
41     & +vVel( I ,J+1,K,bi,bj)*vVel( I ,J+1,K,bi,bj) )
42     theMax=max(theMax,tmpVal)
43     IF (tmpVal.NE.0.) THEN
44     theMean=theMean+tmpVal
45     numPnts=numPnts+1
46     ENDIF
47     ENDDO
48     ENDDO
49     ENDDO
50     ENDDO
51     ENDDO
52     _GLOBAL_MAX_R8(theMax,myThid)
53     _GLOBAL_SUM_R8(theMean,myThid)
54     tmpVal=float(numPnts)
55     _GLOBAL_SUM_R8(tmpVal,myThid)
56 adcroft 1.3 IF (tmpVal.NE.0.) theMean=theMean*tmpVal
57 adcroft 1.1
58 cnh 1.5 CALL MON_OUT_RL( mon_string_none, theMax, mon_foot_max )
59     CALL MON_OUT_RL( mon_string_none, theMean, mon_foot_mean )
60 adcroft 1.1
61     RETURN
62     END

  ViewVC Help
Powered by ViewVC 1.1.22