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

Specify variable shape / chunking? #7

Closed
TomAugspurger opened this issue May 21, 2021 · 1 comment
Closed

Specify variable shape / chunking? #7

TomAugspurger opened this issue May 21, 2021 · 1 comment

Comments

@TomAugspurger
Copy link
Contributor

Storage formats like Zarr and NetCDF allow variables to be chunked along one or more dimensions (zarr docs).

Would this extension be an appropriate place to capture that information? Building on #6:

{
  "cube:variables": {
    "prcp": {
      "type": "data",
      "description": "...",
      "extent": [0, null],
      "unit": "mm",
      "dimensions": ["time", "y", "x"],
      // new chunking information below //
      "shape": [365, 1000, 1000],
      "chunks": [1, 100, 100]
    }
}

The expectation is that if chunks is specified, it's an array of integers equal to the number of dimensions. The integers indicate the chunk size. Zarr, at least, doesn't allow non-uniform chunks, so a simple list of integers is used. If non-uniform chunking is desired, you would need a list of list of integers.

This overlaps somewhat with proj:shape, but I'm not really sure how extensions interact with each other.

@TomAugspurger
Copy link
Contributor Author

Let's continue this discussion in #8.

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