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

[netCDF #ZYF-261630]: nccopy (hdf?) error when a dimension name and a variable name are the same



Hello,

Thanks for reporting this issue; there shouldn't be a problem with what you're 
trying to do.

I've opened an issue at our GitHub repository, which you can view/follow here:

* https://github.com/Unidata/netcdf-c/issues/295

I will take a look at the failure in nccopy and see if I can figure out what is 
going on.

Thanks!

-Ward

> If a dimension name and a variable name are the same, nccopy will generate an 
> error.
> This does not appear to be a problem with netcdf-4/hdf files we are 
> generating programmatically.
> 
> 
> 
> We started to observe the following error with
> hdf5-1.8.10-linux-x86_64
> netcdf-4.3.3.1
> 
> and found it is still present when we tested with:
> hdf5-1.10.0-patch1-linux-centos6-x86_64-gcc447-shared
> netcdf-4.4.1
> 
> (prior to netcdf-4.3.3.1 we were just netcdf-3, so I can't comment on when
> the problem may have started)
> 
> 
> 
> Given the following CDL (afile.cdl):
> 
> 
> netcdf afile {
> dimensions:
> elapsed_time = UNLIMITED ; // (1 currently)
> aName = 4 ;
> variables:
> double aName(elapsed_time, aName) ;
> 
> // global attributes:
> data:
> 
> 
> aName =
> 1, 2, 3, 4 ;
> 
> }
> 
> 
> ncgen -4 -o afile.nc afile.cdl
> 
> nccopy -4 afile.nc afile2.nc
> 
> generates the following error:
> 
> NetCDF: Index exceeds dimension bound
> Location: file nccopy.c; line 1045
> 
> 
> if the cdl is more complicated, it still generates an error, but the error
> changes to:
> 
> NetCDF: HDF error
> Location: file nccopy.c; line 1045
> 
> 
> 
> If instead of generating a netcdf-4 file with ncgen, we back down to netcdf-3,
> using nccopy to create a netcdf-4 version of the file will work. However 
> copying that
> netcdf-4 file will (not surprisingly) generate the error.
> 
> All of this was discovered when we wanted to retroactively compress existing 
> netcdf-4
> files via nccopy.
> 
> I did take a quick look at nccopy, but was not able to see anything obvious 
> about why
> nccopy would be having a problem.  I went back a couple of years in the 
> netcdf support
> archive and didn't see anything that would appear to be relevant to this.
> 
> --
> 
> Robert M. Shectman
> 
> National Atmospheric Release Advisory Center (NARAC)
> Lawrence Livermore National Laboratory
> 
> address@hidden
> (925)423-6714
> 
> 


Ticket Details
===================
Ticket ID: ZYF-261630
Department: Support netCDF
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.