Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:42:23 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
723acae40e Jean*0001 #include "MONITOR_OPTIONS.h"
                0002 
                0003 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0004 CBOP
                0005 C     !ROUTINE: MON_WRITESTATS_RL
                0006 
                0007 C     !INTERFACE:
                0008       SUBROUTINE MON_WRITESTATS_RL(
0d404f33b0 Jean*0009      I     myNr, arr, arrName,
                0010      I     arrhFac, arrMask, arrArea, arrDr,
723acae40e Jean*0011      O     arrStats,
                0012      I     myThid )
                0013 
                0014 C     !DESCRIPTION:
0d404f33b0 Jean*0015 C     Compute the statistics of global array "\_RL arr" (account for
                0016 C     volume and mask) and write them to STDOUT with label "arrName".
723acae40e Jean*0017 
                0018 C     !USES:
                0019       IMPLICIT NONE
                0020 #include "SIZE.h"
                0021 #include "EEPARAMS.h"
                0022 #include "MONITOR.h"
                0023 
                0024 C     !INPUT PARAMETERS:
                0025       INTEGER myNr
0d404f33b0 Jean*0026       _RL arr    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,myNr,nSx,nSy)
723acae40e Jean*0027       _RS arrhFac(1-OLx:sNx+OLx,1-OLy:sNy+OLy,myNr,nSx,nSy)
0d404f33b0 Jean*0028       _RS arrMask(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
723acae40e Jean*0029       _RS arrArea(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0030       _RS arrDr(myNr)
                0031       CHARACTER*(*) arrName
                0032       INTEGER myThid
                0033 
                0034 C     !OUTPUT PARAMETERS:
                0035 C     arrStats :: statistics of the global array (min, max ...)
                0036       _RL arrStats(*)
                0037 CEOP
                0038 
                0039 C     !LOCAL VARIABLES:
                0040       _RL theMin, theMax, theMean, theSD, theDel2, theVol
                0041 
0d404f33b0 Jean*0042       CALL MON_CALC_STATS_RL(
                0043      I         myNr, arr, arrhFac, arrMask, arrArea, arrDr,
                0044      O         theMin, theMax, theMean, theSD, theDel2, theVol,
                0045      I         myThid )
723acae40e Jean*0046 
                0047       arrStats(1) = theMin
                0048       arrStats(2) = theMax
                0049       arrStats(3) = theMean
                0050       arrStats(4) = theSD
                0051       arrStats(5) = theDel2
                0052       arrStats(6) = theVol
                0053 
0d404f33b0 Jean*0054       CALL MON_OUT_RL( arrName, theMax,  mon_foot_max,  myThid )
                0055       CALL MON_OUT_RL( arrName, theMin,  mon_foot_min,  myThid )
                0056       CALL MON_OUT_RL( arrName, theMean, mon_foot_mean, myThid )
                0057       CALL MON_OUT_RL( arrName, theSD,   mon_foot_sd,   myThid )
                0058       CALL MON_OUT_RL( arrName, theDel2, mon_foot_del2, myThid )
                0059 c     CALL MON_OUT_RL( arrName, theVol,  mon_foot_vol,  myThid )
723acae40e Jean*0060 
                0061       RETURN
                0062       END