> We have netcdf data files that were written with netcdf-4.0. In these files > the deflate and deflate_level are set to 0 for scalars. With netcdf-4.1.1 > this no longer works. In nc4var.c the function nc_def_var_extra returns > NC_EINVAL because of the check: > if (!var->ndims) > > Code that was written to handle the netcdf files produced by netcdf-4.0 > worked because this check wasn't made back then. When I recompile linking to > netcdf-4.1.1 the code doesn't work anymore. > > Is this behavior on purpose? The variable's chunking is set to NC_CONTIGUOUS > and deflate is set to 0. Historically that combo was sufficient. > > Will > > > Howdy Will! This has been fixed in the netCDF daily snapshot. You can get the snapshot, wait for the next release (before the end of the year), or change your copy of the code to return NC_NOERR. This was done on purpose, because there can be no compression of a scalar in HDF5. But someone suggested that I was being to strict, and that I should just ignore attempts to deflate scalars. I'm OK with that, but when you check the properties of the file, netcdf will still tell you that there is no compression on that variable. (Because there isn't, really). Also in the snapshot, netCDF will now ignore attempts to set deflation to zero. This causes everything to be run through the gzip compression filter, but no compression is done. It causes bad performance and does nothing to the data, so now it is simply ignored. Thanks, Ed Ticket Details =================== Ticket ID: VGE-187371 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.