Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REFERENCE_LIST. Do we need to implement it? #11

Closed
bnlawrence opened this issue Jul 19, 2024 · 2 comments
Closed

REFERENCE_LIST. Do we need to implement it? #11

bnlawrence opened this issue Jul 19, 2024 · 2 comments

Comments

@bnlawrence
Copy link
Collaborator

bnlawrence commented Jul 19, 2024

We have a problem when using pyfive as the backend for h5netcdf, which may boil down to the ability to deal with reference lists. It turns out we have one of those in the netcdf_classic file we used for the netcdf_classic test, but it doesn't cause any problems because it is never investigated in that test.

We now have a new test (test_reference_list.py) in the h5netcdf branch that currently traps the relevant warning and raises it as an error. The question at hand is, do we need to implement this at all.

It is noteworthy that is is only raised when you look for the dimensions of a coordinate axis ... is that a real use case?

@bnlawrence
Copy link
Collaborator Author

From https://docs.unidata.ucar.edu/netcdf-c/current/file_format_specifications.html via David Hassell's comment:

Attributes

Attributes in HDF5 and netCDF-4 correspond very closely. Each attribute in an HDF5 file is represented as an attribute in the netCDF-4 file, with the exception of the attributes below, which are hidden by the netCDF-4 API.

  • _Netcdf4Coordinates An integer array containing the dimension IDs of a variable which is a multi-dimensional coordinate variable.
  • _nc3_strict When this (scalar, H5T_NATIVE_INT) attribute exists in the root group of the HDF5 file, the netCDF API will enforce the netCDF classic model on the data file.
  • REFERENCE_LIST This attribute is created and maintained by the HDF5 dimension scale API.
  • CLASS This attribute is created and maintained by the HDF5 dimension scale API.
  • DIMENSION_LIST This attribute is created and maintained by the HDF5 dimension scale API.
  • NAME This attribute is created and maintained by the HDF5 dimension scale API.
  • _Netcdf4Dimid Holds a scalar H5T_NATIVE_INT that is the (zero-based) dimension ID for this dimension, needed when dimensions and coordinate variables are defined in different orders.
  • _NCProperties Holds provenance information about a file at the time it was created. It specifies the versions of the netCDF and HDF5 libraries used to create the file.

@bnlawrence
Copy link
Collaborator Author

Ok, it seems clear that we do not need to implement this, whatever the downstream problem is in h5netcdf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant