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/2404#issuecomment-419392403,https://api.github.com/repos/pydata/xarray/issues/2404,419392403,MDEyOklzc3VlQ29tbWVudDQxOTM5MjQwMw==,17178478,2018-09-07T10:12:09Z,2018-09-07T10:12:09Z,NONE,"I'll work on an MWE, but need to strip a bunch of data from it before I can share it. We encode using `{'zlib': True, 'complevel': 4}` for every data variable in the Dataset. Removing that doesn't change the error occurrence. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,357729048 https://github.com/pydata/xarray/issues/1949#issuecomment-369315468,https://api.github.com/repos/pydata/xarray/issues/1949,369315468,MDEyOklzc3VlQ29tbWVudDM2OTMxNTQ2OA==,17178478,2018-02-28T17:27:10Z,2018-02-28T17:27:38Z,NONE,"The drop technique seems reasonable, if a bit long-winded for the programmatic case (loop over all dimensions, find any that are empty -> loop over all variables, drop any that contain those empty dimensions). As an addition, if the empty dimension also has an associated empty coordinate then it requires an extra step to get rid of it: ``` python In [21]: test_dataset = xr.Dataset(dict( ...: empty_array=xr.DataArray([], dims='a', coords={'a':[]}), ...: populated_array=xr.DataArray([1], {'b':['1']}, 'b') ...: )) In [22]: test_dataset Out[22]: Dimensions: (a: 0, b: 1) Coordinates: * a (a) float64 * b (b) Dimensions: (a: 0, b: 1) Coordinates: * a (a) float64 * b (b) Dimensions: (b: 1) Coordinates: * b (b)