[cdftools] 64/228: modify cdfpendep

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Jun 12 08:21:29 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 0fd39e0a620d896926543368ceffd1bd8250c85a
Author: dufour <dufour at 1055176f-818a-41d9-83e1-73fbe5b947c5>
Date:   Tue Aug 31 14:24:18 2010 +0000

    modify cdfpendep
    
    git-svn-id: http://servforge.legi.grenoble-inp.fr/svn/CDFTOOLS/trunk@340 1055176f-818a-41d9-83e1-73fbe5b947c5
---
 cdfpendep.f90 | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/cdfpendep.f90 b/cdfpendep.f90
index dda7ea6..65c9729 100644
--- a/cdfpendep.f90
+++ b/cdfpendep.f90
@@ -1,4 +1,4 @@
-PROGRAM cdfpendep
+PROGRAM cdfpendep_new
   !!-------------------------------------------------------------------
   !!              PROGRAM CDFPENDEP
   !!              *****************
@@ -29,7 +29,7 @@ PROGRAM cdfpendep
   REAL(KIND=4) , DIMENSION (:,:), ALLOCATABLE :: trcinv, trcsurf, pendep
   REAL(KIND=4) ,DIMENSION(1)                  :: timean
 
-  CHARACTER(LEN=256) :: cfiletrc, cfileout='pendep.nc'            !: file name
+  CHARACTER(LEN=256) :: cfiletrc, cfiledia, cfileout='pendep.nc'            !: file name
   CHARACTER(LEN=256) :: cinv='invcfc' , ctrc='cfc11', cdum
   TYPE(variable), DIMENSION(1) :: typvar
 
@@ -39,16 +39,17 @@ PROGRAM cdfpendep
   !!  Read command line
   narg= iargc()
   IF ( narg == 0 ) THEN
-     PRINT *,' Usage : cdfpendep ''TRC file'' [-inv inventory_name  -trc trc_name ]'
-     PRINT *,' if not given, inventory name is cfcinv, and trc name is cfc '
+     PRINT *,' Usage : cdfpendep ''TRC file'' ''DIA file'' [-inv inventory_name  -trc trc_name ]'
+     PRINT *,' if not given, inventory name is invcfc, and trc name is cfc11 '
      PRINT *,'   Output on pendep.nc ,variable pendep (m) '
      STOP
   ENDIF
   !!
   !! Initialisation from 1st file (all file are assume to have the same geometry)
   CALL getarg (1, cfiletrc)
-  IF ( narg > 1 ) THEN
-    jarg=2
+  CALL getarg (2, cfiledia)
+  IF ( narg > 2 ) THEN
+    jarg=3
     DO WHILE (jarg <= narg )
       CALL getarg(jarg,cdum)
       SELECT CASE (cdum)
@@ -61,7 +62,7 @@ PROGRAM cdfpendep
 
   npiglo = getdim (cfiletrc,'x')
   npjglo = getdim (cfiletrc,'y')
-  npk    = getdim (cfiletrc,'depth')
+  npk    = getdim (cfiletrc,'deptht')
 
   ipk(1)      = 1
   typvar(1)%name='pendep'
@@ -87,7 +88,7 @@ PROGRAM cdfpendep
   ierr= putheadervar(ncout, cfiletrc, npiglo, npjglo,1)
 
     pendep(:,:)=0.
-    trcinv(:,:) = getvar(cfiletrc,cinv,1 ,npiglo, npjglo)
+    trcinv(:,:) = getvar(cfiledia,cinv,1 ,npiglo, npjglo)
     trcsurf(:,:) = getvar(cfiletrc,ctrc,1 ,npiglo, npjglo)
     WHERE( trcsurf /= 0 ) pendep=trcinv/trcsurf
     ierr=putvar(ncout,id_varout(1), pendep, 1 ,npiglo, npjglo)
@@ -96,4 +97,4 @@ PROGRAM cdfpendep
     ierr=putvar1d(ncout,timean,1,'T')
     istatus = closeout(ncout)
 
-END PROGRAM cdfpendep
+END PROGRAM cdfpendep_new

-- 
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