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/5082#issuecomment-860136253,https://api.github.com/repos/pydata/xarray/issues/5082,860136253,MDEyOklzc3VlQ29tbWVudDg2MDEzNjI1Mw==,17162724,2021-06-13T01:34:00Z,2021-06-13T01:34:00Z,CONTRIBUTOR,"I tend to do `ds[""var""].encoding = {}` before saving. See also https://github.com/pydata/xarray/discussions/5407","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,842438533
https://github.com/pydata/xarray/issues/5082#issuecomment-855037803,https://api.github.com/repos/pydata/xarray/issues/5082,855037803,MDEyOklzc3VlQ29tbWVudDg1NTAzNzgwMw==,14808389,2021-06-04T22:13:35Z,2021-06-04T22:13:51Z,MEMBER,"I think dropping on the first operation is the right thing to do, otherwise reloading might cause surprising issues. Consider [this](https://github.com/xarray-contrib/pint-xarray/issues/111):
```python
In [4]: encoding = {
...: ""add_offset"": 267.39366454179356,
...: ""scale_factor"": 0.0006500423894110363,
...: ""dtype"": np.dtype(""int16""),
...: ""_FillValue"": -32767,
...: }
...: ds = xr.Dataset({""arr"": (""x"", [270, 280, 290], {}, encoding)})
...: ds
Out[4]:
Dimensions: (x: 3)
Dimensions without coordinates: x
Data variables:
arr (x) int64 270 280 290
In [5]: ds.arr[:] = [3, 4, 5]
...: ds.to_netcdf(""abc.nc"")
...: with xr.open_dataset(""abc.nc"").load() as loaded:
...: display(loaded)
...: display(loaded.arr)
...:
Dimensions: (x: 3)
Dimensions without coordinates: x
Data variables:
arr (x) float32 258.6 259.6 260.6
array([258.60706, 259.6068 , 260.60724], dtype=float32)
Dimensions without coordinates: x
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,842438533