issue_comments: 1432943981
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/pydata/xarray/issues/7039#issuecomment-1432943981 | https://api.github.com/repos/pydata/xarray/issues/7039 | 1432943981 | IC_kwDOAMm_X85VaP1t | 60435591 | 2023-02-16T11:29:45Z | 2023-02-16T11:29:45Z | CONTRIBUTOR | I have also encountered an issue with reading of ERA5 data with open_mfdatset, writing it to_netcdf() and reading it again (https://github.com/Deltares/dfm_tools/issues/239). I was actually looking for a place to land this, and found your issue. My expectation is that this is because the ERA5 data is saved as ints, but all files have different offsets/scalingfactors. Upon opening it with open_mfdataset(), the data is converted to floats and to the offset/scalingfactor of the first file. This is fine, but the issue occurs I think (and what you also mention) since {'dtype': 'int16'} is in the encoding. The file is written as ints and this seems to mess up the data. (all a theory) A workaround is to remove the dtype from the encoding for all variables in the file (or update to float32), but that seems cumbersome. |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1373352524 |