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

[netCDF #IJX-817619]: HDF4 chunking (and compression?) support hints



Hi Charlie,

> Now that NCF-272 is fixed, I would like to support it in NCO.
> What is the best way? To workaround the now-solved bug,
> NCO currently avoids all chunking/compression calls on HDF4 files.
> Chunking should now be allowed on HDF4 files as long as
> NCO was built with netCDF 4.3.3+.
> So...we are in the familiar yet uncomfortable position where
> NCO needs to implement version-dependent libnetcdf.a functionality.
> 
> For whatever reason, netCDF does not include a YYYYMMDD date token
> (like GCC does) nor a library version token (also like GCC) with
> which clients like NCO could implement netCDF version/date specific
> workarounds using those as pre-processor conditionals.
> In the absence of version/date tokens, the next easiest way for us is if
> netcdf.h includes a function-specific indicator token, e.g.,
> NC_HAVE_HDF4_CHUNKING
> NC_HAVE_HDF4_DEFLATE

Would macros such as the__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__
described at

  https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html

suffice for what NCO needs (substituting "NETCDFC" for "GNUC" in the
macro names), or do you have a better suggestion?  It seems that just
having a version string wouldn't work very well, becasue youy want o
know whwther the current version is later than a specific version, and
the approach with the macros above allows this.  The alternative of a
version date integer such as YYYYMMDD would require developers to know
about the correspondence between version numbers and release dates, so
I'd prefer not to use that.

> Also, it is unclear if netCDF-HDF4 now supports compression
> inquiry and/or setting functions. When I filed the original
> bug report nc_inq_var_deflate() would crash on HDF4. Does it still?

Not sure, we'll have to get back to you on that.

> It would be great if such library hints could be in 4.3.3-final.

If it's just a matter of defining them in netcdf.h for this and all 
subsequent releases, we can do that.  We'd define them manually
for this release and automate it as part of the release management
from now on.

--Russ

> Thanks,
> Charlie
> --
> Charlie Zender, Earth System Sci. & Computer Sci.
> University of California, Irvine 949-891-2429 )'(
> 
> 

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



Ticket Details
===================
Ticket ID: IJX-817619
Department: Support netCDF
Priority: Normal
Status: Closed