id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 839823306,MDU6SXNzdWU4Mzk4MjMzMDY=,5070,requires io.IOBase subclass rather than duck file-like,6042212,closed,0,,,3,2021-03-24T15:06:39Z,2021-03-29T16:22:35Z,2021-03-29T16:22:35Z,CONTRIBUTOR,,,,"If you `open_dataset` on a file-like object, you will get the error ``` TypeError: cannot read the magic number form [sic!] ``` This is because in `xarray.core.utils.read_magic_number`, we have `isinstance(filename_or_obj, io.IOBase)`, which is not necessarily the case for a file-like. I recommend changing this to `hasattr(filename_or_obj, ""read"")`. Example: ``` In [1]: import fsspec In [2]: fs = fsspec.filesystem('file') In [3]: f = fs.open(""201704010000.CHRTOUT_DOMAIN1.comp"") In [5]: import xarray as xr In [6]: xr.open_dataset(f) TypeError ``` Where `f` is a `LocalFileOpener`, made to be lazy and defer file opening, so that it can be pickled.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5070/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 202260275,MDU6SXNzdWUyMDIyNjAyNzU=,1223,zarr as persistent store for xarray,6042212,closed,0,,,12,2017-01-20T22:37:20Z,2017-12-14T02:11:36Z,2017-12-14T02:11:36Z,CONTRIBUTOR,,,,"netCDF and HDF are good legacy archival formats handled by xarray and the wider numerical python ecosystem, but they don't play nicely with parallel access across a cluster or from an archive store like s3. [zarr](https://github.com/alimanfoo/zarr) is certainly non-standard, but would make a very nice internal store for intermediates. This gist, below, is a simple motivator that we could use zarr not only for dask but for xarray too without too much expenditure of effort. https://gist.github.com/martindurant/dc27a072da47fab8d63117488f1fd7f1 ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/1223/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue