[cdftools] 163/228: JMM : fix a bug in cdfwhereij for alternate coordinate file ( -c option): character variable too short
Alastair McKinstry
mckinstry at moszumanska.debian.org
Fri Jun 12 08:21:44 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 166c77e69ad5b8c502a5e359437743779bfce3ae
Author: molines <molines at 1055176f-818a-41d9-83e1-73fbe5b947c5>
Date: Fri Sep 7 13:33:38 2012 +0000
JMM : fix a bug in cdfwhereij for alternate coordinate file ( -c option): character variable too short
git-svn-id: http://servforge.legi.grenoble-inp.fr/svn/CDFTOOLS/trunk@611 1055176f-818a-41d9-83e1-73fbe5b947c5
---
Macrolib/macro.jade | 1 +
cdfwhereij.f90 | 17 ++++++++++-------
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/Macrolib/macro.jade b/Macrolib/macro.jade
index 335ac89..9abcd01 100644
--- a/Macrolib/macro.jade
+++ b/Macrolib/macro.jade
@@ -16,3 +16,4 @@ FFLAGS= -static -O $(NCDF) -assume byterecl -convert big_endian
LMPI=-lmpich
INSTALL=$(WORKDIR)/bin
+INSTALL_MAN=$(WORKDIR)/man
diff --git a/cdfwhereij.f90 b/cdfwhereij.f90
index ceb2dd6..4277b81 100644
--- a/cdfwhereij.f90
+++ b/cdfwhereij.f90
@@ -33,8 +33,11 @@ PROGRAM cdfwhereij
CHARACTER(LEN=256) :: cv_phi ! latitude name
CHARACTER(LEN=256) :: ctype='T' ! type of point on C-grid
CHARACTER(LEN=256) :: cldum ! dummmy string
+ CHARACTER(LEN=256) :: clcoo ! dummy character variable
!!----------------------------------------------------------------------
CALL ReadCdfNames()
+ clcoo = cn_fcoo
+
narg= iargc()
IF ( narg < 4 ) THEN
@@ -65,8 +68,8 @@ PROGRAM cdfwhereij
DO WHILE ( ijarg <= narg)
CALL getarg( ijarg, cldum ) ; ijarg= ijarg+1
SELECT CASE ( cldum )
- CASE ( '-c' ) ; CALL getarg(ijarg, cn_fcoo ) ; ijarg=ijarg+1
- CASE ( '-p' ) ; CALL getarg(ijarg, ctype ) ; ijarg=ijarg+1
+ CASE ( '-c' ) ; CALL getarg(ijarg, clcoo ) ; ijarg=ijarg+1
+ CASE ( '-p' ) ; CALL getarg(ijarg, ctype ) ; ijarg=ijarg+1
CASE DEFAULT
ireq=ireq+1
SELECT CASE (ireq)
@@ -80,10 +83,10 @@ PROGRAM cdfwhereij
END SELECT
END DO
- IF ( chkfile(cn_fcoo) ) STOP ! missing file
+ IF ( chkfile(clcoo) ) STOP ! missing file
- npiglo = getdim (cn_fcoo, cn_x)
- npjglo = getdim (cn_fcoo, cn_y)
+ npiglo = getdim (clcoo, cn_x)
+ npjglo = getdim (clcoo, cn_y)
IF ( iimax > npiglo ) THEN
PRINT *,' ERROR : imax is greater than the maximum size ', iimax, npiglo
@@ -106,8 +109,8 @@ PROGRAM cdfwhereij
PRINT *,' ERROR : type of point not known: ', TRIM(ctype)
END SELECT
- glam(:,:) = getvar(cn_fcoo, cv_lam, 1, npiglo, npjglo)
- gphi(:,:) = getvar(cn_fcoo, cv_phi, 1, npiglo, npjglo)
+ glam(:,:) = getvar(clcoo, cv_lam, 1, npiglo, npjglo)
+ gphi(:,:) = getvar(clcoo, cv_phi, 1, npiglo, npjglo)
PRINT '(2a)' ,' Type of point : ', TRIM(ctype)
PRINT '(a,4i6)' ,' I J zoom : ', iimin, iimax, ijmin, ijmax
--
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