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

allow coordinates to be independent of region selection in to_zarr #6260

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

observingClouds
Copy link
Contributor

The region argument has been validated too strictly as coordinates needed to have a common dimension with the selected dimensions in region. The validation is now restricted to data variables.

@d70-t
Copy link
Contributor

d70-t commented Feb 9, 2022

I'm wondering what the right option for this case would be:

data = Dataset(             
    {"u": (("x", "y"), np.array([[10], [11], [12]]))},             
    coords={"x": [0, 1, 2], "y": [0], "z": ("x", [10, 11, 12])},             
)                                         
data2 = Dataset(                                  
    {"u": (("x", "y"), np.array([[13], [14]]))},             
    coords={"x": [3, 4], "y": [1], "z": ("x", [13, 14])},             
) 

In this case, the y-coordinate would be independent of x, so probably should not be updated during the region-write (multiple concurrent writes on distinct regions would interfere). However, the z-coordinate probably should be written as that would result in concurrent writes to distinct regions.

Copy link
Member

@shoyer shoyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's resolve what the desired behavior is over in #6069 first.

@max-sixty
Copy link
Collaborator

I added a comment to #6069. I realize this lost some momentum, but I would be +1 on doing this behind an option. If that option could allow for just ignoring all coords that don't have the region, that would be even better (from #8245)

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

Successfully merging this pull request may close these issues.

to_zarr: region not recognised as dataset dimensions
5 participants