-
Notifications
You must be signed in to change notification settings - Fork 1
DAS-2419: Restores datatree string behavior #29
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
DAS-2419: Restores datatree string behavior #29
Conversation
This gets around a regression in the 2025.8.0 xarray that required h5netcdf to write NetCDF files.
…date-version-again
decode_cf=False turns off all CF decoding by default including concat_characters, even when it's specified.
decode_times=False, | ||
decode_timedelta=False, | ||
decode_coords=False, | ||
decode_cf=False, |
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.
So we shouldn't be using this flag if we want to do any decoding. if this is false, all the other flags are ignored and also discarded. The current set of flags is probably overkill, but it is explicit and doing what we want. concatting strings and leaving everything else alone
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.
Changes look good. I ran the unit tests and they all passed. I ran into permission issues for the collection specified in the test request, so I ran the request below for SPL4CMDL v008 instead.
I was able to open the output in panoply and plot the variables.
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.
Great sleuthing the other day to get to the bottom of this!
Description
This PR corrects the keyword args passed to open_datatree, ensuring that the concat_character behavior for xarray is enabled.
That behavior is to "concatenate along the last dimension of character arrays to form string arrays. Dimensions will only be concatenated over (and removed) if they have no corresponding variable and if they are only used as the last dimension of character arrays."
Our incorrect flags were discovered as a result of a fix to the filtering of decoders in xarray's 2025.3.0 release
Jira Issue ID
DAS-2419
Local Test Steps
Pull this branch and make sure the tests pass.
Run this command and verify the output is openable in panoply for plotting.
PR Acceptance Checklist
CHANGELOG.md
updated to include high level summary of PR changes.docker/service_version.txt
updated if publishing a release.