DAS-2419: Restores datatree string behavior#29
Merged
flamingbear merged 5 commits intomainfrom Sep 16, 2025
Merged
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.
flamingbear
commented
Sep 16, 2025
| decode_times=False, | ||
| decode_timedelta=False, | ||
| decode_coords=False, | ||
| decode_cf=False, |
Member
Author
There was a problem hiding this comment.
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
5 tasks
joeyschultz
approved these changes
Sep 16, 2025
Contributor
joeyschultz
left a comment
There was a problem hiding this comment.
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.
owenlittlejohns
approved these changes
Sep 16, 2025
Member
owenlittlejohns
left a comment
There was a problem hiding this comment.
Great sleuthing the other day to get to the bottom of this!
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.mdupdated to include high level summary of PR changes.docker/service_version.txtupdated if publishing a release.