/[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.8 - (hide annotations) (download)
Thu Nov 8 16:47:34 2001 UTC (22 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint44e_post, checkpoint44f_post, checkpoint43a-release1mods, chkpt44d_post, checkpoint44e_pre, release1-branch_tutorials, chkpt44a_post, checkpoint44h_pre, chkpt44c_pre, checkpoint45a_post, checkpoint44g_post, checkpoint45b_post, release1-branch-end, release1_final_v1, checkpoint44b_post, checkpoint45c_post, checkpoint44h_post, chkpt44a_pre, checkpoint44b_pre, checkpoint44, checkpoint45, chkpt44c_post, checkpoint44f_pre, release1-branch_branchpoint
Branch point for: release1_final, release1-branch
Changes since 1.7: +18 -5 lines
update MONITOR:
* compute volume mean and (volume) standard deviation (replace the
  previous one)
* add diagnostic of 2dx,2dy grid noise for each field.
* volume mean and volume integral of KE

1 jmc 1.8 C $Header: /u/gcmpack/models/MITgcmUV/pkg/monitor/mon_ke.F,v 1.7 2001/06/25 20:35: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 jmc 1.8 #include "GRID.h"
21 adcroft 1.1
22     C === Routine arguments ===
23     INTEGER myThid
24    
25     C === Local variables ====
26     INTEGER bi,bj,I,J,K
27 jmc 1.8 _RL tmpVal,theMax,theMean,theVolMean,theVol
28 adcroft 1.1 INTEGER numPnts
29    
30     theMax=0.
31 jmc 1.8 numPnts=0
32 adcroft 1.1 theMean=0.
33 jmc 1.8 theVolMean=0.
34     theVol=0.
35 adcroft 1.1
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 jmc 1.8 theVol=theVol+ra(i,j,bi,bj)*drf(k)*hFacC(i,j,k,bi,bj)
42 adcroft 1.1 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 jmc 1.8 theVolMean=theVolMean+tmpVal
52     & *ra(i,j,bi,bj)*drf(k)*hFacC(i,j,k,bi,bj)
53 adcroft 1.1 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 adcroft 1.6 IF (tmpVal.NE.0.) theMean=theMean/tmpVal
63 jmc 1.8 _GLOBAL_SUM_R8(theVol,myThid)
64     _GLOBAL_SUM_R8(theVolMean,myThid)
65 adcroft 1.1
66 jmc 1.8 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 adcroft 1.1
74     RETURN
75     END

  ViewVC Help
Powered by ViewVC 1.1.22