-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add support for NETCDF4_CLASSIC to h5netcdf engine #10686
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
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
68d5c73
Support NETCDF4_CLASSIC in the h5engine backend
huard 120af07
convert bytes attributes to numpy.bytes_ in NETCDF4_CLASSIC format wi…
huard f8f44f0
added test to confirm string attributes are stored as numpy char arra…
huard 522d37d
Added change to whats-new
huard 783c407
run pre-commit
huard 2f1c781
Added test comparing CDL representation of test data written with net…
huard b142d38
Added global attribute to test data. Apply CLASSIC conversion to vari…
huard b14c373
Merge branch 'main' into fix_10676
huard 909a96c
Use h5dump to compare file content instead of CDL. Add _nc3_strict at…
huard 14d22a1
Merge branch 'fix_10676' of github.com:Ouranosinc/xarray into fix_10676
huard 35b50ce
raise error if writing groups to CLASSIC file.
huard a187c8d
remove h5dump test. Remove _nc3_strict attribute (should go into h5ne…
huard 0c1bc08
fix h5netcdf version check.
huard 10707ee
Merge branch 'main' into fix_10676
huard 03ea2de
try to fix tests
huard 592b98b
Set default format to NETCDF4 instead of None, because passing None t…
huard 13b60d0
Apply suggestions from code review
huard cf8b4be
Suggestions from review.
huard d0b0948
Merge branch 'fix_10676' of github.com:Ouranosinc/xarray into fix_10676
huard 6351e66
Merge branch 'main' into fix_10676
huard b2a21d2
Raise an error within `get_child_store` rather that `__init__` with f…
huard 50dbd36
Merge branch 'main' into fix_10676
huard 6d686d4
Merge branch 'main' into fix_10676
huard 18e4bd0
Merge branch 'main' into fix_10676
kmuehlbauer d9c4879
Remove casting of bytes to np._bytes_. Require h5netcdf 1.7.0 to save…
huard 99c90a5
Merge branch 'main' into fix_10676
kmuehlbauer 28bd354
Apply suggestions from code review
huard f2a29ca
Update xarray/backends/h5netcdf_.py
huard f1c1819
Update xarray/backends/h5netcdf_.py
huard 88d0841
Merge branch 'main' into fix_10676
kmuehlbauer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NumPy's
S
dtype actually corresponds tobytes
, notstr
. I don't think we want to use it for storing attributes in general.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using fixed width chars replicates the behavior of the netCDF4 backend for the CLASSIC format. Again, this has to do with the
NC_CHAR
vsNC_STRING
formats.Sticking as close as possible to netCDF4 output increases my confidence that the h5netcdf outputs will be compatible with 3rd party software expecting the CLASSIC format.