[cdftools] 208/228: JMM : add printing in cdfsumm for surface, mean value, and mean over time in case of multi time frame file

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Jun 12 08:21:50 UTC 2015


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch master
in repository cdftools.

commit e2e06869571e783950548e18b23c922d6f400f03
Author: molines <molines at 1055176f-818a-41d9-83e1-73fbe5b947c5>
Date:   Fri Apr 19 12:58:24 2013 +0000

    JMM : add printing in cdfsumm for surface, mean value, and mean over time in case of multi time frame file
    
    
    git-svn-id: http://servforge.legi.grenoble-inp.fr/svn/CDFTOOLS/trunk@656 1055176f-818a-41d9-83e1-73fbe5b947c5
---
 cdfsum.f90 | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/cdfsum.f90 b/cdfsum.f90
index cce03a3..0090212 100644
--- a/cdfsum.f90
+++ b/cdfsum.f90
@@ -43,6 +43,7 @@ PROGRAM cdfsum
   REAL(KIND=8)                              :: dvol, dvol2d        ! volume of the ocean/ layer
   REAL(KIND=8)                              :: dsurf               ! surface of the ocean
   REAL(KIND=8)                              :: dsum, dsum2d        ! global sum /layer sum
+  REAL(KIND=8)                              :: dsumt               ! global sum over time
 
   CHARACTER(LEN=256)                        :: cldum               ! dummy string
   CHARACTER(LEN=256)                        :: cf_in               ! file name 
@@ -185,6 +186,7 @@ PROGRAM cdfsum
   e2(:,:) = getvar  (cn_fhgr, cv_e2, 1, npiglo, npjglo, kimin=iimin, kjmin=ijmin)
   gdep(:) = getvare3(cn_fzgr, cv_dep,   npk                                   )
 
+  dsumt = 0.d0
   DO jt = 1,npt
      dvol = 0.d0
      dsum = 0.d0
@@ -215,11 +217,16 @@ PROGRAM cdfsum
            dsum2d = SUM(DBLE(zv * e1 * e2 * zmask))
            dsum   = dsum + dsum2d
            PRINT *, ' Sum value at time ',jt,' = ', dsum2d
+           PRINT *, '          Surface  = ', dsurf/1.d6,' km^2'
+           PRINT *, '       mean value  = ', dsum2d/dsurf
            WRITE (numout,'(i4," ",1e12.6)') jt, dsum2d
         END IF
      END DO
+     dsumt = dsumt + dsum
      IF (.NOT. lforcing) PRINT * ,' Sum value over the ocean: ', dsum
   END DO  ! time loop
+  
+  PRINT *, ' mean Sum over time ', dsumt/npt
 
   CLOSE(numout)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cdftools.git



More information about the debian-science-commits mailing list