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

Xr unitsfix #65

Merged
merged 4 commits into from
Mar 18, 2024
Merged

Xr unitsfix #65

merged 4 commits into from
Mar 18, 2024

Conversation

pp-mo
Copy link
Owner

@pp-mo pp-mo commented Mar 17, 2024

Discovered that the problem with current proposed v1.1 is ..

  • specific to xarray 2024.2.0
  • results of direct and via-ncdata load are identical according to xr.Dataset.identical()
  • on save via xr.Dataset.to_netcdf() however, the units does/does-not strip a midnight time-of-day when the data array is lazy/real (i.e. sometimes get "hours since 1970-01-01" instead of the "hours since 1970-01-01 00:00:00" in the encoding)
    • quirky: possibly only happens with scalar data, and seems to also depend on 'unconnected' dims / extra variables
  • the Dataset.encodings are also non-identical, but Dataset.identical() does not insist on this
    • variable encodings also lack a bunch of compression options
    • main (Dataset) encoding notably lacks an "unlimited_dims" entry : this is a known limitation, and should maybe be fixed

@pp-mo pp-mo marked this pull request as ready for review March 17, 2024 16:56
@pp-mo pp-mo merged commit 3a7c997 into main Mar 18, 2024
3 checks passed
@pp-mo pp-mo deleted the xr_unitsfix branch May 11, 2024 22:53
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.

1 participant