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/1849#issuecomment-366255764,https://api.github.com/repos/pydata/xarray/issues/1849,366255764,MDEyOklzc3VlQ29tbWVudDM2NjI1NTc2NA==,6883049,2018-02-16T14:50:21Z,2018-02-16T15:10:40Z,CONTRIBUTOR,"This happened to me today after introducing some modifications in a code that was working fine. I have tried to trace it without success. Finally, I found a workaround which consist on removing the ""contiguous"" entry from the .encoding attributes. This works with gerritholl's file:
```
import xarray as xr
ds = xr.open_dataset(""sample.nc"")
del ds.x.encoding[""contiguous""]
del ds.y.encoding[""contiguous""]
ds.to_netcdf(""sample2.nc"", unlimited_dims=[""y""])
```
So it seems that this entry in the encoding dictionaries is triggering the error.
OK, so I guess that this explains it, from the netCDF4 documentation:
""contiguous: if True (default False), the variable data is stored contiguously on disk. Default False. Setting to True for a variable with an unlimited dimension will trigger an error.""
This is quite an obscure error right now, so maybe we could force contiguous to be False when unlimited_dims is being used, or either raise a more informative error.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,290572700