Open jcmgray opened 5 days ago
@jcmgray Thanks for the well written issue and the MCVE.
I get the same output with engine="netcdf4"
, so I would not say that's specific to the h5netcdf
engine, but is with the distribution of encoding
.
Best answer is to drop encoding in such cases. See a more in-depth discussion on encoding here #6323. Please also have a read here: https://docs.xarray.dev/en/stable/user-guide/io.html#reading-encoded-data and let us know, if and how the documentation could be improved to make this more clear.
Hi @kmuehlbauer, thanks for the response. Apologies for missing the prior discussion around encoding - indeed simply dropping the encoding works perfectly for me, feel free to close.
For what its worth my thoughts behavior/docs-wise (as a user who hasn't needed think about encoding before):
What happened?
If one:
engine="h5ncetdf"
with a string coordinate say<U2
<U4
engine="h5ncetdf"
This is specific to the "h5netcdf" engine.This doesn't happen however with the "scipy" engine.What did you expect to happen?
I guess the encoding should be dropped or updated during the
merge
call.Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
No response
Anything else we need to know?
No response
Environment