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

Re: 20000816: ncdump bug



>From: Doug Reynolds <address@hidden>
>Organization: MIT
>Keywords: 200008162017.e7GKHDN21310 netCDF ncdump

Hi Doug,

> I think I have found a minor bug in ncdump.  I have tried this with
> both netCDF 3.4 and netCDF 3.5beta3 (both running on Solaris 2.5),
> and the behavior is the same for both.  When running a command like
> "ncdump -h *", there is a problem with the first line for files
> other than the first file.  Unless the -n option is used, the first
> line should be "netcdf <filename> {".  However, when the wildcard is
> used, the first filename is repeated for subsequent files.  So, if I
> have three files, test1.nc, test2.nc, and test3.nc, I see output
> like this:
>
> netcdf test1 {
> dimensions:
>         images = UNLIMITED ; // (33 currently)
>         length = 128 ;
> .
> .
> .
> }
> netcdf test1 {
> dimensions:
>         images = UNLIMITED ; // (33 currently)
>         length = 128 ;
> .
> .
> .
> }
> netcdf test1 {
> dimensions:
>         images = UNLIMITED ; // (33 currently)
>         length = 128 ;
> .
> .
> .
> }
>
> Instead, I think I *should* see output like this:
>
> netcdf test1 {
> dimensions:
>         images = UNLIMITED ; // (33 currently)
>         length = 128 ;
> .
> .
> .
> }
> netcdf test2 {
> dimensions:
>         images = UNLIMITED ; // (33 currently)
>         length = 128 ;
> .
> .
> .
> }
> netcdf test3 {
> dimensions:
>         images = UNLIMITED ; // (33 currently)
>         length = 128 ;
> .
> .
> .
> }
>
> I have attached a version of ncdump.c that shows my attempt to fix
> the problem.

Thanks very much for your bug report and suggested fix for the ncdump
problem.  This will be fixed in the final netcdf 3.5 release.

--Russ

_____________________________________________________________________

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