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/3653#issuecomment-1464128552,https://api.github.com/repos/pydata/xarray/issues/3653,1464128552,IC_kwDOAMm_X85XRNQo,44142765,2023-03-10T17:24:35Z,2023-03-10T17:26:06Z,NONE,"
> More concise syntax for the same thing
>
> ```python
> import xarray as xr
> import fsspec
>
> url = 'https://www.ldeo.columbia.edu/~rpa/NOAA_NCDC_ERSST_v3b_SST.nc'
> with fsspec.open(url) as fobj:
> ds = xr.open_dataset(fobj)
> print(ds)
> ```
When trying this snippet more than once I get a `ValueError: I/O operation on closed file.` exception. Any Idead why this might be the case?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,543197350
https://github.com/pydata/xarray/issues/3653#issuecomment-570095263,https://api.github.com/repos/pydata/xarray/issues/3653,570095263,MDEyOklzc3VlQ29tbWVudDU3MDA5NTI2Mw==,29660939,2020-01-02T00:09:36Z,2020-01-02T00:26:11Z,NONE,"Thanks for the responses. I think I understand this issue now. I am not an expert, but Xarray does not appear to be able to open netCDF from a url without a THREADS server. In this case
```python
import xarray as xr
url = https://opendap.oceanobservatories.org/thredds/dodsC/ooi/dax.soule@qc.cuny.edu/20191228T052214778Z-RS03ECAL-MJ03E-06-BOTPTA302-streamed-botpt_nano_sample/deployment0001_RS03ECAL-MJ03E-06-BOTPTA302-streamed-botpt_nano_sample_20191005T000000-20191005T235959.950000.nc
ds = xr.open_dataset(url)
```
Works just fine. So I see how to make xarray work using OpenDAP, but I am still unable to open a file directly from object store using the HTTPS URL.
I am not sure that this is supported, but if it is I would love to see an example.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,543197350