Giter Site home page Giter Site logo

Comments (2)

kmuehlbauer avatar kmuehlbauer commented on June 17, 2024

@itcarroll Thanks for raising. As this might have severe implications I'm inclined to wait for discussion in Unidata/netcdf-c#2571.

Could you give a bit more detail on the use-case?

from h5netcdf.

itcarroll avatar itcarroll commented on June 17, 2024

Yes, I'm interested to see the response from Unidata as well. Of course, I may not foresee some undesirable outcome.

My use case concerns datasets like what you get from XArray with xarray.Dataset({'y': ('x', [0.1, 2.3, 4.5]), 'a': ('x', [0, 0, 1])}), having no coordinate variable for shared dimension x. In HDF5 terminology, x is a dimension scale having a dataspace that may either be null, scalar or an array. HDF5 does not enforce any kind of dimensionality agreement between x and y or a.

A creator of HDF5 files, who does not intend to create netCDF4 files nor depend on the netCDF4 libraries, will use a null dataspace for x when creating a file with the same y and a. They would need the netCDF4 libraries (or knowledge of them) to use an array with shape (3,) for x that also has attributes signaling the array should be ignored. The consumer of that file using XArray benefits greatly from the fact that the netcdf4-python and h5netcdf engines do their level best to read this HDF5 file that is not strictly netCDF4.

These engines are already very accommodating in generation of "phony dimensions" in the absence of dimension scales, and I hope those could become less common if the proposed use of null dataspaces catches on.

from h5netcdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.