1 |
C $Header: /u/gcmpack/MITgcm/pkg/monitor/mon_writestats_rl.F,v 1.1 2004/11/10 20:51:26 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "MONITOR_OPTIONS.h" |
5 |
|
6 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
7 |
CBOP |
8 |
C !ROUTINE: MON_WRITESTATS_RL |
9 |
|
10 |
C !INTERFACE: |
11 |
SUBROUTINE MON_WRITESTATS_RL( |
12 |
I myNr, arr, arrName, |
13 |
I arrhFac, arrMask, arrArea, arrDr, |
14 |
O arrStats, |
15 |
I myThid ) |
16 |
|
17 |
C !DESCRIPTION: |
18 |
C Compute the statistics of global array "\_RL arr" (account for |
19 |
C volume and mask) and write them to STDOUT with label "arrName". |
20 |
|
21 |
C !USES: |
22 |
IMPLICIT NONE |
23 |
#include "SIZE.h" |
24 |
#include "EEPARAMS.h" |
25 |
#include "MONITOR.h" |
26 |
|
27 |
C !INPUT PARAMETERS: |
28 |
INTEGER myNr |
29 |
_RL arr (1-OLx:sNx+OLx,1-OLy:sNy+OLy,myNr,nSx,nSy) |
30 |
_RS arrhFac(1-OLx:sNx+OLx,1-OLy:sNy+OLy,myNr,nSx,nSy) |
31 |
_RS arrMask(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
32 |
_RS arrArea(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
33 |
_RS arrDr(myNr) |
34 |
CHARACTER*(*) arrName |
35 |
INTEGER myThid |
36 |
|
37 |
C !OUTPUT PARAMETERS: |
38 |
C arrStats :: statistics of the global array (min, max ...) |
39 |
_RL arrStats(*) |
40 |
CEOP |
41 |
|
42 |
C !LOCAL VARIABLES: |
43 |
_RL theMin, theMax, theMean, theSD, theDel2, theVol |
44 |
|
45 |
CALL MON_CALC_STATS_RL( |
46 |
I myNr, arr, arrhFac, arrMask, arrArea, arrDr, |
47 |
O theMin, theMax, theMean, theSD, theDel2, theVol, |
48 |
I myThid ) |
49 |
|
50 |
arrStats(1) = theMin |
51 |
arrStats(2) = theMax |
52 |
arrStats(3) = theMean |
53 |
arrStats(4) = theSD |
54 |
arrStats(5) = theDel2 |
55 |
arrStats(6) = theVol |
56 |
|
57 |
CALL MON_OUT_RL( arrName, theMax, mon_foot_max, myThid ) |
58 |
CALL MON_OUT_RL( arrName, theMin, mon_foot_min, myThid ) |
59 |
CALL MON_OUT_RL( arrName, theMean, mon_foot_mean, myThid ) |
60 |
CALL MON_OUT_RL( arrName, theSD, mon_foot_sd, myThid ) |
61 |
CALL MON_OUT_RL( arrName, theDel2, mon_foot_del2, myThid ) |
62 |
c CALL MON_OUT_RL( arrName, theVol, mon_foot_vol, myThid ) |
63 |
|
64 |
RETURN |
65 |
END |