There was an error while loading. Please reload this page.
1 parent 2a5da7c commit bf35dbfCopy full SHA for bf35dbf
1 file changed
docs/examples.md
@@ -95,8 +95,7 @@ scalar variables such as `goes_imager_projection`. `from_dataset` groups all the
95
scalars into a single one-row table named `scalar`:
96
97
```python
98
-import urllib.request
99
-
+import fsspec
100
import xarray as xr
101
from xarray_sql import XarrayContext
102
@@ -106,8 +105,9 @@ url = (
106
105
'https://noaa-goes16.s3.amazonaws.com/ABI-L2-MCMIPM/2024/001/00/'
107
'OR_ABI-L2-MCMIPM1-M6_G16_s20240010000281_e20240010000350_c20240010000426.nc'
108
)
109
-urllib.request.urlretrieve(url, 'goes.nc')
110
-ds = xr.open_dataset('goes.nc').chunk({'y': 250, 'x': 250})
+ds = xr.open_dataset(fsspec.open_local(f'simplecache::{url}')).chunk(
+ {'y': 250, 'x': 250}
+)
111
112
ctx = XarrayContext()
113
ctx.from_dataset('goes', ds)
0 commit comments