[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 20020109: ncdump issue
- Subject: Re: 20020109: ncdump issue
- Date: Mon, 21 Jan 2002 08:29:42 -0700
>To: netCDF support <address@hidden>
>From: Roy Britten <address@hidden>
>Subject: ncdump issue
>Organization: UCAR/Unidata
>Keywords: 200201091915.g09JFqN02114
Roy,
A fix for the extra quote on char arrays in ncdump output when using
the -fc or -ff options is also included in the latest
netcdf-3.5.1-beta3 release.
Thanks for the bug report.
--Russ
You wrote:
> I have encountered another problem with character array handling while
> using the netCDF utilities, this time with ncdump. An extra quote is
> appended to character arrays when the -f switch is used. For example,
> with the file:
>
> ----------------------------------------
> netcdf problem {
> dimensions:
> strlen = 10;
> numstrings = 2;
> variables:
> char strings (numstrings, strlen);
> data:
> strings =
> "foo",
> "bar";
> }
> ----------------------------------------
>
> we execute the following commands:
>
> $ ncgen -b problem.cdl
> $ ncdump -fc problem.nc
>
> giving the output:
>
> ----------------------------------------
> netcdf problem {
> dimensions:
> strlen = 10 ;
> numstrings = 2 ;
> variables:
> char strings(numstrings, strlen) ;
> data:
>
> strings =
> "foo"", // strings(0,0)
> "bar""; // strings(1,0)
> }
> ----------------------------------------
>
> In addition to the extra " mark in the data lines, there is a (less
> significant) alignment problem in the data section. A similarly
> incorrect output is generated if the -ff option is used instead of -fc.
>
> Version and platform information is:
>
> ncgen:
> ncgen: -: netcdf library version 3.4 of Oct 28 1999 20:27:24 $
> ncdump:
> netcdf library version 3.4 of Oct 28 1999 20:27:24 $
> platform:
> IRIX64 6.5
>
>
> This issue does not affect us at all; I just thought you might like to
> be made aware of it (if you aren't already).