[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #MQV-638321]: ncdump bug question



Hi Mike,

> We downloaded the netCDF source on March 13 and built it on Red Hat
> Enterprise 5.  When I do an ncdump on a file named 20090319_0000
> I get this error:
>
> ncdump: name begins with space or control-character: 2
>
> I googled this and found the post below from July 2008.  This seems
> to indicate that this bug should have been fixed.

Yes, the bug was fixed but only in the 4.0.1-beta releases and the daily
snapshot.  If what you downloaded on March 13 was the 3.6.3 release or
the 4.0 release from last June, they still have this bug in them.  The
fix in this case is the one-line change that you found in the July 2008
post.

If instead you want to build netCDF-3 from the 4.0.1-beta3 release or from
the current development snapshot, available from

  ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.0.1-beta3.tar.gz
or
  ftp://ftp.unidata.ucar.edu/pub/netcdf/snapshot/netcdf-4-daily.tar.gz

just make sure you configure without specifying "--enable-netcdf-4" and only
the netCDF-3 software will be built.

> ------------------------------------------------------------------------
> Hi Sheila,
>
> > The latest ncdump rejects filenames starting with the digits 0,1 and 2.
> > 3 - 9 are fine. This is a snag when file-naming conventions starting
> > with year date have been adopted - is this intentional?
> >
> > In ncdump/dumplib.c there's a check on the leading character for the hex
> > range 0x01 - 0x32; changing the upper limit to 2f resolves our immediate
> > problems, but if that's what was intended we'll have the same problems
> > in later releases. Also if that test turns up elsewhere that I haven't
> > found yet.
>
> Thanks for reporting the bug. It's fixed in the next daily snapshot
> release, but the immediate one-line patch to ncdump/dumplib.c (for
> either netCDF-4.0 or netCDF-3.6.3) is appended.
>
> --Russ
>
> Index: netcdf-3/ncdump/dumplib.c
> diff -c netcdf-3/ncdump/dumplib.c:1.59 netcdf-3/ncdump/dumplib.c:1.62
> *** netcdf-3/ncdump/dumplib.c:1.59 Tue Jun 10 14:32:43 2008
> --- netcdf-3/ncdump/dumplib.c Wed Jul 2 08:23:05 2008
> ***************
> *** 1763,1769 ****
> /* For some reason, and on some machines (e.g. tweety)
> utf8 characters such as \343 are considered control character. */
> /* if(*cp && (isspace(*cp) | iscntrl(*cp)))*/
> ! if((*cp >= 0x01 && *cp <= 0x32) || (*cp == 0x7f))
> {
> error("name begins with space or control-character: %c",*cp);
> }
> --- 1770,1776 ----
> /* For some reason, and on some machines (e.g. tweety)
> utf8 characters such as \343 are considered control character. */
> /* if(*cp && (isspace(*cp) | iscntrl(*cp)))*/
> ! if((*cp >= 0x00 && *cp <= 0x20) || (*cp == 0x7f))
> {
> error("name begins with space or control-character: %c",*cp);
> }
> ----------------------------------------------------------------------

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: MQV-638321
Department: Support netCDF
Priority: Normal
Status: Closed