Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | · | 1 | ·8fb9bcdaeda9d90b3613bdfd255531c9·4464396·doc·optional·python-xarray-doc_2025.03.1-8_all.deb |
2 | ·8b79a23e523a680ce4498b5099959c43·820204·python·optional·python3-xarray_2025.03.1-8_all.deb | 2 | ·8b79a23e523a680ce4498b5099959c43·820204·python·optional·python3-xarray_2025.03.1-8_all.deb |
Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | -rw-r--r--···0········0········0········4·2025-05-05·09:04:03.000000·debian-binary | 1 | -rw-r--r--···0········0········0········4·2025-05-05·09:04:03.000000·debian-binary |
2 | -rw-r--r--···0········0········0·····736 | 2 | -rw-r--r--···0········0········0·····7364·2025-05-05·09:04:03.000000·control.tar.xz |
3 | -rw-r--r--···0········0········0··445 | 3 | -rw-r--r--···0········0········0··4456840·2025-05-05·09:04:03.000000·data.tar.xz |
Offset 1, 13 lines modified | Offset 1, 13 lines modified | ||
1 | Package:·python-xarray-doc | 1 | Package:·python-xarray-doc |
2 | Source:·python-xarray | 2 | Source:·python-xarray |
3 | Version:·2025.03.1-8 | 3 | Version:·2025.03.1-8 |
4 | Architecture:·all | 4 | Architecture:·all |
5 | Maintainer:·Debian·Science·Maintainers·<debian-science-maintainers@lists.alioth.debian.org> | 5 | Maintainer:·Debian·Science·Maintainers·<debian-science-maintainers@lists.alioth.debian.org> |
6 | Installed-Size:·1379 | 6 | Installed-Size:·13795 |
7 | Depends:·libjs-sphinxdoc·(>=·8.1),·libjs-mathjax,·libjs-requirejs | 7 | Depends:·libjs-sphinxdoc·(>=·8.1),·libjs-mathjax,·libjs-requirejs |
8 | Built-Using:·alabaster·(=·0.7.16-0.1),·sphinx·(=·8.1.3-5) | 8 | Built-Using:·alabaster·(=·0.7.16-0.1),·sphinx·(=·8.1.3-5) |
9 | Section:·doc | 9 | Section:·doc |
10 | Priority:·optional | 10 | Priority:·optional |
11 | Multi-Arch:·foreign | 11 | Multi-Arch:·foreign |
12 | Homepage:·https://xarray.pydata.org/ | 12 | Homepage:·https://xarray.pydata.org/ |
13 | Description:·documentation·for·xarray | 13 | Description:·documentation·for·xarray |
Offset 269, 31 lines modified | Offset 269, 31 lines modified | ||
269 | -rw-r--r--···0·root·········(0)·root·········(0)······461·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/dask.html | 269 | -rw-r--r--···0·root·········(0)·root·········(0)······461·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/dask.html |
270 | -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/data-structures.html | 270 | -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/data-structures.html |
271 | -rw-r--r--···0·root·········(0)·root·········(0)·····8448·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/developers-meeting.html | 271 | -rw-r--r--···0·root·········(0)·root·········(0)·····8448·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/developers-meeting.html |
272 | -rw-r--r--···0·root·········(0)·root·········(0)······479·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/duckarrays.html | 272 | -rw-r--r--···0·root·········(0)·root·········(0)······479·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/duckarrays.html |
273 | -rw-r--r--···0·root·········(0)·root·········(0)····22909·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/ecosystem.html | 273 | -rw-r--r--···0·root·········(0)·root·········(0)····22909·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/ecosystem.html |
274 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/ | 274 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/ |
275 | -rw-r--r--···0·root·········(0)·root·········(0)····21694·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html | 275 | -rw-r--r--···0·root·········(0)·root·········(0)····21694·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html |
276 | -rw-r--r--···0·root·········(0)·root·········(0)·····18 | 276 | -rw-r--r--···0·root·········(0)·root·········(0)·····1832·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz |
277 | -rw-r--r--···0·root·········(0)·root·········(0)····38490·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html | 277 | -rw-r--r--···0·root·········(0)·root·········(0)····38490·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html |
278 | -rw-r--r--···0·root·········(0)·root·········(0)····237 | 278 | -rw-r--r--···0·root·········(0)·root·········(0)····23771·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz |
279 | -rw-r--r--···0·root·········(0)·root·········(0)···116838·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html | 279 | -rw-r--r--···0·root·········(0)·root·········(0)···116838·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html |
280 | -rw-r--r--···0·root·········(0)·root·········(0)·····88 | 280 | -rw-r--r--···0·root·········(0)·root·········(0)·····8801·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz |
281 | -rw-r--r--···0·root·········(0)·root·········(0)····27577·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html | 281 | -rw-r--r--···0·root·········(0)·root·········(0)····27577·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html |
282 | -rw-r--r--···0·root·········(0)·root·········(0)····210 | 282 | -rw-r--r--···0·root·········(0)·root·········(0)····21019·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz |
283 | -rw-r--r--···0·root·········(0)·root·········(0)····11448·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.html | 283 | -rw-r--r--···0·root·········(0)·root·········(0)····11448·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.html |
284 | -rw-r--r--···0·root·········(0)·root·········(0)·····2375·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb | 284 | -rw-r--r--···0·root·········(0)·root·········(0)·····2375·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb |
285 | -rw-r--r--···0·root·········(0)·root·········(0)····38981·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html | 285 | -rw-r--r--···0·root·········(0)·root·········(0)····38981·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html |
286 | -rw-r--r--···0·root·········(0)·root·········(0)·····32 | 286 | -rw-r--r--···0·root·········(0)·root·········(0)·····3219·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz |
287 | -rw-r--r--···0·root·········(0)·root·········(0)····30434·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html | 287 | -rw-r--r--···0·root·········(0)·root·········(0)····30434·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html |
288 | -rw-r--r--···0·root·········(0)·root·········(0)·····323 | 288 | -rw-r--r--···0·root·········(0)·root·········(0)·····3232·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz |
289 | -rw-r--r--···0·root·········(0)·root·········(0)····36876·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html | 289 | -rw-r--r--···0·root·········(0)·root·········(0)····36876·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html |
290 | -rw-r--r--···0·root·········(0)·root·········(0)·····28 | 290 | -rw-r--r--···0·root·········(0)·root·········(0)·····2857·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz |
291 | -rw-r--r--···0·root·········(0)·root·········(0)····46324·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.html | 291 | -rw-r--r--···0·root·········(0)·root·········(0)····46324·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.html |
292 | -rw-r--r--···0·root·········(0)·root·········(0)·····35 | 292 | -rw-r--r--···0·root·········(0)·root·········(0)·····3572·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz |
293 | -rw-r--r--···0·root·········(0)·root·········(0)······491·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/faq.html | 293 | -rw-r--r--···0·root·········(0)·root·········(0)······491·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/faq.html |
294 | -rw-r--r--···0·root·········(0)·root·········(0)····15073·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/gallery.html | 294 | -rw-r--r--···0·root·········(0)·root·········(0)····15073·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/gallery.html |
295 | -rw-r--r--···0·root·········(0)·root·········(0)····16306·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/genindex.html | 295 | -rw-r--r--···0·root·········(0)·root·········(0)····16306·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/genindex.html |
296 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/ | 296 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/ |
297 | -rw-r--r--···0·root·········(0)·root·········(0)····51674·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/faq.html | 297 | -rw-r--r--···0·root·········(0)·root·········(0)····51674·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/faq.html |
298 | -rw-r--r--···0·root·········(0)·root·········(0)·····7741·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/index.html | 298 | -rw-r--r--···0·root·········(0)·root·········(0)·····7741·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/index.html |
299 | -rw-r--r--···0·root·········(0)·root·········(0)····25661·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/installing.html | 299 | -rw-r--r--···0·root·········(0)·root·········(0)····25661·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/installing.html |
Offset 323, 15 lines modified | Offset 323, 15 lines modified | ||
323 | -rw-r--r--···0·root·········(0)·root·········(0)······473·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/plotting.html | 323 | -rw-r--r--···0·root·········(0)·root·········(0)······473·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/plotting.html |
324 | -rw-r--r--···0·root·········(0)·root·········(0)·····6546·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/py-modindex.html | 324 | -rw-r--r--···0·root·········(0)·root·········(0)·····6546·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/py-modindex.html |
325 | -rw-r--r--···0·root·········(0)·root·········(0)······524·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/quick-overview.html | 325 | -rw-r--r--···0·root·········(0)·root·········(0)······524·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/quick-overview.html |
326 | -rw-r--r--···0·root·········(0)·root·········(0)······443·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/related-projects.html | 326 | -rw-r--r--···0·root·········(0)·root·········(0)······443·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/related-projects.html |
327 | -rw-r--r--···0·root·········(0)·root·········(0)······476·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/reshaping.html | 327 | -rw-r--r--···0·root·········(0)·root·········(0)······476·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/reshaping.html |
328 | -rw-r--r--···0·root·········(0)·root·········(0)····24428·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/roadmap.html | 328 | -rw-r--r--···0·root·········(0)·root·········(0)····24428·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/roadmap.html |
329 | -rw-r--r--···0·root·········(0)·root·········(0)·····6341·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/search.html | 329 | -rw-r--r--···0·root·········(0)·root·········(0)·····6341·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/search.html |
330 | -rw-r--r--···0·root·········(0)·root·········(0)···25 | 330 | -rw-r--r--···0·root·········(0)·root·········(0)···253687·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/searchindex.js |
331 | -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/terminology.html | 331 | -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/terminology.html |
332 | -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/time-series.html | 332 | -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/time-series.html |
333 | -rw-r--r--···0·root·········(0)·root·········(0)····13358·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/tutorials-and-videos.html | 333 | -rw-r--r--···0·root·········(0)·root·········(0)····13358·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/tutorials-and-videos.html |
334 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/ | 334 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/ |
335 | -rw-r--r--···0·root·········(0)·root·········(0)····58669·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/combining.html | 335 | -rw-r--r--···0·root·········(0)·root·········(0)····58669·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/combining.html |
336 | -rw-r--r--···0·root·········(0)·root·········(0)···140306·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/computation.html | 336 | -rw-r--r--···0·root·········(0)·root·········(0)···140306·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/computation.html |
337 | -rw-r--r--···0·root·········(0)·root·········(0)····71357·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/dask.html | 337 | -rw-r--r--···0·root·········(0)·root·········(0)····71357·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/dask.html |
Offset 344, 15 lines modified | Offset 344, 15 lines modified | ||
344 | -rw-r--r--···0·root·········(0)·root·········(0)····68746·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/interpolation.html | 344 | -rw-r--r--···0·root·········(0)·root·········(0)····68746·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/interpolation.html |
345 | -rw-r--r--···0·root·········(0)·root·········(0)···147662·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/io.html | 345 | -rw-r--r--···0·root·········(0)·root·········(0)···147662·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/io.html |
346 | -rw-r--r--···0·root·········(0)·root·········(0)····11704·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/options.html | 346 | -rw-r--r--···0·root·········(0)·root·········(0)····11704·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/options.html |
347 | -rw-r--r--···0·root·········(0)·root·········(0)····42216·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/pandas.html | 347 | -rw-r--r--···0·root·········(0)·root·········(0)····42216·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/pandas.html |
348 | -rw-r--r--···0·root·········(0)·root·········(0)···135242·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/plotting.html | 348 | -rw-r--r--···0·root·········(0)·root·········(0)···135242·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/plotting.html |
349 | -rw-r--r--···0·root·········(0)·root·········(0)····63000·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/reshaping.html | 349 | -rw-r--r--···0·root·········(0)·root·········(0)····63000·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/reshaping.html |
350 | -rw-r--r--···0·root·········(0)·root·········(0)····46813·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/terminology.html | 350 | -rw-r--r--···0·root·········(0)·root·········(0)····46813·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/terminology.html |
351 | -rw-r--r--···0·root·········(0)·root·········(0)····5 | 351 | -rw-r--r--···0·root·········(0)·root·········(0)····53463·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/testing.html |
352 | -rw-r--r--···0·root·········(0)·root·········(0)····53732·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/time-series.html | 352 | -rw-r--r--···0·root·········(0)·root·········(0)····53732·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/time-series.html |
353 | -rw-r--r--···0·root·········(0)·root·········(0)····47294·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/weather-climate.html | 353 | -rw-r--r--···0·root·········(0)·root·········(0)····47294·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/user-guide/weather-climate.html |
354 | -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/weather-climate.html | 354 | -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/weather-climate.html |
355 | -rw-r--r--···0·root·········(0)·root·········(0)··1051854·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/whats-new.html | 355 | -rw-r--r--···0·root·········(0)·root·········(0)··1051854·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/whats-new.html |
356 | -rw-r--r--···0·root·········(0)·root·········(0)······512·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/why-xarray.html | 356 | -rw-r--r--···0·root·········(0)·root·········(0)······512·2025-05-05·09:04:03.000000·./usr/share/doc/python-xarray-doc/html/why-xarray.html |
357 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-05-05·09:04:03.000000·./usr/share/doc-base/ | 357 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-05-05·09:04:03.000000·./usr/share/doc-base/ |
358 | -rw-r--r--···0·root·········(0)·root·········(0)······290·2025-05-05·09:04:03.000000·./usr/share/doc-base/python-xarray-doc.python-xarray-doc | 358 | -rw-r--r--···0·root·········(0)·root·········(0)······290·2025-05-05·09:04:03.000000·./usr/share/doc-base/python-xarray-doc.python-xarray-doc |
Offset 15, 18 lines modified | Offset 15, 18 lines modified | ||
15 | ············] | 15 | ············] |
16 | ········}, | 16 | ········}, |
17 | ········{ | 17 | ········{ |
18 | ············"cell_type":·"code", | 18 | ············"cell_type":·"code", |
19 | ············"execution_count":·1, | 19 | ············"execution_count":·1, |
20 | ············"metadata":·{ | 20 | ············"metadata":·{ |
21 | ················"execution":·{ | 21 | ················"execution":·{ |
22 | ····················"iopub.execute_input":·"2025-05-21T1 | 22 | ····················"iopub.execute_input":·"2025-05-21T15:01:39.439934Z", |
23 | ····················"iopub.status.busy":·"2025-05-21T1 | 23 | ····················"iopub.status.busy":·"2025-05-21T15:01:39.438490Z", |
24 | ····················"iopub.status.idle":·"2025-05-21T1 | 24 | ····················"iopub.status.idle":·"2025-05-21T15:01:39.975491Z", |
25 | ····················"shell.execute_reply":·"2025-05-21T1 | 25 | ····················"shell.execute_reply":·"2025-05-21T15:01:39.973428Z" |
26 | ················} | 26 | ················} |
27 | ············}, | 27 | ············}, |
28 | ············"outputs":·[ | 28 | ············"outputs":·[ |
29 | ················{ | 29 | ················{ |
30 | ····················"ename":·"ModuleNotFoundError", | 30 | ····················"ename":·"ModuleNotFoundError", |
31 | ····················"evalue":·"No·module·named·'xarray'", | 31 | ····················"evalue":·"No·module·named·'xarray'", |
32 | ····················"output_type":·"error", | 32 | ····················"output_type":·"error", |
Offset 51, 18 lines modified | Offset 51, 18 lines modified | ||
51 | ············] | 51 | ············] |
52 | ········}, | 52 | ········}, |
53 | ········{ | 53 | ········{ |
54 | ············"cell_type":·"code", | 54 | ············"cell_type":·"code", |
55 | ············"execution_count":·2, | 55 | ············"execution_count":·2, |
56 | ············"metadata":·{ | 56 | ············"metadata":·{ |
57 | ················"execution":·{ | 57 | ················"execution":·{ |
58 | ····················"iopub.execute_input":·"2025-05-21T1 | 58 | ····················"iopub.execute_input":·"2025-05-21T15:01:40.093910Z", |
59 | ····················"iopub.status.busy":·"2025-05-21T1 | 59 | ····················"iopub.status.busy":·"2025-05-21T15:01:40.092390Z", |
60 | ····················"iopub.status.idle":·"2025-05-21T1 | 60 | ····················"iopub.status.idle":·"2025-05-21T15:01:40.136209Z", |
61 | ····················"shell.execute_reply":·"2025-05-21T1 | 61 | ····················"shell.execute_reply":·"2025-05-21T15:01:40.134349Z" |
62 | ················} | 62 | ················} |
63 | ············}, | 63 | ············}, |
64 | ············"outputs":·[ | 64 | ············"outputs":·[ |
65 | ················{ | 65 | ················{ |
66 | ····················"ename":·"NameError", | 66 | ····················"ename":·"NameError", |
67 | ····················"evalue":·"name·'xr'·is·not·defined", | 67 | ····················"evalue":·"name·'xr'·is·not·defined", |
68 | ····················"output_type":·"error", | 68 | ····················"output_type":·"error", |
Offset 86, 18 lines modified | Offset 86, 18 lines modified | ||
86 | ············] | 86 | ············] |
87 | ········}, | 87 | ········}, |
88 | ········{ | 88 | ········{ |
89 | ············"cell_type":·"code", | 89 | ············"cell_type":·"code", |
90 | ············"execution_count":·3, | 90 | ············"execution_count":·3, |
91 | ············"metadata":·{ | 91 | ············"metadata":·{ |
92 | ················"execution":·{ | 92 | ················"execution":·{ |
93 | ····················"iopub.execute_input":·"2025-05-21T1 | 93 | ····················"iopub.execute_input":·"2025-05-21T15:01:40.142706Z", |
94 | ····················"iopub.status.busy":·"2025-05-21T1 | 94 | ····················"iopub.status.busy":·"2025-05-21T15:01:40.141538Z", |
95 | ····················"iopub.status.idle":·"2025-05-21T1 | 95 | ····················"iopub.status.idle":·"2025-05-21T15:01:40.184343Z", |
96 | ····················"shell.execute_reply":·"2025-05-21T1 | 96 | ····················"shell.execute_reply":·"2025-05-21T15:01:40.182485Z" |
97 | ················} | 97 | ················} |
98 | ············}, | 98 | ············}, |
99 | ············"outputs":·[ | 99 | ············"outputs":·[ |
100 | ················{ | 100 | ················{ |
101 | ····················"ename":·"NameError", | 101 | ····················"ename":·"NameError", |
102 | ····················"evalue":·"name·'ds'·is·not·defined", | 102 | ····················"evalue":·"name·'ds'·is·not·defined", |
103 | ····················"output_type":·"error", | 103 | ····················"output_type":·"error", |
Offset 122, 18 lines modified | Offset 122, 18 lines modified | ||
122 | ············] | 122 | ············] |
123 | ········}, | 123 | ········}, |
124 | ········{ | 124 | ········{ |
125 | ············"cell_type":·"code", | 125 | ············"cell_type":·"code", |
126 | ············"execution_count":·4, | 126 | ············"execution_count":·4, |
127 | ············"metadata":·{ | 127 | ············"metadata":·{ |
128 | ················"execution":·{ | 128 | ················"execution":·{ |
129 | ····················"iopub.execute_input":·"2025-05-21T1 | 129 | ····················"iopub.execute_input":·"2025-05-21T15:01:40.190850Z", |
130 | ····················"iopub.status.busy":·"2025-05-21T1 | 130 | ····················"iopub.status.busy":·"2025-05-21T15:01:40.189433Z", |
131 | ····················"iopub.status.idle":·"2025-05-21T1 | 131 | ····················"iopub.status.idle":·"2025-05-21T15:01:40.593434Z", |
132 | ····················"shell.execute_reply":·"2025-05-21T1 | 132 | ····················"shell.execute_reply":·"2025-05-21T15:01:40.591605Z" |
133 | ················} | 133 | ················} |
134 | ············}, | 134 | ············}, |
135 | ············"outputs":·[ | 135 | ············"outputs":·[ |
136 | ················{ | 136 | ················{ |
137 | ····················"ename":·"NameError", | 137 | ····················"ename":·"NameError", |
138 | ····················"evalue":·"name·'plt'·is·not·defined", | 138 | ····················"evalue":·"name·'plt'·is·not·defined", |
139 | ····················"output_type":·"error", | 139 | ····················"output_type":·"error", |
Offset 166, 18 lines modified | Offset 166, 18 lines modified | ||
166 | ············] | 166 | ············] |
167 | ········}, | 167 | ········}, |
168 | ········{ | 168 | ········{ |
169 | ············"cell_type":·"code", | 169 | ············"cell_type":·"code", |
170 | ············"execution_count":·5, | 170 | ············"execution_count":·5, |
171 | ············"metadata":·{ | 171 | ············"metadata":·{ |
172 | ················"execution":·{ | 172 | ················"execution":·{ |
173 | ····················"iopub.execute_input":·"2025-05-21T1 | 173 | ····················"iopub.execute_input":·"2025-05-21T15:01:40.600289Z", |
174 | ····················"iopub.status.busy":·"2025-05-21T1 | 174 | ····················"iopub.status.busy":·"2025-05-21T15:01:40.598835Z", |
175 | ····················"iopub.status.idle":·"2025-05-21T1 | 175 | ····················"iopub.status.idle":·"2025-05-21T15:01:40.642488Z", |
176 | ····················"shell.execute_reply":·"2025-05-21T1 | 176 | ····················"shell.execute_reply":·"2025-05-21T15:01:40.640764Z" |
177 | ················} | 177 | ················} |
178 | ············}, | 178 | ············}, |
179 | ············"outputs":·[ | 179 | ············"outputs":·[ |
180 | ················{ | 180 | ················{ |
181 | ····················"ename":·"NameError", | 181 | ····················"ename":·"NameError", |
182 | ····················"evalue":·"name·'ds'·is·not·defined", | 182 | ····················"evalue":·"name·'ds'·is·not·defined", |
183 | ····················"output_type":·"error", | 183 | ····················"output_type":·"error", |
Offset 17, 18 lines modified | Offset 17, 18 lines modified | ||
17 | ············] | 17 | ············] |
18 | ········}, | 18 | ········}, |
19 | ········{ | 19 | ········{ |
20 | ············"cell_type":·"code", | 20 | ············"cell_type":·"code", |
21 | ············"execution_count":·1, | 21 | ············"execution_count":·1, |
22 | ············"metadata":·{ | 22 | ············"metadata":·{ |
23 | ················"execution":·{ | 23 | ················"execution":·{ |
24 | ····················"iopub.execute_input":·"2025-05-21T1 | 24 | ····················"iopub.execute_input":·"2025-05-21T15:01:44.921880Z", |
25 | ····················"iopub.status.busy":·"2025-05-21T1 | 25 | ····················"iopub.status.busy":·"2025-05-21T15:01:44.920399Z", |
26 | ····················"iopub.status.idle":·"2025-05-21T1 | 26 | ····················"iopub.status.idle":·"2025-05-21T15:01:47.660059Z", |
27 | ····················"shell.execute_reply":·"2025-05-21T1 | 27 | ····················"shell.execute_reply":·"2025-05-21T15:01:47.658158Z" |
28 | ················} | 28 | ················} |
29 | ············}, | 29 | ············}, |
30 | ············"outputs":·[ | 30 | ············"outputs":·[ |
31 | ················{ | 31 | ················{ |
32 | ····················"ename":·"ModuleNotFoundError", | 32 | ····················"ename":·"ModuleNotFoundError", |
33 | ····················"evalue":·"No·module·named·'xarray'", | 33 | ····················"evalue":·"No·module·named·'xarray'", |
34 | ····················"output_type":·"error", | 34 | ····················"output_type":·"error", |
Offset 87, 18 lines modified | Offset 87, 18 lines modified | ||
87 | ············] | 87 | ············] |
88 | ········}, | 88 | ········}, |
89 | ········{ | 89 | ········{ |
90 | ············"cell_type":·"code", | 90 | ············"cell_type":·"code", |
91 | ············"execution_count":·2, | 91 | ············"execution_count":·2, |
92 | ············"metadata":·{ | 92 | ············"metadata":·{ |
93 | ················"execution":·{ | 93 | ················"execution":·{ |
94 | ····················"iopub.execute_input":·"2025-05-21T1 | 94 | ····················"iopub.execute_input":·"2025-05-21T15:01:47.667144Z", |
95 | ····················"iopub.status.busy":·"2025-05-21T1 | 95 | ····················"iopub.status.busy":·"2025-05-21T15:01:47.665636Z", |
96 | ····················"iopub.status.idle":·"2025-05-21T1 | 96 | ····················"iopub.status.idle":·"2025-05-21T15:01:47.711137Z", |
97 | ····················"shell.execute_reply":·"2025-05-21T1 | 97 | ····················"shell.execute_reply":·"2025-05-21T15:01:47.709248Z" |
98 | ················} | 98 | ················} |
99 | ············}, | 99 | ············}, |
100 | ············"outputs":·[ | 100 | ············"outputs":·[ |
101 | ················{ | 101 | ················{ |
102 | ····················"ename":·"NameError", | 102 | ····················"ename":·"NameError", |
103 | ····················"evalue":·"name·'xr'·is·not·defined", | 103 | ····················"evalue":·"name·'xr'·is·not·defined", |
104 | ····················"output_type":·"error", | 104 | ····················"output_type":·"error", |
Offset 137, 18 lines modified | Offset 137, 18 lines modified | ||
137 | ············] | 137 | ············] |
138 | ········}, | 138 | ········}, |
139 | ········{ | 139 | ········{ |
140 | ············"cell_type":·"code", | 140 | ············"cell_type":·"code", |
141 | ············"execution_count":·3, | 141 | ············"execution_count":·3, |
142 | ············"metadata":·{ | 142 | ············"metadata":·{ |
143 | ················"execution":·{ | 143 | ················"execution":·{ |
144 | ····················"iopub.execute_input":·"2025-05-21T1 | 144 | ····················"iopub.execute_input":·"2025-05-21T15:01:47.717918Z", |
145 | ····················"iopub.status.busy":·"2025-05-21T1 | 145 | ····················"iopub.status.busy":·"2025-05-21T15:01:47.716423Z", |
146 | ····················"iopub.status.idle":·"2025-05-21T1 | 146 | ····················"iopub.status.idle":·"2025-05-21T15:01:47.792952Z", |
147 | ····················"shell.execute_reply":·"2025-05-21T1 | 147 | ····················"shell.execute_reply":·"2025-05-21T15:01:47.791235Z" |
148 | ················} | 148 | ················} |
149 | ············}, | 149 | ············}, |
150 | ············"outputs":·[ | 150 | ············"outputs":·[ |
151 | ················{ | 151 | ················{ |
152 | ····················"ename":·"NameError", | 152 | ····················"ename":·"NameError", |
153 | ····················"evalue":·"name·'ds'·is·not·defined", | 153 | ····················"evalue":·"name·'ds'·is·not·defined", |
154 | ····················"output_type":·"error", | 154 | ····················"output_type":·"error", |
Offset 182, 18 lines modified | Offset 182, 18 lines modified | ||
182 | ············] | 182 | ············] |
183 | ········}, | 183 | ········}, |
184 | ········{ | 184 | ········{ |
185 | ············"cell_type":·"code", | 185 | ············"cell_type":·"code", |
186 | ············"execution_count":·4, | 186 | ············"execution_count":·4, |
187 | ············"metadata":·{ | 187 | ············"metadata":·{ |
188 | ················"execution":·{ | 188 | ················"execution":·{ |
189 | ····················"iopub.execute_input":·"2025-05-21T1 | 189 | ····················"iopub.execute_input":·"2025-05-21T15:01:47.799764Z", |
190 | ····················"iopub.status.busy":·"2025-05-21T1 | 190 | ····················"iopub.status.busy":·"2025-05-21T15:01:47.798222Z", |
191 | ····················"iopub.status.idle":·"2025-05-21T1 | 191 | ····················"iopub.status.idle":·"2025-05-21T15:01:47.843076Z", |
192 | ····················"shell.execute_reply":·"2025-05-21T1 | 192 | ····················"shell.execute_reply":·"2025-05-21T15:01:47.841332Z" |
193 | ················}, | 193 | ················}, |
194 | ················"scrolled":·false | 194 | ················"scrolled":·false |
195 | ············}, | 195 | ············}, |
196 | ············"outputs":·[ | 196 | ············"outputs":·[ |
197 | ················{ | 197 | ················{ |
198 | ····················"ename":·"NameError", | 198 | ····················"ename":·"NameError", |
199 | ····················"evalue":·"name·'ds'·is·not·defined", | 199 | ····················"evalue":·"name·'ds'·is·not·defined", |
Offset 218, 18 lines modified | Offset 218, 18 lines modified | ||
218 | ············] | 218 | ············] |
219 | ········}, | 219 | ········}, |
220 | ········{ | 220 | ········{ |
221 | ············"cell_type":·"code", | 221 | ············"cell_type":·"code", |
222 | ············"execution_count":·5, | 222 | ············"execution_count":·5, |
223 | ············"metadata":·{ | 223 | ············"metadata":·{ |
224 | ················"execution":·{ | 224 | ················"execution":·{ |
225 | ····················"iopub.execute_input":·"2025-05-21T1 | 225 | ····················"iopub.execute_input":·"2025-05-21T15:01:47.849634Z", |
226 | ····················"iopub.status.busy":·"2025-05-21T1 | 226 | ····················"iopub.status.busy":·"2025-05-21T15:01:47.848167Z", |
227 | ····················"iopub.status.idle":·"2025-05-21T1 | 227 | ····················"iopub.status.idle":·"2025-05-21T15:01:47.897507Z", |
228 | ····················"shell.execute_reply":·"2025-05-21T1 | 228 | ····················"shell.execute_reply":·"2025-05-21T15:01:47.895740Z" |
229 | ················} | 229 | ················} |
230 | ············}, | 230 | ············}, |
231 | ············"outputs":·[ | 231 | ············"outputs":·[ |
232 | ················{ | 232 | ················{ |
233 | ····················"ename":·"NameError", | 233 | ····················"ename":·"NameError", |
234 | ····················"evalue":·"name·'ds'·is·not·defined", | 234 | ····················"evalue":·"name·'ds'·is·not·defined", |
235 | ····················"output_type":·"error", | 235 | ····················"output_type":·"error", |
Offset 257, 18 lines modified | Offset 257, 18 lines modified | ||
257 | ············] | 257 | ············] |
258 | ········}, | 258 | ········}, |
259 | ········{ | 259 | ········{ |
260 | ············"cell_type":·"code", | 260 | ············"cell_type":·"code", |
261 | ············"execution_count":·6, | 261 | ············"execution_count":·6, |
262 | ············"metadata":·{ | 262 | ············"metadata":·{ |
263 | ················"execution":·{ | 263 | ················"execution":·{ |
264 | ····················"iopub.execute_input":·"2025-05-21T1 | 264 | ····················"iopub.execute_input":·"2025-05-21T15:01:47.904343Z", |
265 | ····················"iopub.status.busy":·"2025-05-21T1 | 265 | ····················"iopub.status.busy":·"2025-05-21T15:01:47.902862Z", |
266 | ····················"iopub.status.idle":·"2025-05-21T1 | 266 | ····················"iopub.status.idle":·"2025-05-21T15:01:47.946339Z", |
267 | ····················"shell.execute_reply":·"2025-05-21T1 | 267 | ····················"shell.execute_reply":·"2025-05-21T15:01:47.944593Z" |
268 | ················} | 268 | ················} |
269 | ············}, | 269 | ············}, |
270 | ············"outputs":·[ | 270 | ············"outputs":·[ |
271 | ················{ | 271 | ················{ |
272 | ····················"ename":·"NameError", | 272 | ····················"ename":·"NameError", |
273 | ····················"evalue":·"name·'ds'·is·not·defined", | 273 | ····················"evalue":·"name·'ds'·is·not·defined", |
274 | ····················"output_type":·"error", | 274 | ····················"output_type":·"error", |
Offset 292, 18 lines modified | Offset 292, 18 lines modified | ||
292 | ············] | 292 | ············] |
293 | ········}, | 293 | ········}, |
294 | ········{ | 294 | ········{ |
295 | ············"cell_type":·"code", | 295 | ············"cell_type":·"code", |
296 | ············"execution_count":·7, | 296 | ············"execution_count":·7, |
297 | ············"metadata":·{ | 297 | ············"metadata":·{ |
298 | ················"execution":·{ | 298 | ················"execution":·{ |
299 | ····················"iopub.execute_input":·"2025-05-21T1 | 299 | ····················"iopub.execute_input":·"2025-05-21T15:01:47.953170Z", |
300 | ····················"iopub.status.busy":·"2025-05-21T1 | 300 | ····················"iopub.status.busy":·"2025-05-21T15:01:47.951588Z", |
301 | ····················"iopub.status.idle":·"2025-05-21T1 | 301 | ····················"iopub.status.idle":·"2025-05-21T15:01:48.196034Z", |
302 | ····················"shell.execute_reply":·"2025-05-21T1 | 302 | ····················"shell.execute_reply":·"2025-05-21T15:01:48.193977Z" |
303 | ················} | 303 | ················} |
304 | ············}, | 304 | ············}, |
Max diff block lines reached; 166/7032 bytes (2.36%) of diff not shown. |
Offset 36, 18 lines modified | Offset 36, 18 lines modified | ||
36 | ············"execution_count":·1, | 36 | ············"execution_count":·1, |
37 | ············"metadata":·{ | 37 | ············"metadata":·{ |
38 | ················"ExecuteTime":·{ | 38 | ················"ExecuteTime":·{ |
39 | ····················"end_time":·"2020-01-15T14:45:51.659160Z", | 39 | ····················"end_time":·"2020-01-15T14:45:51.659160Z", |
40 | ····················"start_time":·"2020-01-15T14:45:50.528742Z" | 40 | ····················"start_time":·"2020-01-15T14:45:50.528742Z" |
41 | ················}, | 41 | ················}, |
42 | ················"execution":·{ | 42 | ················"execution":·{ |
43 | ····················"iopub.execute_input":·"2025-05-21T1 | 43 | ····················"iopub.execute_input":·"2025-05-21T15:01:52.845932Z", |
44 | ····················"iopub.status.busy":·"2025-05-21T1 | 44 | ····················"iopub.status.busy":·"2025-05-21T15:01:52.845261Z", |
45 | ····················"iopub.status.idle":·"2025-05-21T1 | 45 | ····················"iopub.status.idle":·"2025-05-21T15:01:53.386805Z", |
46 | ····················"shell.execute_reply":·"2025-05-21T1 | 46 | ····················"shell.execute_reply":·"2025-05-21T15:01:53.384990Z" |
47 | ················} | 47 | ················} |
48 | ············}, | 48 | ············}, |
49 | ············"outputs":·[ | 49 | ············"outputs":·[ |
50 | ················{ | 50 | ················{ |
51 | ····················"ename":·"ModuleNotFoundError", | 51 | ····················"ename":·"ModuleNotFoundError", |
52 | ····················"evalue":·"No·module·named·'xarray'", | 52 | ····················"evalue":·"No·module·named·'xarray'", |
53 | ····················"output_type":·"error", | 53 | ····················"output_type":·"error", |
Offset 85, 18 lines modified | Offset 85, 18 lines modified | ||
85 | ············"execution_count":·2, | 85 | ············"execution_count":·2, |
86 | ············"metadata":·{ | 86 | ············"metadata":·{ |
87 | ················"ExecuteTime":·{ | 87 | ················"ExecuteTime":·{ |
88 | ····················"end_time":·"2020-01-15T14:45:55.431708Z", | 88 | ····················"end_time":·"2020-01-15T14:45:55.431708Z", |
89 | ····················"start_time":·"2020-01-15T14:45:55.104701Z" | 89 | ····················"start_time":·"2020-01-15T14:45:55.104701Z" |
90 | ················}, | 90 | ················}, |
91 | ················"execution":·{ | 91 | ················"execution":·{ |
92 | ····················"iopub.execute_input":·"2025-05-21T1 | 92 | ····················"iopub.execute_input":·"2025-05-21T15:01:53.393699Z", |
93 | ····················"iopub.status.busy":·"2025-05-21T1 | 93 | ····················"iopub.status.busy":·"2025-05-21T15:01:53.392226Z", |
94 | ····················"iopub.status.idle":·"2025-05-21T1 | 94 | ····················"iopub.status.idle":·"2025-05-21T15:01:53.436835Z", |
95 | ····················"shell.execute_reply":·"2025-05-21T1 | 95 | ····················"shell.execute_reply":·"2025-05-21T15:01:53.434979Z" |
96 | ················} | 96 | ················} |
97 | ············}, | 97 | ············}, |
98 | ············"outputs":·[ | 98 | ············"outputs":·[ |
99 | ················{ | 99 | ················{ |
100 | ····················"ename":·"NameError", | 100 | ····················"ename":·"NameError", |
101 | ····················"evalue":·"name·'np'·is·not·defined", | 101 | ····················"evalue":·"name·'np'·is·not·defined", |
102 | ····················"output_type":·"error", | 102 | ····················"output_type":·"error", |
Offset 125, 18 lines modified | Offset 125, 18 lines modified | ||
125 | ············"execution_count":·3, | 125 | ············"execution_count":·3, |
126 | ············"metadata":·{ | 126 | ············"metadata":·{ |
127 | ················"ExecuteTime":·{ | 127 | ················"ExecuteTime":·{ |
128 | ····················"end_time":·"2020-01-15T14:45:57.889496Z", | 128 | ····················"end_time":·"2020-01-15T14:45:57.889496Z", |
129 | ····················"start_time":·"2020-01-15T14:45:57.792269Z" | 129 | ····················"start_time":·"2020-01-15T14:45:57.792269Z" |
130 | ················}, | 130 | ················}, |
131 | ················"execution":·{ | 131 | ················"execution":·{ |
132 | ····················"iopub.execute_input":·"2025-05-21T1 | 132 | ····················"iopub.execute_input":·"2025-05-21T15:01:53.443672Z", |
133 | ····················"iopub.status.busy":·"2025-05-21T1 | 133 | ····················"iopub.status.busy":·"2025-05-21T15:01:53.442155Z", |
134 | ····················"iopub.status.idle":·"2025-05-21T1 | 134 | ····················"iopub.status.idle":·"2025-05-21T15:01:53.492800Z", |
135 | ····················"shell.execute_reply":·"2025-05-21T1 | 135 | ····················"shell.execute_reply":·"2025-05-21T15:01:53.490946Z" |
136 | ················} | 136 | ················} |
137 | ············}, | 137 | ············}, |
138 | ············"outputs":·[ | 138 | ············"outputs":·[ |
139 | ················{ | 139 | ················{ |
140 | ····················"ename":·"NameError", | 140 | ····················"ename":·"NameError", |
141 | ····················"evalue":·"name·'air'·is·not·defined", | 141 | ····················"evalue":·"name·'air'·is·not·defined", |
142 | ····················"output_type":·"error", | 142 | ····················"output_type":·"error", |
Offset 184, 18 lines modified | Offset 184, 18 lines modified | ||
184 | ············"execution_count":·4, | 184 | ············"execution_count":·4, |
185 | ············"metadata":·{ | 185 | ············"metadata":·{ |
186 | ················"ExecuteTime":·{ | 186 | ················"ExecuteTime":·{ |
187 | ····················"end_time":·"2020-01-15T14:45:59.768626Z", | 187 | ····················"end_time":·"2020-01-15T14:45:59.768626Z", |
188 | ····················"start_time":·"2020-01-15T14:45:59.543808Z" | 188 | ····················"start_time":·"2020-01-15T14:45:59.543808Z" |
189 | ················}, | 189 | ················}, |
190 | ················"execution":·{ | 190 | ················"execution":·{ |
191 | ····················"iopub.execute_input":·"2025-05-21T1 | 191 | ····················"iopub.execute_input":·"2025-05-21T15:01:53.499409Z", |
192 | ····················"iopub.status.busy":·"2025-05-21T1 | 192 | ····················"iopub.status.busy":·"2025-05-21T15:01:53.497949Z", |
193 | ····················"iopub.status.idle":·"2025-05-21T1 | 193 | ····················"iopub.status.idle":·"2025-05-21T15:01:53.540816Z", |
194 | ····················"shell.execute_reply":·"2025-05-21T1 | 194 | ····················"shell.execute_reply":·"2025-05-21T15:01:53.538993Z" |
195 | ················} | 195 | ················} |
196 | ············}, | 196 | ············}, |
197 | ············"outputs":·[ | 197 | ············"outputs":·[ |
198 | ················{ | 198 | ················{ |
199 | ····················"ename":·"NameError", | 199 | ····················"ename":·"NameError", |
200 | ····················"evalue":·"name·'xr'·is·not·defined", | 200 | ····················"evalue":·"name·'xr'·is·not·defined", |
201 | ····················"output_type":·"error", | 201 | ····················"output_type":·"error", |
Offset 250, 18 lines modified | Offset 250, 18 lines modified | ||
250 | ············"execution_count":·5, | 250 | ············"execution_count":·5, |
251 | ············"metadata":·{ | 251 | ············"metadata":·{ |
252 | ················"ExecuteTime":·{ | 252 | ················"ExecuteTime":·{ |
253 | ····················"end_time":·"2020-01-15T14:46:02.187012Z", | 253 | ····················"end_time":·"2020-01-15T14:46:02.187012Z", |
254 | ····················"start_time":·"2020-01-15T14:46:02.105563Z" | 254 | ····················"start_time":·"2020-01-15T14:46:02.105563Z" |
255 | ················}, | 255 | ················}, |
256 | ················"execution":·{ | 256 | ················"execution":·{ |
257 | ····················"iopub.execute_input":·"2025-05-21T1 | 257 | ····················"iopub.execute_input":·"2025-05-21T15:01:53.547587Z", |
258 | ····················"iopub.status.busy":·"2025-05-21T1 | 258 | ····················"iopub.status.busy":·"2025-05-21T15:01:53.546336Z", |
259 | ····················"iopub.status.idle":·"2025-05-21T1 | 259 | ····················"iopub.status.idle":·"2025-05-21T15:01:53.591056Z", |
260 | ····················"shell.execute_reply":·"2025-05-21T1 | 260 | ····················"shell.execute_reply":·"2025-05-21T15:01:53.589205Z" |
261 | ················} | 261 | ················} |
262 | ············}, | 262 | ············}, |
263 | ············"outputs":·[ | 263 | ············"outputs":·[ |
264 | ················{ | 264 | ················{ |
265 | ····················"ename":·"NameError", | 265 | ····················"ename":·"NameError", |
266 | ····················"evalue":·"name·'xr'·is·not·defined", | 266 | ····················"evalue":·"name·'xr'·is·not·defined", |
267 | ····················"output_type":·"error", | 267 | ····················"output_type":·"error", |
Offset 328, 18 lines modified | Offset 328, 18 lines modified | ||
328 | ············"execution_count":·6, | 328 | ············"execution_count":·6, |
329 | ············"metadata":·{ | 329 | ············"metadata":·{ |
330 | ················"ExecuteTime":·{ | 330 | ················"ExecuteTime":·{ |
331 | ····················"end_time":·"2020-01-15T14:46:05.031672Z", | 331 | ····················"end_time":·"2020-01-15T14:46:05.031672Z", |
332 | ····················"start_time":·"2020-01-15T14:46:04.947588Z" | 332 | ····················"start_time":·"2020-01-15T14:46:04.947588Z" |
333 | ················}, | 333 | ················}, |
334 | ················"execution":·{ | 334 | ················"execution":·{ |
335 | ····················"iopub.execute_input":·"2025-05-21T1 | 335 | ····················"iopub.execute_input":·"2025-05-21T15:01:53.597462Z", |
336 | ····················"iopub.status.busy":·"2025-05-21T1 | 336 | ····················"iopub.status.busy":·"2025-05-21T15:01:53.596256Z", |
337 | ····················"iopub.status.idle":·"2025-05-21T1 | 337 | ····················"iopub.status.idle":·"2025-05-21T15:01:53.642704Z", |
338 | ····················"shell.execute_reply":·"2025-05-21T1 | 338 | ····················"shell.execute_reply":·"2025-05-21T15:01:53.640949Z" |
339 | ················} | 339 | ················} |
340 | ············}, | 340 | ············}, |
341 | ············"outputs":·[ | 341 | ············"outputs":·[ |
342 | ················{ | 342 | ················{ |
343 | ····················"ename":·"NameError", | 343 | ····················"ename":·"NameError", |
344 | ····················"evalue":·"name·'xr'·is·not·defined", | 344 | ····················"evalue":·"name·'xr'·is·not·defined", |
345 | ····················"output_type":·"error", | 345 | ····················"output_type":·"error", |
Offset 374, 18 lines modified | Offset 374, 18 lines modified | ||
374 | ············"execution_count":·7, | 374 | ············"execution_count":·7, |
375 | ············"metadata":·{ | 375 | ············"metadata":·{ |
376 | ················"ExecuteTime":·{ | 376 | ················"ExecuteTime":·{ |
377 | ····················"end_time":·"2020-01-15T14:46:09.325218Z", | 377 | ····················"end_time":·"2020-01-15T14:46:09.325218Z", |
378 | ····················"start_time":·"2020-01-15T14:46:09.303020Z" | 378 | ····················"start_time":·"2020-01-15T14:46:09.303020Z" |
379 | ················}, | 379 | ················}, |
380 | ················"execution":·{ | 380 | ················"execution":·{ |
381 | ····················"iopub.execute_input":·"2025-05-21T1 | 381 | ····················"iopub.execute_input":·"2025-05-21T15:01:53.649254Z", |
382 | ····················"iopub.status.busy":·"2025-05-21T1 | 382 | ····················"iopub.status.busy":·"2025-05-21T15:01:53.647884Z", |
383 | ····················"iopub.status.idle":·"2025-05-21T1 | 383 | ····················"iopub.status.idle":·"2025-05-21T15:01:53.696142Z", |
384 | ····················"shell.execute_reply":·"2025-05-21T1 | 384 | ····················"shell.execute_reply":·"2025-05-21T15:01:53.694315Z" |
385 | ················} | 385 | ················} |
386 | ············}, | 386 | ············}, |
Max diff block lines reached; 9118/16771 bytes (54.37%) of diff not shown. |
Offset 28, 18 lines modified | Offset 28, 18 lines modified | ||
28 | ············"execution_count":·1, | 28 | ············"execution_count":·1, |
29 | ············"metadata":·{ | 29 | ············"metadata":·{ |
30 | ················"ExecuteTime":·{ | 30 | ················"ExecuteTime":·{ |
31 | ····················"end_time":·"2020-03-17T14:43:57.222351Z", | 31 | ····················"end_time":·"2020-03-17T14:43:57.222351Z", |
32 | ····················"start_time":·"2020-03-17T14:43:56.147541Z" | 32 | ····················"start_time":·"2020-03-17T14:43:56.147541Z" |
33 | ················}, | 33 | ················}, |
34 | ················"execution":·{ | 34 | ················"execution":·{ |
35 | ····················"iopub.execute_input":·"2025-05-21T1 | 35 | ····················"iopub.execute_input":·"2025-05-21T15:02:00.648621Z", |
36 | ····················"iopub.status.busy":·"2025-05-21T1 | 36 | ····················"iopub.status.busy":·"2025-05-21T15:02:00.647095Z", |
37 | ····················"iopub.status.idle":·"2025-05-21T1 | 37 | ····················"iopub.status.idle":·"2025-05-21T15:02:02.736107Z", |
38 | ····················"shell.execute_reply":·"2025-05-21T1 | 38 | ····················"shell.execute_reply":·"2025-05-21T15:02:02.734022Z" |
39 | ················} | 39 | ················} |
40 | ············}, | 40 | ············}, |
41 | ············"outputs":·[ | 41 | ············"outputs":·[ |
42 | ················{ | 42 | ················{ |
43 | ····················"ename":·"ModuleNotFoundError", | 43 | ····················"ename":·"ModuleNotFoundError", |
44 | ····················"evalue":·"No·module·named·'xarray'", | 44 | ····················"evalue":·"No·module·named·'xarray'", |
45 | ····················"output_type":·"error", | 45 | ····················"output_type":·"error", |
Offset 75, 18 lines modified | Offset 75, 18 lines modified | ||
75 | ············"execution_count":·2, | 75 | ············"execution_count":·2, |
76 | ············"metadata":·{ | 76 | ············"metadata":·{ |
77 | ················"ExecuteTime":·{ | 77 | ················"ExecuteTime":·{ |
78 | ····················"end_time":·"2020-03-17T14:43:57.831734Z", | 78 | ····················"end_time":·"2020-03-17T14:43:57.831734Z", |
79 | ····················"start_time":·"2020-03-17T14:43:57.651845Z" | 79 | ····················"start_time":·"2020-03-17T14:43:57.651845Z" |
80 | ················}, | 80 | ················}, |
81 | ················"execution":·{ | 81 | ················"execution":·{ |
82 | ····················"iopub.execute_input":·"2025-05-21T1 | 82 | ····················"iopub.execute_input":·"2025-05-21T15:02:02.743086Z", |
83 | ····················"iopub.status.busy":·"2025-05-21T1 | 83 | ····················"iopub.status.busy":·"2025-05-21T15:02:02.741767Z", |
84 | ····················"iopub.status.idle":·"2025-05-21T1 | 84 | ····················"iopub.status.idle":·"2025-05-21T15:02:02.788543Z", |
85 | ····················"shell.execute_reply":·"2025-05-21T1 | 85 | ····················"shell.execute_reply":·"2025-05-21T15:02:02.786526Z" |
86 | ················} | 86 | ················} |
87 | ············}, | 87 | ············}, |
88 | ············"outputs":·[ | 88 | ············"outputs":·[ |
89 | ················{ | 89 | ················{ |
90 | ····················"ename":·"NameError", | 90 | ····················"ename":·"NameError", |
91 | ····················"evalue":·"name·'xr'·is·not·defined", | 91 | ····················"evalue":·"name·'xr'·is·not·defined", |
92 | ····················"output_type":·"error", | 92 | ····················"output_type":·"error", |
Offset 122, 18 lines modified | Offset 122, 18 lines modified | ||
122 | ············"execution_count":·3, | 122 | ············"execution_count":·3, |
123 | ············"metadata":·{ | 123 | ············"metadata":·{ |
124 | ················"ExecuteTime":·{ | 124 | ················"ExecuteTime":·{ |
125 | ····················"end_time":·"2020-03-17T14:43:59.887120Z", | 125 | ····················"end_time":·"2020-03-17T14:43:59.887120Z", |
126 | ····················"start_time":·"2020-03-17T14:43:59.582894Z" | 126 | ····················"start_time":·"2020-03-17T14:43:59.582894Z" |
127 | ················}, | 127 | ················}, |
128 | ················"execution":·{ | 128 | ················"execution":·{ |
129 | ····················"iopub.execute_input":·"2025-05-21T1 | 129 | ····················"iopub.execute_input":·"2025-05-21T15:02:02.795108Z", |
130 | ····················"iopub.status.busy":·"2025-05-21T1 | 130 | ····················"iopub.status.busy":·"2025-05-21T15:02:02.793821Z", |
131 | ····················"iopub.status.idle":·"2025-05-21T1 | 131 | ····················"iopub.status.idle":·"2025-05-21T15:02:03.042355Z", |
132 | ····················"shell.execute_reply":·"2025-05-21T1 | 132 | ····················"shell.execute_reply":·"2025-05-21T15:02:03.040488Z" |
133 | ················} | 133 | ················} |
134 | ············}, | 134 | ············}, |
135 | ············"outputs":·[ | 135 | ············"outputs":·[ |
136 | ················{ | 136 | ················{ |
137 | ····················"ename":·"NameError", | 137 | ····················"ename":·"NameError", |
138 | ····················"evalue":·"name·'air'·is·not·defined", | 138 | ····················"evalue":·"name·'air'·is·not·defined", |
139 | ····················"output_type":·"error", | 139 | ····················"output_type":·"error", |
Offset 178, 18 lines modified | Offset 178, 18 lines modified | ||
178 | ············"execution_count":·4, | 178 | ············"execution_count":·4, |
179 | ············"metadata":·{ | 179 | ············"metadata":·{ |
180 | ················"ExecuteTime":·{ | 180 | ················"ExecuteTime":·{ |
181 | ····················"end_time":·"2020-03-17T14:44:18.777092Z", | 181 | ····················"end_time":·"2020-03-17T14:44:18.777092Z", |
182 | ····················"start_time":·"2020-03-17T14:44:18.736587Z" | 182 | ····················"start_time":·"2020-03-17T14:44:18.736587Z" |
183 | ················}, | 183 | ················}, |
184 | ················"execution":·{ | 184 | ················"execution":·{ |
185 | ····················"iopub.execute_input":·"2025-05-21T1 | 185 | ····················"iopub.execute_input":·"2025-05-21T15:02:03.049428Z", |
186 | ····················"iopub.status.busy":·"2025-05-21T1 | 186 | ····················"iopub.status.busy":·"2025-05-21T15:02:03.047969Z", |
187 | ····················"iopub.status.idle":·"2025-05-21T1 | 187 | ····················"iopub.status.idle":·"2025-05-21T15:02:03.095151Z", |
188 | ····················"shell.execute_reply":·"2025-05-21T1 | 188 | ····················"shell.execute_reply":·"2025-05-21T15:02:03.093249Z" |
189 | ················} | 189 | ················} |
190 | ············}, | 190 | ············}, |
191 | ············"outputs":·[ | 191 | ············"outputs":·[ |
192 | ················{ | 192 | ················{ |
193 | ····················"ename":·"NameError", | 193 | ····················"ename":·"NameError", |
194 | ····················"evalue":·"name·'air'·is·not·defined", | 194 | ····················"evalue":·"name·'air'·is·not·defined", |
195 | ····················"output_type":·"error", | 195 | ····················"output_type":·"error", |
Offset 219, 18 lines modified | Offset 219, 18 lines modified | ||
219 | ············"execution_count":·5, | 219 | ············"execution_count":·5, |
220 | ············"metadata":·{ | 220 | ············"metadata":·{ |
221 | ················"ExecuteTime":·{ | 221 | ················"ExecuteTime":·{ |
222 | ····················"end_time":·"2020-03-17T14:44:52.607120Z", | 222 | ····················"end_time":·"2020-03-17T14:44:52.607120Z", |
223 | ····················"start_time":·"2020-03-17T14:44:52.564674Z" | 223 | ····················"start_time":·"2020-03-17T14:44:52.564674Z" |
224 | ················}, | 224 | ················}, |
225 | ················"execution":·{ | 225 | ················"execution":·{ |
226 | ····················"iopub.execute_input":·"2025-05-21T1 | 226 | ····················"iopub.execute_input":·"2025-05-21T15:02:03.101444Z", |
227 | ····················"iopub.status.busy":·"2025-05-21T1 | 227 | ····················"iopub.status.busy":·"2025-05-21T15:02:03.100267Z", |
228 | ····················"iopub.status.idle":·"2025-05-21T1 | 228 | ····················"iopub.status.idle":·"2025-05-21T15:02:03.143528Z", |
229 | ····················"shell.execute_reply":·"2025-05-21T1 | 229 | ····················"shell.execute_reply":·"2025-05-21T15:02:03.141649Z" |
230 | ················} | 230 | ················} |
231 | ············}, | 231 | ············}, |
232 | ············"outputs":·[ | 232 | ············"outputs":·[ |
233 | ················{ | 233 | ················{ |
234 | ····················"ename":·"NameError", | 234 | ····················"ename":·"NameError", |
235 | ····················"evalue":·"name·'air'·is·not·defined", | 235 | ····················"evalue":·"name·'air'·is·not·defined", |
236 | ····················"output_type":·"error", | 236 | ····················"output_type":·"error", |
Offset 252, 18 lines modified | Offset 252, 18 lines modified | ||
252 | ············"execution_count":·6, | 252 | ············"execution_count":·6, |
253 | ············"metadata":·{ | 253 | ············"metadata":·{ |
254 | ················"ExecuteTime":·{ | 254 | ················"ExecuteTime":·{ |
255 | ····················"end_time":·"2020-03-17T14:44:54.334279Z", | 255 | ····················"end_time":·"2020-03-17T14:44:54.334279Z", |
256 | ····················"start_time":·"2020-03-17T14:44:54.280022Z" | 256 | ····················"start_time":·"2020-03-17T14:44:54.280022Z" |
257 | ················}, | 257 | ················}, |
258 | ················"execution":·{ | 258 | ················"execution":·{ |
259 | ····················"iopub.execute_input":·"2025-05-21T1 | 259 | ····················"iopub.execute_input":·"2025-05-21T15:02:03.150011Z", |
260 | ····················"iopub.status.busy":·"2025-05-21T1 | 260 | ····················"iopub.status.busy":·"2025-05-21T15:02:03.148626Z", |
261 | ····················"iopub.status.idle":·"2025-05-21T1 | 261 | ····················"iopub.status.idle":·"2025-05-21T15:02:03.191250Z", |
262 | ····················"shell.execute_reply":·"2025-05-21T1 | 262 | ····················"shell.execute_reply":·"2025-05-21T15:02:03.189343Z" |
263 | ················} | 263 | ················} |
264 | ············}, | 264 | ············}, |
265 | ············"outputs":·[ | 265 | ············"outputs":·[ |
266 | ················{ | 266 | ················{ |
267 | ····················"ename":·"NameError", | 267 | ····················"ename":·"NameError", |
268 | ····················"evalue":·"name·'air_weighted'·is·not·defined", | 268 | ····················"evalue":·"name·'air_weighted'·is·not·defined", |
269 | ····················"output_type":·"error", | 269 | ····················"output_type":·"error", |
Offset 294, 18 lines modified | Offset 294, 18 lines modified | ||
294 | ············"execution_count":·7, | 294 | ············"execution_count":·7, |
295 | ············"metadata":·{ | 295 | ············"metadata":·{ |
296 | ················"ExecuteTime":·{ | 296 | ················"ExecuteTime":·{ |
297 | ····················"end_time":·"2020-03-17T14:45:08.877307Z", | 297 | ····················"end_time":·"2020-03-17T14:45:08.877307Z", |
298 | ····················"start_time":·"2020-03-17T14:45:08.673383Z" | 298 | ····················"start_time":·"2020-03-17T14:45:08.673383Z" |
299 | ················}, | 299 | ················}, |
300 | ················"execution":·{ | 300 | ················"execution":·{ |
301 | ····················"iopub.execute_input":·"2025-05-21T1 | 301 | ····················"iopub.execute_input":·"2025-05-21T15:02:03.197346Z", |
302 | ····················"iopub.status.busy":·"2025-05-21T1 | 302 | ····················"iopub.status.busy":·"2025-05-21T15:02:03.196232Z", |
303 | ····················"iopub.status.idle":·"2025-05-21T1 | 303 | ····················"iopub.status.idle":·"2025-05-21T15:02:03.241094Z", |
304 | ····················"shell.execute_reply":·"2025-05-21T1 | 304 | ····················"shell.execute_reply":·"2025-05-21T15:02:03.239149Z" |
305 | ················} | 305 | ················} |
306 | ············}, | 306 | ············}, |
Max diff block lines reached; 177/7842 bytes (2.26%) of diff not shown. |
Offset 12, 18 lines modified | Offset 12, 18 lines modified | ||
12 | ········}, | 12 | ········}, |
13 | ········{ | 13 | ········{ |
14 | ············"cell_type":·"code", | 14 | ············"cell_type":·"code", |
15 | ············"execution_count":·1, | 15 | ············"execution_count":·1, |
16 | ············"id":·"41b90ede", | 16 | ············"id":·"41b90ede", |
17 | ············"metadata":·{ | 17 | ············"metadata":·{ |
18 | ················"execution":·{ | 18 | ················"execution":·{ |
19 | ····················"iopub.execute_input":·"2025-05-21T1 | 19 | ····················"iopub.execute_input":·"2025-05-21T15:02:07.861247Z", |
20 | ····················"iopub.status.busy":·"2025-05-21T1 | 20 | ····················"iopub.status.busy":·"2025-05-21T15:02:07.860204Z", |
21 | ····················"iopub.status.idle":·"2025-05-21T1 | 21 | ····················"iopub.status.idle":·"2025-05-21T15:02:08.397729Z", |
22 | ····················"shell.execute_reply":·"2025-05-21T1 | 22 | ····················"shell.execute_reply":·"2025-05-21T15:02:08.395911Z" |
23 | ················} | 23 | ················} |
24 | ············}, | 24 | ············}, |
25 | ············"outputs":·[ | 25 | ············"outputs":·[ |
26 | ················{ | 26 | ················{ |
27 | ····················"ename":·"ModuleNotFoundError", | 27 | ····················"ename":·"ModuleNotFoundError", |
28 | ····················"evalue":·"No·module·named·'xarray'", | 28 | ····················"evalue":·"No·module·named·'xarray'", |
29 | ····················"output_type":·"error", | 29 | ····················"output_type":·"error", |
Offset 19, 18 lines modified | Offset 19, 18 lines modified | ||
19 | ············"execution_count":·1, | 19 | ············"execution_count":·1, |
20 | ············"metadata":·{ | 20 | ············"metadata":·{ |
21 | ················"ExecuteTime":·{ | 21 | ················"ExecuteTime":·{ |
22 | ····················"end_time":·"2018-11-28T20:51:35.958210Z", | 22 | ····················"end_time":·"2018-11-28T20:51:35.958210Z", |
23 | ····················"start_time":·"2018-11-28T20:51:35.936966Z" | 23 | ····················"start_time":·"2018-11-28T20:51:35.936966Z" |
24 | ················}, | 24 | ················}, |
25 | ················"execution":·{ | 25 | ················"execution":·{ |
26 | ····················"iopub.execute_input":·"2025-05-21T1 | 26 | ····················"iopub.execute_input":·"2025-05-21T15:02:12.077867Z", |
27 | ····················"iopub.status.busy":·"2025-05-21T1 | 27 | ····················"iopub.status.busy":·"2025-05-21T15:02:12.076812Z", |
28 | ····················"iopub.status.idle":·"2025-05-21T1 | 28 | ····················"iopub.status.idle":·"2025-05-21T15:02:14.780949Z", |
29 | ····················"shell.execute_reply":·"2025-05-21T1 | 29 | ····················"shell.execute_reply":·"2025-05-21T15:02:14.778969Z" |
30 | ················} | 30 | ················} |
31 | ············}, | 31 | ············}, |
32 | ············"outputs":·[ | 32 | ············"outputs":·[ |
33 | ················{ | 33 | ················{ |
34 | ····················"ename":·"ModuleNotFoundError", | 34 | ····················"ename":·"ModuleNotFoundError", |
35 | ····················"evalue":·"No·module·named·'xarray'", | 35 | ····················"evalue":·"No·module·named·'xarray'", |
36 | ····················"output_type":·"error", | 36 | ····················"output_type":·"error", |
Offset 62, 18 lines modified | Offset 62, 18 lines modified | ||
62 | ············"execution_count":·2, | 62 | ············"execution_count":·2, |
63 | ············"metadata":·{ | 63 | ············"metadata":·{ |
64 | ················"ExecuteTime":·{ | 64 | ················"ExecuteTime":·{ |
65 | ····················"end_time":·"2018-11-28T20:51:36.072316Z", | 65 | ····················"end_time":·"2018-11-28T20:51:36.072316Z", |
66 | ····················"start_time":·"2018-11-28T20:51:36.016594Z" | 66 | ····················"start_time":·"2018-11-28T20:51:36.016594Z" |
67 | ················}, | 67 | ················}, |
68 | ················"execution":·{ | 68 | ················"execution":·{ |
69 | ····················"iopub.execute_input":·"2025-05-21T1 | 69 | ····················"iopub.execute_input":·"2025-05-21T15:02:14.787915Z", |
70 | ····················"iopub.status.busy":·"2025-05-21T1 | 70 | ····················"iopub.status.busy":·"2025-05-21T15:02:14.786611Z", |
71 | ····················"iopub.status.idle":·"2025-05-21T1 | 71 | ····················"iopub.status.idle":·"2025-05-21T15:02:14.831427Z", |
72 | ····················"shell.execute_reply":·"2025-05-21T1 | 72 | ····················"shell.execute_reply":·"2025-05-21T15:02:14.829526Z" |
73 | ················} | 73 | ················} |
74 | ············}, | 74 | ············}, |
75 | ············"outputs":·[ | 75 | ············"outputs":·[ |
76 | ················{ | 76 | ················{ |
77 | ····················"ename":·"NameError", | 77 | ····················"ename":·"NameError", |
78 | ····················"evalue":·"name·'xr'·is·not·defined", | 78 | ····················"evalue":·"name·'xr'·is·not·defined", |
79 | ····················"output_type":·"error", | 79 | ····················"output_type":·"error", |
Offset 103, 18 lines modified | Offset 103, 18 lines modified | ||
103 | ············] | 103 | ············] |
104 | ········}, | 104 | ········}, |
105 | ········{ | 105 | ········{ |
106 | ············"cell_type":·"code", | 106 | ············"cell_type":·"code", |
107 | ············"execution_count":·3, | 107 | ············"execution_count":·3, |
108 | ············"metadata":·{ | 108 | ············"metadata":·{ |
109 | ················"execution":·{ | 109 | ················"execution":·{ |
110 | ····················"iopub.execute_input":·"2025-05-21T1 | 110 | ····················"iopub.execute_input":·"2025-05-21T15:02:14.837707Z", |
111 | ····················"iopub.status.busy":·"2025-05-21T1 | 111 | ····················"iopub.status.busy":·"2025-05-21T15:02:14.836525Z", |
112 | ····················"iopub.status.idle":·"2025-05-21T1 | 112 | ····················"iopub.status.idle":·"2025-05-21T15:02:14.879153Z", |
113 | ····················"shell.execute_reply":·"2025-05-21T1 | 113 | ····················"shell.execute_reply":·"2025-05-21T15:02:14.877263Z" |
114 | ················} | 114 | ················} |
115 | ············}, | 115 | ············}, |
116 | ············"outputs":·[ | 116 | ············"outputs":·[ |
117 | ················{ | 117 | ················{ |
118 | ····················"ename":·"NameError", | 118 | ····················"ename":·"NameError", |
119 | ····················"evalue":·"name·'ds'·is·not·defined", | 119 | ····················"evalue":·"name·'ds'·is·not·defined", |
120 | ····················"output_type":·"error", | 120 | ····················"output_type":·"error", |
Offset 136, 18 lines modified | Offset 136, 18 lines modified | ||
136 | ············"execution_count":·4, | 136 | ············"execution_count":·4, |
137 | ············"metadata":·{ | 137 | ············"metadata":·{ |
138 | ················"ExecuteTime":·{ | 138 | ················"ExecuteTime":·{ |
139 | ····················"end_time":·"2018-11-28T20:51:36.132413Z", | 139 | ····················"end_time":·"2018-11-28T20:51:36.132413Z", |
140 | ····················"start_time":·"2018-11-28T20:51:36.073708Z" | 140 | ····················"start_time":·"2018-11-28T20:51:36.073708Z" |
141 | ················}, | 141 | ················}, |
142 | ················"execution":·{ | 142 | ················"execution":·{ |
143 | ····················"iopub.execute_input":·"2025-05-21T1 | 143 | ····················"iopub.execute_input":·"2025-05-21T15:02:14.885517Z", |
144 | ····················"iopub.status.busy":·"2025-05-21T1 | 144 | ····················"iopub.status.busy":·"2025-05-21T15:02:14.884136Z", |
145 | ····················"iopub.status.idle":·"2025-05-21T1 | 145 | ····················"iopub.status.idle":·"2025-05-21T15:02:14.933125Z", |
146 | ····················"shell.execute_reply":·"2025-05-21T1 | 146 | ····················"shell.execute_reply":·"2025-05-21T15:02:14.931297Z" |
147 | ················} | 147 | ················} |
148 | ············}, | 148 | ············}, |
149 | ············"outputs":·[ | 149 | ············"outputs":·[ |
150 | ················{ | 150 | ················{ |
151 | ····················"ename":·"NameError", | 151 | ····················"ename":·"NameError", |
152 | ····················"evalue":·"name·'month_length'·is·not·defined", | 152 | ····················"evalue":·"name·'month_length'·is·not·defined", |
153 | ····················"output_type":·"error", | 153 | ····················"output_type":·"error", |
Offset 177, 18 lines modified | Offset 177, 18 lines modified | ||
177 | ············"execution_count":·5, | 177 | ············"execution_count":·5, |
178 | ············"metadata":·{ | 178 | ············"metadata":·{ |
179 | ················"ExecuteTime":·{ | 179 | ················"ExecuteTime":·{ |
180 | ····················"end_time":·"2018-11-28T20:51:36.152913Z", | 180 | ····················"end_time":·"2018-11-28T20:51:36.152913Z", |
181 | ····················"start_time":·"2018-11-28T20:51:36.133997Z" | 181 | ····················"start_time":·"2018-11-28T20:51:36.133997Z" |
182 | ················}, | 182 | ················}, |
183 | ················"execution":·{ | 183 | ················"execution":·{ |
184 | ····················"iopub.execute_input":·"2025-05-21T1 | 184 | ····················"iopub.execute_input":·"2025-05-21T15:02:14.939778Z", |
185 | ····················"iopub.status.busy":·"2025-05-21T1 | 185 | ····················"iopub.status.busy":·"2025-05-21T15:02:14.938251Z", |
186 | ····················"iopub.status.idle":·"2025-05-21T1 | 186 | ····················"iopub.status.idle":·"2025-05-21T15:02:14.980177Z", |
187 | ····················"shell.execute_reply":·"2025-05-21T1 | 187 | ····················"shell.execute_reply":·"2025-05-21T15:02:14.978303Z" |
188 | ················} | 188 | ················} |
189 | ············}, | 189 | ············}, |
190 | ············"outputs":·[ | 190 | ············"outputs":·[ |
191 | ················{ | 191 | ················{ |
192 | ····················"ename":·"NameError", | 192 | ····················"ename":·"NameError", |
193 | ····················"evalue":·"name·'ds_weighted'·is·not·defined", | 193 | ····················"evalue":·"name·'ds_weighted'·is·not·defined", |
194 | ····················"output_type":·"error", | 194 | ····················"output_type":·"error", |
Offset 209, 18 lines modified | Offset 209, 18 lines modified | ||
209 | ············"execution_count":·6, | 209 | ············"execution_count":·6, |
210 | ············"metadata":·{ | 210 | ············"metadata":·{ |
211 | ················"ExecuteTime":·{ | 211 | ················"ExecuteTime":·{ |
212 | ····················"end_time":·"2018-11-28T20:51:36.190765Z", | 212 | ····················"end_time":·"2018-11-28T20:51:36.190765Z", |
213 | ····················"start_time":·"2018-11-28T20:51:36.154416Z" | 213 | ····················"start_time":·"2018-11-28T20:51:36.154416Z" |
214 | ················}, | 214 | ················}, |
215 | ················"execution":·{ | 215 | ················"execution":·{ |
216 | ····················"iopub.execute_input":·"2025-05-21T1 | 216 | ····················"iopub.execute_input":·"2025-05-21T15:02:14.986615Z", |
217 | ····················"iopub.status.busy":·"2025-05-21T1 | 217 | ····················"iopub.status.busy":·"2025-05-21T15:02:14.985250Z", |
218 | ····················"iopub.status.idle":·"2025-05-21T1 | 218 | ····················"iopub.status.idle":·"2025-05-21T15:02:15.028558Z", |
219 | ····················"shell.execute_reply":·"2025-05-21T1 | 219 | ····················"shell.execute_reply":·"2025-05-21T15:02:15.026723Z" |
220 | ················} | 220 | ················} |
221 | ············}, | 221 | ············}, |
222 | ············"outputs":·[ | 222 | ············"outputs":·[ |
223 | ················{ | 223 | ················{ |
224 | ····················"ename":·"NameError", | 224 | ····················"ename":·"NameError", |
225 | ····················"evalue":·"name·'ds'·is·not·defined", | 225 | ····················"evalue":·"name·'ds'·is·not·defined", |
226 | ····················"output_type":·"error", | 226 | ····················"output_type":·"error", |
Offset 243, 18 lines modified | Offset 243, 18 lines modified | ||
243 | ············"execution_count":·7, | 243 | ············"execution_count":·7, |
244 | ············"metadata":·{ | 244 | ············"metadata":·{ |
245 | ················"ExecuteTime":·{ | 245 | ················"ExecuteTime":·{ |
246 | ····················"end_time":·"2018-11-28T20:51:40.264871Z", | 246 | ····················"end_time":·"2018-11-28T20:51:40.264871Z", |
247 | ····················"start_time":·"2018-11-28T20:51:36.192467Z" | 247 | ····················"start_time":·"2018-11-28T20:51:36.192467Z" |
248 | ················}, | 248 | ················}, |
249 | ················"execution":·{ | 249 | ················"execution":·{ |
250 | ····················"iopub.execute_input":·"2025-05-21T1 | 250 | ····················"iopub.execute_input":·"2025-05-21T15:02:15.035252Z", |
251 | ····················"iopub.status.busy":·"2025-05-21T1 | 251 | ····················"iopub.status.busy":·"2025-05-21T15:02:15.033785Z", |
252 | ····················"iopub.status.idle":·"2025-05-21T1 | 252 | ····················"iopub.status.idle":·"2025-05-21T15:02:15.132946Z", |
253 | ····················"shell.execute_reply":·"2025-05-21T1 | 253 | ····················"shell.execute_reply":·"2025-05-21T15:02:15.131085Z" |
254 | ················} | 254 | ················} |
255 | ············}, | 255 | ············}, |
Max diff block lines reached; 1376/8936 bytes (15.40%) of diff not shown. |
Offset 16, 18 lines modified | Offset 16, 18 lines modified | ||
16 | ············"execution_count":·1, | 16 | ············"execution_count":·1, |
17 | ············"metadata":·{ | 17 | ············"metadata":·{ |
18 | ················"ExecuteTime":·{ | 18 | ················"ExecuteTime":·{ |
19 | ····················"end_time":·"2018-11-28T20:49:56.068395Z", | 19 | ····················"end_time":·"2018-11-28T20:49:56.068395Z", |
20 | ····················"start_time":·"2018-11-28T20:49:56.035349Z" | 20 | ····················"start_time":·"2018-11-28T20:49:56.035349Z" |
21 | ················}, | 21 | ················}, |
22 | ················"execution":·{ | 22 | ················"execution":·{ |
23 | ····················"iopub.execute_input":·"2025-05-21T1 | 23 | ····················"iopub.execute_input":·"2025-05-21T15:02:19.476823Z", |
24 | ····················"iopub.status.busy":·"2025-05-21T1 | 24 | ····················"iopub.status.busy":·"2025-05-21T15:02:19.475278Z", |
25 | ····················"iopub.status.idle":·"2025-05-21T1 | 25 | ····················"iopub.status.idle":·"2025-05-21T15:02:22.195270Z", |
26 | ····················"shell.execute_reply":·"2025-05-21T1 | 26 | ····················"shell.execute_reply":·"2025-05-21T15:02:22.193346Z" |
27 | ················} | 27 | ················} |
28 | ············}, | 28 | ············}, |
29 | ············"outputs":·[ | 29 | ············"outputs":·[ |
30 | ················{ | 30 | ················{ |
31 | ····················"ename":·"ModuleNotFoundError", | 31 | ····················"ename":·"ModuleNotFoundError", |
32 | ····················"evalue":·"No·module·named·'xarray'", | 32 | ····················"evalue":·"No·module·named·'xarray'", |
33 | ····················"output_type":·"error", | 33 | ····················"output_type":·"error", |
Offset 60, 18 lines modified | Offset 60, 18 lines modified | ||
60 | ············"execution_count":·2, | 60 | ············"execution_count":·2, |
61 | ············"metadata":·{ | 61 | ············"metadata":·{ |
62 | ················"ExecuteTime":·{ | 62 | ················"ExecuteTime":·{ |
63 | ····················"end_time":·"2018-11-28T20:50:13.629720Z", | 63 | ····················"end_time":·"2018-11-28T20:50:13.629720Z", |
64 | ····················"start_time":·"2018-11-28T20:50:13.484542Z" | 64 | ····················"start_time":·"2018-11-28T20:50:13.484542Z" |
65 | ················}, | 65 | ················}, |
66 | ················"execution":·{ | 66 | ················"execution":·{ |
67 | ····················"iopub.execute_input":·"2025-05-21T1 | 67 | ····················"iopub.execute_input":·"2025-05-21T15:02:22.202268Z", |
68 | ····················"iopub.status.busy":·"2025-05-21T1 | 68 | ····················"iopub.status.busy":·"2025-05-21T15:02:22.200829Z", |
69 | ····················"iopub.status.idle":·"2025-05-21T1 | 69 | ····················"iopub.status.idle":·"2025-05-21T15:02:22.245805Z", |
70 | ····················"shell.execute_reply":·"2025-05-21T1 | 70 | ····················"shell.execute_reply":·"2025-05-21T15:02:22.244040Z" |
71 | ················} | 71 | ················} |
72 | ············}, | 72 | ············}, |
73 | ············"outputs":·[ | 73 | ············"outputs":·[ |
74 | ················{ | 74 | ················{ |
75 | ····················"ename":·"NameError", | 75 | ····················"ename":·"NameError", |
76 | ····················"evalue":·"name·'xr'·is·not·defined", | 76 | ····················"evalue":·"name·'xr'·is·not·defined", |
77 | ····················"output_type":·"error", | 77 | ····················"output_type":·"error", |
Offset 100, 18 lines modified | Offset 100, 18 lines modified | ||
100 | ············"execution_count":·3, | 100 | ············"execution_count":·3, |
101 | ············"metadata":·{ | 101 | ············"metadata":·{ |
102 | ················"ExecuteTime":·{ | 102 | ················"ExecuteTime":·{ |
103 | ····················"end_time":·"2018-11-28T20:50:15.836061Z", | 103 | ····················"end_time":·"2018-11-28T20:50:15.836061Z", |
104 | ····················"start_time":·"2018-11-28T20:50:15.768376Z" | 104 | ····················"start_time":·"2018-11-28T20:50:15.768376Z" |
105 | ················}, | 105 | ················}, |
106 | ················"execution":·{ | 106 | ················"execution":·{ |
107 | ····················"iopub.execute_input":·"2025-05-21T1 | 107 | ····················"iopub.execute_input":·"2025-05-21T15:02:22.252195Z", |
108 | ····················"iopub.status.busy":·"2025-05-21T1 | 108 | ····················"iopub.status.busy":·"2025-05-21T15:02:22.250933Z", |
109 | ····················"iopub.status.idle":·"2025-05-21T1 | 109 | ····················"iopub.status.idle":·"2025-05-21T15:02:22.294830Z", |
110 | ····················"shell.execute_reply":·"2025-05-21T1 | 110 | ····················"shell.execute_reply":·"2025-05-21T15:02:22.293050Z" |
111 | ················} | 111 | ················} |
112 | ············}, | 112 | ············}, |
113 | ············"outputs":·[ | 113 | ············"outputs":·[ |
114 | ················{ | 114 | ················{ |
115 | ····················"ename":·"NameError", | 115 | ····················"ename":·"NameError", |
116 | ····················"evalue":·"name·'ds'·is·not·defined", | 116 | ····················"evalue":·"name·'ds'·is·not·defined", |
117 | ····················"output_type":·"error", | 117 | ····················"output_type":·"error", |
Offset 142, 18 lines modified | Offset 142, 18 lines modified | ||
142 | ············"execution_count":·4, | 142 | ············"execution_count":·4, |
143 | ············"metadata":·{ | 143 | ············"metadata":·{ |
144 | ················"ExecuteTime":·{ | 144 | ················"ExecuteTime":·{ |
145 | ····················"end_time":·"2018-11-28T20:50:17.928556Z", | 145 | ····················"end_time":·"2018-11-28T20:50:17.928556Z", |
146 | ····················"start_time":·"2018-11-28T20:50:17.031211Z" | 146 | ····················"start_time":·"2018-11-28T20:50:17.031211Z" |
147 | ················}, | 147 | ················}, |
148 | ················"execution":·{ | 148 | ················"execution":·{ |
149 | ····················"iopub.execute_input":·"2025-05-21T1 | 149 | ····················"iopub.execute_input":·"2025-05-21T15:02:22.301330Z", |
150 | ····················"iopub.status.busy":·"2025-05-21T1 | 150 | ····················"iopub.status.busy":·"2025-05-21T15:02:22.299953Z", |
151 | ····················"iopub.status.idle":·"2025-05-21T1 | 151 | ····················"iopub.status.idle":·"2025-05-21T15:02:22.346029Z", |
152 | ····················"shell.execute_reply":·"2025-05-21T1 | 152 | ····················"shell.execute_reply":·"2025-05-21T15:02:22.344252Z" |
153 | ················} | 153 | ················} |
154 | ············}, | 154 | ············}, |
155 | ············"outputs":·[ | 155 | ············"outputs":·[ |
156 | ················{ | 156 | ················{ |
157 | ····················"ename":·"NameError", | 157 | ····················"ename":·"NameError", |
158 | ····················"evalue":·"name·'plt'·is·not·defined", | 158 | ····················"evalue":·"name·'plt'·is·not·defined", |
159 | ····················"output_type":·"error", | 159 | ····················"output_type":·"error", |
Offset 185, 18 lines modified | Offset 185, 18 lines modified | ||
185 | ············"execution_count":·5, | 185 | ············"execution_count":·5, |
186 | ············"metadata":·{ | 186 | ············"metadata":·{ |
187 | ················"ExecuteTime":·{ | 187 | ················"ExecuteTime":·{ |
188 | ····················"end_time":·"2018-11-28T20:50:20.567749Z", | 188 | ····················"end_time":·"2018-11-28T20:50:20.567749Z", |
189 | ····················"start_time":·"2018-11-28T20:50:19.999393Z" | 189 | ····················"start_time":·"2018-11-28T20:50:19.999393Z" |
190 | ················}, | 190 | ················}, |
191 | ················"execution":·{ | 191 | ················"execution":·{ |
192 | ····················"iopub.execute_input":·"2025-05-21T1 | 192 | ····················"iopub.execute_input":·"2025-05-21T15:02:22.352587Z", |
193 | ····················"iopub.status.busy":·"2025-05-21T1 | 193 | ····················"iopub.status.busy":·"2025-05-21T15:02:22.351186Z", |
194 | ····················"iopub.status.idle":·"2025-05-21T1 | 194 | ····················"iopub.status.idle":·"2025-05-21T15:02:22.394027Z", |
195 | ····················"shell.execute_reply":·"2025-05-21T1 | 195 | ····················"shell.execute_reply":·"2025-05-21T15:02:22.392278Z" |
196 | ················} | 196 | ················} |
197 | ············}, | 197 | ············}, |
198 | ············"outputs":·[ | 198 | ············"outputs":·[ |
199 | ················{ | 199 | ················{ |
200 | ····················"ename":·"NameError", | 200 | ····················"ename":·"NameError", |
201 | ····················"evalue":·"name·'ds'·is·not·defined", | 201 | ····················"evalue":·"name·'ds'·is·not·defined", |
202 | ····················"output_type":·"error", | 202 | ····················"output_type":·"error", |
Offset 224, 18 lines modified | Offset 224, 18 lines modified | ||
224 | ············"execution_count":·6, | 224 | ············"execution_count":·6, |
225 | ············"metadata":·{ | 225 | ············"metadata":·{ |
226 | ················"ExecuteTime":·{ | 226 | ················"ExecuteTime":·{ |
227 | ····················"end_time":·"2018-11-28T20:50:31.131708Z", | 227 | ····················"end_time":·"2018-11-28T20:50:31.131708Z", |
228 | ····················"start_time":·"2018-11-28T20:50:30.444697Z" | 228 | ····················"start_time":·"2018-11-28T20:50:30.444697Z" |
229 | ················}, | 229 | ················}, |
230 | ················"execution":·{ | 230 | ················"execution":·{ |
231 | ····················"iopub.execute_input":·"2025-05-21T1 | 231 | ····················"iopub.execute_input":·"2025-05-21T15:02:22.400618Z", |
232 | ····················"iopub.status.busy":·"2025-05-21T1 | 232 | ····················"iopub.status.busy":·"2025-05-21T15:02:22.399213Z", |
233 | ····················"iopub.status.idle":·"2025-05-21T1 | 233 | ····················"iopub.status.idle":·"2025-05-21T15:02:22.450175Z", |
234 | ····················"shell.execute_reply":·"2025-05-21T1 | 234 | ····················"shell.execute_reply":·"2025-05-21T15:02:22.448427Z" |
235 | ················} | 235 | ················} |
236 | ············}, | 236 | ············}, |
237 | ············"outputs":·[ | 237 | ············"outputs":·[ |
238 | ················{ | 238 | ················{ |
239 | ····················"ename":·"NameError", | 239 | ····················"ename":·"NameError", |
240 | ····················"evalue":·"name·'plt'·is·not·defined", | 240 | ····················"evalue":·"name·'plt'·is·not·defined", |
241 | ····················"output_type":·"error", | 241 | ····················"output_type":·"error", |
Offset 272, 18 lines modified | Offset 272, 18 lines modified | ||
272 | ············"execution_count":·7, | 272 | ············"execution_count":·7, |
273 | ············"metadata":·{ | 273 | ············"metadata":·{ |
274 | ················"ExecuteTime":·{ | 274 | ················"ExecuteTime":·{ |
275 | ····················"end_time":·"2018-11-28T20:50:43.670463Z", | 275 | ····················"end_time":·"2018-11-28T20:50:43.670463Z", |
276 | ····················"start_time":·"2018-11-28T20:50:43.245501Z" | 276 | ····················"start_time":·"2018-11-28T20:50:43.245501Z" |
277 | ················}, | 277 | ················}, |
278 | ················"execution":·{ | 278 | ················"execution":·{ |
279 | ····················"iopub.execute_input":·"2025-05-21T1 | 279 | ····················"iopub.execute_input":·"2025-05-21T15:02:22.456556Z", |
280 | ····················"iopub.status.busy":·"2025-05-21T1 | 280 | ····················"iopub.status.busy":·"2025-05-21T15:02:22.455400Z", |
281 | ····················"iopub.status.idle":·"2025-05-21T1 | 281 | ····················"iopub.status.idle":·"2025-05-21T15:02:22.504104Z", |
282 | ····················"shell.execute_reply":·"2025-05-21T1 | 282 | ····················"shell.execute_reply":·"2025-05-21T15:02:22.502244Z" |
283 | ················} | 283 | ················} |
284 | ············}, | 284 | ············}, |
Max diff block lines reached; 166/7820 bytes (2.12%) of diff not shown. |
Offset 10, 18 lines modified | Offset 10, 18 lines modified | ||
10 | ············] | 10 | ············] |
11 | ········}, | 11 | ········}, |
12 | ········{ | 12 | ········{ |
13 | ············"cell_type":·"code", | 13 | ············"cell_type":·"code", |
14 | ············"execution_count":·1, | 14 | ············"execution_count":·1, |
15 | ············"metadata":·{ | 15 | ············"metadata":·{ |
16 | ················"execution":·{ | 16 | ················"execution":·{ |
17 | ····················"iopub.execute_input":·"2025-05-21T1 | 17 | ····················"iopub.execute_input":·"2025-05-21T15:02:27.141039Z", |
18 | ····················"iopub.status.busy":·"2025-05-21T1 | 18 | ····················"iopub.status.busy":·"2025-05-21T15:02:27.140365Z", |
19 | ····················"iopub.status.idle":·"2025-05-21T1 | 19 | ····················"iopub.status.idle":·"2025-05-21T15:02:29.214387Z", |
20 | ····················"shell.execute_reply":·"2025-05-21T1 | 20 | ····················"shell.execute_reply":·"2025-05-21T15:02:29.212535Z" |
21 | ················} | 21 | ················} |
22 | ············}, | 22 | ············}, |
23 | ············"outputs":·[ | 23 | ············"outputs":·[ |
24 | ················{ | 24 | ················{ |
25 | ····················"ename":·"ModuleNotFoundError", | 25 | ····················"ename":·"ModuleNotFoundError", |
26 | ····················"evalue":·"No·module·named·'xarray'", | 26 | ····················"evalue":·"No·module·named·'xarray'", |
27 | ····················"output_type":·"error", | 27 | ····················"output_type":·"error", |
Offset 49, 18 lines modified | Offset 49, 18 lines modified | ||
49 | ············] | 49 | ············] |
50 | ········}, | 50 | ········}, |
51 | ········{ | 51 | ········{ |
52 | ············"cell_type":·"code", | 52 | ············"cell_type":·"code", |
53 | ············"execution_count":·2, | 53 | ············"execution_count":·2, |
54 | ············"metadata":·{ | 54 | ············"metadata":·{ |
55 | ················"execution":·{ | 55 | ················"execution":·{ |
56 | ····················"iopub.execute_input":·"2025-05-21T1 | 56 | ····················"iopub.execute_input":·"2025-05-21T15:02:29.221227Z", |
57 | ····················"iopub.status.busy":·"2025-05-21T1 | 57 | ····················"iopub.status.busy":·"2025-05-21T15:02:29.219981Z", |
58 | ····················"iopub.status.idle":·"2025-05-21T1 | 58 | ····················"iopub.status.idle":·"2025-05-21T15:02:29.264686Z", |
59 | ····················"shell.execute_reply":·"2025-05-21T1 | 59 | ····················"shell.execute_reply":·"2025-05-21T15:02:29.262824Z" |
60 | ················} | 60 | ················} |
61 | ············}, | 61 | ············}, |
62 | ············"outputs":·[ | 62 | ············"outputs":·[ |
63 | ················{ | 63 | ················{ |
64 | ····················"ename":·"NameError", | 64 | ····················"ename":·"NameError", |
65 | ····················"evalue":·"name·'xr'·is·not·defined", | 65 | ····················"evalue":·"name·'xr'·is·not·defined", |
66 | ····················"output_type":·"error", | 66 | ····················"output_type":·"error", |
Offset 91, 18 lines modified | Offset 91, 18 lines modified | ||
91 | ············] | 91 | ············] |
92 | ········}, | 92 | ········}, |
93 | ········{ | 93 | ········{ |
94 | ············"cell_type":·"code", | 94 | ············"cell_type":·"code", |
95 | ············"execution_count":·3, | 95 | ············"execution_count":·3, |
96 | ············"metadata":·{ | 96 | ············"metadata":·{ |
97 | ················"execution":·{ | 97 | ················"execution":·{ |
98 | ····················"iopub.execute_input":·"2025-05-21T1 | 98 | ····················"iopub.execute_input":·"2025-05-21T15:02:29.271405Z", |
99 | ····················"iopub.status.busy":·"2025-05-21T1 | 99 | ····················"iopub.status.busy":·"2025-05-21T15:02:29.270113Z", |
100 | ····················"iopub.status.idle":·"2025-05-21T1 | 100 | ····················"iopub.status.idle":·"2025-05-21T15:02:29.325608Z", |
101 | ····················"shell.execute_reply":·"2025-05-21T1 | 101 | ····················"shell.execute_reply":·"2025-05-21T15:02:29.323840Z" |
102 | ················} | 102 | ················} |
103 | ············}, | 103 | ············}, |
104 | ············"outputs":·[ | 104 | ············"outputs":·[ |
105 | ················{ | 105 | ················{ |
106 | ····················"ename":·"NameError", | 106 | ····················"ename":·"NameError", |
107 | ····················"evalue":·"name·'ds'·is·not·defined", | 107 | ····················"evalue":·"name·'ds'·is·not·defined", |
108 | ····················"output_type":·"error", | 108 | ····················"output_type":·"error", |
Offset 144, 18 lines modified | Offset 144, 18 lines modified | ||
144 | ············] | 144 | ············] |
145 | ········}, | 145 | ········}, |
146 | ········{ | 146 | ········{ |
147 | ············"cell_type":·"code", | 147 | ············"cell_type":·"code", |
148 | ············"execution_count":·4, | 148 | ············"execution_count":·4, |
149 | ············"metadata":·{ | 149 | ············"metadata":·{ |
150 | ················"execution":·{ | 150 | ················"execution":·{ |
151 | ····················"iopub.execute_input":·"2025-05-21T1 | 151 | ····················"iopub.execute_input":·"2025-05-21T15:02:29.331968Z", |
152 | ····················"iopub.status.busy":·"2025-05-21T1 | 152 | ····················"iopub.status.busy":·"2025-05-21T15:02:29.330677Z", |
153 | ····················"iopub.status.idle":·"2025-05-21T1 | 153 | ····················"iopub.status.idle":·"2025-05-21T15:02:29.393411Z", |
154 | ····················"shell.execute_reply":·"2025-05-21T1 | 154 | ····················"shell.execute_reply":·"2025-05-21T15:02:29.391605Z" |
155 | ················} | 155 | ················} |
156 | ············}, | 156 | ············}, |
157 | ············"outputs":·[ | 157 | ············"outputs":·[ |
158 | ················{ | 158 | ················{ |
159 | ····················"ename":·"NameError", | 159 | ····················"ename":·"NameError", |
160 | ····················"evalue":·"name·'ds'·is·not·defined", | 160 | ····················"evalue":·"name·'ds'·is·not·defined", |
161 | ····················"output_type":·"error", | 161 | ····················"output_type":·"error", |
Offset 208, 18 lines modified | Offset 208, 18 lines modified | ||
208 | ············] | 208 | ············] |
209 | ········}, | 209 | ········}, |
210 | ········{ | 210 | ········{ |
211 | ············"cell_type":·"code", | 211 | ············"cell_type":·"code", |
212 | ············"execution_count":·5, | 212 | ············"execution_count":·5, |
213 | ············"metadata":·{ | 213 | ············"metadata":·{ |
214 | ················"execution":·{ | 214 | ················"execution":·{ |
215 | ····················"iopub.execute_input":·"2025-05-21T1 | 215 | ····················"iopub.execute_input":·"2025-05-21T15:02:29.400066Z", |
216 | ····················"iopub.status.busy":·"2025-05-21T1 | 216 | ····················"iopub.status.busy":·"2025-05-21T15:02:29.398397Z", |
217 | ····················"iopub.status.idle":·"2025-05-21T1 | 217 | ····················"iopub.status.idle":·"2025-05-21T15:02:29.473622Z", |
218 | ····················"shell.execute_reply":·"2025-05-21T1 | 218 | ····················"shell.execute_reply":·"2025-05-21T15:02:29.471857Z" |
219 | ················} | 219 | ················} |
220 | ············}, | 220 | ············}, |
221 | ············"outputs":·[ | 221 | ············"outputs":·[ |
222 | ················{ | 222 | ················{ |
223 | ····················"ename":·"NameError", | 223 | ····················"ename":·"NameError", |
224 | ····················"evalue":·"name·'ds'·is·not·defined", | 224 | ····················"evalue":·"name·'ds'·is·not·defined", |
225 | ····················"output_type":·"error", | 225 | ····················"output_type":·"error", |
Offset 264, 18 lines modified | Offset 264, 18 lines modified | ||
264 | ············] | 264 | ············] |
265 | ········}, | 265 | ········}, |
266 | ········{ | 266 | ········{ |
267 | ············"cell_type":·"code", | 267 | ············"cell_type":·"code", |
268 | ············"execution_count":·6, | 268 | ············"execution_count":·6, |
269 | ············"metadata":·{ | 269 | ············"metadata":·{ |
270 | ················"execution":·{ | 270 | ················"execution":·{ |
271 | ····················"iopub.execute_input":·"2025-05-21T1 | 271 | ····················"iopub.execute_input":·"2025-05-21T15:02:29.480169Z", |
272 | ····················"iopub.status.busy":·"2025-05-21T1 | 272 | ····················"iopub.status.busy":·"2025-05-21T15:02:29.478874Z", |
273 | ····················"iopub.status.idle":·"2025-05-21T1 | 273 | ····················"iopub.status.idle":·"2025-05-21T15:02:29.534056Z", |
274 | ····················"shell.execute_reply":·"2025-05-21T1 | 274 | ····················"shell.execute_reply":·"2025-05-21T15:02:29.532320Z" |
275 | ················} | 275 | ················} |
276 | ············}, | 276 | ············}, |
277 | ············"outputs":·[ | 277 | ············"outputs":·[ |
278 | ················{ | 278 | ················{ |
279 | ····················"ename":·"NameError", | 279 | ····················"ename":·"NameError", |
280 | ····················"evalue":·"name·'ds'·is·not·defined", | 280 | ····················"evalue":·"name·'ds'·is·not·defined", |
281 | ····················"output_type":·"error", | 281 | ····················"output_type":·"error", |
Offset 15, 18 lines modified | Offset 15, 18 lines modified | ||
15 | ············"execution_count":·1, | 15 | ············"execution_count":·1, |
16 | ············"metadata":·{ | 16 | ············"metadata":·{ |
17 | ················"ExecuteTime":·{ | 17 | ················"ExecuteTime":·{ |
18 | ····················"end_time":·"2020-01-27T15:43:36.127628Z", | 18 | ····················"end_time":·"2020-01-27T15:43:36.127628Z", |
19 | ····················"start_time":·"2020-01-27T15:43:36.081733Z" | 19 | ····················"start_time":·"2020-01-27T15:43:36.081733Z" |
20 | ················}, | 20 | ················}, |
21 | ················"execution":·{ | 21 | ················"execution":·{ |
22 | ····················"iopub.execute_input":·"2025-05-21T1 | 22 | ····················"iopub.execute_input":·"2025-05-21T15:02:33.940488Z", |
23 | ····················"iopub.status.busy":·"2025-05-21T1 | 23 | ····················"iopub.status.busy":·"2025-05-21T15:02:33.939064Z", |
24 | ····················"iopub.status.idle":·"2025-05-21T1 | 24 | ····················"iopub.status.idle":·"2025-05-21T15:02:38.019414Z", |
25 | ····················"shell.execute_reply":·"2025-05-21T1 | 25 | ····················"shell.execute_reply":·"2025-05-21T15:02:38.017338Z" |
26 | ················} | 26 | ················} |
27 | ············}, | 27 | ············}, |
28 | ············"outputs":·[ | 28 | ············"outputs":·[ |
29 | ················{ | 29 | ················{ |
30 | ····················"ename":·"ModuleNotFoundError", | 30 | ····················"ename":·"ModuleNotFoundError", |
31 | ····················"evalue":·"No·module·named·'xarray'", | 31 | ····················"evalue":·"No·module·named·'xarray'", |
32 | ····················"output_type":·"error", | 32 | ····················"output_type":·"error", |
Offset 86, 18 lines modified | Offset 86, 18 lines modified | ||
86 | ············"execution_count":·2, | 86 | ············"execution_count":·2, |
87 | ············"metadata":·{ | 87 | ············"metadata":·{ |
88 | ················"ExecuteTime":·{ | 88 | ················"ExecuteTime":·{ |
89 | ····················"end_time":·"2020-01-27T15:47:14.160297Z", | 89 | ····················"end_time":·"2020-01-27T15:47:14.160297Z", |
90 | ····················"start_time":·"2020-01-27T15:47:14.126738Z" | 90 | ····················"start_time":·"2020-01-27T15:47:14.126738Z" |
91 | ················}, | 91 | ················}, |
92 | ················"execution":·{ | 92 | ················"execution":·{ |
93 | ····················"iopub.execute_input":·"2025-05-21T1 | 93 | ····················"iopub.execute_input":·"2025-05-21T15:02:38.026605Z", |
94 | ····················"iopub.status.busy":·"2025-05-21T1 | 94 | ····················"iopub.status.busy":·"2025-05-21T15:02:38.025116Z", |
95 | ····················"iopub.status.idle":·"2025-05-21T1 | 95 | ····················"iopub.status.idle":·"2025-05-21T15:02:38.070380Z", |
96 | ····················"shell.execute_reply":·"2025-05-21T1 | 96 | ····················"shell.execute_reply":·"2025-05-21T15:02:38.068541Z" |
97 | ················} | 97 | ················} |
98 | ············}, | 98 | ············}, |
99 | ············"outputs":·[ | 99 | ············"outputs":·[ |
100 | ················{ | 100 | ················{ |
101 | ····················"ename":·"NameError", | 101 | ····················"ename":·"NameError", |
102 | ····················"evalue":·"name·'ds'·is·not·defined", | 102 | ····················"evalue":·"name·'ds'·is·not·defined", |
103 | ····················"output_type":·"error", | 103 | ····················"output_type":·"error", |
Offset 119, 18 lines modified | Offset 119, 18 lines modified | ||
119 | ············"execution_count":·3, | 119 | ············"execution_count":·3, |
120 | ············"metadata":·{ | 120 | ············"metadata":·{ |
121 | ················"ExecuteTime":·{ | 121 | ················"ExecuteTime":·{ |
122 | ····················"end_time":·"2020-01-27T15:47:32.682065Z", | 122 | ····················"end_time":·"2020-01-27T15:47:32.682065Z", |
123 | ····················"start_time":·"2020-01-27T15:47:32.652629Z" | 123 | ····················"start_time":·"2020-01-27T15:47:32.652629Z" |
124 | ················}, | 124 | ················}, |
125 | ················"execution":·{ | 125 | ················"execution":·{ |
126 | ····················"iopub.execute_input":·"2025-05-21T1 | 126 | ····················"iopub.execute_input":·"2025-05-21T15:02:38.076752Z", |
127 | ····················"iopub.status.busy":·"2025-05-21T1 | 127 | ····················"iopub.status.busy":·"2025-05-21T15:02:38.075390Z", |
128 | ····················"iopub.status.idle":·"2025-05-21T1 | 128 | ····················"iopub.status.idle":·"2025-05-21T15:02:38.118335Z", |
129 | ····················"shell.execute_reply":·"2025-05-21T1 | 129 | ····················"shell.execute_reply":·"2025-05-21T15:02:38.116556Z" |
130 | ················} | 130 | ················} |
131 | ············}, | 131 | ············}, |
132 | ············"outputs":·[ | 132 | ············"outputs":·[ |
133 | ················{ | 133 | ················{ |
134 | ····················"ename":·"NameError", | 134 | ····················"ename":·"NameError", |
135 | ····················"evalue":·"name·'df'·is·not·defined", | 135 | ····················"evalue":·"name·'df'·is·not·defined", |
136 | ····················"output_type":·"error", | 136 | ····················"output_type":·"error", |
Offset 158, 18 lines modified | Offset 158, 18 lines modified | ||
158 | ············"execution_count":·4, | 158 | ············"execution_count":·4, |
159 | ············"metadata":·{ | 159 | ············"metadata":·{ |
160 | ················"ExecuteTime":·{ | 160 | ················"ExecuteTime":·{ |
161 | ····················"end_time":·"2020-01-27T15:47:34.617042Z", | 161 | ····················"end_time":·"2020-01-27T15:47:34.617042Z", |
162 | ····················"start_time":·"2020-01-27T15:47:34.282605Z" | 162 | ····················"start_time":·"2020-01-27T15:47:34.282605Z" |
163 | ················}, | 163 | ················}, |
164 | ················"execution":·{ | 164 | ················"execution":·{ |
165 | ····················"iopub.execute_input":·"2025-05-21T1 | 165 | ····················"iopub.execute_input":·"2025-05-21T15:02:38.124681Z", |
166 | ····················"iopub.status.busy":·"2025-05-21T1 | 166 | ····················"iopub.status.busy":·"2025-05-21T15:02:38.123286Z", |
167 | ····················"iopub.status.idle":·"2025-05-21T1 | 167 | ····················"iopub.status.idle":·"2025-05-21T15:02:38.167643Z", |
168 | ····················"shell.execute_reply":·"2025-05-21T1 | 168 | ····················"shell.execute_reply":·"2025-05-21T15:02:38.165782Z" |
169 | ················} | 169 | ················} |
170 | ············}, | 170 | ············}, |
171 | ············"outputs":·[ | 171 | ············"outputs":·[ |
172 | ················{ | 172 | ················{ |
173 | ····················"ename":·"NameError", | 173 | ····················"ename":·"NameError", |
174 | ····················"evalue":·"name·'ds'·is·not·defined", | 174 | ····················"evalue":·"name·'ds'·is·not·defined", |
175 | ····················"output_type":·"error", | 175 | ····················"output_type":·"error", |
Offset 197, 18 lines modified | Offset 197, 18 lines modified | ||
197 | ············"execution_count":·5, | 197 | ············"execution_count":·5, |
198 | ············"metadata":·{ | 198 | ············"metadata":·{ |
199 | ················"ExecuteTime":·{ | 199 | ················"ExecuteTime":·{ |
200 | ····················"end_time":·"2020-01-27T15:47:37.643175Z", | 200 | ····················"end_time":·"2020-01-27T15:47:37.643175Z", |
201 | ····················"start_time":·"2020-01-27T15:47:37.202479Z" | 201 | ····················"start_time":·"2020-01-27T15:47:37.202479Z" |
202 | ················}, | 202 | ················}, |
203 | ················"execution":·{ | 203 | ················"execution":·{ |
204 | ····················"iopub.execute_input":·"2025-05-21T1 | 204 | ····················"iopub.execute_input":·"2025-05-21T15:02:38.173942Z", |
205 | ····················"iopub.status.busy":·"2025-05-21T1 | 205 | ····················"iopub.status.busy":·"2025-05-21T15:02:38.172778Z", |
206 | ····················"iopub.status.idle":·"2025-05-21T1 | 206 | ····················"iopub.status.idle":·"2025-05-21T15:02:38.216436Z", |
207 | ····················"shell.execute_reply":·"2025-05-21T1 | 207 | ····················"shell.execute_reply":·"2025-05-21T15:02:38.214438Z" |
208 | ················} | 208 | ················} |
209 | ············}, | 209 | ············}, |
210 | ············"outputs":·[ | 210 | ············"outputs":·[ |
211 | ················{ | 211 | ················{ |
212 | ····················"ename":·"NameError", | 212 | ····················"ename":·"NameError", |
213 | ····················"evalue":·"name·'df'·is·not·defined", | 213 | ····················"evalue":·"name·'df'·is·not·defined", |
214 | ····················"output_type":·"error", | 214 | ····················"output_type":·"error", |
Offset 236, 18 lines modified | Offset 236, 18 lines modified | ||
236 | ············"execution_count":·6, | 236 | ············"execution_count":·6, |
237 | ············"metadata":·{ | 237 | ············"metadata":·{ |
238 | ················"ExecuteTime":·{ | 238 | ················"ExecuteTime":·{ |
239 | ····················"end_time":·"2020-01-27T15:48:11.241224Z", | 239 | ····················"end_time":·"2020-01-27T15:48:11.241224Z", |
240 | ····················"start_time":·"2020-01-27T15:48:11.211156Z" | 240 | ····················"start_time":·"2020-01-27T15:48:11.211156Z" |
241 | ················}, | 241 | ················}, |
242 | ················"execution":·{ | 242 | ················"execution":·{ |
243 | ····················"iopub.execute_input":·"2025-05-21T1 | 243 | ····················"iopub.execute_input":·"2025-05-21T15:02:38.223257Z", |
244 | ····················"iopub.status.busy":·"2025-05-21T1 | 244 | ····················"iopub.status.busy":·"2025-05-21T15:02:38.221593Z", |
245 | ····················"iopub.status.idle":·"2025-05-21T1 | 245 | ····················"iopub.status.idle":·"2025-05-21T15:02:38.266827Z", |
246 | ····················"shell.execute_reply":·"2025-05-21T1 | 246 | ····················"shell.execute_reply":·"2025-05-21T15:02:38.265068Z" |
247 | ················} | 247 | ················} |
248 | ············}, | 248 | ············}, |
249 | ············"outputs":·[ | 249 | ············"outputs":·[ |
250 | ················{ | 250 | ················{ |
251 | ····················"ename":·"NameError", | 251 | ····················"ename":·"NameError", |
252 | ····················"evalue":·"name·'ds'·is·not·defined", | 252 | ····················"evalue":·"name·'ds'·is·not·defined", |
253 | ····················"output_type":·"error", | 253 | ····················"output_type":·"error", |
Offset 269, 18 lines modified | Offset 269, 18 lines modified | ||
269 | ············"execution_count":·7, | 269 | ············"execution_count":·7, |
270 | ············"metadata":·{ | 270 | ············"metadata":·{ |
271 | ················"ExecuteTime":·{ | 271 | ················"ExecuteTime":·{ |
272 | ····················"end_time":·"2020-01-27T15:48:13.131247Z", | 272 | ····················"end_time":·"2020-01-27T15:48:13.131247Z", |
273 | ····················"start_time":·"2020-01-27T15:48:12.924985Z" | 273 | ····················"start_time":·"2020-01-27T15:48:12.924985Z" |
274 | ················}, | 274 | ················}, |
275 | ················"execution":·{ | 275 | ················"execution":·{ |
276 | ····················"iopub.execute_input":·"2025-05-21T1 | 276 | ····················"iopub.execute_input":·"2025-05-21T15:02:38.272983Z", |
277 | ····················"iopub.status.busy":·"2025-05-21T1 | 277 | ····················"iopub.status.busy":·"2025-05-21T15:02:38.271777Z", |
278 | ····················"iopub.status.idle":·"2025-05-21T1 | 278 | ····················"iopub.status.idle":·"2025-05-21T15:02:38.314200Z", |
279 | ····················"shell.execute_reply":·"2025-05-21T1 | 279 | ····················"shell.execute_reply":·"2025-05-21T15:02:38.312293Z" |
280 | ················} | 280 | ················} |
281 | ············}, | 281 | ············}, |
Max diff block lines reached; 6872/14524 bytes (47.31%) of diff not shown. |
Offset 324, 15 lines modified | Offset 324, 15 lines modified | ||
324 | </pre></div> | 324 | </pre></div> |
325 | </div> | 325 | </div> |
326 | </section> | 326 | </section> |
327 | <section·id="plotting"> | 327 | <section·id="plotting"> |
328 | <h2>Plotting<a·class="headerlink"·href="#plotting"·title="Link·to·this·heading">¶</a></h2> | 328 | <h2>Plotting<a·class="headerlink"·href="#plotting"·title="Link·to·this·heading">¶</a></h2> |
329 | <p>Visualizing·your·datasets·is·quick·and·convenient:</p> | 329 | <p>Visualizing·your·datasets·is·quick·and·convenient:</p> |
330 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[37]:·</span><span·class="n">data</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span> | 330 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[37]:·</span><span·class="n">data</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span> |
331 | <span·class="gh">Out[37]:·</span><span·class="go"><matplotlib.collections.QuadMesh·at·0x | 331 | <span·class="gh">Out[37]:·</span><span·class="go"><matplotlib.collections.QuadMesh·at·0xe93860e8></span> |
332 | </pre></div> | 332 | </pre></div> |
333 | </div> | 333 | </div> |
334 | <img·alt="../_images/plotting_quick_overview.png"·src="../_images/plotting_quick_overview.png"·/> | 334 | <img·alt="../_images/plotting_quick_overview.png"·src="../_images/plotting_quick_overview.png"·/> |
335 | <p>Note·the·automatic·labeling·with·names·and·units.·Our·effort·in·adding·metadata·attributes·has·paid·off!·Many·aspects·of·these·figures·are·customizable:·see·<a·class="reference·internal"·href="../user-guide/plotting.html#plotting"><span·class="std·std-ref">Plotting</span></a>.</p> | 335 | <p>Note·the·automatic·labeling·with·names·and·units.·Our·effort·in·adding·metadata·attributes·has·paid·off!·Many·aspects·of·these·figures·are·customizable:·see·<a·class="reference·internal"·href="../user-guide/plotting.html#plotting"><span·class="std·std-ref">Plotting</span></a>.</p> |
336 | </section> | 336 | </section> |
337 | <section·id="pandas"> | 337 | <section·id="pandas"> |
338 | <h2>pandas<a·class="headerlink"·href="#pandas"·title="Link·to·this·heading">¶</a></h2> | 338 | <h2>pandas<a·class="headerlink"·href="#pandas"·title="Link·to·this·heading">¶</a></h2> |
Offset 253, 15 lines modified | Offset 253, 15 lines modified | ||
253 | ·······[0.37342613,·1.49497537,·1.33584385]]) | 253 | ·······[0.37342613,·1.49497537,·1.33584385]]) |
254 | Coordinates: | 254 | Coordinates: |
255 | ··*·x········(x)·int32·8B·10·20 | 255 | ··*·x········(x)·int32·8B·10·20 |
256 | Dimensions·without·coordinates:·y | 256 | Dimensions·without·coordinates:·y |
257 | *\x8**\x8**\x8**\x8**\x8*·P\x8Pl\x8lo\x8ot\x8tt\x8ti\x8in\x8ng\x8g_\x8?\x8¶·*\x8**\x8**\x8**\x8**\x8* | 257 | *\x8**\x8**\x8**\x8**\x8*·P\x8Pl\x8lo\x8ot\x8tt\x8ti\x8in\x8ng\x8g_\x8?\x8¶·*\x8**\x8**\x8**\x8**\x8* |
258 | Visualizing·your·datasets·is·quick·and·convenient: | 258 | Visualizing·your·datasets·is·quick·and·convenient: |
259 | In·[37]:·data.plot() | 259 | In·[37]:·data.plot() |
260 | Out[37]:·<matplotlib.collections.QuadMesh·at·0x | 260 | Out[37]:·<matplotlib.collections.QuadMesh·at·0xe93860e8> |
261 | [../_images/plotting_quick_overview.png] | 261 | [../_images/plotting_quick_overview.png] |
262 | Note·the·automatic·labeling·with·names·and·units.·Our·effort·in·adding·metadata | 262 | Note·the·automatic·labeling·with·names·and·units.·Our·effort·in·adding·metadata |
263 | attributes·has·paid·off!·Many·aspects·of·these·figures·are·customizable:·see | 263 | attributes·has·paid·off!·Many·aspects·of·these·figures·are·customizable:·see |
264 | _\x8P_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g. | 264 | _\x8P_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g. |
265 | *\x8**\x8**\x8**\x8**\x8*·p\x8pa\x8an\x8nd\x8da\x8as\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8**\x8* | 265 | *\x8**\x8**\x8**\x8**\x8*·p\x8pa\x8an\x8nd\x8da\x8as\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8**\x8* |
266 | Xarray·objects·can·be·easily·converted·to·and·from·pandas·objects·using·the | 266 | Xarray·objects·can·be·easily·converted·to·and·from·pandas·objects·using·the |
267 | to_series(),·to_dataframe()·and·_\x8t_\x8o_\x8__\x8x_\x8a_\x8r_\x8r_\x8a_\x8y_\x8(_\x8)·methods: | 267 | to_series(),·to_dataframe()·and·_\x8t_\x8o_\x8__\x8x_\x8a_\x8r_\x8r_\x8a_\x8y_\x8(_\x8)·methods: |
Offset 225, 15 lines modified | Offset 225, 15 lines modified | ||
225 | <span·class="g·g-Whitespace">····</span><span·class="mi">705</span>·<span·class="n">server_hostname</span><span·class="p">:</span>·<span·class="nb">str</span>·<span·class="o">=</span>·<span·class="bp">self</span><span·class="o">.</span><span·class="n">host</span> | 225 | <span·class="g·g-Whitespace">····</span><span·class="mi">705</span>·<span·class="n">server_hostname</span><span·class="p">:</span>·<span·class="nb">str</span>·<span·class="o">=</span>·<span·class="bp">self</span><span·class="o">.</span><span·class="n">host</span> |
226 | <span·class="nn">File·/usr/lib/python3/dist-packages/urllib3/connection.py:205,</span>·in·<span·class="ni">HTTPConnection._new_conn</span><span·class="nt">(self)</span> | 226 | <span·class="nn">File·/usr/lib/python3/dist-packages/urllib3/connection.py:205,</span>·in·<span·class="ni">HTTPConnection._new_conn</span><span·class="nt">(self)</span> |
227 | <span·class="g·g-Whitespace">····</span><span·class="mi">204</span>·<span·class="k">except</span>·<span·class="n">socket</span><span·class="o">.</span><span·class="n">gaierror</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> | 227 | <span·class="g·g-Whitespace">····</span><span·class="mi">204</span>·<span·class="k">except</span>·<span·class="n">socket</span><span·class="o">.</span><span·class="n">gaierror</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> |
228 | <span·class="ne">-->·</span><span·class="mi">205</span>·····<span·class="k">raise</span>·<span·class="n">NameResolutionError</span><span·class="p">(</span><span·class="bp">self</span><span·class="o">.</span><span·class="n">host</span><span·class="p">,</span>·<span·class="bp">self</span><span·class="p">,</span>·<span·class="n">e</span><span·class="p">)</span>·<span·class="kn">from</span>·<span·class="nn">e</span> | 228 | <span·class="ne">-->·</span><span·class="mi">205</span>·····<span·class="k">raise</span>·<span·class="n">NameResolutionError</span><span·class="p">(</span><span·class="bp">self</span><span·class="o">.</span><span·class="n">host</span><span·class="p">,</span>·<span·class="bp">self</span><span·class="p">,</span>·<span·class="n">e</span><span·class="p">)</span>·<span·class="kn">from</span>·<span·class="nn">e</span> |
229 | <span·class="g·g-Whitespace">····</span><span·class="mi">206</span>·<span·class="k">except</span>·<span·class="n">SocketTimeout</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> | 229 | <span·class="g·g-Whitespace">····</span><span·class="mi">206</span>·<span·class="k">except</span>·<span·class="n">SocketTimeout</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> |
230 | <span·class="ne">NameResolutionError</span>:·<urllib3.connection.HTTPSConnection·object·at·0x | 230 | <span·class="ne">NameResolutionError</span>:·<urllib3.connection.HTTPSConnection·object·at·0xe76d4c90>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution) |
231 | <span·class="n">The</span>·<span·class="n">above</span>·<span·class="n">exception</span>·<span·class="n">was</span>·<span·class="n">the</span>·<span·class="n">direct</span>·<span·class="n">cause</span>·<span·class="n">of</span>·<span·class="n">the</span>·<span·class="n">following</span>·<span·class="n">exception</span><span·class="p">:</span> | 231 | <span·class="n">The</span>·<span·class="n">above</span>·<span·class="n">exception</span>·<span·class="n">was</span>·<span·class="n">the</span>·<span·class="n">direct</span>·<span·class="n">cause</span>·<span·class="n">of</span>·<span·class="n">the</span>·<span·class="n">following</span>·<span·class="n">exception</span><span·class="p">:</span> |
232 | <span·class="ne">MaxRetryError</span><span·class="g·g-Whitespace">·····························</span>Traceback·(most·recent·call·last) | 232 | <span·class="ne">MaxRetryError</span><span·class="g·g-Whitespace">·····························</span>Traceback·(most·recent·call·last) |
233 | <span·class="nn">File·/usr/lib/python3/dist-packages/requests/adapters.py:667,</span>·in·<span·class="ni">HTTPAdapter.send</span><span·class="nt">(self,·request,·stream,·timeout,·verify,·cert,·proxies)</span> | 233 | <span·class="nn">File·/usr/lib/python3/dist-packages/requests/adapters.py:667,</span>·in·<span·class="ni">HTTPAdapter.send</span><span·class="nt">(self,·request,·stream,·timeout,·verify,·cert,·proxies)</span> |
234 | <span·class="g·g-Whitespace">····</span><span·class="mi">666</span>·<span·class="k">try</span><span·class="p">:</span> | 234 | <span·class="g·g-Whitespace">····</span><span·class="mi">666</span>·<span·class="k">try</span><span·class="p">:</span> |
235 | <span·class="ne">-->·</span><span·class="mi">667</span>·····<span·class="n">resp</span>·<span·class="o">=</span>·<span·class="n">conn</span><span·class="o">.</span><span·class="n">urlopen</span><span·class="p">(</span> | 235 | <span·class="ne">-->·</span><span·class="mi">667</span>·····<span·class="n">resp</span>·<span·class="o">=</span>·<span·class="n">conn</span><span·class="o">.</span><span·class="n">urlopen</span><span·class="p">(</span> |
Offset 259, 15 lines modified | Offset 259, 15 lines modified | ||
259 | <span·class="g·g-Whitespace">····</span><span·class="mi">844</span>·<span·class="n">retries</span><span·class="o">.</span><span·class="n">sleep</span><span·class="p">()</span> | 259 | <span·class="g·g-Whitespace">····</span><span·class="mi">844</span>·<span·class="n">retries</span><span·class="o">.</span><span·class="n">sleep</span><span·class="p">()</span> |
260 | <span·class="nn">File·/usr/lib/python3/dist-packages/urllib3/util/retry.py:519,</span>·in·<span·class="ni">Retry.increment</span><span·class="nt">(self,·method,·url,·response,·error,·_pool,·_stacktrace)</span> | 260 | <span·class="nn">File·/usr/lib/python3/dist-packages/urllib3/util/retry.py:519,</span>·in·<span·class="ni">Retry.increment</span><span·class="nt">(self,·method,·url,·response,·error,·_pool,·_stacktrace)</span> |
261 | <span·class="g·g-Whitespace">····</span><span·class="mi">518</span>·····<span·class="n">reason</span>·<span·class="o">=</span>·<span·class="n">error</span>·<span·class="ow">or</span>·<span·class="n">ResponseError</span><span·class="p">(</span><span·class="n">cause</span><span·class="p">)</span> | 261 | <span·class="g·g-Whitespace">····</span><span·class="mi">518</span>·····<span·class="n">reason</span>·<span·class="o">=</span>·<span·class="n">error</span>·<span·class="ow">or</span>·<span·class="n">ResponseError</span><span·class="p">(</span><span·class="n">cause</span><span·class="p">)</span> |
262 | <span·class="ne">-->·</span><span·class="mi">519</span>·····<span·class="k">raise</span>·<span·class="n">MaxRetryError</span><span·class="p">(</span><span·class="n">_pool</span><span·class="p">,</span>·<span·class="n">url</span><span·class="p">,</span>·<span·class="n">reason</span><span·class="p">)</span>·<span·class="kn">from</span>·<span·class="nn">reason</span>··<span·class="c1">#·type:·ignore[arg-type]</span> | 262 | <span·class="ne">-->·</span><span·class="mi">519</span>·····<span·class="k">raise</span>·<span·class="n">MaxRetryError</span><span·class="p">(</span><span·class="n">_pool</span><span·class="p">,</span>·<span·class="n">url</span><span·class="p">,</span>·<span·class="n">reason</span><span·class="p">)</span>·<span·class="kn">from</span>·<span·class="nn">reason</span>··<span·class="c1">#·type:·ignore[arg-type]</span> |
263 | <span·class="g·g-Whitespace">····</span><span·class="mi">521</span>·<span·class="n">log</span><span·class="o">.</span><span·class="n">debug</span><span·class="p">(</span><span·class="s2">"Incremented·Retry·for·(url='</span><span·class="si">%s</span><span·class="s2">'):·</span><span·class="si">%r</span><span·class="s2">"</span><span·class="p">,</span>·<span·class="n">url</span><span·class="p">,</span>·<span·class="n">new_retry</span><span·class="p">)</span> | 263 | <span·class="g·g-Whitespace">····</span><span·class="mi">521</span>·<span·class="n">log</span><span·class="o">.</span><span·class="n">debug</span><span·class="p">(</span><span·class="s2">"Incremented·Retry·for·(url='</span><span·class="si">%s</span><span·class="s2">'):·</span><span·class="si">%r</span><span·class="s2">"</span><span·class="p">,</span>·<span·class="n">url</span><span·class="p">,</span>·<span·class="n">new_retry</span><span·class="p">)</span> |
264 | <span·class="ne">MaxRetryError</span>:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 264 | <span·class="ne">MaxRetryError</span>:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe76d4c90>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution)")) |
265 | <span·class="n">During</span>·<span·class="n">handling</span>·<span·class="n">of</span>·<span·class="n">the</span>·<span·class="n">above</span>·<span·class="n">exception</span><span·class="p">,</span>·<span·class="n">another</span>·<span·class="n">exception</span>·<span·class="n">occurred</span><span·class="p">:</span> | 265 | <span·class="n">During</span>·<span·class="n">handling</span>·<span·class="n">of</span>·<span·class="n">the</span>·<span·class="n">above</span>·<span·class="n">exception</span><span·class="p">,</span>·<span·class="n">another</span>·<span·class="n">exception</span>·<span·class="n">occurred</span><span·class="p">:</span> |
266 | <span·class="ne">ConnectionError</span><span·class="g·g-Whitespace">···························</span>Traceback·(most·recent·call·last) | 266 | <span·class="ne">ConnectionError</span><span·class="g·g-Whitespace">···························</span>Traceback·(most·recent·call·last) |
267 | <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span> | 267 | <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span> |
268 | <span·class="ne">---->·</span><span·class="mi">1</span>·<span·class="n">da</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)[</span><span·class="s2">"air"</span><span·class="p">]</span> | 268 | <span·class="ne">---->·</span><span·class="mi">1</span>·<span·class="n">da</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)[</span><span·class="s2">"air"</span><span·class="p">]</span> |
Offset 345, 15 lines modified | Offset 345, 15 lines modified | ||
345 | <span·class="g·g-Whitespace">····</span><span·class="mi">696</span>·····<span·class="k">if</span>·<span·class="nb">isinstance</span><span·class="p">(</span><span·class="n">e</span><span·class="o">.</span><span·class="n">reason</span><span·class="p">,</span>·<span·class="n">_SSLError</span><span·class="p">):</span> | 345 | <span·class="g·g-Whitespace">····</span><span·class="mi">696</span>·····<span·class="k">if</span>·<span·class="nb">isinstance</span><span·class="p">(</span><span·class="n">e</span><span·class="o">.</span><span·class="n">reason</span><span·class="p">,</span>·<span·class="n">_SSLError</span><span·class="p">):</span> |
346 | <span·class="g·g-Whitespace">····</span><span·class="mi">697</span>·········<span·class="c1">#·This·branch·is·for·urllib3·v1.22·and·later.</span> | 346 | <span·class="g·g-Whitespace">····</span><span·class="mi">697</span>·········<span·class="c1">#·This·branch·is·for·urllib3·v1.22·and·later.</span> |
347 | <span·class="g·g-Whitespace">····</span><span·class="mi">698</span>·········<span·class="k">raise</span>·<span·class="n">SSLError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> | 347 | <span·class="g·g-Whitespace">····</span><span·class="mi">698</span>·········<span·class="k">raise</span>·<span·class="n">SSLError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> |
348 | <span·class="ne">-->·</span><span·class="mi">700</span>·····<span·class="k">raise</span>·<span·class="ne">ConnectionError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> | 348 | <span·class="ne">-->·</span><span·class="mi">700</span>·····<span·class="k">raise</span>·<span·class="ne">ConnectionError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> |
349 | <span·class="g·g-Whitespace">····</span><span·class="mi">702</span>·<span·class="k">except</span>·<span·class="n">ClosedPoolError</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> | 349 | <span·class="g·g-Whitespace">····</span><span·class="mi">702</span>·<span·class="k">except</span>·<span·class="n">ClosedPoolError</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> |
350 | <span·class="g·g-Whitespace">····</span><span·class="mi">703</span>·····<span·class="k">raise</span>·<span·class="ne">ConnectionError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> | 350 | <span·class="g·g-Whitespace">····</span><span·class="mi">703</span>·····<span·class="k">raise</span>·<span·class="ne">ConnectionError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> |
351 | <span·class="ne">ConnectionError</span>:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 351 | <span·class="ne">ConnectionError</span>:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe76d4c90>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution)")) |
352 | <span·class="gp">In·[2]:·</span><span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span> | 352 | <span·class="gp">In·[2]:·</span><span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span> |
353 | <span·class="gt">---------------------------------------------------------------------------</span> | 353 | <span·class="gt">---------------------------------------------------------------------------</span> |
354 | <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last) | 354 | <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last) |
355 | <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">2</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span> | 355 | <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">2</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span> |
356 | <span·class="ne">---->·</span><span·class="mi">1</span>·<span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span> | 356 | <span·class="ne">---->·</span><span·class="mi">1</span>·<span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span> |
Offset 462, 15 lines modified | Offset 462, 15 lines modified | ||
462 | <span·class="g·g-Whitespace">····</span><span·class="mi">705</span>·<span·class="n">server_hostname</span><span·class="p">:</span>·<span·class="nb">str</span>·<span·class="o">=</span>·<span·class="bp">self</span><span·class="o">.</span><span·class="n">host</span> | 462 | <span·class="g·g-Whitespace">····</span><span·class="mi">705</span>·<span·class="n">server_hostname</span><span·class="p">:</span>·<span·class="nb">str</span>·<span·class="o">=</span>·<span·class="bp">self</span><span·class="o">.</span><span·class="n">host</span> |
463 | <span·class="nn">File·/usr/lib/python3/dist-packages/urllib3/connection.py:205,</span>·in·<span·class="ni">HTTPConnection._new_conn</span><span·class="nt">(self)</span> | 463 | <span·class="nn">File·/usr/lib/python3/dist-packages/urllib3/connection.py:205,</span>·in·<span·class="ni">HTTPConnection._new_conn</span><span·class="nt">(self)</span> |
464 | <span·class="g·g-Whitespace">····</span><span·class="mi">204</span>·<span·class="k">except</span>·<span·class="n">socket</span><span·class="o">.</span><span·class="n">gaierror</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> | 464 | <span·class="g·g-Whitespace">····</span><span·class="mi">204</span>·<span·class="k">except</span>·<span·class="n">socket</span><span·class="o">.</span><span·class="n">gaierror</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> |
465 | <span·class="ne">-->·</span><span·class="mi">205</span>·····<span·class="k">raise</span>·<span·class="n">NameResolutionError</span><span·class="p">(</span><span·class="bp">self</span><span·class="o">.</span><span·class="n">host</span><span·class="p">,</span>·<span·class="bp">self</span><span·class="p">,</span>·<span·class="n">e</span><span·class="p">)</span>·<span·class="kn">from</span>·<span·class="nn">e</span> | 465 | <span·class="ne">-->·</span><span·class="mi">205</span>·····<span·class="k">raise</span>·<span·class="n">NameResolutionError</span><span·class="p">(</span><span·class="bp">self</span><span·class="o">.</span><span·class="n">host</span><span·class="p">,</span>·<span·class="bp">self</span><span·class="p">,</span>·<span·class="n">e</span><span·class="p">)</span>·<span·class="kn">from</span>·<span·class="nn">e</span> |
466 | <span·class="g·g-Whitespace">····</span><span·class="mi">206</span>·<span·class="k">except</span>·<span·class="n">SocketTimeout</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> | 466 | <span·class="g·g-Whitespace">····</span><span·class="mi">206</span>·<span·class="k">except</span>·<span·class="n">SocketTimeout</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> |
467 | <span·class="ne">NameResolutionError</span>:·<urllib3.connection.HTTPSConnection·object·at·0x | 467 | <span·class="ne">NameResolutionError</span>:·<urllib3.connection.HTTPSConnection·object·at·0xe74e0be0>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution) |
468 | <span·class="n">The</span>·<span·class="n">above</span>·<span·class="n">exception</span>·<span·class="n">was</span>·<span·class="n">the</span>·<span·class="n">direct</span>·<span·class="n">cause</span>·<span·class="n">of</span>·<span·class="n">the</span>·<span·class="n">following</span>·<span·class="n">exception</span><span·class="p">:</span> | 468 | <span·class="n">The</span>·<span·class="n">above</span>·<span·class="n">exception</span>·<span·class="n">was</span>·<span·class="n">the</span>·<span·class="n">direct</span>·<span·class="n">cause</span>·<span·class="n">of</span>·<span·class="n">the</span>·<span·class="n">following</span>·<span·class="n">exception</span><span·class="p">:</span> |
469 | <span·class="ne">MaxRetryError</span><span·class="g·g-Whitespace">·····························</span>Traceback·(most·recent·call·last) | 469 | <span·class="ne">MaxRetryError</span><span·class="g·g-Whitespace">·····························</span>Traceback·(most·recent·call·last) |
470 | <span·class="nn">File·/usr/lib/python3/dist-packages/requests/adapters.py:667,</span>·in·<span·class="ni">HTTPAdapter.send</span><span·class="nt">(self,·request,·stream,·timeout,·verify,·cert,·proxies)</span> | 470 | <span·class="nn">File·/usr/lib/python3/dist-packages/requests/adapters.py:667,</span>·in·<span·class="ni">HTTPAdapter.send</span><span·class="nt">(self,·request,·stream,·timeout,·verify,·cert,·proxies)</span> |
471 | <span·class="g·g-Whitespace">····</span><span·class="mi">666</span>·<span·class="k">try</span><span·class="p">:</span> | 471 | <span·class="g·g-Whitespace">····</span><span·class="mi">666</span>·<span·class="k">try</span><span·class="p">:</span> |
472 | <span·class="ne">-->·</span><span·class="mi">667</span>·····<span·class="n">resp</span>·<span·class="o">=</span>·<span·class="n">conn</span><span·class="o">.</span><span·class="n">urlopen</span><span·class="p">(</span> | 472 | <span·class="ne">-->·</span><span·class="mi">667</span>·····<span·class="n">resp</span>·<span·class="o">=</span>·<span·class="n">conn</span><span·class="o">.</span><span·class="n">urlopen</span><span·class="p">(</span> |
Offset 496, 15 lines modified | Offset 496, 15 lines modified | ||
496 | <span·class="g·g-Whitespace">····</span><span·class="mi">844</span>·<span·class="n">retries</span><span·class="o">.</span><span·class="n">sleep</span><span·class="p">()</span> | 496 | <span·class="g·g-Whitespace">····</span><span·class="mi">844</span>·<span·class="n">retries</span><span·class="o">.</span><span·class="n">sleep</span><span·class="p">()</span> |
497 | <span·class="nn">File·/usr/lib/python3/dist-packages/urllib3/util/retry.py:519,</span>·in·<span·class="ni">Retry.increment</span><span·class="nt">(self,·method,·url,·response,·error,·_pool,·_stacktrace)</span> | 497 | <span·class="nn">File·/usr/lib/python3/dist-packages/urllib3/util/retry.py:519,</span>·in·<span·class="ni">Retry.increment</span><span·class="nt">(self,·method,·url,·response,·error,·_pool,·_stacktrace)</span> |
498 | <span·class="g·g-Whitespace">····</span><span·class="mi">518</span>·····<span·class="n">reason</span>·<span·class="o">=</span>·<span·class="n">error</span>·<span·class="ow">or</span>·<span·class="n">ResponseError</span><span·class="p">(</span><span·class="n">cause</span><span·class="p">)</span> | 498 | <span·class="g·g-Whitespace">····</span><span·class="mi">518</span>·····<span·class="n">reason</span>·<span·class="o">=</span>·<span·class="n">error</span>·<span·class="ow">or</span>·<span·class="n">ResponseError</span><span·class="p">(</span><span·class="n">cause</span><span·class="p">)</span> |
499 | <span·class="ne">-->·</span><span·class="mi">519</span>·····<span·class="k">raise</span>·<span·class="n">MaxRetryError</span><span·class="p">(</span><span·class="n">_pool</span><span·class="p">,</span>·<span·class="n">url</span><span·class="p">,</span>·<span·class="n">reason</span><span·class="p">)</span>·<span·class="kn">from</span>·<span·class="nn">reason</span>··<span·class="c1">#·type:·ignore[arg-type]</span> | 499 | <span·class="ne">-->·</span><span·class="mi">519</span>·····<span·class="k">raise</span>·<span·class="n">MaxRetryError</span><span·class="p">(</span><span·class="n">_pool</span><span·class="p">,</span>·<span·class="n">url</span><span·class="p">,</span>·<span·class="n">reason</span><span·class="p">)</span>·<span·class="kn">from</span>·<span·class="nn">reason</span>··<span·class="c1">#·type:·ignore[arg-type]</span> |
500 | <span·class="g·g-Whitespace">····</span><span·class="mi">521</span>·<span·class="n">log</span><span·class="o">.</span><span·class="n">debug</span><span·class="p">(</span><span·class="s2">"Incremented·Retry·for·(url='</span><span·class="si">%s</span><span·class="s2">'):·</span><span·class="si">%r</span><span·class="s2">"</span><span·class="p">,</span>·<span·class="n">url</span><span·class="p">,</span>·<span·class="n">new_retry</span><span·class="p">)</span> | 500 | <span·class="g·g-Whitespace">····</span><span·class="mi">521</span>·<span·class="n">log</span><span·class="o">.</span><span·class="n">debug</span><span·class="p">(</span><span·class="s2">"Incremented·Retry·for·(url='</span><span·class="si">%s</span><span·class="s2">'):·</span><span·class="si">%r</span><span·class="s2">"</span><span·class="p">,</span>·<span·class="n">url</span><span·class="p">,</span>·<span·class="n">new_retry</span><span·class="p">)</span> |
501 | <span·class="ne">MaxRetryError</span>:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 501 | <span·class="ne">MaxRetryError</span>:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe74e0be0>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution)")) |
502 | <span·class="n">During</span>·<span·class="n">handling</span>·<span·class="n">of</span>·<span·class="n">the</span>·<span·class="n">above</span>·<span·class="n">exception</span><span·class="p">,</span>·<span·class="n">another</span>·<span·class="n">exception</span>·<span·class="n">occurred</span><span·class="p">:</span> | 502 | <span·class="n">During</span>·<span·class="n">handling</span>·<span·class="n">of</span>·<span·class="n">the</span>·<span·class="n">above</span>·<span·class="n">exception</span><span·class="p">,</span>·<span·class="n">another</span>·<span·class="n">exception</span>·<span·class="n">occurred</span><span·class="p">:</span> |
503 | <span·class="ne">ConnectionError</span><span·class="g·g-Whitespace">···························</span>Traceback·(most·recent·call·last) | 503 | <span·class="ne">ConnectionError</span><span·class="g·g-Whitespace">···························</span>Traceback·(most·recent·call·last) |
504 | <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">7</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span> | 504 | <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">7</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span> |
505 | <span·class="ne">---->·</span><span·class="mi">1</span>·<span·class="n">da</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)[</span><span·class="s2">"air"</span><span·class="p">]</span> | 505 | <span·class="ne">---->·</span><span·class="mi">1</span>·<span·class="n">da</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)[</span><span·class="s2">"air"</span><span·class="p">]</span> |
Offset 582, 15 lines modified | Offset 582, 15 lines modified | ||
582 | <span·class="g·g-Whitespace">····</span><span·class="mi">696</span>·····<span·class="k">if</span>·<span·class="nb">isinstance</span><span·class="p">(</span><span·class="n">e</span><span·class="o">.</span><span·class="n">reason</span><span·class="p">,</span>·<span·class="n">_SSLError</span><span·class="p">):</span> | 582 | <span·class="g·g-Whitespace">····</span><span·class="mi">696</span>·····<span·class="k">if</span>·<span·class="nb">isinstance</span><span·class="p">(</span><span·class="n">e</span><span·class="o">.</span><span·class="n">reason</span><span·class="p">,</span>·<span·class="n">_SSLError</span><span·class="p">):</span> |
583 | <span·class="g·g-Whitespace">····</span><span·class="mi">697</span>·········<span·class="c1">#·This·branch·is·for·urllib3·v1.22·and·later.</span> | 583 | <span·class="g·g-Whitespace">····</span><span·class="mi">697</span>·········<span·class="c1">#·This·branch·is·for·urllib3·v1.22·and·later.</span> |
584 | <span·class="g·g-Whitespace">····</span><span·class="mi">698</span>·········<span·class="k">raise</span>·<span·class="n">SSLError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> | 584 | <span·class="g·g-Whitespace">····</span><span·class="mi">698</span>·········<span·class="k">raise</span>·<span·class="n">SSLError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> |
585 | <span·class="ne">-->·</span><span·class="mi">700</span>·····<span·class="k">raise</span>·<span·class="ne">ConnectionError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> | 585 | <span·class="ne">-->·</span><span·class="mi">700</span>·····<span·class="k">raise</span>·<span·class="ne">ConnectionError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> |
586 | <span·class="g·g-Whitespace">····</span><span·class="mi">702</span>·<span·class="k">except</span>·<span·class="n">ClosedPoolError</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> | 586 | <span·class="g·g-Whitespace">····</span><span·class="mi">702</span>·<span·class="k">except</span>·<span·class="n">ClosedPoolError</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> |
587 | <span·class="g·g-Whitespace">····</span><span·class="mi">703</span>·····<span·class="k">raise</span>·<span·class="ne">ConnectionError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> | 587 | <span·class="g·g-Whitespace">····</span><span·class="mi">703</span>·····<span·class="k">raise</span>·<span·class="ne">ConnectionError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> |
588 | <span·class="ne">ConnectionError</span>:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 588 | <span·class="ne">ConnectionError</span>:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe74e0be0>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution)")) |
589 | <span·class="gp">In·[8]:·</span><span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span> | 589 | <span·class="gp">In·[8]:·</span><span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span> |
590 | <span·class="gt">---------------------------------------------------------------------------</span> | 590 | <span·class="gt">---------------------------------------------------------------------------</span> |
591 | <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last) | 591 | <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last) |
592 | <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">8</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span> | 592 | <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">8</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span> |
593 | <span·class="ne">---->·</span><span·class="mi">1</span>·<span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span> | 593 | <span·class="ne">---->·</span><span·class="mi">1</span>·<span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span> |
Offset 184, 15 lines modified | Offset 184, 15 lines modified | ||
184 | File·/usr/lib/python3/dist-packages/urllib3/connection.py:205,·in | 184 | File·/usr/lib/python3/dist-packages/urllib3/connection.py:205,·in |
185 | HTTPConnection._new_conn(self) | 185 | HTTPConnection._new_conn(self) |
186 | ····204·except·socket.gaierror·as·e: | 186 | ····204·except·socket.gaierror·as·e: |
187 | -->·205·····raise·NameResolutionError(self.host,·self,·e)·from·e | 187 | -->·205·····raise·NameResolutionError(self.host,·self,·e)·from·e |
188 | ····206·except·SocketTimeout·as·e: | 188 | ····206·except·SocketTimeout·as·e: |
189 | NameResolutionError:·<urllib3.connection.HTTPSConnection·object·at·0x | 189 | NameResolutionError:·<urllib3.connection.HTTPSConnection·object·at·0xe76d4c90>: |
190 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 190 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
191 | resolution) | 191 | resolution) |
192 | The·above·exception·was·the·direct·cause·of·the·following·exception: | 192 | The·above·exception·was·the·direct·cause·of·the·following·exception: |
193 | MaxRetryError·····························Traceback·(most·recent·call·last) | 193 | MaxRetryError·····························Traceback·(most·recent·call·last) |
194 | File·/usr/lib/python3/dist-packages/requests/adapters.py:667,·in | 194 | File·/usr/lib/python3/dist-packages/requests/adapters.py:667,·in |
Offset 228, 15 lines modified | Offset 228, 15 lines modified | ||
228 | ····518·····reason·=·error·or·ResponseError(cause) | 228 | ····518·····reason·=·error·or·ResponseError(cause) |
229 | -->·519·····raise·MaxRetryError(_pool,·url,·reason)·from·reason··#·type:·ignore | 229 | -->·519·····raise·MaxRetryError(_pool,·url,·reason)·from·reason··#·type:·ignore |
230 | [arg-type] | 230 | [arg-type] |
231 | ····521·log.debug("Incremented·Retry·for·(url='%s'):·%r",·url,·new_retry) | 231 | ····521·log.debug("Incremented·Retry·for·(url='%s'):·%r",·url,·new_retry) |
232 | MaxRetryError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 232 | MaxRetryError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
233 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by | 233 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by |
234 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 234 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe76d4c90>: |
235 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 235 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
236 | resolution)")) | 236 | resolution)")) |
237 | During·handling·of·the·above·exception,·another·exception·occurred: | 237 | During·handling·of·the·above·exception,·another·exception·occurred: |
238 | ConnectionError···························Traceback·(most·recent·call·last) | 238 | ConnectionError···························Traceback·(most·recent·call·last) |
239 | Cell·In[1],·line·1 | 239 | Cell·In[1],·line·1 |
Offset 332, 15 lines modified | Offset 332, 15 lines modified | ||
332 | ····698·········raise·SSLError(e,·request=request) | 332 | ····698·········raise·SSLError(e,·request=request) |
333 | -->·700·····raise·ConnectionError(e,·request=request) | 333 | -->·700·····raise·ConnectionError(e,·request=request) |
334 | ····702·except·ClosedPoolError·as·e: | 334 | ····702·except·ClosedPoolError·as·e: |
335 | ····703·····raise·ConnectionError(e,·request=request) | 335 | ····703·····raise·ConnectionError(e,·request=request) |
336 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 336 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
337 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by | 337 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by |
338 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 338 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe76d4c90>: |
339 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 339 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
340 | resolution)")) | 340 | resolution)")) |
341 | In·[2]:·var·=·da.variable | 341 | In·[2]:·var·=·da.variable |
342 | --------------------------------------------------------------------------- | 342 | --------------------------------------------------------------------------- |
343 | AttributeError····························Traceback·(most·recent·call·last) | 343 | AttributeError····························Traceback·(most·recent·call·last) |
344 | Cell·In[2],·line·1 | 344 | Cell·In[2],·line·1 |
Offset 459, 15 lines modified | Offset 459, 15 lines modified | ||
459 | File·/usr/lib/python3/dist-packages/urllib3/connection.py:205,·in | 459 | File·/usr/lib/python3/dist-packages/urllib3/connection.py:205,·in |
460 | HTTPConnection._new_conn(self) | 460 | HTTPConnection._new_conn(self) |
461 | ····204·except·socket.gaierror·as·e: | 461 | ····204·except·socket.gaierror·as·e: |
462 | -->·205·····raise·NameResolutionError(self.host,·self,·e)·from·e | 462 | -->·205·····raise·NameResolutionError(self.host,·self,·e)·from·e |
463 | ····206·except·SocketTimeout·as·e: | 463 | ····206·except·SocketTimeout·as·e: |
464 | NameResolutionError:·<urllib3.connection.HTTPSConnection·object·at·0x | 464 | NameResolutionError:·<urllib3.connection.HTTPSConnection·object·at·0xe74e0be0>: |
465 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 465 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
466 | resolution) | 466 | resolution) |
467 | The·above·exception·was·the·direct·cause·of·the·following·exception: | 467 | The·above·exception·was·the·direct·cause·of·the·following·exception: |
468 | MaxRetryError·····························Traceback·(most·recent·call·last) | 468 | MaxRetryError·····························Traceback·(most·recent·call·last) |
469 | File·/usr/lib/python3/dist-packages/requests/adapters.py:667,·in | 469 | File·/usr/lib/python3/dist-packages/requests/adapters.py:667,·in |
Offset 503, 15 lines modified | Offset 503, 15 lines modified | ||
503 | ····518·····reason·=·error·or·ResponseError(cause) | 503 | ····518·····reason·=·error·or·ResponseError(cause) |
504 | -->·519·····raise·MaxRetryError(_pool,·url,·reason)·from·reason··#·type:·ignore | 504 | -->·519·····raise·MaxRetryError(_pool,·url,·reason)·from·reason··#·type:·ignore |
505 | [arg-type] | 505 | [arg-type] |
506 | ····521·log.debug("Incremented·Retry·for·(url='%s'):·%r",·url,·new_retry) | 506 | ····521·log.debug("Incremented·Retry·for·(url='%s'):·%r",·url,·new_retry) |
507 | MaxRetryError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 507 | MaxRetryError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
508 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by | 508 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by |
509 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 509 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe74e0be0>: |
510 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 510 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
511 | resolution)")) | 511 | resolution)")) |
512 | During·handling·of·the·above·exception,·another·exception·occurred: | 512 | During·handling·of·the·above·exception,·another·exception·occurred: |
513 | ConnectionError···························Traceback·(most·recent·call·last) | 513 | ConnectionError···························Traceback·(most·recent·call·last) |
514 | Cell·In[7],·line·1 | 514 | Cell·In[7],·line·1 |
Offset 607, 15 lines modified | Offset 607, 15 lines modified | ||
607 | ····698·········raise·SSLError(e,·request=request) | 607 | ····698·········raise·SSLError(e,·request=request) |
608 | -->·700·····raise·ConnectionError(e,·request=request) | 608 | -->·700·····raise·ConnectionError(e,·request=request) |
609 | ····702·except·ClosedPoolError·as·e: | 609 | ····702·except·ClosedPoolError·as·e: |
610 | ····703·····raise·ConnectionError(e,·request=request) | 610 | ····703·····raise·ConnectionError(e,·request=request) |
611 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 611 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
612 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by | 612 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by |
613 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 613 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe74e0be0>: |
614 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 614 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
615 | resolution)")) | 615 | resolution)")) |
616 | In·[8]:·var·=·da.variable | 616 | In·[8]:·var·=·da.variable |
617 | --------------------------------------------------------------------------- | 617 | --------------------------------------------------------------------------- |
618 | AttributeError····························Traceback·(most·recent·call·last) | 618 | AttributeError····························Traceback·(most·recent·call·last) |
619 | Cell·In[8],·line·1 | 619 | Cell·In[8],·line·1 |
Offset 167, 15 lines modified | Offset 167, 15 lines modified | ||
167 | <span·class="g·g-Whitespace">····</span><span·class="mi">705</span>·<span·class="n">server_hostname</span><span·class="p">:</span>·<span·class="nb">str</span>·<span·class="o">=</span>·<span·class="bp">self</span><span·class="o">.</span><span·class="n">host</span> | 167 | <span·class="g·g-Whitespace">····</span><span·class="mi">705</span>·<span·class="n">server_hostname</span><span·class="p">:</span>·<span·class="nb">str</span>·<span·class="o">=</span>·<span·class="bp">self</span><span·class="o">.</span><span·class="n">host</span> |
168 | <span·class="nn">File·/usr/lib/python3/dist-packages/urllib3/connection.py:205,</span>·in·<span·class="ni">HTTPConnection._new_conn</span><span·class="nt">(self)</span> | 168 | <span·class="nn">File·/usr/lib/python3/dist-packages/urllib3/connection.py:205,</span>·in·<span·class="ni">HTTPConnection._new_conn</span><span·class="nt">(self)</span> |
169 | <span·class="g·g-Whitespace">····</span><span·class="mi">204</span>·<span·class="k">except</span>·<span·class="n">socket</span><span·class="o">.</span><span·class="n">gaierror</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> | 169 | <span·class="g·g-Whitespace">····</span><span·class="mi">204</span>·<span·class="k">except</span>·<span·class="n">socket</span><span·class="o">.</span><span·class="n">gaierror</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> |
170 | <span·class="ne">-->·</span><span·class="mi">205</span>·····<span·class="k">raise</span>·<span·class="n">NameResolutionError</span><span·class="p">(</span><span·class="bp">self</span><span·class="o">.</span><span·class="n">host</span><span·class="p">,</span>·<span·class="bp">self</span><span·class="p">,</span>·<span·class="n">e</span><span·class="p">)</span>·<span·class="kn">from</span>·<span·class="nn">e</span> | 170 | <span·class="ne">-->·</span><span·class="mi">205</span>·····<span·class="k">raise</span>·<span·class="n">NameResolutionError</span><span·class="p">(</span><span·class="bp">self</span><span·class="o">.</span><span·class="n">host</span><span·class="p">,</span>·<span·class="bp">self</span><span·class="p">,</span>·<span·class="n">e</span><span·class="p">)</span>·<span·class="kn">from</span>·<span·class="nn">e</span> |
171 | <span·class="g·g-Whitespace">····</span><span·class="mi">206</span>·<span·class="k">except</span>·<span·class="n">SocketTimeout</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> | 171 | <span·class="g·g-Whitespace">····</span><span·class="mi">206</span>·<span·class="k">except</span>·<span·class="n">SocketTimeout</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> |
172 | <span·class="ne">NameResolutionError</span>:·<urllib3.connection.HTTPSConnection·object·at·0x | 172 | <span·class="ne">NameResolutionError</span>:·<urllib3.connection.HTTPSConnection·object·at·0xe6563190>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution) |
173 | <span·class="n">The</span>·<span·class="n">above</span>·<span·class="n">exception</span>·<span·class="n">was</span>·<span·class="n">the</span>·<span·class="n">direct</span>·<span·class="n">cause</span>·<span·class="n">of</span>·<span·class="n">the</span>·<span·class="n">following</span>·<span·class="n">exception</span><span·class="p">:</span> | 173 | <span·class="n">The</span>·<span·class="n">above</span>·<span·class="n">exception</span>·<span·class="n">was</span>·<span·class="n">the</span>·<span·class="n">direct</span>·<span·class="n">cause</span>·<span·class="n">of</span>·<span·class="n">the</span>·<span·class="n">following</span>·<span·class="n">exception</span><span·class="p">:</span> |
174 | <span·class="ne">MaxRetryError</span><span·class="g·g-Whitespace">·····························</span>Traceback·(most·recent·call·last) | 174 | <span·class="ne">MaxRetryError</span><span·class="g·g-Whitespace">·····························</span>Traceback·(most·recent·call·last) |
175 | <span·class="nn">File·/usr/lib/python3/dist-packages/requests/adapters.py:667,</span>·in·<span·class="ni">HTTPAdapter.send</span><span·class="nt">(self,·request,·stream,·timeout,·verify,·cert,·proxies)</span> | 175 | <span·class="nn">File·/usr/lib/python3/dist-packages/requests/adapters.py:667,</span>·in·<span·class="ni">HTTPAdapter.send</span><span·class="nt">(self,·request,·stream,·timeout,·verify,·cert,·proxies)</span> |
176 | <span·class="g·g-Whitespace">····</span><span·class="mi">666</span>·<span·class="k">try</span><span·class="p">:</span> | 176 | <span·class="g·g-Whitespace">····</span><span·class="mi">666</span>·<span·class="k">try</span><span·class="p">:</span> |
177 | <span·class="ne">-->·</span><span·class="mi">667</span>·····<span·class="n">resp</span>·<span·class="o">=</span>·<span·class="n">conn</span><span·class="o">.</span><span·class="n">urlopen</span><span·class="p">(</span> | 177 | <span·class="ne">-->·</span><span·class="mi">667</span>·····<span·class="n">resp</span>·<span·class="o">=</span>·<span·class="n">conn</span><span·class="o">.</span><span·class="n">urlopen</span><span·class="p">(</span> |
Offset 201, 15 lines modified | Offset 201, 15 lines modified | ||
201 | <span·class="g·g-Whitespace">····</span><span·class="mi">844</span>·<span·class="n">retries</span><span·class="o">.</span><span·class="n">sleep</span><span·class="p">()</span> | 201 | <span·class="g·g-Whitespace">····</span><span·class="mi">844</span>·<span·class="n">retries</span><span·class="o">.</span><span·class="n">sleep</span><span·class="p">()</span> |
202 | <span·class="nn">File·/usr/lib/python3/dist-packages/urllib3/util/retry.py:519,</span>·in·<span·class="ni">Retry.increment</span><span·class="nt">(self,·method,·url,·response,·error,·_pool,·_stacktrace)</span> | 202 | <span·class="nn">File·/usr/lib/python3/dist-packages/urllib3/util/retry.py:519,</span>·in·<span·class="ni">Retry.increment</span><span·class="nt">(self,·method,·url,·response,·error,·_pool,·_stacktrace)</span> |
203 | <span·class="g·g-Whitespace">····</span><span·class="mi">518</span>·····<span·class="n">reason</span>·<span·class="o">=</span>·<span·class="n">error</span>·<span·class="ow">or</span>·<span·class="n">ResponseError</span><span·class="p">(</span><span·class="n">cause</span><span·class="p">)</span> | 203 | <span·class="g·g-Whitespace">····</span><span·class="mi">518</span>·····<span·class="n">reason</span>·<span·class="o">=</span>·<span·class="n">error</span>·<span·class="ow">or</span>·<span·class="n">ResponseError</span><span·class="p">(</span><span·class="n">cause</span><span·class="p">)</span> |
204 | <span·class="ne">-->·</span><span·class="mi">519</span>·····<span·class="k">raise</span>·<span·class="n">MaxRetryError</span><span·class="p">(</span><span·class="n">_pool</span><span·class="p">,</span>·<span·class="n">url</span><span·class="p">,</span>·<span·class="n">reason</span><span·class="p">)</span>·<span·class="kn">from</span>·<span·class="nn">reason</span>··<span·class="c1">#·type:·ignore[arg-type]</span> | 204 | <span·class="ne">-->·</span><span·class="mi">519</span>·····<span·class="k">raise</span>·<span·class="n">MaxRetryError</span><span·class="p">(</span><span·class="n">_pool</span><span·class="p">,</span>·<span·class="n">url</span><span·class="p">,</span>·<span·class="n">reason</span><span·class="p">)</span>·<span·class="kn">from</span>·<span·class="nn">reason</span>··<span·class="c1">#·type:·ignore[arg-type]</span> |
205 | <span·class="g·g-Whitespace">····</span><span·class="mi">521</span>·<span·class="n">log</span><span·class="o">.</span><span·class="n">debug</span><span·class="p">(</span><span·class="s2">"Incremented·Retry·for·(url='</span><span·class="si">%s</span><span·class="s2">'):·</span><span·class="si">%r</span><span·class="s2">"</span><span·class="p">,</span>·<span·class="n">url</span><span·class="p">,</span>·<span·class="n">new_retry</span><span·class="p">)</span> | 205 | <span·class="g·g-Whitespace">····</span><span·class="mi">521</span>·<span·class="n">log</span><span·class="o">.</span><span·class="n">debug</span><span·class="p">(</span><span·class="s2">"Incremented·Retry·for·(url='</span><span·class="si">%s</span><span·class="s2">'):·</span><span·class="si">%r</span><span·class="s2">"</span><span·class="p">,</span>·<span·class="n">url</span><span·class="p">,</span>·<span·class="n">new_retry</span><span·class="p">)</span> |
206 | <span·class="ne">MaxRetryError</span>:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/rasm.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 206 | <span·class="ne">MaxRetryError</span>:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/rasm.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe6563190>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution)")) |
207 | <span·class="n">During</span>·<span·class="n">handling</span>·<span·class="n">of</span>·<span·class="n">the</span>·<span·class="n">above</span>·<span·class="n">exception</span><span·class="p">,</span>·<span·class="n">another</span>·<span·class="n">exception</span>·<span·class="n">occurred</span><span·class="p">:</span> | 207 | <span·class="n">During</span>·<span·class="n">handling</span>·<span·class="n">of</span>·<span·class="n">the</span>·<span·class="n">above</span>·<span·class="n">exception</span><span·class="p">,</span>·<span·class="n">another</span>·<span·class="n">exception</span>·<span·class="n">occurred</span><span·class="p">:</span> |
208 | <span·class="ne">ConnectionError</span><span·class="g·g-Whitespace">···························</span>Traceback·(most·recent·call·last) | 208 | <span·class="ne">ConnectionError</span><span·class="g·g-Whitespace">···························</span>Traceback·(most·recent·call·last) |
209 | <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">4</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span> | 209 | <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">4</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span> |
210 | <span·class="ne">---->·</span><span·class="mi">1</span>·<span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">load_dataset</span><span·class="p">(</span><span·class="s2">"rasm"</span><span·class="p">)</span> | 210 | <span·class="ne">---->·</span><span·class="mi">1</span>·<span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">load_dataset</span><span·class="p">(</span><span·class="s2">"rasm"</span><span·class="p">)</span> |
Offset 298, 18 lines modified | Offset 298, 18 lines modified | ||
298 | <span·class="g·g-Whitespace">····</span><span·class="mi">696</span>·····<span·class="k">if</span>·<span·class="nb">isinstance</span><span·class="p">(</span><span·class="n">e</span><span·class="o">.</span><span·class="n">reason</span><span·class="p">,</span>·<span·class="n">_SSLError</span><span·class="p">):</span> | 298 | <span·class="g·g-Whitespace">····</span><span·class="mi">696</span>·····<span·class="k">if</span>·<span·class="nb">isinstance</span><span·class="p">(</span><span·class="n">e</span><span·class="o">.</span><span·class="n">reason</span><span·class="p">,</span>·<span·class="n">_SSLError</span><span·class="p">):</span> |
299 | <span·class="g·g-Whitespace">····</span><span·class="mi">697</span>·········<span·class="c1">#·This·branch·is·for·urllib3·v1.22·and·later.</span> | 299 | <span·class="g·g-Whitespace">····</span><span·class="mi">697</span>·········<span·class="c1">#·This·branch·is·for·urllib3·v1.22·and·later.</span> |
300 | <span·class="g·g-Whitespace">····</span><span·class="mi">698</span>·········<span·class="k">raise</span>·<span·class="n">SSLError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> | 300 | <span·class="g·g-Whitespace">····</span><span·class="mi">698</span>·········<span·class="k">raise</span>·<span·class="n">SSLError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> |
301 | <span·class="ne">-->·</span><span·class="mi">700</span>·····<span·class="k">raise</span>·<span·class="ne">ConnectionError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> | 301 | <span·class="ne">-->·</span><span·class="mi">700</span>·····<span·class="k">raise</span>·<span·class="ne">ConnectionError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> |
302 | <span·class="g·g-Whitespace">····</span><span·class="mi">702</span>·<span·class="k">except</span>·<span·class="n">ClosedPoolError</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> | 302 | <span·class="g·g-Whitespace">····</span><span·class="mi">702</span>·<span·class="k">except</span>·<span·class="n">ClosedPoolError</span>·<span·class="k">as</span>·<span·class="n">e</span><span·class="p">:</span> |
303 | <span·class="g·g-Whitespace">····</span><span·class="mi">703</span>·····<span·class="k">raise</span>·<span·class="ne">ConnectionError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> | 303 | <span·class="g·g-Whitespace">····</span><span·class="mi">703</span>·····<span·class="k">raise</span>·<span·class="ne">ConnectionError</span><span·class="p">(</span><span·class="n">e</span><span·class="p">,</span>·<span·class="n">request</span><span·class="o">=</span><span·class="n">request</span><span·class="p">)</span> |
304 | <span·class="ne">ConnectionError</span>:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/rasm.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 304 | <span·class="ne">ConnectionError</span>:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/rasm.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe6563190>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution)")) |
305 | <span·class="gp">In·[5]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">"rasm.zarr"</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> | 305 | <span·class="gp">In·[5]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">"rasm.zarr"</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> |
306 | <span·class="gh">Out[5]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 306 | <span·class="gh">Out[5]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe937d6e8></span> |
307 | <span·class="gp">In·[6]:·</span><span·class="n">zgroup</span>·<span·class="o">=</span>·<span·class="n">zarr</span><span·class="o">.</span><span·class="n">open</span><span·class="p">(</span><span·class="s2">"rasm.zarr"</span><span·class="p">)</span> | 307 | <span·class="gp">In·[6]:·</span><span·class="n">zgroup</span>·<span·class="o">=</span>·<span·class="n">zarr</span><span·class="o">.</span><span·class="n">open</span><span·class="p">(</span><span·class="s2">"rasm.zarr"</span><span·class="p">)</span> |
308 | <span·class="gp">In·[7]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">os</span><span·class="o">.</span><span·class="n">listdir</span><span·class="p">(</span><span·class="s2">"rasm.zarr"</span><span·class="p">))</span> | 308 | <span·class="gp">In·[7]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">os</span><span·class="o">.</span><span·class="n">listdir</span><span·class="p">(</span><span·class="s2">"rasm.zarr"</span><span·class="p">))</span> |
309 | <span·class="go">['time',·'zarr.json']</span> | 309 | <span·class="go">['time',·'zarr.json']</span> |
310 | <span·class="gp">In·[8]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">zgroup</span><span·class="o">.</span><span·class="n">tree</span><span·class="p">())</span> | 310 | <span·class="gp">In·[8]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">zgroup</span><span·class="o">.</span><span·class="n">tree</span><span·class="p">())</span> |
Offset 123, 15 lines modified | Offset 123, 15 lines modified | ||
123 | File·/usr/lib/python3/dist-packages/urllib3/connection.py:205,·in | 123 | File·/usr/lib/python3/dist-packages/urllib3/connection.py:205,·in |
124 | HTTPConnection._new_conn(self) | 124 | HTTPConnection._new_conn(self) |
125 | ····204·except·socket.gaierror·as·e: | 125 | ····204·except·socket.gaierror·as·e: |
126 | -->·205·····raise·NameResolutionError(self.host,·self,·e)·from·e | 126 | -->·205·····raise·NameResolutionError(self.host,·self,·e)·from·e |
127 | ····206·except·SocketTimeout·as·e: | 127 | ····206·except·SocketTimeout·as·e: |
128 | NameResolutionError:·<urllib3.connection.HTTPSConnection·object·at·0x | 128 | NameResolutionError:·<urllib3.connection.HTTPSConnection·object·at·0xe6563190>: |
129 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 129 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
130 | resolution) | 130 | resolution) |
131 | The·above·exception·was·the·direct·cause·of·the·following·exception: | 131 | The·above·exception·was·the·direct·cause·of·the·following·exception: |
132 | MaxRetryError·····························Traceback·(most·recent·call·last) | 132 | MaxRetryError·····························Traceback·(most·recent·call·last) |
133 | File·/usr/lib/python3/dist-packages/requests/adapters.py:667,·in | 133 | File·/usr/lib/python3/dist-packages/requests/adapters.py:667,·in |
Offset 167, 15 lines modified | Offset 167, 15 lines modified | ||
167 | ····518·····reason·=·error·or·ResponseError(cause) | 167 | ····518·····reason·=·error·or·ResponseError(cause) |
168 | -->·519·····raise·MaxRetryError(_pool,·url,·reason)·from·reason··#·type:·ignore | 168 | -->·519·····raise·MaxRetryError(_pool,·url,·reason)·from·reason··#·type:·ignore |
169 | [arg-type] | 169 | [arg-type] |
170 | ····521·log.debug("Incremented·Retry·for·(url='%s'):·%r",·url,·new_retry) | 170 | ····521·log.debug("Incremented·Retry·for·(url='%s'):·%r",·url,·new_retry) |
171 | MaxRetryError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 171 | MaxRetryError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
172 | exceeded·with·url:·/pydata/xarray-data/raw/master/rasm.nc·(Caused·by | 172 | exceeded·with·url:·/pydata/xarray-data/raw/master/rasm.nc·(Caused·by |
173 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 173 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe6563190>: |
174 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 174 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
175 | resolution)")) | 175 | resolution)")) |
176 | During·handling·of·the·above·exception,·another·exception·occurred: | 176 | During·handling·of·the·above·exception,·another·exception·occurred: |
177 | ConnectionError···························Traceback·(most·recent·call·last) | 177 | ConnectionError···························Traceback·(most·recent·call·last) |
178 | Cell·In[4],·line·1 | 178 | Cell·In[4],·line·1 |
Offset 284, 20 lines modified | Offset 284, 20 lines modified | ||
284 | ····698·········raise·SSLError(e,·request=request) | 284 | ····698·········raise·SSLError(e,·request=request) |
285 | -->·700·····raise·ConnectionError(e,·request=request) | 285 | -->·700·····raise·ConnectionError(e,·request=request) |
286 | ····702·except·ClosedPoolError·as·e: | 286 | ····702·except·ClosedPoolError·as·e: |
287 | ····703·····raise·ConnectionError(e,·request=request) | 287 | ····703·····raise·ConnectionError(e,·request=request) |
288 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 288 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
289 | exceeded·with·url:·/pydata/xarray-data/raw/master/rasm.nc·(Caused·by | 289 | exceeded·with·url:·/pydata/xarray-data/raw/master/rasm.nc·(Caused·by |
290 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 290 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe6563190>: |
291 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 291 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
292 | resolution)")) | 292 | resolution)")) |
293 | In·[5]:·ds.to_zarr("rasm.zarr",·mode="w") | 293 | In·[5]:·ds.to_zarr("rasm.zarr",·mode="w") |
294 | Out[5]:·<xarray.backends.zarr.ZarrStore·at·0x | 294 | Out[5]:·<xarray.backends.zarr.ZarrStore·at·0xe937d6e8> |
295 | In·[6]:·zgroup·=·zarr.open("rasm.zarr") | 295 | In·[6]:·zgroup·=·zarr.open("rasm.zarr") |
296 | In·[7]:·print(os.listdir("rasm.zarr")) | 296 | In·[7]:·print(os.listdir("rasm.zarr")) |
297 | ['time',·'zarr.json'] | 297 | ['time',·'zarr.json'] |
298 | In·[8]:·print(zgroup.tree()) | 298 | In·[8]:·print(zgroup.tree()) |
Offset 2436, 54 lines modified | Offset 2436, 53 lines modified | ||
2436 | ········"00010301":·54, | 2436 | ········"00010301":·54, |
2437 | ········"0002":·[32,·54], | 2437 | ········"0002":·[32,·54], |
2438 | ········"00021001":·54, | 2438 | ········"00021001":·54, |
2439 | ········"00021101":·54, | 2439 | ········"00021101":·54, |
2440 | ········"00021201":·54, | 2440 | ········"00021201":·54, |
2441 | ········"000e":·[49,·52], | 2441 | ········"000e":·[49,·52], |
2442 | ········"000j":·52, | 2442 | ········"000j":·52, |
2443 | ········"001":· | 2443 | ········"001":·32, |
2444 | ········"001901901":·32, | 2444 | ········"001901901":·32, |
2445 | ········"001e":·38, | 2445 | ········"001e":·38, |
2446 | ········"001j":·52, | 2446 | ········"001j":·52, |
2447 | ········"003000":·32, | 2447 | ········"003000":·32, |
2448 | ········"005":·52, | ||
2449 | ········"005036":·41, | 2448 | ········"005036":·41, |
2450 | ········"005e":·38, | 2449 | ········"005e":·38, |
2450 | ········"005j":·52, | ||
2451 | ········"00688889":·37, | 2451 | ········"00688889":·37, |
2452 | ········"006e":·38, | 2452 | ········"006e":·38, |
2453 | ········"007":·52, | 2453 | ········"007":·52, |
2454 | ········"007e":·52, | 2454 | ········"007e":·52, |
2455 | ········"00914929":·37, | 2455 | ········"00914929":·37, |
2456 | ········"00941742":·37, | 2456 | ········"00941742":·37, |
2457 | ········"00968205":·37, | 2457 | ········"00968205":·37, |
2458 | ········"00973567":·37, | 2458 | ········"00973567":·37, |
2459 | ········"00j":·52, | ||
2459 | ········"01":·[14,·16,·20,·32,·38,·39,·42,·44,·45,·46,·48,·49,·53,·54], | 2460 | ········"01":·[14,·16,·20,·32,·38,·39,·42,·44,·45,·46,·48,·49,·53,·54], |
2460 | ········"01082401":·37, | 2461 | ········"01082401":·37, |
2461 | ········"01183847":·37, | 2462 | ········"01183847":·37, |
2462 | ········"012":·52, | ||
2463 | ········"015":·52, | ||
2464 | ········"016":·52, | 2463 | ········"016":·52, |
2465 | ········"01636376":·37, | 2464 | ········"01636376":·37, |
2466 | ········"01652688":·37, | 2465 | ········"01652688":·37, |
2467 | ········"01652764":·37, | 2466 | ········"01652764":·37, |
2468 | ········"0165891":·37, | 2467 | ········"0165891":·37, |
2469 | ········"01670071":·37, | 2468 | ········"01670071":·37, |
2470 | ········"01670121":·37, | 2469 | ········"01670121":·37, |
2471 | ········"01671269":·37, | 2470 | ········"01671269":·37, |
2472 | ········"01671847":·37, | 2471 | ········"01671847":·37, |
2473 | ········"01672":·37, | 2472 | ········"01672":·37, |
2474 | ········"016j":·52, | ||
2475 | ········"017":·44, | 2473 | ········"017":·44, |
2476 | ········"01806694":·37, | 2474 | ········"01806694":·37, |
2477 | ········"01814439":·37, | 2475 | ········"01814439":·37, |
2478 | ········"0182217":·37, | 2476 | ········"0182217":·37, |
2479 | ········"018e":·38, | 2477 | ········"018e":·38, |
2480 | ········"019":·41, | 2478 | ········"019":·41, |
2481 | ········"01906":·49, | 2479 | ········"01906":·49, |
2482 | ········"019e":·38, | 2480 | ········"019e":·38, |
2481 | ········"01j":·52, | ||
2483 | ········"01t00":·[32,·38,·39,·53,·55], | 2482 | ········"01t00":·[32,·38,·39,·53,·55], |
2484 | ········"01t01":·32, | 2483 | ········"01t01":·32, |
2485 | ········"01t03":·[32,·53], | 2484 | ········"01t03":·[32,·53], |
2486 | ········"01t04":·32, | 2485 | ········"01t04":·32, |
2487 | ········"01t06":·32, | 2486 | ········"01t06":·32, |
2488 | ········"01t12":·[32,·53], | 2487 | ········"01t12":·[32,·53], |
2489 | ········"01t18":·32, | 2488 | ········"01t18":·32, |
Offset 2491, 14 lines modified | Offset 2490, 15 lines modified | ||
2491 | ········"020e":·38, | 2490 | ········"020e":·38, |
2492 | ········"021e":·[38,·46], | 2491 | ········"021e":·[38,·46], |
2493 | ········"023e":·38, | 2492 | ········"023e":·38, |
2494 | ········"024e":·[38,·46], | 2493 | ········"024e":·[38,·46], |
2495 | ········"026e":·38, | 2494 | ········"026e":·38, |
2496 | ········"02756784":·19, | 2495 | ········"02756784":·19, |
2497 | ········"029e":·49, | 2496 | ········"029e":·49, |
2497 | ········"02j":·52, | ||
2498 | ········"02t00":·[32,·38,·39], | 2498 | ········"02t00":·[32,·38,·39], |
2499 | ········"03":·[6,·26,·30,·32,·33,·38,·44,·45,·46,·49,·53,·54], | 2499 | ········"03":·[6,·26,·30,·32,·33,·38,·44,·45,·46,·49,·53,·54], |
2500 | ········"03047":·49, | 2500 | ········"03047":·49, |
2501 | ········"031":·42, | 2501 | ········"031":·42, |
2502 | ········"03333":·45, | 2502 | ········"03333":·45, |
2503 | ········"03343807":·37, | 2503 | ········"03343807":·37, |
2504 | ········"03343845":·37, | 2504 | ········"03343845":·37, |
Offset 2507, 71 lines modified | Offset 2507, 74 lines modified | ||
2507 | ········"035e":·38, | 2507 | ········"035e":·38, |
2508 | ········"03611368":·37, | 2508 | ········"03611368":·37, |
2509 | ········"03626848":·37, | 2509 | ········"03626848":·37, |
2510 | ········"03642301":·37, | 2510 | ········"03642301":·37, |
2511 | ········"036e":·49, | 2511 | ········"036e":·49, |
2512 | ········"0379266750948":·46, | 2512 | ········"0379266750948":·46, |
2513 | ········"037e":·38, | 2513 | ········"037e":·38, |
2514 | ········"038":· | 2514 | ········"038":·44, |
2515 | ········"03835":·42, | 2515 | ········"03835":·42, |
2516 | ········"038j":·52, | 2516 | ········"038j":·52, |
2517 | ········"03957499":·19, | 2517 | ········"03957499":·19, |
2518 | ········"03t00":·[32,·38,·39], | 2518 | ········"03t00":·[32,·38,·39], |
2519 | ········"04":·[19,·32,·37,·38,·39,·42,·44,·48,·53], | 2519 | ········"04":·[19,·32,·37,·38,·39,·42,·44,·48,·53], |
2520 | ········"04096206":·37, | 2520 | ········"04096206":·37, |
2521 | ········"04097352":·37, | 2521 | ········"04097352":·37, |
2522 | ········"040e":·49, | 2522 | ········"040e":·49, |
2523 | ········"0417827":·46, | 2523 | ········"0417827":·46, |
2524 | ········"042e":·38, | 2524 | ········"042e":·38, |
2525 | ········"044":·[36,·48], | 2525 | ········"044":·[36,·48], |
2526 | ········"04423597":·19, | 2526 | ········"04423597":·19, |
2527 | ········"044236":·48, | 2527 | ········"044236":·48, |
2528 | ········"044e":·52, | ||
2528 | ········"04569531":·37, | 2529 | ········"04569531":·37, |
2529 | ········"04703446":·37, | 2530 | ········"04703446":·37, |
2530 | ········"047e":·[38,·49], | 2531 | ········"047e":·[38,·49], |
2531 | ········"04835611":·37, | 2532 | ········"04835611":·37, |
2532 | ········"04862391":·37, | 2533 | ········"04862391":·37, |
2533 | ········"048e":·38, | 2534 | ········"048e":·[38,·52], |
2534 | ········"04t00":·[38,·39], | 2535 | ········"04t00":·[38,·39], |
2535 | ········"05":·[32,·37,·39,·46,·49,·52,·53,·54], | 2536 | ········"05":·[32,·37,·39,·46,·49,·52,·53,·54], |
2537 | ········"053e":·52, | ||
2536 | ········"05405954":·37, | 2538 | ········"05405954":·37, |
2537 | ········"05556":·45, | 2539 | ········"05556":·45, |
2538 | ········"056":·45, | 2540 | ········"056":·45, |
2539 | ········"057e":·38, | 2541 | ········"057e":·38, |
2540 | ········"058e":· | 2542 | ········"058e":·38, |
2541 | ········"05912615":·37, | 2543 | ········"05912615":·37, |
2542 | ········"05j":·52, | 2544 | ········"05j":·52, |
2543 | ········"05t00":·38, | 2545 | ········"05t00":·38, |
2544 | ········"06":·[28,·32,·37,·39,·46,·53], | 2546 | ········"06":·[28,·32,·37,·39,·46,·53], |
2545 | ········"060":·52, | 2547 | ········"060e":·52, |
2546 | ········"061":·44, | 2548 | ········"061":·44, |
2547 | ········"06141":·42, | 2549 | ········"06141":·42, |
2548 | ········"062":·42, | 2550 | ········"062":·42, |
2549 | ········"063":·39, | 2551 | ········"063":·39, |
2550 | ········"06683875":·37, | 2552 | ········"06683875":·37, |
2551 | ········"06683951":·37, | 2553 | ········"06683951":·37, |
2552 | ········"06683976":·37, | 2554 | ········"06683976":·37, |
2553 | ········"06689":·37, | 2555 | ········"06689":·37, |
2554 | ········"066e":·[38,·49], | 2556 | ········"066e":·[38,·49], |
2557 | ········"066j":·52, | ||
2555 | ········"06732":·42, | 2558 | ········"06732":·42, |
2556 | ········"067e":·49, | 2559 | ········"067e":·49, |
Max diff block lines reached; 52267/55569 bytes (94.06%) of diff not shown. |
Offset 731, 18 lines modified | Offset 731, 18 lines modified | ||
731 | a·method·call·with·an·external·function·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">ds.pipe(func)</span></code>)·instead·of | 731 | a·method·call·with·an·external·function·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">ds.pipe(func)</span></code>)·instead·of |
732 | simply·calling·it·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">func(ds)</span></code>).·This·allows·you·to·write·pipelines·for | 732 | simply·calling·it·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">func(ds)</span></code>).·This·allows·you·to·write·pipelines·for |
733 | transforming·your·data·(using·“method·chaining”)·instead·of·writing·hard·to | 733 | transforming·your·data·(using·“method·chaining”)·instead·of·writing·hard·to |
734 | follow·nested·function·calls:</p> | 734 | follow·nested·function·calls:</p> |
735 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow</span> | 735 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow</span> |
736 | <span·class="go">#·entirely·from·left·to·right</span> | 736 | <span·class="go">#·entirely·from·left·to·right</span> |
737 | <span·class="gp">In·[64]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">((</span><span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">temperature</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">loc</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">))</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"instrument"</span><span·class="p">))</span> | 737 | <span·class="gp">In·[64]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">((</span><span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">temperature</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">loc</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">))</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"instrument"</span><span·class="p">))</span> |
738 | <span·class="gh">Out[64]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 738 | <span·class="gh">Out[64]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xe4726450>]</span> |
739 | <span·class="gp">In·[65]:·</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">temperature</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">loc</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span><span·class="o">.</span><span·class="n">pipe</span><span·class="p">(</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">x</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"instrument"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">pipe</span><span·class="p">(</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">))</span> | 739 | <span·class="gp">In·[65]:·</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">temperature</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">loc</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span><span·class="o">.</span><span·class="n">pipe</span><span·class="p">(</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">x</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"instrument"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">pipe</span><span·class="p">(</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">))</span> |
740 | <span·class="gh">Out[65]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 740 | <span·class="gh">Out[65]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xe47263a0>]</span> |
741 | </pre></div> | 741 | </pre></div> |
742 | </div> | 742 | </div> |
743 | <p>Both·<code·class="docutils·literal·notranslate"><span·class="pre">pipe</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">assign</span></code>·replicate·the·pandas·methods·of·the·same·names | 743 | <p>Both·<code·class="docutils·literal·notranslate"><span·class="pre">pipe</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">assign</span></code>·replicate·the·pandas·methods·of·the·same·names |
744 | (<a·class="reference·external"·href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.pipe.html#pandas.DataFrame.pipe"·title="(in·pandas·v2.2.3)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.pipe</span></code></a>·and | 744 | (<a·class="reference·external"·href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.pipe.html#pandas.DataFrame.pipe"·title="(in·pandas·v2.2.3)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.pipe</span></code></a>·and |
745 | <a·class="reference·external"·href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.assign.html#pandas.DataFrame.assign"·title="(in·pandas·v2.2.3)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.assign</span></code></a>).</p> | 745 | <a·class="reference·external"·href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.assign.html#pandas.DataFrame.assign"·title="(in·pandas·v2.2.3)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.assign</span></code></a>).</p> |
746 | <p>With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if | 746 | <p>With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if |
747 | variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead | 747 | variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead |
Offset 585, 19 lines modified | Offset 585, 19 lines modified | ||
585 | There·is·also·the·pipe()·method·that·allows·you·to·use·a·method·call·with·an | 585 | There·is·also·the·pipe()·method·that·allows·you·to·use·a·method·call·with·an |
586 | external·function·(e.g.,·ds.pipe(func))·instead·of·simply·calling·it·(e.g., | 586 | external·function·(e.g.,·ds.pipe(func))·instead·of·simply·calling·it·(e.g., |
587 | func(ds)).·This·allows·you·to·write·pipelines·for·transforming·your·data·(using | 587 | func(ds)).·This·allows·you·to·write·pipelines·for·transforming·your·data·(using |
588 | “method·chaining”)·instead·of·writing·hard·to·follow·nested·function·calls: | 588 | “method·chaining”)·instead·of·writing·hard·to·follow·nested·function·calls: |
589 | #·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow | 589 | #·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow |
590 | #·entirely·from·left·to·right | 590 | #·entirely·from·left·to·right |
591 | In·[64]:·plt.plot((2·*·ds.temperature.sel(loc=0)).mean("instrument")) | 591 | In·[64]:·plt.plot((2·*·ds.temperature.sel(loc=0)).mean("instrument")) |
592 | Out[64]:·[<matplotlib.lines.Line2D·at·0x | 592 | Out[64]:·[<matplotlib.lines.Line2D·at·0xe4726450>] |
593 | In·[65]:·(ds.temperature.sel(loc=0).pipe(lambda·x:·2·*·x).mean | 593 | In·[65]:·(ds.temperature.sel(loc=0).pipe(lambda·x:·2·*·x).mean |
594 | ("instrument").pipe(plt.plot)) | 594 | ("instrument").pipe(plt.plot)) |
595 | Out[65]:·[<matplotlib.lines.Line2D·at·0x | 595 | Out[65]:·[<matplotlib.lines.Line2D·at·0xe47263a0>] |
596 | Both·pipe·and·assign·replicate·the·pandas·methods·of·the·same·names | 596 | Both·pipe·and·assign·replicate·the·pandas·methods·of·the·same·names |
597 | (_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8p_\x8i_\x8p_\x8e·and·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8a_\x8s_\x8s_\x8i_\x8g_\x8n). | 597 | (_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8p_\x8i_\x8p_\x8e·and·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8a_\x8s_\x8s_\x8i_\x8g_\x8n). |
598 | With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if | 598 | With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if |
599 | variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead | 599 | variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead |
600 | of·mutating·existing·objects·often·results·in·easier·to·understand·code,·so·we | 600 | of·mutating·existing·objects·often·results·in·easier·to·understand·code,·so·we |
601 | encourage·using·this·approach. | 601 | encourage·using·this·approach. |
602 | *\x8**\x8**\x8**\x8*·R\x8Re\x8en\x8na\x8am\x8mi\x8in\x8ng\x8g·v\x8va\x8ar\x8ri\x8ia\x8ab\x8bl\x8le\x8es\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 602 | *\x8**\x8**\x8**\x8*·R\x8Re\x8en\x8na\x8am\x8mi\x8in\x8ng\x8g·v\x8va\x8ar\x8ri\x8ia\x8ab\x8bl\x8le\x8es\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
Offset 983, 15 lines modified | Offset 983, 15 lines modified | ||
983 | <p>If·you·were·a·previous·user·of·the·prototype·<a·class="reference·external"·href="https://github.com/xarray-contrib/datatree">xarray-contrib/datatree</a>·package,·this·is·different·from·what·you’re·used·to! | 983 | <p>If·you·were·a·previous·user·of·the·prototype·<a·class="reference·external"·href="https://github.com/xarray-contrib/datatree">xarray-contrib/datatree</a>·package,·this·is·different·from·what·you’re·used·to! |
984 | In·that·package·the·data·model·was·that·the·data·stored·in·each·node·actually·was·completely·unrelated.·The·data·model·is·now·slightly·stricter. | 984 | In·that·package·the·data·model·was·that·the·data·stored·in·each·node·actually·was·completely·unrelated.·The·data·model·is·now·slightly·stricter. |
985 | This·allows·us·to·provide·features·like·<a·class="reference·internal"·href="#coordinate-inheritance"><span·class="std·std-ref">Coordinate·Inheritance</span></a>.</p> | 985 | This·allows·us·to·provide·features·like·<a·class="reference·internal"·href="#coordinate-inheritance"><span·class="std·std-ref">Coordinate·Inheritance</span></a>.</p> |
986 | </div> | 986 | </div> |
987 | <p>To·demonstrate,·let’s·first·generate·some·example·datasets·which·are·not·aligned·with·one·another:</p> | 987 | <p>To·demonstrate,·let’s·first·generate·some·example·datasets·which·are·not·aligned·with·one·another:</p> |
988 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·(drop·the·attributes·just·to·make·the·printed·representation·shorter)</span> | 988 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·(drop·the·attributes·just·to·make·the·printed·representation·shorter)</span> |
989 | <span·class="gp">In·[89]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">drop_attrs</span><span·class="p">()</span> | 989 | <span·class="gp">In·[89]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">drop_attrs</span><span·class="p">()</span> |
990 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 990 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe4f51be0>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution)"))</span> |
991 | <span·class="gp">In·[90]:·</span><span·class="n">ds_daily</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="s2">"D"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"time"</span><span·class="p">)</span> | 991 | <span·class="gp">In·[90]:·</span><span·class="n">ds_daily</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="s2">"D"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"time"</span><span·class="p">)</span> |
992 | <span·class="go">KeyError:·"No·variable·named·'time'.·Variables·on·the·dataset·include·['foo',·'x',·'letters']"</span> | 992 | <span·class="go">KeyError:·"No·variable·named·'time'.·Variables·on·the·dataset·include·['foo',·'x',·'letters']"</span> |
993 | <span·class="gp">In·[91]:·</span><span·class="n">ds_weekly</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="s2">"W"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"time"</span><span·class="p">)</span> | 993 | <span·class="gp">In·[91]:·</span><span·class="n">ds_weekly</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="s2">"W"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"time"</span><span·class="p">)</span> |
Offset 1055, 15 lines modified | Offset 1055, 15 lines modified | ||
1055 | <span·class="go">····└──·Group:·/b/B</span> | 1055 | <span·class="go">····└──·Group:·/b/B</span> |
1056 | </pre></div> | 1056 | </pre></div> |
1057 | </div> | 1057 | </div> |
1058 | <p>Now·we·have·a·valid·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">DataTree</span></code>·structure·which·contains·all·the·data·at·each·different·time·frequency,·stored·in·a·separate·group.</p> | 1058 | <p>Now·we·have·a·valid·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">DataTree</span></code>·structure·which·contains·all·the·data·at·each·different·time·frequency,·stored·in·a·separate·group.</p> |
1059 | <p>This·is·a·useful·way·to·organise·our·data·because·we·can·still·operate·on·all·the·groups·at·once. | 1059 | <p>This·is·a·useful·way·to·organise·our·data·because·we·can·still·operate·on·all·the·groups·at·once. |
1060 | For·example·we·can·extract·all·three·timeseries·at·a·specific·lat-lon·location:</p> | 1060 | For·example·we·can·extract·all·three·timeseries·at·a·specific·lat-lon·location:</p> |
1061 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[100]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">lat</span><span·class="o">=</span><span·class="mi">75</span><span·class="p">,</span>·<span·class="n">lon</span><span·class="o">=</span><span·class="mi">300</span><span·class="p">)</span> | 1061 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[100]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">lat</span><span·class="o">=</span><span·class="mi">75</span><span·class="p">,</span>·<span·class="n">lon</span><span·class="o">=</span><span·class="mi">300</span><span·class="p">)</span> |
1062 | <span·class="go">ValueError:·Dimensions·{'l | 1062 | <span·class="go">ValueError:·Dimensions·{'lat',·'lon'}·do·not·exist.·Expected·one·or·more·of·set()</span> |
1063 | </pre></div> | 1063 | </pre></div> |
1064 | </div> | 1064 | </div> |
1065 | <p>or·compute·the·standard·deviation·of·each·timeseries·to·find·out·how·it·varies·with·sampling·frequency:</p> | 1065 | <p>or·compute·the·standard·deviation·of·each·timeseries·to·find·out·how·it·varies·with·sampling·frequency:</p> |
1066 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[101]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">std</span><span·class="p">(</span><span·class="n">dim</span><span·class="o">=</span><span·class="s2">"time"</span><span·class="p">)</span> | 1066 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[101]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">std</span><span·class="p">(</span><span·class="n">dim</span><span·class="o">=</span><span·class="s2">"time"</span><span·class="p">)</span> |
1067 | <span·class="go">ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set()</span> | 1067 | <span·class="go">ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set()</span> |
1068 | </pre></div> | 1068 | </pre></div> |
1069 | </div> | 1069 | </div> |
Offset 1129, 15 lines modified | Offset 1129, 15 lines modified | ||
1129 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[107]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">dt</span><span·class="p">[</span><span·class="s2">"/daily"</span><span·class="p">])</span> | 1129 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[107]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">dt</span><span·class="p">[</span><span·class="s2">"/daily"</span><span·class="p">])</span> |
1130 | <span·class="go">KeyError:·'Could·not·find·node·at·/daily'</span> | 1130 | <span·class="go">KeyError:·'Could·not·find·node·at·/daily'</span> |
1131 | </pre></div> | 1131 | </pre></div> |
1132 | </div> | 1132 | </div> |
1133 | <p>This·helps·to·differentiate·which·variables·are·defined·on·the·datatree·node·that·you·are·currently·looking·at,·and·which·were·defined·somewhere·above·it.</p> | 1133 | <p>This·helps·to·differentiate·which·variables·are·defined·on·the·datatree·node·that·you·are·currently·looking·at,·and·which·were·defined·somewhere·above·it.</p> |
1134 | <p>We·can·also·still·perform·all·the·same·operations·on·the·whole·tree:</p> | 1134 | <p>We·can·also·still·perform·all·the·same·operations·on·the·whole·tree:</p> |
1135 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[108]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">lat</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">75</span><span·class="p">],</span>·<span·class="n">lon</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">300</span><span·class="p">])</span> | 1135 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[108]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">lat</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">75</span><span·class="p">],</span>·<span·class="n">lon</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">300</span><span·class="p">])</span> |
1136 | <span·class="go">ValueError:·Dimensions·{'l | 1136 | <span·class="go">ValueError:·Dimensions·{'lat',·'lon'}·do·not·exist.·Expected·one·or·more·of·set()</span> |
1137 | <span·class="gp">In·[109]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">std</span><span·class="p">(</span><span·class="n">dim</span><span·class="o">=</span><span·class="s2">"time"</span><span·class="p">)</span> | 1137 | <span·class="gp">In·[109]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">std</span><span·class="p">(</span><span·class="n">dim</span><span·class="o">=</span><span·class="s2">"time"</span><span·class="p">)</span> |
1138 | <span·class="go">ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set()</span> | 1138 | <span·class="go">ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set()</span> |
1139 | </pre></div> | 1139 | </pre></div> |
1140 | </div> | 1140 | </div> |
1141 | </section> | 1141 | </section> |
Offset 870, 15 lines modified | Offset 870, 15 lines modified | ||
870 | _\x8C_\x8o_\x8o_\x8r_\x8d_\x8i_\x8n_\x8a_\x8t_\x8e_\x8·_\x8I_\x8n_\x8h_\x8e_\x8r_\x8i_\x8t_\x8a_\x8n_\x8c_\x8e. | 870 | _\x8C_\x8o_\x8o_\x8r_\x8d_\x8i_\x8n_\x8a_\x8t_\x8e_\x8·_\x8I_\x8n_\x8h_\x8e_\x8r_\x8i_\x8t_\x8a_\x8n_\x8c_\x8e. |
871 | To·demonstrate,·let’s·first·generate·some·example·datasets·which·are·not | 871 | To·demonstrate,·let’s·first·generate·some·example·datasets·which·are·not |
872 | aligned·with·one·another: | 872 | aligned·with·one·another: |
873 | #·(drop·the·attributes·just·to·make·the·printed·representation·shorter) | 873 | #·(drop·the·attributes·just·to·make·the·printed·representation·shorter) |
874 | In·[89]:·ds·=·xr.tutorial.open_dataset("air_temperature").drop_attrs() | 874 | In·[89]:·ds·=·xr.tutorial.open_dataset("air_temperature").drop_attrs() |
875 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 875 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
876 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by | 876 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by |
877 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 877 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe4f51be0>: |
878 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 878 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
879 | resolution)")) | 879 | resolution)")) |
880 | In·[90]:·ds_daily·=·ds.resample(time="D").mean("time") | 880 | In·[90]:·ds_daily·=·ds.resample(time="D").mean("time") |
881 | KeyError:·"No·variable·named·'time'.·Variables·on·the·dataset·include·['foo', | 881 | KeyError:·"No·variable·named·'time'.·Variables·on·the·dataset·include·['foo', |
882 | 'x',·'letters']" | 882 | 'x',·'letters']" |
Offset 947, 15 lines modified | Offset 947, 15 lines modified | ||
947 | ····└──·Group:·/b/B | 947 | ····└──·Group:·/b/B |
948 | Now·we·have·a·valid·DataTree·structure·which·contains·all·the·data·at·each | 948 | Now·we·have·a·valid·DataTree·structure·which·contains·all·the·data·at·each |
949 | different·time·frequency,·stored·in·a·separate·group. | 949 | different·time·frequency,·stored·in·a·separate·group. |
950 | This·is·a·useful·way·to·organise·our·data·because·we·can·still·operate·on·all | 950 | This·is·a·useful·way·to·organise·our·data·because·we·can·still·operate·on·all |
951 | the·groups·at·once.·For·example·we·can·extract·all·three·timeseries·at·a | 951 | the·groups·at·once.·For·example·we·can·extract·all·three·timeseries·at·a |
952 | specific·lat-lon·location: | 952 | specific·lat-lon·location: |
953 | In·[100]:·dt.sel(lat=75,·lon=300) | 953 | In·[100]:·dt.sel(lat=75,·lon=300) |
954 | ValueError:·Dimensions·{'l | 954 | ValueError:·Dimensions·{'lat',·'lon'}·do·not·exist.·Expected·one·or·more·of·set |
955 | () | 955 | () |
956 | or·compute·the·standard·deviation·of·each·timeseries·to·find·out·how·it·varies | 956 | or·compute·the·standard·deviation·of·each·timeseries·to·find·out·how·it·varies |
957 | with·sampling·frequency: | 957 | with·sampling·frequency: |
958 | In·[101]:·dt.std(dim="time") | 958 | In·[101]:·dt.std(dim="time") |
959 | ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set() | 959 | ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set() |
960 | *\x8**\x8**\x8**\x8*·C\x8Co\x8oo\x8or\x8rd\x8di\x8in\x8na\x8at\x8te\x8e·I\x8In\x8nh\x8he\x8er\x8ri\x8it\x8ta\x8an\x8nc\x8ce\x8e_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 960 | *\x8**\x8**\x8**\x8*·C\x8Co\x8oo\x8or\x8rd\x8di\x8in\x8na\x8at\x8te\x8e·I\x8In\x8nh\x8he\x8er\x8ri\x8it\x8ta\x8an\x8nc\x8ce\x8e_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
961 | Notice·that·in·the·trees·we·constructed·above·there·is·some·redundancy·-·the | 961 | Notice·that·in·the·trees·we·constructed·above·there·is·some·redundancy·-·the |
Offset 1019, 15 lines modified | Offset 1019, 15 lines modified | ||
1019 | coordinates,·but·explicitly·mark·them·as·such: | 1019 | coordinates,·but·explicitly·mark·them·as·such: |
1020 | In·[107]:·print(dt["/daily"]) | 1020 | In·[107]:·print(dt["/daily"]) |
1021 | KeyError:·'Could·not·find·node·at·/daily' | 1021 | KeyError:·'Could·not·find·node·at·/daily' |
1022 | This·helps·to·differentiate·which·variables·are·defined·on·the·datatree·node | 1022 | This·helps·to·differentiate·which·variables·are·defined·on·the·datatree·node |
1023 | that·you·are·currently·looking·at,·and·which·were·defined·somewhere·above·it. | 1023 | that·you·are·currently·looking·at,·and·which·were·defined·somewhere·above·it. |
1024 | We·can·also·still·perform·all·the·same·operations·on·the·whole·tree: | 1024 | We·can·also·still·perform·all·the·same·operations·on·the·whole·tree: |
1025 | In·[108]:·dt.sel(lat=[75],·lon=[300]) | 1025 | In·[108]:·dt.sel(lat=[75],·lon=[300]) |
1026 | ValueError:·Dimensions·{'l | 1026 | ValueError:·Dimensions·{'lat',·'lon'}·do·not·exist.·Expected·one·or·more·of·set |
1027 | () | 1027 | () |
1028 | In·[109]:·dt.std(dim="time") | 1028 | In·[109]:·dt.std(dim="time") |
1029 | ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set() | 1029 | ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set() |
1030 | _\x8[_\x8L_\x8o_\x8g_\x8o_\x8·_\x8o_\x8f_\x8·_\x8x_\x8a_\x8r_\x8r_\x8a_\x8y_\x8] | 1030 | _\x8[_\x8L_\x8o_\x8g_\x8o_\x8·_\x8o_\x8f_\x8·_\x8x_\x8a_\x8r_\x8r_\x8a_\x8y_\x8] |
1031 | *\x8**\x8**\x8**\x8**\x8**\x8*·_\x8x\x8x_\x8a\x8a_\x8r\x8r_\x8r\x8r_\x8a\x8a_\x8y\x8y·*\x8**\x8**\x8**\x8**\x8**\x8* | 1031 | *\x8**\x8**\x8**\x8**\x8**\x8*·_\x8x\x8x_\x8a\x8a_\x8r\x8r_\x8r\x8r_\x8a\x8a_\x8y\x8y·*\x8**\x8**\x8**\x8**\x8**\x8* |
Offset 653, 15 lines modified | Offset 653, 15 lines modified | ||
653 | to·a·collection·specified·weather·station·latitudes·and·longitudes. | 653 | to·a·collection·specified·weather·station·latitudes·and·longitudes. |
654 | To·trigger·vectorized·indexing·behavior | 654 | To·trigger·vectorized·indexing·behavior |
655 | you·will·need·to·provide·the·selection·dimensions·with·a·new | 655 | you·will·need·to·provide·the·selection·dimensions·with·a·new |
656 | shared·output·dimension·name.·In·the·example·below,·the·selections | 656 | shared·output·dimension·name.·In·the·example·below,·the·selections |
657 | of·the·closest·latitude·and·longitude·are·renamed·to·an·output | 657 | of·the·closest·latitude·and·longitude·are·renamed·to·an·output |
658 | dimension·named·“points”:</p> | 658 | dimension·named·“points”:</p> |
659 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[52]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)</span> | 659 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[52]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)</span> |
660 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 660 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe4f51710>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution)"))</span> |
661 | <span·class="go">#·Define·target·latitude·and·longitude·(where·weather·stations·might·be)</span> | 661 | <span·class="go">#·Define·target·latitude·and·longitude·(where·weather·stations·might·be)</span> |
662 | <span·class="gp">In·[53]:·</span><span·class="n">target_lon</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">DataArray</span><span·class="p">([</span><span·class="mi">200</span><span·class="p">,</span>·<span·class="mi">201</span><span·class="p">,</span>·<span·class="mi">202</span><span·class="p">,</span>·<span·class="mi">205</span><span·class="p">],</span>·<span·class="n">dims</span><span·class="o">=</span><span·class="s2">"points"</span><span·class="p">)</span> | 662 | <span·class="gp">In·[53]:·</span><span·class="n">target_lon</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">DataArray</span><span·class="p">([</span><span·class="mi">200</span><span·class="p">,</span>·<span·class="mi">201</span><span·class="p">,</span>·<span·class="mi">202</span><span·class="p">,</span>·<span·class="mi">205</span><span·class="p">],</span>·<span·class="n">dims</span><span·class="o">=</span><span·class="s2">"points"</span><span·class="p">)</span> |
663 | <span·class="gp">In·[54]:·</span><span·class="n">target_lat</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">DataArray</span><span·class="p">([</span><span·class="mi">31</span><span·class="p">,</span>·<span·class="mi">41</span><span·class="p">,</span>·<span·class="mi">42</span><span·class="p">,</span>·<span·class="mi">42</span><span·class="p">],</span>·<span·class="n">dims</span><span·class="o">=</span><span·class="s2">"points"</span><span·class="p">)</span> | 663 | <span·class="gp">In·[54]:·</span><span·class="n">target_lat</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">DataArray</span><span·class="p">([</span><span·class="mi">31</span><span·class="p">,</span>·<span·class="mi">41</span><span·class="p">,</span>·<span·class="mi">42</span><span·class="p">,</span>·<span·class="mi">42</span><span·class="p">],</span>·<span·class="n">dims</span><span·class="o">=</span><span·class="s2">"points"</span><span·class="p">)</span> |
Offset 697, 15 lines modified | Offset 697, 15 lines modified | ||
697 | </div> | 697 | </div> |
698 | </section> | 698 | </section> |
699 | <section·id="assigning-values-with-indexing"> | 699 | <section·id="assigning-values-with-indexing"> |
700 | <span·id="assigning-values"></span><h2>Assigning·values·with·indexing<a·class="headerlink"·href="#assigning-values-with-indexing"·title="Link·to·this·heading">¶</a></h2> | 700 | <span·id="assigning-values"></span><h2>Assigning·values·with·indexing<a·class="headerlink"·href="#assigning-values-with-indexing"·title="Link·to·this·heading">¶</a></h2> |
701 | <p>To·select·and·assign·values·to·a·portion·of·a·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataArray()</span></code>·you | 701 | <p>To·select·and·assign·values·to·a·portion·of·a·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataArray()</span></code>·you |
702 | can·use·indexing·with·<code·class="docutils·literal·notranslate"><span·class="pre">.loc</span></code>·:</p> | 702 | can·use·indexing·with·<code·class="docutils·literal·notranslate"><span·class="pre">.loc</span></code>·:</p> |
703 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[57]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)</span> | 703 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[57]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)</span> |
704 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 704 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe4ee99d0>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution)"))</span> |
705 | <span·class="go">#·add·an·empty·2D·dataarray</span> | 705 | <span·class="go">#·add·an·empty·2D·dataarray</span> |
706 | <span·class="gp">In·[58]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">"empty"</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">full_like</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"time"</span><span·class="p">),</span>·<span·class="n">fill_value</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span> | 706 | <span·class="gp">In·[58]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">"empty"</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">full_like</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"time"</span><span·class="p">),</span>·<span·class="n">fill_value</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span> |
707 | <span·class="go">AttributeError:·'Dataset'·object·has·no·attribute·'air'</span> | 707 | <span·class="go">AttributeError:·'Dataset'·object·has·no·attribute·'air'</span> |
Offset 869, 15 lines modified | Offset 869, 15 lines modified | ||
869 | </div> | 869 | </div> |
870 | </div> | 870 | </div> |
871 | <p>You·can·also·assign·values·to·all·variables·of·a·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Dataset</span></code>·at·once:</p> | 871 | <p>You·can·also·assign·values·to·all·variables·of·a·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Dataset</span></code>·at·once:</p> |
872 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[83]:·</span><span·class="n">ds_org</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"eraint_uvz"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span> | 872 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[83]:·</span><span·class="n">ds_org</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"eraint_uvz"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span> |
873 | <span·class="gp">···....:·</span>····<span·class="n">latitude</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">56</span><span·class="p">,</span>·<span·class="mi">59</span><span·class="p">),</span>·<span·class="n">longitude</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">255</span><span·class="p">,</span>·<span·class="mi">258</span><span·class="p">),</span>·<span·class="n">level</span><span·class="o">=</span><span·class="mi">0</span> | 873 | <span·class="gp">···....:·</span>····<span·class="n">latitude</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">56</span><span·class="p">,</span>·<span·class="mi">59</span><span·class="p">),</span>·<span·class="n">longitude</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">255</span><span·class="p">,</span>·<span·class="mi">258</span><span·class="p">),</span>·<span·class="n">level</span><span·class="o">=</span><span·class="mi">0</span> |
874 | <span·class="gp">···....:·</span><span·class="p">)</span> | 874 | <span·class="gp">···....:·</span><span·class="p">)</span> |
875 | <span·class="gp">···....:·</span> | 875 | <span·class="gp">···....:·</span> |
876 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/eraint_uvz.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 876 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/eraint_uvz.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe4ee9ea0>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution)"))</span> |
877 | <span·class="go">#·set·all·values·to·0</span> | 877 | <span·class="go">#·set·all·values·to·0</span> |
878 | <span·class="gp">In·[84]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">zeros_like</span><span·class="p">(</span><span·class="n">ds_org</span><span·class="p">)</span> | 878 | <span·class="gp">In·[84]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">zeros_like</span><span·class="p">(</span><span·class="n">ds_org</span><span·class="p">)</span> |
879 | <span·class="go">NameError:·name·'ds_org'·is·not·defined</span> | 879 | <span·class="go">NameError:·name·'ds_org'·is·not·defined</span> |
Offset 475, 15 lines modified | Offset 475, 15 lines modified | ||
475 | vectorized·indexing·behavior·you·will·need·to·provide·the·selection·dimensions | 475 | vectorized·indexing·behavior·you·will·need·to·provide·the·selection·dimensions |
476 | with·a·new·shared·output·dimension·name.·In·the·example·below,·the·selections | 476 | with·a·new·shared·output·dimension·name.·In·the·example·below,·the·selections |
477 | of·the·closest·latitude·and·longitude·are·renamed·to·an·output·dimension·named | 477 | of·the·closest·latitude·and·longitude·are·renamed·to·an·output·dimension·named |
478 | “points”: | 478 | “points”: |
479 | In·[52]:·ds·=·xr.tutorial.open_dataset("air_temperature") | 479 | In·[52]:·ds·=·xr.tutorial.open_dataset("air_temperature") |
480 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 480 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
481 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by | 481 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by |
482 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 482 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe4f51710>: |
483 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 483 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
484 | resolution)")) | 484 | resolution)")) |
485 | #·Define·target·latitude·and·longitude·(where·weather·stations·might·be) | 485 | #·Define·target·latitude·and·longitude·(where·weather·stations·might·be) |
486 | In·[53]:·target_lon·=·xr.DataArray([200,·201,·202,·205],·dims="points") | 486 | In·[53]:·target_lon·=·xr.DataArray([200,·201,·202,·205],·dims="points") |
Offset 515, 15 lines modified | Offset 515, 15 lines modified | ||
515 | dimensions·with·.loc/.sel).·Otherwise,·IndexError·will·be·raised. | 515 | dimensions·with·.loc/.sel).·Otherwise,·IndexError·will·be·raised. |
516 | *\x8**\x8**\x8**\x8**\x8*·A\x8As\x8ss\x8si\x8ig\x8gn\x8ni\x8in\x8ng\x8g·v\x8va\x8al\x8lu\x8ue\x8es\x8s·w\x8wi\x8it\x8th\x8h·i\x8in\x8nd\x8de\x8ex\x8xi\x8in\x8ng\x8g_\x8?\x8¶·*\x8**\x8**\x8**\x8**\x8* | 516 | *\x8**\x8**\x8**\x8**\x8*·A\x8As\x8ss\x8si\x8ig\x8gn\x8ni\x8in\x8ng\x8g·v\x8va\x8al\x8lu\x8ue\x8es\x8s·w\x8wi\x8it\x8th\x8h·i\x8in\x8nd\x8de\x8ex\x8xi\x8in\x8ng\x8g_\x8?\x8¶·*\x8**\x8**\x8**\x8**\x8* |
517 | To·select·and·assign·values·to·a·portion·of·a·DataArray()·you·can·use·indexing | 517 | To·select·and·assign·values·to·a·portion·of·a·DataArray()·you·can·use·indexing |
518 | with·.loc·: | 518 | with·.loc·: |
519 | In·[57]:·ds·=·xr.tutorial.open_dataset("air_temperature") | 519 | In·[57]:·ds·=·xr.tutorial.open_dataset("air_temperature") |
520 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 520 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
521 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by | 521 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by |
522 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 522 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe4ee99d0>: |
523 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 523 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
524 | resolution)")) | 524 | resolution)")) |
525 | #·add·an·empty·2D·dataarray | 525 | #·add·an·empty·2D·dataarray |
526 | In·[58]:·ds["empty"]·=·xr.full_like(ds.air.mean("time"),·fill_value=0) | 526 | In·[58]:·ds["empty"]·=·xr.full_like(ds.air.mean("time"),·fill_value=0) |
527 | AttributeError:·'Dataset'·object·has·no·attribute·'air' | 527 | AttributeError:·'Dataset'·object·has·no·attribute·'air' |
Offset 677, 15 lines modified | Offset 677, 15 lines modified | ||
677 | You·can·also·assign·values·to·all·variables·of·a·Dataset·at·once: | 677 | You·can·also·assign·values·to·all·variables·of·a·Dataset·at·once: |
678 | In·[83]:·ds_org·=·xr.tutorial.open_dataset("eraint_uvz").isel( | 678 | In·[83]:·ds_org·=·xr.tutorial.open_dataset("eraint_uvz").isel( |
679 | ···....:·····latitude=slice(56,·59),·longitude=slice(255,·258),·level=0 | 679 | ···....:·····latitude=slice(56,·59),·longitude=slice(255,·258),·level=0 |
680 | ···....:·) | 680 | ···....:·) |
681 | ···....: | 681 | ···....: |
682 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 682 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
683 | exceeded·with·url:·/pydata/xarray-data/raw/master/eraint_uvz.nc·(Caused·by | 683 | exceeded·with·url:·/pydata/xarray-data/raw/master/eraint_uvz.nc·(Caused·by |
684 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 684 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe4ee9ea0>: |
685 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 685 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
686 | resolution)")) | 686 | resolution)")) |
687 | #·set·all·values·to·0 | 687 | #·set·all·values·to·0 |
688 | In·[84]:·ds·=·xr.zeros_like(ds_org) | 688 | In·[84]:·ds·=·xr.zeros_like(ds_org) |
689 | NameError:·name·'ds_org'·is·not·defined | 689 | NameError:·name·'ds_org'·is·not·defined |
Offset 237, 24 lines modified | Offset 237, 24 lines modified | ||
237 | <span·class="gp">···....:·</span>····<span·class="n">np</span><span·class="o">.</span><span·class="n">sin</span><span·class="p">(</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">pi</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">)),</span> | 237 | <span·class="gp">···....:·</span>····<span·class="n">np</span><span·class="o">.</span><span·class="n">sin</span><span·class="p">(</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">pi</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">)),</span> |
238 | <span·class="gp">···....:·</span>····<span·class="n">dims</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span> | 238 | <span·class="gp">···....:·</span>····<span·class="n">dims</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span> |
239 | <span·class="gp">···....:·</span>····<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">)},</span> | 239 | <span·class="gp">···....:·</span>····<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">)},</span> |
240 | <span·class="gp">···....:·</span><span·class="p">)</span> | 240 | <span·class="gp">···....:·</span><span·class="p">)</span> |
241 | <span·class="gp">···....:·</span> | 241 | <span·class="gp">···....:·</span> |
242 | <span·class="gp">In·[17]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="s2">"o"</span><span·class="p">,</span>·<span·class="n">label</span><span·class="o">=</span><span·class="s2">"original"</span><span·class="p">)</span> | 242 | <span·class="gp">In·[17]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="s2">"o"</span><span·class="p">,</span>·<span·class="n">label</span><span·class="o">=</span><span·class="s2">"original"</span><span·class="p">)</span> |
243 | <span·class="gh">Out[17]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 243 | <span·class="gh">Out[17]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xe93acc90>]</span> |
244 | <span·class="gp">In·[18]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">100</span><span·class="p">))</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="n">label</span><span·class="o">=</span><span·class="s2">"linear·(default)"</span><span·class="p">)</span> | 244 | <span·class="gp">In·[18]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">100</span><span·class="p">))</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="n">label</span><span·class="o">=</span><span·class="s2">"linear·(default)"</span><span·class="p">)</span> |
245 | <span·class="gh">Out[18]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 245 | <span·class="gh">Out[18]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xe93acbe0>]</span> |
246 | <span·class="gp">In·[19]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">100</span><span·class="p">),</span>·<span·class="n">method</span><span·class="o">=</span><span·class="s2">"cubic"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="n">label</span><span·class="o">=</span><span·class="s2">"cubic"</span><span·class="p">)</span> | 246 | <span·class="gp">In·[19]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">100</span><span·class="p">),</span>·<span·class="n">method</span><span·class="o">=</span><span·class="s2">"cubic"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="n">label</span><span·class="o">=</span><span·class="s2">"cubic"</span><span·class="p">)</span> |
247 | <span·class="gh">Out[19]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 247 | <span·class="gh">Out[19]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xe93acb30>]</span> |
248 | <span·class="gp">In·[20]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">legend</span><span·class="p">()</span> | 248 | <span·class="gp">In·[20]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">legend</span><span·class="p">()</span> |
249 | <span·class="gh">Out[20]:·</span><span·class="go"><matplotlib.legend.Legend·at·0x | 249 | <span·class="gh">Out[20]:·</span><span·class="go"><matplotlib.legend.Legend·at·0xe9386258></span> |
250 | </pre></div> | 250 | </pre></div> |
251 | </div> | 251 | </div> |
252 | <a·class="reference·internal·image-reference"·href="../_images/interpolation_sample1.png"><img·alt="../_images/interpolation_sample1.png"·src="../_images/interpolation_sample1.png"·style="width:·4in;"·/> | 252 | <a·class="reference·internal·image-reference"·href="../_images/interpolation_sample1.png"><img·alt="../_images/interpolation_sample1.png"·src="../_images/interpolation_sample1.png"·style="width:·4in;"·/> |
253 | </a> | 253 | </a> |
254 | <p>Additional·keyword·arguments·can·be·passed·to·scipy’s·functions.</p> | 254 | <p>Additional·keyword·arguments·can·be·passed·to·scipy’s·functions.</p> |
255 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·fill·0·for·the·outside·of·the·original·coordinates.</span> | 255 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·fill·0·for·the·outside·of·the·original·coordinates.</span> |
256 | <span·class="gp">In·[21]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="o">-</span><span·class="mf">0.5</span><span·class="p">,</span>·<span·class="mf">1.5</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">),</span>·<span·class="n">kwargs</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"fill_value"</span><span·class="p">:</span>·<span·class="mf">0.0</span><span·class="p">})</span> | 256 | <span·class="gp">In·[21]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="o">-</span><span·class="mf">0.5</span><span·class="p">,</span>·<span·class="mf">1.5</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">),</span>·<span·class="n">kwargs</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"fill_value"</span><span·class="p">:</span>·<span·class="mf">0.0</span><span·class="p">})</span> |
Offset 439, 15 lines modified | Offset 439, 15 lines modified | ||
439 | see·<a·class="reference·internal"·href="computation.html#missing-values"><span·class="std·std-ref">Missing·values</span></a>.</p> | 439 | see·<a·class="reference·internal"·href="computation.html#missing-values"><span·class="std·std-ref">Missing·values</span></a>.</p> |
440 | </section> | 440 | </section> |
441 | <section·id="example"> | 441 | <section·id="example"> |
442 | <h2>Example<a·class="headerlink"·href="#example"·title="Link·to·this·heading">¶</a></h2> | 442 | <h2>Example<a·class="headerlink"·href="#example"·title="Link·to·this·heading">¶</a></h2> |
443 | <p>Let’s·see·how·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">interp()</span></code>·works·on·real·data.</p> | 443 | <p>Let’s·see·how·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">interp()</span></code>·works·on·real·data.</p> |
444 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Raw·data</span> | 444 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Raw·data</span> |
445 | <span·class="gp">In·[44]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span> | 445 | <span·class="gp">In·[44]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span> |
446 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 446 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe9384920>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution)"))</span> |
447 | <span·class="gp">In·[45]:·</span><span·class="n">fig</span><span·class="p">,</span>·<span·class="n">axes</span>·<span·class="o">=</span>·<span·class="n">plt</span><span·class="o">.</span><span·class="n">subplots</span><span·class="p">(</span><span·class="n">ncols</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">,</span>·<span·class="n">figsize</span><span·class="o">=</span><span·class="p">(</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">))</span> | 447 | <span·class="gp">In·[45]:·</span><span·class="n">fig</span><span·class="p">,</span>·<span·class="n">axes</span>·<span·class="o">=</span>·<span·class="n">plt</span><span·class="o">.</span><span·class="n">subplots</span><span·class="p">(</span><span·class="n">ncols</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">,</span>·<span·class="n">figsize</span><span·class="o">=</span><span·class="p">(</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">))</span> |
448 | <span·class="gp">In·[46]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">ax</span><span·class="o">=</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">])</span> | 448 | <span·class="gp">In·[46]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">ax</span><span·class="o">=</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">])</span> |
449 | <span·class="go">AttributeError:·'Dataset'·object·has·no·attribute·'air'</span> | 449 | <span·class="go">AttributeError:·'Dataset'·object·has·no·attribute·'air'</span> |
Offset 153, 26 lines modified | Offset 153, 26 lines modified | ||
153 | ···....:·····np.sin(np.linspace(0,·2·*·np.pi,·10)), | 153 | ···....:·····np.sin(np.linspace(0,·2·*·np.pi,·10)), |
154 | ···....:·····dims="x", | 154 | ···....:·····dims="x", |
155 | ···....:·····coords={"x":·np.linspace(0,·1,·10)}, | 155 | ···....:·····coords={"x":·np.linspace(0,·1,·10)}, |
156 | ···....:·) | 156 | ···....:·) |
157 | ···....: | 157 | ···....: |
158 | In·[17]:·da.plot.line("o",·label="original") | 158 | In·[17]:·da.plot.line("o",·label="original") |
159 | Out[17]:·[<matplotlib.lines.Line2D·at·0x | 159 | Out[17]:·[<matplotlib.lines.Line2D·at·0xe93acc90>] |
160 | In·[18]:·da.interp(x=np.linspace(0,·1,·100)).plot.line(label="linear | 160 | In·[18]:·da.interp(x=np.linspace(0,·1,·100)).plot.line(label="linear |
161 | (default)") | 161 | (default)") |
162 | Out[18]:·[<matplotlib.lines.Line2D·at·0x | 162 | Out[18]:·[<matplotlib.lines.Line2D·at·0xe93acbe0>] |
163 | In·[19]:·da.interp(x=np.linspace(0,·1,·100),·method="cubic").plot.line | 163 | In·[19]:·da.interp(x=np.linspace(0,·1,·100),·method="cubic").plot.line |
164 | (label="cubic") | 164 | (label="cubic") |
165 | Out[19]:·[<matplotlib.lines.Line2D·at·0x | 165 | Out[19]:·[<matplotlib.lines.Line2D·at·0xe93acb30>] |
166 | In·[20]:·plt.legend() | 166 | In·[20]:·plt.legend() |
167 | Out[20]:·<matplotlib.legend.Legend·at·0x | 167 | Out[20]:·<matplotlib.legend.Legend·at·0xe9386258> |
168 | _\x8[_\x8._\x8._\x8/_\x8__\x8i_\x8m_\x8a_\x8g_\x8e_\x8s_\x8/_\x8i_\x8n_\x8t_\x8e_\x8r_\x8p_\x8o_\x8l_\x8a_\x8t_\x8i_\x8o_\x8n_\x8__\x8s_\x8a_\x8m_\x8p_\x8l_\x8e_\x81_\x8._\x8p_\x8n_\x8g_\x8] | 168 | _\x8[_\x8._\x8._\x8/_\x8__\x8i_\x8m_\x8a_\x8g_\x8e_\x8s_\x8/_\x8i_\x8n_\x8t_\x8e_\x8r_\x8p_\x8o_\x8l_\x8a_\x8t_\x8i_\x8o_\x8n_\x8__\x8s_\x8a_\x8m_\x8p_\x8l_\x8e_\x81_\x8._\x8p_\x8n_\x8g_\x8] |
169 | Additional·keyword·arguments·can·be·passed·to·scipy’s·functions. | 169 | Additional·keyword·arguments·can·be·passed·to·scipy’s·functions. |
170 | #·fill·0·for·the·outside·of·the·original·coordinates. | 170 | #·fill·0·for·the·outside·of·the·original·coordinates. |
171 | In·[21]:·da.interp(x=np.linspace(-0.5,·1.5,·10),·kwargs={"fill_value":·0.0}) | 171 | In·[21]:·da.interp(x=np.linspace(-0.5,·1.5,·10),·kwargs={"fill_value":·0.0}) |
172 | Out[21]: | 172 | Out[21]: |
173 | <xarray.DataArray·(x:·10)>·Size:·80B | 173 | <xarray.DataArray·(x:·10)>·Size:·80B |
174 | array([·0.···,··0.···,··0.···,··0.814,··0.604,·-0.604,·-0.814,··0.···,··0.···, | 174 | array([·0.···,··0.···,··0.···,··0.814,··0.604,·-0.604,·-0.814,··0.···,··0.···, |
Offset 337, 15 lines modified | Offset 337, 15 lines modified | ||
337 | For·the·details·of·interpolate_na(),·see·_\x8M_\x8i_\x8s_\x8s_\x8i_\x8n_\x8g_\x8·_\x8v_\x8a_\x8l_\x8u_\x8e_\x8s. | 337 | For·the·details·of·interpolate_na(),·see·_\x8M_\x8i_\x8s_\x8s_\x8i_\x8n_\x8g_\x8·_\x8v_\x8a_\x8l_\x8u_\x8e_\x8s. |
338 | *\x8**\x8**\x8**\x8**\x8*·E\x8Ex\x8xa\x8am\x8mp\x8pl\x8le\x8e_\x8?\x8¶·*\x8**\x8**\x8**\x8**\x8* | 338 | *\x8**\x8**\x8**\x8**\x8*·E\x8Ex\x8xa\x8am\x8mp\x8pl\x8le\x8e_\x8?\x8¶·*\x8**\x8**\x8**\x8**\x8* |
339 | Let’s·see·how·interp()·works·on·real·data. | 339 | Let’s·see·how·interp()·works·on·real·data. |
340 | #·Raw·data | 340 | #·Raw·data |
341 | In·[44]:·ds·=·xr.tutorial.open_dataset("air_temperature").isel(time=0) | 341 | In·[44]:·ds·=·xr.tutorial.open_dataset("air_temperature").isel(time=0) |
342 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 342 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
343 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by | 343 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by |
344 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 344 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe9384920>: |
345 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 345 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
346 | resolution)")) | 346 | resolution)")) |
347 | In·[45]:·fig,·axes·=·plt.subplots(ncols=2,·figsize=(10,·4)) | 347 | In·[45]:·fig,·axes·=·plt.subplots(ncols=2,·figsize=(10,·4)) |
348 | In·[46]:·ds.air.plot(ax=axes[0]) | 348 | In·[46]:·ds.air.plot(ax=axes[0]) |
Offset 630, 15 lines modified | Offset 630, 15 lines modified | ||
630 | <span·class="gp">···....:·</span>········<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">"2000-01-01"</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">5</span><span·class="p">),</span> | 630 | <span·class="gp">···....:·</span>········<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">"2000-01-01"</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">5</span><span·class="p">),</span> |
631 | <span·class="gp">···....:·</span>········<span·class="s2">"z"</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="nb">list</span><span·class="p">(</span><span·class="s2">"abcd"</span><span·class="p">)),</span> | 631 | <span·class="gp">···....:·</span>········<span·class="s2">"z"</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="nb">list</span><span·class="p">(</span><span·class="s2">"abcd"</span><span·class="p">)),</span> |
632 | <span·class="gp">···....:·</span>····<span·class="p">},</span> | 632 | <span·class="gp">···....:·</span>····<span·class="p">},</span> |
633 | <span·class="gp">···....:·</span><span·class="p">)</span> | 633 | <span·class="gp">···....:·</span><span·class="p">)</span> |
634 | <span·class="gp">···....:·</span> | 634 | <span·class="gp">···....:·</span> |
635 | <span·class="gp">In·[13]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">"path/to/directory.zarr"</span><span·class="p">)</span> | 635 | <span·class="gp">In·[13]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">"path/to/directory.zarr"</span><span·class="p">)</span> |
636 | <span·class="gh">Out[13]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 636 | <span·class="gh">Out[13]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe4ecc388></span> |
637 | </pre></div> | 637 | </pre></div> |
638 | </div> | 638 | </div> |
639 | <p>(The·suffix·<code·class="docutils·literal·notranslate"><span·class="pre">.zarr</span></code>·is·optional–just·a·reminder·that·a·zarr·store·lives | 639 | <p>(The·suffix·<code·class="docutils·literal·notranslate"><span·class="pre">.zarr</span></code>·is·optional–just·a·reminder·that·a·zarr·store·lives |
640 | there.)·If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr | 640 | there.)·If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr |
641 | store·is·already·present·at·that·path,·an·error·will·be·raised,·preventing·it | 641 | store·is·already·present·at·that·path,·an·error·will·be·raised,·preventing·it |
642 | from·being·overwritten.·To·override·this·behavior·and·overwrite·an·existing | 642 | from·being·overwritten.·To·override·this·behavior·and·overwrite·an·existing |
643 | store,·add·<code·class="docutils·literal·notranslate"><span·class="pre">mode='w'</span></code>·when·invoking·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">to_zarr()</span></code>.</p> | 643 | store,·add·<code·class="docutils·literal·notranslate"><span·class="pre">mode='w'</span></code>·when·invoking·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">to_zarr()</span></code>.</p> |
Offset 658, 19 lines modified | Offset 658, 19 lines modified | ||
658 | <p>To·read·back·a·zarr·dataset·that·has·been·created·this·way,·we·use·the | 658 | <p>To·read·back·a·zarr·dataset·that·has·been·created·this·way,·we·use·the |
659 | <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">open_zarr()</span></code>·method:</p> | 659 | <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">open_zarr()</span></code>·method:</p> |
660 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="n">ds_zarr</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">open_zarr</span><span·class="p">(</span><span·class="s2">"path/to/directory.zarr"</span><span·class="p">)</span> | 660 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="n">ds_zarr</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">open_zarr</span><span·class="p">(</span><span·class="s2">"path/to/directory.zarr"</span><span·class="p">)</span> |
661 | <span·class="gp">In·[15]:·</span><span·class="n">ds_zarr</span> | 661 | <span·class="gp">In·[15]:·</span><span·class="n">ds_zarr</span> |
662 | <span·class="gh">Out[15]:·</span> | 662 | <span·class="gh">Out[15]:·</span> |
663 | <span·class="go"><xarray.Dataset>·Size:·232B</span> | 663 | <span·class="go"><xarray.Dataset>·Size:·232B</span> |
664 | <span·class="go">Dimensions:··( | 664 | <span·class="go">Dimensions:··(y:·5,·x:·4)</span> |
665 | <span·class="go">Coordinates:</span> | 665 | <span·class="go">Coordinates:</span> |
666 | <span·class="go">··*·y········(y)·datetime64[ns]·40B·2000-01-01·2000-01-02·...·2000-01-05</span> | ||
666 | <span·class="go">····z········(x)·object·16B·dask.array<chunksize=(4,),·meta=np.ndarray></span> | 667 | <span·class="go">····z········(x)·object·16B·dask.array<chunksize=(4,),·meta=np.ndarray></span> |
667 | <span·class="go">··*·x········(x)·int32·16B·10·20·30·40</span> | 668 | <span·class="go">··*·x········(x)·int32·16B·10·20·30·40</span> |
668 | <span·class="go">··*·y········(y)·datetime64[ns]·40B·2000-01-01·2000-01-02·...·2000-01-05</span> | ||
669 | <span·class="go">Data·variables:</span> | 669 | <span·class="go">Data·variables:</span> |
670 | <span·class="go">····foo······(x,·y)·float64·160B·dask.array<chunksize=(4,·5),·meta=np.ndarray></span> | 670 | <span·class="go">····foo······(x,·y)·float64·160B·dask.array<chunksize=(4,·5),·meta=np.ndarray></span> |
671 | </pre></div> | 671 | </pre></div> |
672 | </div> | 672 | </div> |
673 | <section·id="cloud-storage-buckets"> | 673 | <section·id="cloud-storage-buckets"> |
674 | <h3>Cloud·Storage·Buckets<a·class="headerlink"·href="#cloud-storage-buckets"·title="Link·to·this·heading">¶</a></h3> | 674 | <h3>Cloud·Storage·Buckets<a·class="headerlink"·href="#cloud-storage-buckets"·title="Link·to·this·heading">¶</a></h3> |
675 | <p>It·is·possible·to·read·and·write·xarray·datasets·directly·from·/·to·cloud | 675 | <p>It·is·possible·to·read·and·write·xarray·datasets·directly·from·/·to·cloud |
Offset 724, 36 lines modified | Offset 724, 36 lines modified | ||
724 | <span·class="gp">In·[18]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">({</span><span·class="s2">"foo"</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">dummies</span><span·class="p">)},</span>·<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">)})</span> | 724 | <span·class="gp">In·[18]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">({</span><span·class="s2">"foo"</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">dummies</span><span·class="p">)},</span>·<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">)})</span> |
725 | <span·class="gp">In·[19]:·</span><span·class="n">path</span>·<span·class="o">=</span>·<span·class="s2">"path/to/directory.zarr"</span> | 725 | <span·class="gp">In·[19]:·</span><span·class="n">path</span>·<span·class="o">=</span>·<span·class="s2">"path/to/directory.zarr"</span> |
726 | <span·class="go">#·Now·we·write·the·metadata·without·computing·any·array·values</span> | 726 | <span·class="go">#·Now·we·write·the·metadata·without·computing·any·array·values</span> |
727 | <span·class="gp">In·[20]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">compute</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span> | 727 | <span·class="gp">In·[20]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">compute</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span> |
728 | <span·class="gh">Out[20]:·</span><span·class="go">Delayed('_finalize_store- | 728 | <span·class="gh">Out[20]:·</span><span·class="go">Delayed('_finalize_store-f37e47b2-f3f2-443e-9089-a5cf5e5ab508')</span> |
729 | </pre></div> | 729 | </pre></div> |
730 | </div> | 730 | </div> |
731 | <p>Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that | 731 | <p>Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that |
732 | can·be·filled·out·by·subsequent·calls·to·<code·class="docutils·literal·notranslate"><span·class="pre">to_zarr</span></code>. | 732 | can·be·filled·out·by·subsequent·calls·to·<code·class="docutils·literal·notranslate"><span·class="pre">to_zarr</span></code>. |
733 | Setting·<code·class="docutils·literal·notranslate"><span·class="pre">region="auto"</span></code>·will·open·the·existing·store·and·determine·the | 733 | Setting·<code·class="docutils·literal·notranslate"><span·class="pre">region="auto"</span></code>·will·open·the·existing·store·and·determine·the |
734 | correct·alignment·of·the·new·data·with·the·existing·dimensions,·or·as·an | 734 | correct·alignment·of·the·new·data·with·the·existing·dimensions,·or·as·an |
735 | explicit·mapping·from·dimension·names·to·Python·<code·class="docutils·literal·notranslate"><span·class="pre">slice</span></code>·objects·indicating | 735 | explicit·mapping·from·dimension·names·to·Python·<code·class="docutils·literal·notranslate"><span·class="pre">slice</span></code>·objects·indicating |
736 | where·the·data·should·be·written·(in·index·space,·not·label·space),·e.g.,</p> | 736 | where·the·data·should·be·written·(in·index·space,·not·label·space),·e.g.,</p> |
737 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·For·convenience,·we'll·slice·a·single·dataset,·but·in·the·real·use-case</span> | 737 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·For·convenience,·we'll·slice·a·single·dataset,·but·in·the·real·use-case</span> |
738 | <span·class="go">#·we·would·create·them·separately·possibly·even·from·separate·processes.</span> | 738 | <span·class="go">#·we·would·create·them·separately·possibly·even·from·separate·processes.</span> |
739 | <span·class="gp">In·[21]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">({</span><span·class="s2">"foo"</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">))},</span>·<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">)})</span> | 739 | <span·class="gp">In·[21]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">({</span><span·class="s2">"foo"</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">))},</span>·<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">)})</span> |
740 | <span·class="go">#·Any·of·the·following·region·specifications·are·valid</span> | 740 | <span·class="go">#·Any·of·the·following·region·specifications·are·valid</span> |
741 | <span·class="gp">In·[22]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="s2">"auto"</span><span·class="p">)</span> | 741 | <span·class="gp">In·[22]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="s2">"auto"</span><span·class="p">)</span> |
742 | <span·class="gh">Out[22]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 742 | <span·class="gh">Out[22]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe49462f8></span> |
743 | <span·class="gp">In·[23]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">20</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="s2">"auto"</span><span·class="p">})</span> | 743 | <span·class="gp">In·[23]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">20</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="s2">"auto"</span><span·class="p">})</span> |
744 | <span·class="gh">Out[23]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 744 | <span·class="gh">Out[23]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe4946c88></span> |
745 | <span·class="gp">In·[24]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="nb">slice</span><span·class="p">(</span><span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">)})</span> | 745 | <span·class="gp">In·[24]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="nb">slice</span><span·class="p">(</span><span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">)})</span> |
746 | <span·class="gh">Out[24]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 746 | <span·class="gh">Out[24]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe4f44ec8></span> |
747 | </pre></div> | 747 | </pre></div> |
748 | </div> | 748 | </div> |
749 | <p>Concurrent·writes·with·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·are·safe·as·long·as·they·modify·distinct | 749 | <p>Concurrent·writes·with·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·are·safe·as·long·as·they·modify·distinct |
750 | chunks·in·the·underlying·Zarr·arrays·(or·use·an·appropriate·<code·class="docutils·literal·notranslate"><span·class="pre">lock</span></code>).</p> | 750 | chunks·in·the·underlying·Zarr·arrays·(or·use·an·appropriate·<code·class="docutils·literal·notranslate"><span·class="pre">lock</span></code>).</p> |
751 | <p>As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values, | 751 | <p>As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values, |
752 | if·you·set·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·then·<em>all</em>·variables·included·in·a·Dataset·must·have | 752 | if·you·set·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·then·<em>all</em>·variables·included·in·a·Dataset·must·have |
753 | dimensions·included·in·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>.·Other·variables·(typically·coordinates) | 753 | dimensions·included·in·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>.·Other·variables·(typically·coordinates) |
Offset 816, 28 lines modified | Offset 816, 28 lines modified | ||
816 | <span·class="gp">···....:·</span>········<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">],</span> | 816 | <span·class="gp">···....:·</span>········<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">],</span> |
817 | <span·class="gp">···....:·</span>········<span·class="s2">"t"</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">"2001-01-01"</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">),</span> | 817 | <span·class="gp">···....:·</span>········<span·class="s2">"t"</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">"2001-01-01"</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">),</span> |
818 | <span·class="gp">···....:·</span>····<span·class="p">},</span> | 818 | <span·class="gp">···....:·</span>····<span·class="p">},</span> |
819 | <span·class="gp">···....:·</span><span·class="p">)</span> | 819 | <span·class="gp">···....:·</span><span·class="p">)</span> |
820 | <span·class="gp">···....:·</span> | 820 | <span·class="gp">···....:·</span> |
821 | <span·class="gp">In·[30]:·</span><span·class="n">ds1</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">"path/to/directory.zarr"</span><span·class="p">)</span> | 821 | <span·class="gp">In·[30]:·</span><span·class="n">ds1</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">"path/to/directory.zarr"</span><span·class="p">)</span> |
822 | <span·class="gh">Out[30]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 822 | <span·class="gh">Out[30]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe455af10></span> |
823 | <span·class="gp">In·[31]:·</span><span·class="n">ds2</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">(</span> | 823 | <span·class="gp">In·[31]:·</span><span·class="n">ds2</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">(</span> |
824 | <span·class="gp">···....:·</span>····<span·class="p">{</span><span·class="s2">"foo"</span><span·class="p">:</span>·<span·class="p">((</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="s2">"y"</span><span·class="p">,</span>·<span·class="s2">"t"</span><span·class="p">),</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">random</span><span·class="o">.</span><span·class="n">rand</span><span·class="p">(</span><span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">))},</span> | 824 | <span·class="gp">···....:·</span>····<span·class="p">{</span><span·class="s2">"foo"</span><span·class="p">:</span>·<span·class="p">((</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="s2">"y"</span><span·class="p">,</span>·<span·class="s2">"t"</span><span·class="p">),</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">random</span><span·class="o">.</span><span·class="n">rand</span><span·class="p">(</span><span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">))},</span> |
825 | <span·class="gp">···....:·</span>····<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span> | 825 | <span·class="gp">···....:·</span>····<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span> |
826 | <span·class="gp">···....:·</span>········<span·class="s2">"x"</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">,</span>·<span·class="mi">40</span><span·class="p">],</span> | 826 | <span·class="gp">···....:·</span>········<span·class="s2">"x"</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">,</span>·<span·class="mi">40</span><span·class="p">],</span> |
827 | <span·class="gp">···....:·</span>········<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">],</span> | 827 | <span·class="gp">···....:·</span>········<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">],</span> |
828 | <span·class="gp">···....:·</span>········<span·class="s2">"t"</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">"2001-01-03"</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">),</span> | 828 | <span·class="gp">···....:·</span>········<span·class="s2">"t"</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">"2001-01-03"</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">),</span> |
829 | <span·class="gp">···....:·</span>····<span·class="p">},</span> | 829 | <span·class="gp">···....:·</span>····<span·class="p">},</span> |
830 | <span·class="gp">···....:·</span><span·class="p">)</span> | 830 | <span·class="gp">···....:·</span><span·class="p">)</span> |
831 | <span·class="gp">···....:·</span> | 831 | <span·class="gp">···....:·</span> |
832 | <span·class="gp">In·[32]:·</span><span·class="n">ds2</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">"path/to/directory.zarr"</span><span·class="p">,</span>·<span·class="n">append_dim</span><span·class="o">=</span><span·class="s2">"t"</span><span·class="p">)</span> | 832 | <span·class="gp">In·[32]:·</span><span·class="n">ds2</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">"path/to/directory.zarr"</span><span·class="p">,</span>·<span·class="n">append_dim</span><span·class="o">=</span><span·class="s2">"t"</span><span·class="p">)</span> |
833 | <span·class="gh">Out[32]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 833 | <span·class="gh">Out[32]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe93b93d0></span> |
834 | </pre></div> | 834 | </pre></div> |
835 | </div> | 835 | </div> |
836 | </section> | 836 | </section> |
837 | <section·id="specifying-chunks-in-a-zarr-store"> | 837 | <section·id="specifying-chunks-in-a-zarr-store"> |
838 | <span·id="io-zarr-writing-chunks"></span><h3>Specifying·chunks·in·a·zarr·store<a·class="headerlink"·href="#specifying-chunks-in-a-zarr-store"·title="Link·to·this·heading">¶</a></h3> | 838 | <span·id="io-zarr-writing-chunks"></span><h3>Specifying·chunks·in·a·zarr·store<a·class="headerlink"·href="#specifying-chunks-in-a-zarr-store"·title="Link·to·this·heading">¶</a></h3> |
839 | <p>Chunk·sizes·may·be·specified·in·one·of·three·ways·when·writing·to·a·zarr·store:</p> | 839 | <p>Chunk·sizes·may·be·specified·in·one·of·three·ways·when·writing·to·a·zarr·store:</p> |
840 | <ol·class="arabic·simple"> | 840 | <ol·class="arabic·simple"> |
Offset 861, 15 lines modified | Offset 861, 15 lines modified | ||
861 | positional·ordering·of·the·dimensions·in·each·array.·Watch·out·for·arrays·with | 861 | positional·ordering·of·the·dimensions·in·each·array.·Watch·out·for·arrays·with |
862 | differently-ordered·dimensions·within·a·single·Dataset.</p> | 862 | differently-ordered·dimensions·within·a·single·Dataset.</p> |
863 | </div> | 863 | </div> |
864 | <p>For·example,·let’s·say·we’re·working·with·a·dataset·with·dimensions | 864 | <p>For·example,·let’s·say·we’re·working·with·a·dataset·with·dimensions |
865 | <code·class="docutils·literal·notranslate"><span·class="pre">('time',</span>·<span·class="pre">'x',</span>·<span·class="pre">'y')</span></code>,·a·variable·<code·class="docutils·literal·notranslate"><span·class="pre">Tair</span></code>·which·is·chunked·in·<code·class="docutils·literal·notranslate"><span·class="pre">x</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">y</span></code>, | 865 | <code·class="docutils·literal·notranslate"><span·class="pre">('time',</span>·<span·class="pre">'x',</span>·<span·class="pre">'y')</span></code>,·a·variable·<code·class="docutils·literal·notranslate"><span·class="pre">Tair</span></code>·which·is·chunked·in·<code·class="docutils·literal·notranslate"><span·class="pre">x</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">y</span></code>, |
866 | and·two·multi-dimensional·coordinates·<code·class="docutils·literal·notranslate"><span·class="pre">xc</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">yc</span></code>:</p> | 866 | and·two·multi-dimensional·coordinates·<code·class="docutils·literal·notranslate"><span·class="pre">xc</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">yc</span></code>:</p> |
867 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[33]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"rasm"</span><span·class="p">)</span> | 867 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[33]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"rasm"</span><span·class="p">)</span> |
868 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/rasm.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 868 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/rasm.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe497ef50>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution)"))</span> |
869 | <span·class="gp">In·[34]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">"Tair"</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="p">[</span><span·class="s2">"Tair"</span><span·class="p">]</span><span·class="o">.</span><span·class="n">chunk</span><span·class="p">({</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">,</span>·<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">})</span> | 869 | <span·class="gp">In·[34]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">"Tair"</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="p">[</span><span·class="s2">"Tair"</span><span·class="p">]</span><span·class="o">.</span><span·class="n">chunk</span><span·class="p">({</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">,</span>·<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">})</span> |
870 | <span·class="go">KeyError:·"No·variable·named·'Tair'.·Variables·on·the·dataset·include·['foo',·'x']"</span> | 870 | <span·class="go">KeyError:·"No·variable·named·'Tair'.·Variables·on·the·dataset·include·['foo',·'x']"</span> |
871 | <span·class="gp">In·[35]:·</span><span·class="n">ds</span> | 871 | <span·class="gp">In·[35]:·</span><span·class="n">ds</span> |
Offset 882, 15 lines modified | Offset 882, 15 lines modified | ||
882 | <span·class="go">····foo······(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29</span> | 882 | <span·class="go">····foo······(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29</span> |
883 | </pre></div> | 883 | </pre></div> |
884 | </div> | 884 | </div> |
885 | <p>These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very·little | 885 | <p>These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very·little |
886 | space·on·disk·or·in·memory,·yet·when·writing·to·disk·the·default·zarr·behavior·is·to | 886 | space·on·disk·or·in·memory,·yet·when·writing·to·disk·the·default·zarr·behavior·is·to |
887 | split·them·into·chunks:</p> | 887 | split·them·into·chunks:</p> |
888 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[36]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">"path/to/directory.zarr"</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> | 888 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[36]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">"path/to/directory.zarr"</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> |
889 | <span·class="gh">Out[36]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 889 | <span·class="gh">Out[36]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe45a2418></span> |
Max diff block lines reached; 2580/21243 bytes (12.15%) of diff not shown. |
Offset 481, 15 lines modified | Offset 481, 15 lines modified | ||
481 | ···....:·········"y":·pd.date_range("2000-01-01",·periods=5), | 481 | ···....:·········"y":·pd.date_range("2000-01-01",·periods=5), |
482 | ···....:·········"z":·("x",·list("abcd")), | 482 | ···....:·········"z":·("x",·list("abcd")), |
483 | ···....:·····}, | 483 | ···....:·····}, |
484 | ···....:·) | 484 | ···....:·) |
485 | ···....: | 485 | ···....: |
486 | In·[13]:·ds.to_zarr("path/to/directory.zarr") | 486 | In·[13]:·ds.to_zarr("path/to/directory.zarr") |
487 | Out[13]:·<xarray.backends.zarr.ZarrStore·at·0x | 487 | Out[13]:·<xarray.backends.zarr.ZarrStore·at·0xe4ecc388> |
488 | (The·suffix·.zarr·is·optional–just·a·reminder·that·a·zarr·store·lives·there.) | 488 | (The·suffix·.zarr·is·optional–just·a·reminder·that·a·zarr·store·lives·there.) |
489 | If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr·store·is·already | 489 | If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr·store·is·already |
490 | present·at·that·path,·an·error·will·be·raised,·preventing·it·from·being | 490 | present·at·that·path,·an·error·will·be·raised,·preventing·it·from·being |
491 | overwritten.·To·override·this·behavior·and·overwrite·an·existing·store,·add | 491 | overwritten.·To·override·this·behavior·and·overwrite·an·existing·store,·add |
492 | mode='w'·when·invoking·to_zarr(). | 492 | mode='w'·when·invoking·to_zarr(). |
493 | DataArrays·can·also·be·saved·to·disk·using·the·DataArray.to_zarr()·method,·and | 493 | DataArrays·can·also·be·saved·to·disk·using·the·DataArray.to_zarr()·method,·and |
494 | loaded·from·disk·using·the·open_dataarray()·function·with·engine='zarr'. | 494 | loaded·from·disk·using·the·open_dataarray()·function·with·engine='zarr'. |
Offset 505, 19 lines modified | Offset 505, 19 lines modified | ||
505 | To·read·back·a·zarr·dataset·that·has·been·created·this·way,·we·use·the | 505 | To·read·back·a·zarr·dataset·that·has·been·created·this·way,·we·use·the |
506 | open_zarr()·method: | 506 | open_zarr()·method: |
507 | In·[14]:·ds_zarr·=·xr.open_zarr("path/to/directory.zarr") | 507 | In·[14]:·ds_zarr·=·xr.open_zarr("path/to/directory.zarr") |
508 | In·[15]:·ds_zarr | 508 | In·[15]:·ds_zarr |
509 | Out[15]: | 509 | Out[15]: |
510 | <xarray.Dataset>·Size:·232B | 510 | <xarray.Dataset>·Size:·232B |
511 | Dimensions:··( | 511 | Dimensions:··(y:·5,·x:·4) |
512 | Coordinates: | 512 | Coordinates: |
513 | ··*·y········(y)·datetime64[ns]·40B·2000-01-01·2000-01-02·...·2000-01-05 | ||
513 | ····z········(x)·object·16B·dask.array<chunksize=(4,),·meta=np.ndarray> | 514 | ····z········(x)·object·16B·dask.array<chunksize=(4,),·meta=np.ndarray> |
514 | ··*·x········(x)·int32·16B·10·20·30·40 | 515 | ··*·x········(x)·int32·16B·10·20·30·40 |
515 | ··*·y········(y)·datetime64[ns]·40B·2000-01-01·2000-01-02·...·2000-01-05 | ||
516 | Data·variables: | 516 | Data·variables: |
517 | ····foo······(x,·y)·float64·160B·dask.array<chunksize=(4,·5),·meta=np.ndarray> | 517 | ····foo······(x,·y)·float64·160B·dask.array<chunksize=(4,·5),·meta=np.ndarray> |
518 | *\x8**\x8**\x8**\x8*·C\x8Cl\x8lo\x8ou\x8ud\x8d·S\x8St\x8to\x8or\x8ra\x8ag\x8ge\x8e·B\x8Bu\x8uc\x8ck\x8ke\x8et\x8ts\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 518 | *\x8**\x8**\x8**\x8*·C\x8Cl\x8lo\x8ou\x8ud\x8d·S\x8St\x8to\x8or\x8ra\x8ag\x8ge\x8e·B\x8Bu\x8uc\x8ck\x8ke\x8et\x8ts\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
519 | It·is·possible·to·read·and·write·xarray·datasets·directly·from·/·to·cloud | 519 | It·is·possible·to·read·and·write·xarray·datasets·directly·from·/·to·cloud |
520 | storage·buckets·using·zarr.·This·example·uses·the·_\x8g_\x8c_\x8s_\x8f_\x8s·package·to·provide·an | 520 | storage·buckets·using·zarr.·This·example·uses·the·_\x8g_\x8c_\x8s_\x8f_\x8s·package·to·provide·an |
521 | interface·to·_\x8G_\x8o_\x8o_\x8g_\x8l_\x8e_\x8·_\x8C_\x8l_\x8o_\x8u_\x8d_\x8·_\x8S_\x8t_\x8o_\x8r_\x8a_\x8g_\x8e. | 521 | interface·to·_\x8G_\x8o_\x8o_\x8g_\x8l_\x8e_\x8·_\x8C_\x8l_\x8o_\x8u_\x8d_\x8·_\x8S_\x8t_\x8o_\x8r_\x8a_\x8g_\x8e. |
522 | General·_\x8f_\x8s_\x8s_\x8p_\x8e_\x8c·URLs,·those·that·begin·with·s3://·or·gcs://·for·example,·are | 522 | General·_\x8f_\x8s_\x8s_\x8p_\x8e_\x8c·URLs,·those·that·begin·with·s3://·or·gcs://·for·example,·are |
Offset 562, 35 lines modified | Offset 562, 35 lines modified | ||
562 | In·[18]:·ds·=·xr.Dataset({"foo":·("x",·dummies)},·coords={"x":·np.arange(30)}) | 562 | In·[18]:·ds·=·xr.Dataset({"foo":·("x",·dummies)},·coords={"x":·np.arange(30)}) |
563 | In·[19]:·path·=·"path/to/directory.zarr" | 563 | In·[19]:·path·=·"path/to/directory.zarr" |
564 | #·Now·we·write·the·metadata·without·computing·any·array·values | 564 | #·Now·we·write·the·metadata·without·computing·any·array·values |
565 | In·[20]:·ds.to_zarr(path,·compute=False) | 565 | In·[20]:·ds.to_zarr(path,·compute=False) |
566 | Out[20]:·Delayed('_finalize_store- | 566 | Out[20]:·Delayed('_finalize_store-f37e47b2-f3f2-443e-9089-a5cf5e5ab508') |
567 | Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that | 567 | Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that |
568 | can·be·filled·out·by·subsequent·calls·to·to_zarr.·Setting·region="auto"·will | 568 | can·be·filled·out·by·subsequent·calls·to·to_zarr.·Setting·region="auto"·will |
569 | open·the·existing·store·and·determine·the·correct·alignment·of·the·new·data | 569 | open·the·existing·store·and·determine·the·correct·alignment·of·the·new·data |
570 | with·the·existing·dimensions,·or·as·an·explicit·mapping·from·dimension·names·to | 570 | with·the·existing·dimensions,·or·as·an·explicit·mapping·from·dimension·names·to |
571 | Python·slice·objects·indicating·where·the·data·should·be·written·(in·index | 571 | Python·slice·objects·indicating·where·the·data·should·be·written·(in·index |
572 | space,·not·label·space),·e.g., | 572 | space,·not·label·space),·e.g., |
573 | #·For·convenience,·we'll·slice·a·single·dataset,·but·in·the·real·use-case | 573 | #·For·convenience,·we'll·slice·a·single·dataset,·but·in·the·real·use-case |
574 | #·we·would·create·them·separately·possibly·even·from·separate·processes. | 574 | #·we·would·create·them·separately·possibly·even·from·separate·processes. |
575 | In·[21]:·ds·=·xr.Dataset({"foo":·("x",·np.arange(30))},·coords={"x":·np.arange | 575 | In·[21]:·ds·=·xr.Dataset({"foo":·("x",·np.arange(30))},·coords={"x":·np.arange |
576 | (30)}) | 576 | (30)}) |
577 | #·Any·of·the·following·region·specifications·are·valid | 577 | #·Any·of·the·following·region·specifications·are·valid |
578 | In·[22]:·ds.isel(x=slice(0,·10)).to_zarr(path,·region="auto") | 578 | In·[22]:·ds.isel(x=slice(0,·10)).to_zarr(path,·region="auto") |
579 | Out[22]:·<xarray.backends.zarr.ZarrStore·at·0x | 579 | Out[22]:·<xarray.backends.zarr.ZarrStore·at·0xe49462f8> |
580 | In·[23]:·ds.isel(x=slice(10,·20)).to_zarr(path,·region={"x":·"auto"}) | 580 | In·[23]:·ds.isel(x=slice(10,·20)).to_zarr(path,·region={"x":·"auto"}) |
581 | Out[23]:·<xarray.backends.zarr.ZarrStore·at·0x | 581 | Out[23]:·<xarray.backends.zarr.ZarrStore·at·0xe4946c88> |
582 | In·[24]:·ds.isel(x=slice(20,·30)).to_zarr(path,·region={"x":·slice(20,·30)}) | 582 | In·[24]:·ds.isel(x=slice(20,·30)).to_zarr(path,·region={"x":·slice(20,·30)}) |
583 | Out[24]:·<xarray.backends.zarr.ZarrStore·at·0x | 583 | Out[24]:·<xarray.backends.zarr.ZarrStore·at·0xe4f44ec8> |
584 | Concurrent·writes·with·region·are·safe·as·long·as·they·modify·distinct·chunks | 584 | Concurrent·writes·with·region·are·safe·as·long·as·they·modify·distinct·chunks |
585 | in·the·underlying·Zarr·arrays·(or·use·an·appropriate·lock). | 585 | in·the·underlying·Zarr·arrays·(or·use·an·appropriate·lock). |
586 | As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values, | 586 | As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values, |
587 | if·you·set·region·then·a\x8al\x8ll\x8l·variables·included·in·a·Dataset·must·have·dimensions | 587 | if·you·set·region·then·a\x8al\x8ll\x8l·variables·included·in·a·Dataset·must·have·dimensions |
588 | included·in·region.·Other·variables·(typically·coordinates)·need·to·be | 588 | included·in·region.·Other·variables·(typically·coordinates)·need·to·be |
589 | explicitly·dropped·and/or·written·in·a·separate·calls·to·to_zarr·with·mode='a'. | 589 | explicitly·dropped·and/or·written·in·a·separate·calls·to·to_zarr·with·mode='a'. |
590 | *\x8**\x8**\x8**\x8*·Z\x8Za\x8ar\x8rr\x8r·C\x8Co\x8om\x8mp\x8pr\x8re\x8es\x8ss\x8so\x8or\x8rs\x8s·a\x8an\x8nd\x8d·F\x8Fi\x8il\x8lt\x8te\x8er\x8rs\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 590 | *\x8**\x8**\x8**\x8*·Z\x8Za\x8ar\x8rr\x8r·C\x8Co\x8om\x8mp\x8pr\x8re\x8es\x8ss\x8so\x8or\x8rs\x8s·a\x8an\x8nd\x8d·F\x8Fi\x8il\x8lt\x8te\x8er\x8rs\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
Offset 636, 28 lines modified | Offset 636, 28 lines modified | ||
636 | ···....:·········"y":·[1,·2,·3,·4,·5], | 636 | ···....:·········"y":·[1,·2,·3,·4,·5], |
637 | ···....:·········"t":·pd.date_range("2001-01-01",·periods=2), | 637 | ···....:·········"t":·pd.date_range("2001-01-01",·periods=2), |
638 | ···....:·····}, | 638 | ···....:·····}, |
639 | ···....:·) | 639 | ···....:·) |
640 | ···....: | 640 | ···....: |
641 | In·[30]:·ds1.to_zarr("path/to/directory.zarr") | 641 | In·[30]:·ds1.to_zarr("path/to/directory.zarr") |
642 | Out[30]:·<xarray.backends.zarr.ZarrStore·at·0x | 642 | Out[30]:·<xarray.backends.zarr.ZarrStore·at·0xe455af10> |
643 | In·[31]:·ds2·=·xr.Dataset( | 643 | In·[31]:·ds2·=·xr.Dataset( |
644 | ···....:·····{"foo":·(("x",·"y",·"t"),·np.random.rand(4,·5,·2))}, | 644 | ···....:·····{"foo":·(("x",·"y",·"t"),·np.random.rand(4,·5,·2))}, |
645 | ···....:·····coords={ | 645 | ···....:·····coords={ |
646 | ···....:·········"x":·[10,·20,·30,·40], | 646 | ···....:·········"x":·[10,·20,·30,·40], |
647 | ···....:·········"y":·[1,·2,·3,·4,·5], | 647 | ···....:·········"y":·[1,·2,·3,·4,·5], |
648 | ···....:·········"t":·pd.date_range("2001-01-03",·periods=2), | 648 | ···....:·········"t":·pd.date_range("2001-01-03",·periods=2), |
649 | ···....:·····}, | 649 | ···....:·····}, |
650 | ···....:·) | 650 | ···....:·) |
651 | ···....: | 651 | ···....: |
652 | In·[32]:·ds2.to_zarr("path/to/directory.zarr",·append_dim="t") | 652 | In·[32]:·ds2.to_zarr("path/to/directory.zarr",·append_dim="t") |
653 | Out[32]:·<xarray.backends.zarr.ZarrStore·at·0x | 653 | Out[32]:·<xarray.backends.zarr.ZarrStore·at·0xe93b93d0> |
654 | *\x8**\x8**\x8**\x8*·S\x8Sp\x8pe\x8ec\x8ci\x8if\x8fy\x8yi\x8in\x8ng\x8g·c\x8ch\x8hu\x8un\x8nk\x8ks\x8s·i\x8in\x8n·a\x8a·z\x8za\x8ar\x8rr\x8r·s\x8st\x8to\x8or\x8re\x8e_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 654 | *\x8**\x8**\x8**\x8*·S\x8Sp\x8pe\x8ec\x8ci\x8if\x8fy\x8yi\x8in\x8ng\x8g·c\x8ch\x8hu\x8un\x8nk\x8ks\x8s·i\x8in\x8n·a\x8a·z\x8za\x8ar\x8rr\x8r·s\x8st\x8to\x8or\x8re\x8e_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
655 | Chunk·sizes·may·be·specified·in·one·of·three·ways·when·writing·to·a·zarr·store: | 655 | Chunk·sizes·may·be·specified·in·one·of·three·ways·when·writing·to·a·zarr·store: |
656 | ···1.·Manual·chunk·sizing·through·the·use·of·the·encoding·argument·in | 656 | ···1.·Manual·chunk·sizing·through·the·use·of·the·encoding·argument·in |
657 | ······Dataset.to_zarr(): | 657 | ······Dataset.to_zarr(): |
658 | ···2.·Automatic·chunking·based·on·chunks·in·dask·arrays | 658 | ···2.·Automatic·chunking·based·on·chunks·in·dask·arrays |
659 | ···3.·Default·chunk·behavior·determined·by·the·zarr·library | 659 | ···3.·Default·chunk·behavior·determined·by·the·zarr·library |
660 | The·resulting·chunks·will·be·determined·based·on·the·order·of·the·above·list; | 660 | The·resulting·chunks·will·be·determined·based·on·the·order·of·the·above·list; |
Offset 677, 15 lines modified | Offset 677, 15 lines modified | ||
677 | differently-ordered·dimensions·within·a·single·Dataset. | 677 | differently-ordered·dimensions·within·a·single·Dataset. |
678 | For·example,·let’s·say·we’re·working·with·a·dataset·with·dimensions·('time', | 678 | For·example,·let’s·say·we’re·working·with·a·dataset·with·dimensions·('time', |
679 | 'x',·'y'),·a·variable·Tair·which·is·chunked·in·x·and·y,·and·two·multi- | 679 | 'x',·'y'),·a·variable·Tair·which·is·chunked·in·x·and·y,·and·two·multi- |
680 | dimensional·coordinates·xc·and·yc: | 680 | dimensional·coordinates·xc·and·yc: |
681 | In·[33]:·ds·=·xr.tutorial.open_dataset("rasm") | 681 | In·[33]:·ds·=·xr.tutorial.open_dataset("rasm") |
682 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 682 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
683 | exceeded·with·url:·/pydata/xarray-data/raw/master/rasm.nc·(Caused·by | 683 | exceeded·with·url:·/pydata/xarray-data/raw/master/rasm.nc·(Caused·by |
684 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 684 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe497ef50>: |
685 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 685 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
686 | resolution)")) | 686 | resolution)")) |
687 | In·[34]:·ds["Tair"]·=·ds["Tair"].chunk({"x":·100,·"y":·100}) | 687 | In·[34]:·ds["Tair"]·=·ds["Tair"].chunk({"x":·100,·"y":·100}) |
688 | KeyError:·"No·variable·named·'Tair'.·Variables·on·the·dataset·include·['foo', | 688 | KeyError:·"No·variable·named·'Tair'.·Variables·on·the·dataset·include·['foo', |
689 | 'x']" | 689 | 'x']" |
Offset 699, 15 lines modified | Offset 699, 15 lines modified | ||
699 | ··*·x········(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29 | 699 | ··*·x········(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29 |
700 | Data·variables: | 700 | Data·variables: |
701 | ····foo······(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29 | 701 | ····foo······(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29 |
702 | These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very | 702 | These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very |
703 | little·space·on·disk·or·in·memory,·yet·when·writing·to·disk·the·default·zarr | 703 | little·space·on·disk·or·in·memory,·yet·when·writing·to·disk·the·default·zarr |
704 | behavior·is·to·split·them·into·chunks: | 704 | behavior·is·to·split·them·into·chunks: |
705 | In·[36]:·ds.to_zarr("path/to/directory.zarr",·mode="w") | 705 | In·[36]:·ds.to_zarr("path/to/directory.zarr",·mode="w") |
706 | Out[36]:·<xarray.backends.zarr.ZarrStore·at·0x | 706 | Out[36]:·<xarray.backends.zarr.ZarrStore·at·0xe45a2418> |
Max diff block lines reached; 834/7776 bytes (10.73%) of diff not shown. |
Offset 100, 15 lines modified | Offset 100, 15 lines modified | ||
100 | <span·class="gp">In·[3]:·</span><span·class="kn">import</span>·<span·class="nn">matplotlib.pyplot</span>·<span·class="k">as</span>·<span·class="nn">plt</span> | 100 | <span·class="gp">In·[3]:·</span><span·class="kn">import</span>·<span·class="nn">matplotlib.pyplot</span>·<span·class="k">as</span>·<span·class="nn">plt</span> |
101 | <span·class="gp">In·[4]:·</span><span·class="kn">import</span>·<span·class="nn">xarray</span>·<span·class="k">as</span>·<span·class="nn">xr</span> | 101 | <span·class="gp">In·[4]:·</span><span·class="kn">import</span>·<span·class="nn">xarray</span>·<span·class="k">as</span>·<span·class="nn">xr</span> |
102 | </pre></div> | 102 | </pre></div> |
103 | </div> | 103 | </div> |
104 | <p>For·these·examples·we’ll·use·the·North·American·air·temperature·dataset.</p> | 104 | <p>For·these·examples·we’ll·use·the·North·American·air·temperature·dataset.</p> |
105 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[5]:·</span><span·class="n">airtemps</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)</span> | 105 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[5]:·</span><span·class="n">airtemps</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)</span> |
106 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 106 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe2f870e0>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution)"))</span> |
107 | <span·class="gp">In·[6]:·</span><span·class="n">airtemps</span> | 107 | <span·class="gp">In·[6]:·</span><span·class="n">airtemps</span> |
108 | <span·class="go">NameError:·name·'airtemps'·is·not·defined</span> | 108 | <span·class="go">NameError:·name·'airtemps'·is·not·defined</span> |
109 | <span·class="go">#·Convert·to·celsius</span> | 109 | <span·class="go">#·Convert·to·celsius</span> |
Offset 445, 15 lines modified | Offset 445, 15 lines modified | ||
445 | <span·class="go">#·Apply·a·nonlinear·transformation·to·one·of·the·coords</span> | 445 | <span·class="go">#·Apply·a·nonlinear·transformation·to·one·of·the·coords</span> |
446 | <span·class="gp">In·[50]:·</span><span·class="n">b</span><span·class="o">.</span><span·class="n">coords</span><span·class="p">[</span><span·class="s2">"lat"</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">log</span><span·class="p">(</span><span·class="n">b</span><span·class="o">.</span><span·class="n">coords</span><span·class="p">[</span><span·class="s2">"lat"</span><span·class="p">])</span> | 446 | <span·class="gp">In·[50]:·</span><span·class="n">b</span><span·class="o">.</span><span·class="n">coords</span><span·class="p">[</span><span·class="s2">"lat"</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">log</span><span·class="p">(</span><span·class="n">b</span><span·class="o">.</span><span·class="n">coords</span><span·class="p">[</span><span·class="s2">"lat"</span><span·class="p">])</span> |
447 | <span·class="go">KeyError:·'lat'</span> | 447 | <span·class="go">KeyError:·'lat'</span> |
448 | <span·class="gp">In·[51]:·</span><span·class="n">b</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span> | 448 | <span·class="gp">In·[51]:·</span><span·class="n">b</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span> |
449 | <span·class="gh">Out[51]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 449 | <span·class="gh">Out[51]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xe2d78710>]</span> |
450 | </pre></div> | 450 | </pre></div> |
451 | </div> | 451 | </div> |
452 | <a·class="reference·internal·image-reference"·href="../_images/plotting_nonuniform_coords.png"><img·alt="../_images/plotting_nonuniform_coords.png"·src="../_images/plotting_nonuniform_coords.png"·style="width:·4in;"·/> | 452 | <a·class="reference·internal·image-reference"·href="../_images/plotting_nonuniform_coords.png"><img·alt="../_images/plotting_nonuniform_coords.png"·src="../_images/plotting_nonuniform_coords.png"·style="width:·4in;"·/> |
453 | </a> | 453 | </a> |
454 | </section> | 454 | </section> |
455 | <section·id="other-types-of-plot"> | 455 | <section·id="other-types-of-plot"> |
456 | <h4>Other·types·of·plot<a·class="headerlink"·href="#other-types-of-plot"·title="Link·to·this·heading">¶</a></h4> | 456 | <h4>Other·types·of·plot<a·class="headerlink"·href="#other-types-of-plot"·title="Link·to·this·heading">¶</a></h4> |
Offset 857, 117 lines modified | Offset 857, 117 lines modified | ||
857 | <span·class="go">··*·y········(y)·float64·88B·0.0·0.1·0.2·0.3·0.4·0.5·0.6·0.7·0.8·0.9·1.0</span> | 857 | <span·class="go">··*·y········(y)·float64·88B·0.0·0.1·0.2·0.3·0.4·0.5·0.6·0.7·0.8·0.9·1.0</span> |
858 | <span·class="go">··*·z········(z)·int32·16B·0·1·2·3</span> | 858 | <span·class="go">··*·z········(z)·int32·16B·0·1·2·3</span> |
859 | <span·class="go">··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five'</span> | 859 | <span·class="go">··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five'</span> |
860 | <span·class="go">Attributes:</span> | 860 | <span·class="go">Attributes:</span> |
861 | <span·class="go">····units:····Aunits</span> | 861 | <span·class="go">····units:····Aunits</span> |
862 | <span·class="gp">In·[99]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">A</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">)</span> | 862 | <span·class="gp">In·[99]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">A</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">)</span> |
863 | <span·class="gh">Out[99]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0x | 863 | <span·class="gh">Out[99]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xe4e8d760></span> |
864 | </pre></div> | 864 | </pre></div> |
865 | </div> | 865 | </div> |
866 | <img·alt="../_images/da_A_y.png"·src="../_images/da_A_y.png"·/> | 866 | <img·alt="../_images/da_A_y.png"·src="../_images/da_A_y.png"·/> |
867 | <p>Same·plot·can·be·displayed·using·the·dataset:</p> | 867 | <p>Same·plot·can·be·displayed·using·the·dataset:</p> |
868 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[100]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">)</span> | 868 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[100]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">)</span> |
869 | <span·class="gh">Out[100]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0x | 869 | <span·class="gh">Out[100]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xe2bb6500></span> |
870 | </pre></div> | 870 | </pre></div> |
871 | </div> | 871 | </div> |
872 | <img·alt="../_images/ds_A_y.png"·src="../_images/ds_A_y.png"·/> | 872 | <img·alt="../_images/ds_A_y.png"·src="../_images/ds_A_y.png"·/> |
873 | <p>Now·suppose·we·want·to·scatter·the·<code·class="docutils·literal·notranslate"><span·class="pre">A</span></code>·DataArray·against·the·<code·class="docutils·literal·notranslate"><span·class="pre">B</span></code>·DataArray</p> | 873 | <p>Now·suppose·we·want·to·scatter·the·<code·class="docutils·literal·notranslate"><span·class="pre">A</span></code>·DataArray·against·the·<code·class="docutils·literal·notranslate"><span·class="pre">B</span></code>·DataArray</p> |
874 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[101]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">)</span> | 874 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[101]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">)</span> |
875 | <span·class="gh">Out[101]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0x | 875 | <span·class="gh">Out[101]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xe2eed2f0></span> |
876 | </pre></div> | 876 | </pre></div> |
877 | </div> | 877 | </div> |
878 | <img·alt="../_images/ds_simple_scatter.png"·src="../_images/ds_simple_scatter.png"·/> | 878 | <img·alt="../_images/ds_simple_scatter.png"·src="../_images/ds_simple_scatter.png"·/> |
879 | <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">hue</span></code>·kwarg·lets·you·vary·the·color·by·variable·value</p> | 879 | <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">hue</span></code>·kwarg·lets·you·vary·the·color·by·variable·value</p> |
880 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[102]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> | 880 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[102]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> |
881 | <span·class="gh">Out[102]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0x | 881 | <span·class="gh">Out[102]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xe2ba6710></span> |
882 | </pre></div> | 882 | </pre></div> |
883 | </div> | 883 | </div> |
884 | <img·alt="../_images/ds_hue_scatter.png"·src="../_images/ds_hue_scatter.png"·/> | 884 | <img·alt="../_images/ds_hue_scatter.png"·src="../_images/ds_hue_scatter.png"·/> |
885 | <p>You·can·force·a·legend·instead·of·a·colorbar·by·setting·<code·class="docutils·literal·notranslate"><span·class="pre">add_legend=True,</span>·<span·class="pre">add_colorbar=False</span></code>.</p> | 885 | <p>You·can·force·a·legend·instead·of·a·colorbar·by·setting·<code·class="docutils·literal·notranslate"><span·class="pre">add_legend=True,</span>·<span·class="pre">add_colorbar=False</span></code>.</p> |
886 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[103]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">,</span>·<span·class="n">add_legend</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">,</span>·<span·class="n">add_colorbar</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span> | 886 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[103]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">,</span>·<span·class="n">add_legend</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">,</span>·<span·class="n">add_colorbar</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span> |
887 | <span·class="gh">Out[103]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0x | 887 | <span·class="gh">Out[103]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xe2a10030></span> |
888 | </pre></div> | 888 | </pre></div> |
889 | </div> | 889 | </div> |
890 | <img·alt="../_images/ds_discrete_legend_hue_scatter.png"·src="../_images/ds_discrete_legend_hue_scatter.png"·/> | 890 | <img·alt="../_images/ds_discrete_legend_hue_scatter.png"·src="../_images/ds_discrete_legend_hue_scatter.png"·/> |
891 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[104]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">,</span>·<span·class="n">add_legend</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">,</span>·<span·class="n">add_colorbar</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)</span> | 891 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[104]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">,</span>·<span·class="n">add_legend</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">,</span>·<span·class="n">add_colorbar</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)</span> |
892 | <span·class="gh">Out[104]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0x | 892 | <span·class="gh">Out[104]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xe29cf500></span> |
893 | </pre></div> | 893 | </pre></div> |
894 | </div> | 894 | </div> |
895 | <img·alt="../_images/ds_discrete_colorbar_hue_scatter.png"·src="../_images/ds_discrete_colorbar_hue_scatter.png"·/> | 895 | <img·alt="../_images/ds_discrete_colorbar_hue_scatter.png"·src="../_images/ds_discrete_colorbar_hue_scatter.png"·/> |
896 | <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">markersize</span></code>·kwarg·lets·you·vary·the·point’s·size·by·variable·value. | 896 | <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">markersize</span></code>·kwarg·lets·you·vary·the·point’s·size·by·variable·value. |
897 | You·can·additionally·pass·<code·class="docutils·literal·notranslate"><span·class="pre">size_norm</span></code>·to·control·how·the·variable’s·values·are·mapped·to·point·sizes.</p> | 897 | You·can·additionally·pass·<code·class="docutils·literal·notranslate"><span·class="pre">size_norm</span></code>·to·control·how·the·variable’s·values·are·mapped·to·point·sizes.</p> |
898 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[105]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">)</span> | 898 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[105]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">)</span> |
899 | <span·class="gh">Out[105]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0x | 899 | <span·class="gh">Out[105]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xe2969ea0></span> |
900 | </pre></div> | 900 | </pre></div> |
901 | </div> | 901 | </div> |
902 | <img·alt="../_images/ds_hue_size_scatter.png"·src="../_images/ds_hue_size_scatter.png"·/> | 902 | <img·alt="../_images/ds_hue_size_scatter.png"·src="../_images/ds_hue_size_scatter.png"·/> |
903 | <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">z</span></code>·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well.</p> | 903 | <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">z</span></code>·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well.</p> |
904 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[106]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">)</span> | 904 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[106]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">)</span> |
905 | <span·class="gh">Out[106]:·</span><span·class="go"><mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0x | 905 | <span·class="gh">Out[106]:·</span><span·class="go"><mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xe28ca190></span> |
906 | </pre></div> | 906 | </pre></div> |
907 | </div> | 907 | </div> |
908 | <img·alt="../_images/ds_hue_size_scatter_z.png"·src="../_images/ds_hue_size_scatter_z.png"·/> | 908 | <img·alt="../_images/ds_hue_size_scatter_z.png"·src="../_images/ds_hue_size_scatter_z.png"·/> |
909 | <p>Faceting·is·also·possible</p> | 909 | <p>Faceting·is·also·possible</p> |
910 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[107]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> | 910 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[107]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> |
911 | <span·class="gh">Out[107]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0x | 911 | <span·class="gh">Out[107]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0xe4574dd8></span> |
912 | </pre></div> | 912 | </pre></div> |
913 | </div> | 913 | </div> |
914 | <img·alt="../_images/ds_facet_scatter.png"·src="../_images/ds_facet_scatter.png"·/> | 914 | <img·alt="../_images/ds_facet_scatter.png"·src="../_images/ds_facet_scatter.png"·/> |
915 | <p>And·adding·the·z-axis</p> | 915 | <p>And·adding·the·z-axis</p> |
916 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[108]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> | 916 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[108]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> |
917 | <span·class="gh">Out[108]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0x | 917 | <span·class="gh">Out[108]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0xe2360660></span> |
918 | </pre></div> | 918 | </pre></div> |
919 | </div> | 919 | </div> |
920 | <img·alt="../_images/ds_facet_scatter_z.png"·src="../_images/ds_facet_scatter_z.png"·/> | 920 | <img·alt="../_images/ds_facet_scatter_z.png"·src="../_images/ds_facet_scatter_z.png"·/> |
921 | <p>For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data·variables | 921 | <p>For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data·variables |
922 | to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities·of·<code·class="docutils·literal·notranslate"><span·class="pre">seaborn</span></code>.</p> | 922 | to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities·of·<code·class="docutils·literal·notranslate"><span·class="pre">seaborn</span></code>.</p> |
923 | </section> | 923 | </section> |
924 | <section·id="quiver"> | 924 | <section·id="quiver"> |
925 | <h3>Quiver<a·class="headerlink"·href="#quiver"·title="Link·to·this·heading">¶</a></h3> | 925 | <h3>Quiver<a·class="headerlink"·href="#quiver"·title="Link·to·this·heading">¶</a></h3> |
926 | <p>Visualizing·vector·fields·is·supported·with·quiver·plots:</p> | 926 | <p>Visualizing·vector·fields·is·supported·with·quiver·plots:</p> |
927 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[109]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">w</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">quiver</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">)</span> | 927 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[109]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">w</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">quiver</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">)</span> |
928 | <span·class="gh">Out[109]:·</span><span·class="go"><matplotlib.quiver.Quiver·at·0x | 928 | <span·class="gh">Out[109]:·</span><span·class="go"><matplotlib.quiver.Quiver·at·0xe4e8d538></span> |
929 | </pre></div> | 929 | </pre></div> |
930 | </div> | 930 | </div> |
931 | <img·alt="../_images/ds_simple_quiver.png"·src="../_images/ds_simple_quiver.png"·/> | 931 | <img·alt="../_images/ds_simple_quiver.png"·src="../_images/ds_simple_quiver.png"·/> |
932 | <p>where·<code·class="docutils·literal·notranslate"><span·class="pre">u</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">v</span></code>·denote·the·x·and·y·direction·components·of·the·arrow·vectors.·Again,·faceting·is·also·possible:</p> | 932 | <p>where·<code·class="docutils·literal·notranslate"><span·class="pre">u</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">v</span></code>·denote·the·x·and·y·direction·components·of·the·arrow·vectors.·Again,·faceting·is·also·possible:</p> |
933 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[110]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">quiver</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">,</span>·<span·class="n">scale</span><span·class="o">=</span><span·class="mi">4</span><span·class="p">)</span> | 933 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[110]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">quiver</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">,</span>·<span·class="n">scale</span><span·class="o">=</span><span·class="mi">4</span><span·class="p">)</span> |
934 | <span·class="gh">Out[110]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0x | 934 | <span·class="gh">Out[110]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0xe4d7d618></span> |
935 | </pre></div> | 935 | </pre></div> |
936 | </div> | 936 | </div> |
937 | <img·alt="../_images/ds_facet_quiver.png"·src="../_images/ds_facet_quiver.png"·/> | 937 | <img·alt="../_images/ds_facet_quiver.png"·src="../_images/ds_facet_quiver.png"·/> |
938 | <p><code·class="docutils·literal·notranslate"><span·class="pre">scale</span></code>·is·required·for·faceted·quiver·plots. | 938 | <p><code·class="docutils·literal·notranslate"><span·class="pre">scale</span></code>·is·required·for·faceted·quiver·plots. |
939 | The·scale·determines·the·number·of·data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the·arrow·longer.</p> | 939 | The·scale·determines·the·number·of·data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the·arrow·longer.</p> |
940 | </section> | 940 | </section> |
941 | <section·id="streamplot"> | 941 | <section·id="streamplot"> |
942 | <h3>Streamplot<a·class="headerlink"·href="#streamplot"·title="Link·to·this·heading">¶</a></h3> | 942 | <h3>Streamplot<a·class="headerlink"·href="#streamplot"·title="Link·to·this·heading">¶</a></h3> |
943 | <p>Visualizing·vector·fields·is·also·supported·with·streamline·plots:</p> | 943 | <p>Visualizing·vector·fields·is·also·supported·with·streamline·plots:</p> |
944 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[111]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">w</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">streamplot</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">)</span> | 944 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[111]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">w</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">streamplot</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">)</span> |
945 | <span·class="gh">Out[111]:·</span><span·class="go"><matplotlib.collections.LineCollection·at·0x | 945 | <span·class="gh">Out[111]:·</span><span·class="go"><matplotlib.collections.LineCollection·at·0xe254d9d0></span> |
946 | </pre></div> | 946 | </pre></div> |
947 | </div> | 947 | </div> |
948 | <img·alt="../_images/ds_simple_streamplot.png"·src="../_images/ds_simple_streamplot.png"·/> | 948 | <img·alt="../_images/ds_simple_streamplot.png"·src="../_images/ds_simple_streamplot.png"·/> |
949 | <p>where·<code·class="docutils·literal·notranslate"><span·class="pre">u</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">v</span></code>·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to·the·streamlines. | 949 | <p>where·<code·class="docutils·literal·notranslate"><span·class="pre">u</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">v</span></code>·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to·the·streamlines. |
950 | Again,·faceting·is·also·possible:</p> | 950 | Again,·faceting·is·also·possible:</p> |
Max diff block lines reached; 21088/42872 bytes (49.19%) of diff not shown. |
Offset 31, 15 lines modified | Offset 31, 15 lines modified | ||
31 | In·[3]:·import·matplotlib.pyplot·as·plt | 31 | In·[3]:·import·matplotlib.pyplot·as·plt |
32 | In·[4]:·import·xarray·as·xr | 32 | In·[4]:·import·xarray·as·xr |
33 | For·these·examples·we’ll·use·the·North·American·air·temperature·dataset. | 33 | For·these·examples·we’ll·use·the·North·American·air·temperature·dataset. |
34 | In·[5]:·airtemps·=·xr.tutorial.open_dataset("air_temperature") | 34 | In·[5]:·airtemps·=·xr.tutorial.open_dataset("air_temperature") |
35 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 35 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
36 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by | 36 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by |
37 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 37 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe2f870e0>: |
38 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 38 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
39 | resolution)")) | 39 | resolution)")) |
40 | In·[6]:·airtemps | 40 | In·[6]:·airtemps |
41 | NameError:·name·'airtemps'·is·not·defined | 41 | NameError:·name·'airtemps'·is·not·defined |
Offset 294, 15 lines modified | Offset 294, 15 lines modified | ||
294 | #·Apply·a·nonlinear·transformation·to·one·of·the·coords | 294 | #·Apply·a·nonlinear·transformation·to·one·of·the·coords |
295 | In·[50]:·b.coords["lat"]·=·np.log(b.coords["lat"]) | 295 | In·[50]:·b.coords["lat"]·=·np.log(b.coords["lat"]) |
296 | KeyError:·'lat' | 296 | KeyError:·'lat' |
297 | In·[51]:·b.plot() | 297 | In·[51]:·b.plot() |
298 | Out[51]:·[<matplotlib.lines.Line2D·at·0x | 298 | Out[51]:·[<matplotlib.lines.Line2D·at·0xe2d78710>] |
299 | _\x8[_\x8._\x8._\x8/_\x8__\x8i_\x8m_\x8a_\x8g_\x8e_\x8s_\x8/_\x8p_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g_\x8__\x8n_\x8o_\x8n_\x8u_\x8n_\x8i_\x8f_\x8o_\x8r_\x8m_\x8__\x8c_\x8o_\x8o_\x8r_\x8d_\x8s_\x8._\x8p_\x8n_\x8g_\x8] | 299 | _\x8[_\x8._\x8._\x8/_\x8__\x8i_\x8m_\x8a_\x8g_\x8e_\x8s_\x8/_\x8p_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g_\x8__\x8n_\x8o_\x8n_\x8u_\x8n_\x8i_\x8f_\x8o_\x8r_\x8m_\x8__\x8c_\x8o_\x8o_\x8r_\x8d_\x8s_\x8._\x8p_\x8n_\x8g_\x8] |
300 | *\x8**\x8**\x8*·O\x8Ot\x8th\x8he\x8er\x8r·t\x8ty\x8yp\x8pe\x8es\x8s·o\x8of\x8f·p\x8pl\x8lo\x8ot\x8t_\x8?\x8¶·*\x8**\x8**\x8* | 300 | *\x8**\x8**\x8*·O\x8Ot\x8th\x8he\x8er\x8r·t\x8ty\x8yp\x8pe\x8es\x8s·o\x8of\x8f·p\x8pl\x8lo\x8ot\x8t_\x8?\x8¶·*\x8**\x8**\x8* |
301 | There·are·several·other·options·for·plotting·2D·data. | 301 | There·are·several·other·options·for·plotting·2D·data. |
302 | Contour·plot·using·DataArray.plot.contour() | 302 | Contour·plot·using·DataArray.plot.contour() |
303 | In·[52]:·air2d.plot.contour() | 303 | In·[52]:·air2d.plot.contour() |
304 | NameError:·name·'air2d'·is·not·defined | 304 | NameError:·name·'air2d'·is·not·defined |
305 | _\x8[_\x8._\x8._\x8/_\x8__\x8i_\x8m_\x8a_\x8g_\x8e_\x8s_\x8/_\x8p_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g_\x8__\x8c_\x8o_\x8n_\x8t_\x8o_\x8u_\x8r_\x8._\x8p_\x8n_\x8g_\x8] | 305 | _\x8[_\x8._\x8._\x8/_\x8__\x8i_\x8m_\x8a_\x8g_\x8e_\x8s_\x8/_\x8p_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g_\x8__\x8c_\x8o_\x8n_\x8t_\x8o_\x8u_\x8r_\x8._\x8p_\x8n_\x8g_\x8] |
Offset 615, 93 lines modified | Offset 615, 93 lines modified | ||
615 | ··*·y········(y)·float64·88B·0.0·0.1·0.2·0.3·0.4·0.5·0.6·0.7·0.8·0.9·1.0 | 615 | ··*·y········(y)·float64·88B·0.0·0.1·0.2·0.3·0.4·0.5·0.6·0.7·0.8·0.9·1.0 |
616 | ··*·z········(z)·int32·16B·0·1·2·3 | 616 | ··*·z········(z)·int32·16B·0·1·2·3 |
617 | ··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five' | 617 | ··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five' |
618 | Attributes: | 618 | Attributes: |
619 | ····units:····Aunits | 619 | ····units:····Aunits |
620 | In·[99]:·ds.A.plot.scatter(x="y") | 620 | In·[99]:·ds.A.plot.scatter(x="y") |
621 | Out[99]:·<matplotlib.collections.PathCollection·at·0x | 621 | Out[99]:·<matplotlib.collections.PathCollection·at·0xe4e8d760> |
622 | [../_images/da_A_y.png] | 622 | [../_images/da_A_y.png] |
623 | Same·plot·can·be·displayed·using·the·dataset: | 623 | Same·plot·can·be·displayed·using·the·dataset: |
624 | In·[100]:·ds.plot.scatter(x="y",·y="A") | 624 | In·[100]:·ds.plot.scatter(x="y",·y="A") |
625 | Out[100]:·<matplotlib.collections.PathCollection·at·0x | 625 | Out[100]:·<matplotlib.collections.PathCollection·at·0xe2bb6500> |
626 | [../_images/ds_A_y.png] | 626 | [../_images/ds_A_y.png] |
627 | Now·suppose·we·want·to·scatter·the·A·DataArray·against·the·B·DataArray | 627 | Now·suppose·we·want·to·scatter·the·A·DataArray·against·the·B·DataArray |
628 | In·[101]:·ds.plot.scatter(x="A",·y="B") | 628 | In·[101]:·ds.plot.scatter(x="A",·y="B") |
629 | Out[101]:·<matplotlib.collections.PathCollection·at·0x | 629 | Out[101]:·<matplotlib.collections.PathCollection·at·0xe2eed2f0> |
630 | [../_images/ds_simple_scatter.png] | 630 | [../_images/ds_simple_scatter.png] |
631 | The·hue·kwarg·lets·you·vary·the·color·by·variable·value | 631 | The·hue·kwarg·lets·you·vary·the·color·by·variable·value |
632 | In·[102]:·ds.plot.scatter(x="A",·y="B",·hue="w") | 632 | In·[102]:·ds.plot.scatter(x="A",·y="B",·hue="w") |
633 | Out[102]:·<matplotlib.collections.PathCollection·at·0x | 633 | Out[102]:·<matplotlib.collections.PathCollection·at·0xe2ba6710> |
634 | [../_images/ds_hue_scatter.png] | 634 | [../_images/ds_hue_scatter.png] |
635 | You·can·force·a·legend·instead·of·a·colorbar·by·setting·add_legend=True, | 635 | You·can·force·a·legend·instead·of·a·colorbar·by·setting·add_legend=True, |
636 | add_colorbar=False. | 636 | add_colorbar=False. |
637 | In·[103]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=True, | 637 | In·[103]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=True, |
638 | add_colorbar=False) | 638 | add_colorbar=False) |
639 | Out[103]:·<matplotlib.collections.PathCollection·at·0x | 639 | Out[103]:·<matplotlib.collections.PathCollection·at·0xe2a10030> |
640 | [../_images/ds_discrete_legend_hue_scatter.png] | 640 | [../_images/ds_discrete_legend_hue_scatter.png] |
641 | In·[104]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=False, | 641 | In·[104]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=False, |
642 | add_colorbar=True) | 642 | add_colorbar=True) |
643 | Out[104]:·<matplotlib.collections.PathCollection·at·0x | 643 | Out[104]:·<matplotlib.collections.PathCollection·at·0xe29cf500> |
644 | [../_images/ds_discrete_colorbar_hue_scatter.png] | 644 | [../_images/ds_discrete_colorbar_hue_scatter.png] |
645 | The·markersize·kwarg·lets·you·vary·the·point’s·size·by·variable·value.·You·can | 645 | The·markersize·kwarg·lets·you·vary·the·point’s·size·by·variable·value.·You·can |
646 | additionally·pass·size_norm·to·control·how·the·variable’s·values·are·mapped·to | 646 | additionally·pass·size_norm·to·control·how·the·variable’s·values·are·mapped·to |
647 | point·sizes. | 647 | point·sizes. |
648 | In·[105]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="z") | 648 | In·[105]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="z") |
649 | Out[105]:·<matplotlib.collections.PathCollection·at·0x | 649 | Out[105]:·<matplotlib.collections.PathCollection·at·0xe2969ea0> |
650 | [../_images/ds_hue_size_scatter.png] | 650 | [../_images/ds_hue_size_scatter.png] |
651 | The·z·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well. | 651 | The·z·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well. |
652 | In·[106]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x") | 652 | In·[106]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x") |
653 | Out[106]:·<mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0x | 653 | Out[106]:·<mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xe28ca190> |
654 | [../_images/ds_hue_size_scatter_z.png] | 654 | [../_images/ds_hue_size_scatter_z.png] |
655 | Faceting·is·also·possible | 655 | Faceting·is·also·possible |
656 | In·[107]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="x",·row="x", | 656 | In·[107]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="x",·row="x", |
657 | col="w") | 657 | col="w") |
658 | Out[107]:·<xarray.plot.facetgrid.FacetGrid·at·0x | 658 | Out[107]:·<xarray.plot.facetgrid.FacetGrid·at·0xe4574dd8> |
659 | [../_images/ds_facet_scatter.png] | 659 | [../_images/ds_facet_scatter.png] |
660 | And·adding·the·z-axis | 660 | And·adding·the·z-axis |
661 | In·[108]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x", | 661 | In·[108]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x", |
662 | row="x",·col="w") | 662 | row="x",·col="w") |
663 | Out[108]:·<xarray.plot.facetgrid.FacetGrid·at·0x | 663 | Out[108]:·<xarray.plot.facetgrid.FacetGrid·at·0xe2360660> |
664 | [../_images/ds_facet_scatter_z.png] | 664 | [../_images/ds_facet_scatter_z.png] |
665 | For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data | 665 | For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data |
666 | variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities | 666 | variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities |
667 | of·seaborn. | 667 | of·seaborn. |
668 | *\x8**\x8**\x8**\x8*·Q\x8Qu\x8ui\x8iv\x8ve\x8er\x8r_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 668 | *\x8**\x8**\x8**\x8*·Q\x8Qu\x8ui\x8iv\x8ve\x8er\x8r_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
669 | Visualizing·vector·fields·is·supported·with·quiver·plots: | 669 | Visualizing·vector·fields·is·supported·with·quiver·plots: |
670 | In·[109]:·ds.isel(w=1,·z=1).plot.quiver(x="x",·y="y",·u="A",·v="B") | 670 | In·[109]:·ds.isel(w=1,·z=1).plot.quiver(x="x",·y="y",·u="A",·v="B") |
671 | Out[109]:·<matplotlib.quiver.Quiver·at·0x | 671 | Out[109]:·<matplotlib.quiver.Quiver·at·0xe4e8d538> |
672 | [../_images/ds_simple_quiver.png] | 672 | [../_images/ds_simple_quiver.png] |
673 | where·u·and·v·denote·the·x·and·y·direction·components·of·the·arrow·vectors. | 673 | where·u·and·v·denote·the·x·and·y·direction·components·of·the·arrow·vectors. |
674 | Again,·faceting·is·also·possible: | 674 | Again,·faceting·is·also·possible: |
675 | In·[110]:·ds.plot.quiver(x="x",·y="y",·u="A",·v="B",·col="w",·row="z",·scale=4) | 675 | In·[110]:·ds.plot.quiver(x="x",·y="y",·u="A",·v="B",·col="w",·row="z",·scale=4) |
676 | Out[110]:·<xarray.plot.facetgrid.FacetGrid·at·0x | 676 | Out[110]:·<xarray.plot.facetgrid.FacetGrid·at·0xe4d7d618> |
677 | [../_images/ds_facet_quiver.png] | 677 | [../_images/ds_facet_quiver.png] |
678 | scale·is·required·for·faceted·quiver·plots.·The·scale·determines·the·number·of | 678 | scale·is·required·for·faceted·quiver·plots.·The·scale·determines·the·number·of |
679 | data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the | 679 | data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the |
680 | arrow·longer. | 680 | arrow·longer. |
681 | *\x8**\x8**\x8**\x8*·S\x8St\x8tr\x8re\x8ea\x8am\x8mp\x8pl\x8lo\x8ot\x8t_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 681 | *\x8**\x8**\x8**\x8*·S\x8St\x8tr\x8re\x8ea\x8am\x8mp\x8pl\x8lo\x8ot\x8t_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
682 | Visualizing·vector·fields·is·also·supported·with·streamline·plots: | 682 | Visualizing·vector·fields·is·also·supported·with·streamline·plots: |
683 | In·[111]:·ds.isel(w=1,·z=1).plot.streamplot(x="x",·y="y",·u="A",·v="B") | 683 | In·[111]:·ds.isel(w=1,·z=1).plot.streamplot(x="x",·y="y",·u="A",·v="B") |
684 | Out[111]:·<matplotlib.collections.LineCollection·at·0x | 684 | Out[111]:·<matplotlib.collections.LineCollection·at·0xe254d9d0> |
685 | [../_images/ds_simple_streamplot.png] | 685 | [../_images/ds_simple_streamplot.png] |
686 | where·u·and·v·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to | 686 | where·u·and·v·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to |
687 | the·streamlines.·Again,·faceting·is·also·possible: | 687 | the·streamlines.·Again,·faceting·is·also·possible: |
688 | In·[112]:·ds.plot.streamplot(x="x",·y="y",·u="A",·v="B",·col="w",·row="z") | 688 | In·[112]:·ds.plot.streamplot(x="x",·y="y",·u="A",·v="B",·col="w",·row="z") |
689 | Out[112]:·<xarray.plot.facetgrid.FacetGrid·at·0x | 689 | Out[112]:·<xarray.plot.facetgrid.FacetGrid·at·0xe45858b8> |
690 | [../_images/ds_facet_streamplot.png] | 690 | [../_images/ds_facet_streamplot.png] |
691 | *\x8**\x8**\x8**\x8**\x8*·M\x8Ma\x8ap\x8ps\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8**\x8* | 691 | *\x8**\x8**\x8**\x8**\x8*·M\x8Ma\x8ap\x8ps\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8**\x8* |
692 | To·follow·this·section·you’ll·need·to·have·Cartopy·installed·and·working. | 692 | To·follow·this·section·you’ll·need·to·have·Cartopy·installed·and·working. |
693 | This·script·will·plot·the·air·temperature·on·a·map. | 693 | This·script·will·plot·the·air·temperature·on·a·map. |
694 | In·[113]:·import·cartopy.crs·as·ccrs | 694 | In·[113]:·import·cartopy.crs·as·ccrs |
695 | In·[114]:·air·=·xr.tutorial.open_dataset("air_temperature").air | 695 | In·[114]:·air·=·xr.tutorial.open_dataset("air_temperature").air |
696 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 696 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
697 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by | 697 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by |
698 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 698 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe248abe0>: |
699 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 699 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
700 | resolution)")) | 700 | resolution)")) |
701 | In·[115]:·p·=·air.isel(time=0).plot( | 701 | In·[115]:·p·=·air.isel(time=0).plot( |
702 | ···.....:·····subplot_kws=dict(projection=ccrs.Orthographic(-80,·35), | 702 | ···.....:·····subplot_kws=dict(projection=ccrs.Orthographic(-80,·35), |
703 | facecolor="gray"), | 703 | facecolor="gray"), |
Offset 749, 24 lines modified | Offset 749, 24 lines modified | ||
749 | In·[121]:·import·xarray.plot·as·xplt | 749 | In·[121]:·import·xarray.plot·as·xplt |
Max diff block lines reached; 6584/13769 bytes (47.82%) of diff not shown. |
Offset 554, 15 lines modified | Offset 554, 15 lines modified | ||
554 | <section·id="reshaping-via-coarsen"> | 554 | <section·id="reshaping-via-coarsen"> |
555 | <span·id="reshape-coarsen"></span><h2>Reshaping·via·coarsen<a·class="headerlink"·href="#reshaping-via-coarsen"·title="Link·to·this·heading">¶</a></h2> | 555 | <span·id="reshape-coarsen"></span><h2>Reshaping·via·coarsen<a·class="headerlink"·href="#reshaping-via-coarsen"·title="Link·to·this·heading">¶</a></h2> |
556 | <p>Whilst·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">coarsen</span></code>·is·normally·used·for·reducing·your·data’s·resolution·by·applying·a·reduction·function | 556 | <p>Whilst·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">coarsen</span></code>·is·normally·used·for·reducing·your·data’s·resolution·by·applying·a·reduction·function |
557 | (see·the·<a·class="reference·internal"·href="computation.html#compute-coarsen"><span·class="std·std-ref">page·on·computation</span></a>), | 557 | (see·the·<a·class="reference·internal"·href="computation.html#compute-coarsen"><span·class="std·std-ref">page·on·computation</span></a>), |
558 | it·can·also·be·used·to·reorganise·your·data·without·applying·a·computation·via·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">construct()</span></code>.</p> | 558 | it·can·also·be·used·to·reorganise·your·data·without·applying·a·computation·via·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">construct()</span></code>.</p> |
559 | <p>Taking·our·example·tutorial·air·temperature·dataset·over·the·Northern·US</p> | 559 | <p>Taking·our·example·tutorial·air·temperature·dataset·over·the·Northern·US</p> |
560 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[56]:·</span><span·class="n">air</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)[</span><span·class="s2">"air"</span><span·class="p">]</span> | 560 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[56]:·</span><span·class="n">air</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">"air_temperature"</span><span·class="p">)[</span><span·class="s2">"air"</span><span·class="p">]</span> |
561 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 561 | <span·class="go">ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries·exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by·NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe1a34f50>:·Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name·resolution)"))</span> |
562 | <span·class="gp">In·[57]:·</span><span·class="n">air</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"lon"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"lat"</span><span·class="p">)</span> | 562 | <span·class="gp">In·[57]:·</span><span·class="n">air</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">"lon"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"lat"</span><span·class="p">)</span> |
563 | <span·class="go">NameError:·name·'air'·is·not·defined</span> | 563 | <span·class="go">NameError:·name·'air'·is·not·defined</span> |
564 | </pre></div> | 564 | </pre></div> |
565 | </div> | 565 | </div> |
566 | <img·alt="../_images/pre_coarsening.png"·src="../_images/pre_coarsening.png"·/> | 566 | <img·alt="../_images/pre_coarsening.png"·src="../_images/pre_coarsening.png"·/> |
Offset 441, 15 lines modified | Offset 441, 15 lines modified | ||
441 | Whilst·coarsen·is·normally·used·for·reducing·your·data’s·resolution·by·applying | 441 | Whilst·coarsen·is·normally·used·for·reducing·your·data’s·resolution·by·applying |
442 | a·reduction·function·(see·the·_\x8p_\x8a_\x8g_\x8e_\x8·_\x8o_\x8n_\x8·_\x8c_\x8o_\x8m_\x8p_\x8u_\x8t_\x8a_\x8t_\x8i_\x8o_\x8n),·it·can·also·be·used·to | 442 | a·reduction·function·(see·the·_\x8p_\x8a_\x8g_\x8e_\x8·_\x8o_\x8n_\x8·_\x8c_\x8o_\x8m_\x8p_\x8u_\x8t_\x8a_\x8t_\x8i_\x8o_\x8n),·it·can·also·be·used·to |
443 | reorganise·your·data·without·applying·a·computation·via·construct(). | 443 | reorganise·your·data·without·applying·a·computation·via·construct(). |
444 | Taking·our·example·tutorial·air·temperature·dataset·over·the·Northern·US | 444 | Taking·our·example·tutorial·air·temperature·dataset·over·the·Northern·US |
445 | In·[56]:·air·=·xr.tutorial.open_dataset("air_temperature")["air"] | 445 | In·[56]:·air·=·xr.tutorial.open_dataset("air_temperature")["air"] |
446 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries | 446 | ConnectionError:·HTTPSConnectionPool(host='github.com',·port=443):·Max·retries |
447 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by | 447 | exceeded·with·url:·/pydata/xarray-data/raw/master/air_temperature.nc·(Caused·by |
448 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0x | 448 | NameResolutionError("<urllib3.connection.HTTPSConnection·object·at·0xe1a34f50>: |
449 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name | 449 | Failed·to·resolve·'github.com'·([Errno·-3]·Temporary·failure·in·name |
450 | resolution)")) | 450 | resolution)")) |
451 | In·[57]:·air.isel(time=0).plot(x="lon",·y="lat") | 451 | In·[57]:·air.isel(time=0).plot(x="lon",·y="lat") |
452 | NameError:·name·'air'·is·not·defined | 452 | NameError:·name·'air'·is·not·defined |
453 | [../_images/pre_coarsening.png] | 453 | [../_images/pre_coarsening.png] |
Offset 84, 63 lines modified | Offset 84, 68 lines modified | ||
84 | <h3>Generating·Examples<a·class="headerlink"·href="#generating-examples"·title="Link·to·this·heading">¶</a></h3> | 84 | <h3>Generating·Examples<a·class="headerlink"·href="#generating-examples"·title="Link·to·this·heading">¶</a></h3> |
85 | <p>To·see·an·example·of·what·each·of·these·strategies·might·produce,·you·can·call·one·followed·by·the·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·method, | 85 | <p>To·see·an·example·of·what·each·of·these·strategies·might·produce,·you·can·call·one·followed·by·the·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·method, |
86 | which·is·a·general·hypothesis·method·valid·for·all·strategies.</p> | 86 | which·is·a·general·hypothesis·method·valid·for·all·strategies.</p> |
87 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[2]:·</span><span·class="kn">import</span>·<span·class="nn">xarray.testing.strategies</span>·<span·class="k">as</span>·<span·class="nn">xrst</span> | 87 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[2]:·</span><span·class="kn">import</span>·<span·class="nn">xarray.testing.strategies</span>·<span·class="k">as</span>·<span·class="nn">xrst</span> |
88 | <span·class="gp">In·[3]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> | 88 | <span·class="gp">In·[3]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> |
89 | <span·class="gh">Out[3]:·</span> | 89 | <span·class="gh">Out[3]:·</span> |
90 | <span·class="go"><xarray.Variable·( | 90 | <span·class="go"><xarray.Variable·(Á7:·1)>·Size:·8B</span> |
91 | <span·class="go">array([inf])</span> | ||
91 | <span·class="go">array([[3983055198,·3397777411]],·dtype=uint32)</span> | ||
92 | <span·class="go">Attributes:</span> | ||
93 | <span·class="go">····hĦmůſ:····{'²žAžg':·False,·'ĢŪ':·None,·'ſů½èf':·'²ŻċkŬ',·'ń':·False,·'Ŝùu...</span> | ||
94 | <span·class="go">····žıŔ:······{'æ':·None,·'Ô':·None,·'ſŜŏL':·True,·'TRUE':·False,·'ář':·array...</span> | ||
95 | <span·class="gp">In·[4]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> | 92 | <span·class="gp">In·[4]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> |
96 | <span·class="gh">Out[4]:·</span> | 93 | <span·class="gh">Out[4]:·</span> |
97 | <span·class="go"><xarray.Variable·( | 94 | <span·class="go"><xarray.Variable·(ߎŜóò:·6,·äãøŽ:·3,·ßhſſ:·3)>·Size:·432B</span> |
98 | <span·class="go">array([[[·· | 95 | <span·class="go">array([[[-6.104e-05,·-6.104e-05,·-6.104e-05],</span> |
96 | <span·class="go">········[-6.104e-05,·-6.104e-05,·-6.104e-05],</span> | ||
97 | <span·class="go">········[-6.104e-05,·-6.104e-05,·-6.104e-05]],</span> | ||
99 | <span·class="go">·······[[ | 98 | <span·class="go">·······[[-6.104e-05,·-6.104e-05,·-6.104e-05],</span> |
99 | <span·class="go">········[-6.104e-05,·-6.104e-05,·-6.104e-05],</span> | ||
100 | <span·class="go">········[-6.104e-05,·-6.104e-05,·-6.104e-05]],</span> | ||
101 | <span·class="go">·······[[-6.104e-05,·-6.104e-05,·-6.104e-05],</span> | ||
102 | <span·class="go">········[-6.104e-05,·-6.104e-05,·-6.104e-05],</span> | ||
103 | <span·class="go">········[-6.104e-05,·-6.104e-05,·-6.104e-05]],</span> | ||
104 | <span·class="go">·······[[-6.104e-05,·-6.104e-05,·-6.104e-05],</span> | ||
105 | <span·class="go">········[-6.104e-05,·-6.104e-05,·-6.104e-05],</span> | ||
106 | <span·class="go">········[-6.104e-05,·-6.104e-05,·-6.104e-05]],</span> | ||
107 | <span·class="go">·······[[-6.104e-05,·-6.104e-05,·-6.104e-05],</span> | ||
108 | <span·class="go">········[-6.104e-05,·-6.104e-05,·-6.104e-05],</span> | ||
109 | <span·class="go">········[-6.104e-05,·-6.104e-05,·-6.104e-05]],</span> | ||
110 | <span·class="go">·······[[-6.104e-05,·-6.104e-05,·-6.104e-05],</span> | ||
111 | <span·class="go">········[-6.104e-05,·-6.104e-05,·-6.104e-05],</span> | ||
112 | <span·class="go">········[-6.104e-05,·-6.104e-05,·-6.104e-05]]],·shape=(6,·3,·3))</span> | ||
113 | <span·class="go">Attributes:</span> | ||
114 | <span·class="go">····ĜèŶ³:·····{'ai':·False,·'å':·None,·'':·None}</span> | ||
100 | <span·class="gp">In·[5]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> | 115 | <span·class="gp">In·[5]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> |
101 | <span·class="gh">Out[5]:·</span> | 116 | <span·class="gh">Out[5]:·</span> |
102 | <span·class="go"><xarray.Variable·( | 117 | <span·class="go"><xarray.Variable·(ŷ:·2,·Ŧ:·4,·Őĸ:·6)>·Size:·768B</span> |
103 | <span·class="go">array([[[·-9346,··30561,··30561,··30561,··30561],</span> | ||
104 | <span·class="go">········[·30561,··30561,··30561,··30561,··30561],</span> | ||
105 | <span·class="go">········[·30561,··30561,··30561,··30561,·-32768],</span> | ||
106 | <span·class="go">········[·30561,··30561,··30561,··30561,··30561],</span> | ||
107 | <span·class="go">······· | 118 | <span·class="go">array([[[·······nan+3.916e-117j,·-3.403e+38+5.000e-001j,········nan+3.916e-117j,</span> |
119 | <span·class="go">················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e-117j],</span> | ||
120 | <span·class="go">········[·······nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e-117j,</span> | ||
121 | <span·class="go">················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e-117j],</span> | ||
122 | <span·class="go">········[·······nan+3.916e-117j,········nan+3.916e-117j,········nan·······+infj,</span> | ||
123 | <span·class="go">················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e-117j],</span> | ||
124 | <span·class="go">········[·······nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e-117j,</span> | ||
125 | <span·class="go">················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e-117j]],</span> | ||
126 | <span·class="go">·······[[·······nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e-117j,</span> | ||
127 | <span·class="go">················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e-117j],</span> | ||
128 | <span·class="go">········[·······nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e-117j,</span> | ||
129 | <span·class="go">················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e-117j],</span> | ||
130 | <span·class="go">········[·······nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e-117j,</span> | ||
131 | <span·class="go">················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e-117j],</span> | ||
132 | <span·class="go">········[·······nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e-117j,</span> | ||
133 | <span·class="go">················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e-117j]]],·shape=(2,·4,·6))</span> | ||
108 | <span·class="go">·······[[·30561,··30561,··30561,··30561,··30561],</span> | ||
109 | <span·class="go">········[·30561,··30561,··30561,··30561,··30561],</span> | ||
110 | <span·class="go">········[·30561,··30561,··30561,··14053,···5910],</span> | ||
111 | <span·class="go">········[·30561,··30561,··30561,··30561,··30561],</span> | ||
112 | <span·class="go">········[·30561,··30561,···8140,··30561,··30561]],</span> | ||
113 | <span·class="go">·······[[·30561,···8815,··30561,·-19110,··30561],</span> | ||
114 | <span·class="go">········[·30561,··30561,··30561,··30561,··30561],</span> | ||
115 | <span·class="go">········[·30561,··30561,··30561,··30561,··30561],</span> | ||
116 | <span·class="go">········[·30561,··30561,··30561,··30561,··30561],</span> | ||
117 | <span·class="go">········[·30561,··30561,··30561,··30561,··30561]],</span> | ||
118 | <span·class="go">·······[[·30561,··30561,··30561,··30561,··30561],</span> | ||
119 | <span·class="go">········[·30561,··12260,··30561,··30561,··30561],</span> | ||
120 | <span·class="go">········[·30561,··30561,··30561,··30561,··30561],</span> | ||
121 | <span·class="go">········[·30561,··30561,·-12902,··30561,··30561],</span> | ||
122 | <span·class="go">········[·30561,··30561,··30561,··-9648,··30561]]],·shape=(4,·5,·5),·dtype=int16)</span> | ||
123 | <span·class="go">Attributes:</span> | 134 | <span·class="go">Attributes:</span> |
135 | <span·class="go">····ŧŧĩçj:····{'ŐŽŬżŗ':·False}</span> | ||
124 | <span·class="go">····Żò:·······True</span> | ||
125 | <span·class="go">····:·········ŽŽR</span> | ||
126 | <span·class="go">····ì:········None</span> | ||
127 | <span·class="go">····Ňžě0ŋ:····['-9223372036854773590'··················'NaT']</span> | ||
128 | <span·class="go">····ŪĨIJĿĽ:····[b'4x'·b'<\x13']</span> | ||
129 | <span·class="go">····żÀüFß:····[['NaT']]</span> | ||
130 | <span·class="go">····ò5Sſş:····False</span> | ||
131 | <span·class="go">····ſSc0:·····True</span> | ||
132 | <span·class="go">····Hę:·······[[b'Tj\xa5\xb2\x8b'·b'H']\n·[b'\x91\xe3\xec'·b'Tj\xa5\xb2\x8b']]</span> | ||
133 | </pre></div> | 136 | </pre></div> |
134 | </div> | 137 | </div> |
135 | <p>You·can·see·that·calling·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·multiple·times·will·generate·different·examples,·giving·you·an·idea·of·the·wide | 138 | <p>You·can·see·that·calling·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·multiple·times·will·generate·different·examples,·giving·you·an·idea·of·the·wide |
136 | range·of·data·that·the·xarray·strategies·can·generate.</p> | 139 | range·of·data·that·the·xarray·strategies·can·generate.</p> |
137 | <p>In·your·tests·however·you·should·not·use·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·-·instead·you·should·parameterize·your·tests·with·the | 140 | <p>In·your·tests·however·you·should·not·use·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·-·instead·you·should·parameterize·your·tests·with·the |
138 | <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.given()</span></code>·decorator:</p> | 141 | <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.given()</span></code>·decorator:</p> |
139 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[6]:·</span><span·class="kn">from</span>·<span·class="nn">hypothesis</span>·<span·class="kn">import</span>·<span·class="n">given</span> | 142 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[6]:·</span><span·class="kn">from</span>·<span·class="nn">hypothesis</span>·<span·class="kn">import</span>·<span·class="n">given</span> |
Offset 158, 108 lines modified | Offset 163, 152 lines modified | ||
158 | <p>Xarray’s·strategies·can·accept·other·strategies·as·arguments,·allowing·you·to·customise·the·contents·of·the·generated | 163 | <p>Xarray’s·strategies·can·accept·other·strategies·as·arguments,·allowing·you·to·customise·the·contents·of·the·generated |
159 | examples.</p> | 164 | examples.</p> |
160 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all·other·details·still·arbitrary</span> | 165 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all·other·details·still·arbitrary</span> |
161 | <span·class="gp">In·[8]:·</span><span·class="kn">from</span>·<span·class="nn">hypothesis.extra.numpy</span>·<span·class="kn">import</span>·<span·class="n">complex_number_dtypes</span> | 166 | <span·class="gp">In·[8]:·</span><span·class="kn">from</span>·<span·class="nn">hypothesis.extra.numpy</span>·<span·class="kn">import</span>·<span·class="n">complex_number_dtypes</span> |
162 | <span·class="gp">In·[9]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dtype</span><span·class="o">=</span><span·class="n">complex_number_dtypes</span><span·class="p">())</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> | 167 | <span·class="gp">In·[9]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dtype</span><span·class="o">=</span><span·class="n">complex_number_dtypes</span><span·class="p">())</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> |
163 | <span·class="gh">Out[9]:·</span> | 168 | <span·class="gh">Out[9]:·</span> |
164 | <span·class="go"><xarray.Variable·( | 169 | <span·class="go"><xarray.Variable·(ųy:·5,·ŴĭŐ:·4,·Íė:·5)>·Size:·800B</span> |
165 | <span·class="go">array([[·4.941e-324-2.220e-16j,·-7.106e+016+6.104e-05j],</span> | ||
166 | <span·class="go">·······[·3.333e-001-2.220e-16j,··1.000e+007······-infj],</span> | ||
167 | <span·class="go"> | 170 | <span·class="go">array([[[·3.403e+38······+nanj,········nan-1.401e-45j,········nan-1.401e-45j,</span> |
171 | <span·class="go">················nan-1.401e-45j,········nan-1.401e-45j],</span> | ||
172 | <span·class="go">········[·······nan-1.401e-45j,········nan-1.401e-45j,········nan-1.401e-45j,</span> | ||
173 | <span·class="go">················nan-1.401e-45j,········nan-1.401e-45j],</span> | ||
174 | <span·class="go">········[·······nan-1.401e-45j,········nan-1.401e-45j,·-1.192e-07-1.100e+00j,</span> | ||
175 | <span·class="go">················nan-1.401e-45j,········nan-1.401e-45j],</span> | ||
176 | <span·class="go">········[·······nan-1.401e-45j,··0.000e+00+1.000e+00j,········nan-1.401e-45j,</span> | ||
177 | <span·class="go">················nan-1.401e-45j,·······-inf-0.000e+00j]],</span> | ||
178 | <span·class="go">·······[[·······nan-1.401e-45j,··3.403e+38+6.060e+16j,········nan-1.401e-45j,</span> | ||
179 | <span·class="go">················nan-1.401e-45j,·-0.000e+00+3.399e+16j],</span> | ||
180 | <span·class="go">········[·2.000e+00+3.333e-01j,········nan-1.401e-45j,········nan-1.401e-45j,</span> | ||
181 | <span·class="go">················nan-1.401e-45j,········nan-1.401e-45j],</span> | ||
182 | <span·class="go">········[·······nan-1.401e-45j,········nan-1.401e-45j,········nan-1.401e-45j,</span> | ||
Max diff block lines reached; 18174/32725 bytes (55.54%) of diff not shown. |
Offset 28, 66 lines modified | Offset 28, 84 lines modified | ||
28 | To·see·an·example·of·what·each·of·these·strategies·might·produce,·you·can·call | 28 | To·see·an·example·of·what·each·of·these·strategies·might·produce,·you·can·call |
29 | one·followed·by·the·.example()·method,·which·is·a·general·hypothesis·method | 29 | one·followed·by·the·.example()·method,·which·is·a·general·hypothesis·method |
30 | valid·for·all·strategies. | 30 | valid·for·all·strategies. |
31 | In·[2]:·import·xarray.testing.strategies·as·xrst | 31 | In·[2]:·import·xarray.testing.strategies·as·xrst |
32 | In·[3]:·xrst.variables().example() | 32 | In·[3]:·xrst.variables().example() |
33 | Out[3]: | 33 | Out[3]: |
34 | <xarray.Variable·( | 34 | <xarray.Variable·(Á7:·1)>·Size:·8B |
35 | array([inf]) | ||
35 | array([[3983055198,·3397777411]],·dtype=uint32) | ||
36 | Attributes: | ||
37 | ····hĦmůſ:····{'²žAžg':·False,·'ĢŪ':·None,·'ſů½èf':·'²ŻċkŬ',·'ń':·False, | ||
38 | 'Ŝùu... | ||
39 | ····žıŔ:······{'æ':·None,·'Ô':·None,·'ſŜŏL':·True,·'TRUE':·False,·'ář': | ||
40 | array... | ||
41 | In·[4]:·xrst.variables().example() | 36 | In·[4]:·xrst.variables().example() |
42 | Out[4]: | 37 | Out[4]: |
43 | <xarray.Variable·(ð:·2,·ĖŁżŠÛ:·1,·K:·1)>·Size:·8B | ||
44 | array( | 38 | <xarray.Variable·(ߎŜóò:·6,·äãøŽ:·3,·ßhſſ:·3)>·Size:·432B |
39 | array([[[-6.104e-05,·-6.104e-05,·-6.104e-05], | ||
40 | ········[-6.104e-05,·-6.104e-05,·-6.104e-05], | ||
41 | ········[-6.104e-05,·-6.104e-05,·-6.104e-05]], | ||
45 | ·······[[ | 42 | ·······[[-6.104e-05,·-6.104e-05,·-6.104e-05], |
43 | ········[-6.104e-05,·-6.104e-05,·-6.104e-05], | ||
44 | ········[-6.104e-05,·-6.104e-05,·-6.104e-05]], | ||
45 | ·······[[-6.104e-05,·-6.104e-05,·-6.104e-05], | ||
46 | ········[-6.104e-05,·-6.104e-05,·-6.104e-05], | ||
47 | ········[-6.104e-05,·-6.104e-05,·-6.104e-05]], | ||
48 | ·······[[-6.104e-05,·-6.104e-05,·-6.104e-05], | ||
49 | ········[-6.104e-05,·-6.104e-05,·-6.104e-05], | ||
50 | ········[-6.104e-05,·-6.104e-05,·-6.104e-05]], | ||
51 | ·······[[-6.104e-05,·-6.104e-05,·-6.104e-05], | ||
52 | ········[-6.104e-05,·-6.104e-05,·-6.104e-05], | ||
53 | ········[-6.104e-05,·-6.104e-05,·-6.104e-05]], | ||
54 | ·······[[-6.104e-05,·-6.104e-05,·-6.104e-05], | ||
55 | ········[-6.104e-05,·-6.104e-05,·-6.104e-05], | ||
56 | ········[-6.104e-05,·-6.104e-05,·-6.104e-05]]],·shape=(6,·3,·3)) | ||
57 | Attributes: | ||
58 | ····ĜèŶ³:·····{'ai':·False,·'å':·None,·'':·None} | ||
46 | In·[5]:·xrst.variables().example() | 59 | In·[5]:·xrst.variables().example() |
47 | Out[5]: | 60 | Out[5]: |
48 | <xarray.Variable·(şĘ:·4,·ÛſžŜá:·5,·ŸCŽg:·5)>·Size:·200B | ||
49 | array([[[·-9346,··30561,··30561,··30561,··30561], | ||
50 | ········[·30561,··30561,··30561,··30561,··30561], | ||
51 | ········[·30561,··30561,··30561,··30561,·-32768], | ||
52 | ········[·30561,··30561,··30561,··30561,··30561], | ||
53 | 61 | <xarray.Variable·(ŷ:·2,·Ŧ:·4,·Őĸ:·6)>·Size:·768B | |
62 | array([[[·······nan+3.916e-117j,·-3.403e+38+5.000e-001j,········nan+3.916e- | ||
63 | 117j, | ||
64 | ················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e- | ||
65 | 117j], | ||
66 | ········[·······nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e- | ||
67 | 117j, | ||
68 | ················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e- | ||
69 | 117j], | ||
70 | ········[·······nan+3.916e-117j,········nan+3.916e-117j,········nan | ||
71 | +infj, | ||
72 | ················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e- | ||
73 | 117j], | ||
74 | ········[·······nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e- | ||
75 | 117j, | ||
76 | ················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e- | ||
77 | 117j]], | ||
78 | ·······[[·······nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e- | ||
79 | 117j, | ||
80 | ················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e- | ||
81 | 117j], | ||
82 | ········[·······nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e- | ||
83 | 117j, | ||
84 | ················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e- | ||
85 | 117j], | ||
86 | ········[·······nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e- | ||
87 | 117j, | ||
88 | ················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e- | ||
89 | 117j], | ||
90 | ········[·······nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e- | ||
91 | 117j, | ||
92 | ················nan+3.916e-117j,········nan+3.916e-117j,········nan+3.916e- | ||
93 | 117j]]],·shape=(2,·4,·6)) | ||
54 | ·······[[·30561,··30561,··30561,··30561,··30561], | ||
55 | ········[·30561,··30561,··30561,··30561,··30561], | ||
56 | ········[·30561,··30561,··30561,··14053,···5910], | ||
57 | ········[·30561,··30561,··30561,··30561,··30561], | ||
58 | ········[·30561,··30561,···8140,··30561,··30561]], | ||
59 | ·······[[·30561,···8815,··30561,·-19110,··30561], | ||
60 | ········[·30561,··30561,··30561,··30561,··30561], | ||
61 | ········[·30561,··30561,··30561,··30561,··30561], | ||
62 | ········[·30561,··30561,··30561,··30561,··30561], | ||
63 | ········[·30561,··30561,··30561,··30561,··30561]], | ||
64 | ·······[[·30561,··30561,··30561,··30561,··30561], | ||
65 | ········[·30561,··12260,··30561,··30561,··30561], | ||
66 | ········[·30561,··30561,··30561,··30561,··30561], | ||
67 | ········[·30561,··30561,·-12902,··30561,··30561], | ||
68 | ········[·30561,··30561,··30561,··-9648,··30561]]],·shape=(4,·5,·5), | ||
69 | dtype=int16) | ||
70 | Attributes: | 94 | Attributes: |
95 | ····ŧŧĩçj:····{'ŐŽŬżŗ':·False} | ||
71 | ····Żò:·······True | ||
72 | ····:·········ŽŽR | ||
73 | ····ì:········None | ||
74 | ····Ňžě0ŋ:····['-9223372036854773590'··················'NaT'] | ||
75 | ····ŪĨIJĿĽ:····[b'4x'·b'<\x13'] | ||
76 | ····żÀüFß:····[['NaT']] | ||
77 | ····ò5Sſş:····False | ||
78 | ····ſSc0:·····True | ||
79 | ····Hę:·······[[b'Tj\xa5\xb2\x8b'·b'H']\n·[b'\x91\xe3\xec'·b'Tj\xa5\xb2\x8b']] | ||
80 | You·can·see·that·calling·.example()·multiple·times·will·generate·different | 96 | You·can·see·that·calling·.example()·multiple·times·will·generate·different |
81 | examples,·giving·you·an·idea·of·the·wide·range·of·data·that·the·xarray | 97 | examples,·giving·you·an·idea·of·the·wide·range·of·data·that·the·xarray |
82 | strategies·can·generate. | 98 | strategies·can·generate. |
83 | In·your·tests·however·you·should·not·use·.example()·-·instead·you·should | 99 | In·your·tests·however·you·should·not·use·.example()·-·instead·you·should |
84 | parameterize·your·tests·with·the·hypothesis.given()·decorator: | 100 | parameterize·your·tests·with·the·hypothesis.given()·decorator: |
85 | In·[6]:·from·hypothesis·import·given | 101 | In·[6]:·from·hypothesis·import·given |
86 | In·[7]:·@given(xrst.variables()) | 102 | In·[7]:·@given(xrst.variables()) |
Offset 99, 112 lines modified | Offset 117, 153 lines modified | ||
99 | customise·the·contents·of·the·generated·examples. | 117 | customise·the·contents·of·the·generated·examples. |
100 | #·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all | 118 | #·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all |
101 | other·details·still·arbitrary | 119 | other·details·still·arbitrary |
Max diff block lines reached; 11082/16433 bytes (67.44%) of diff not shown. |
Offset 8191, 15 lines modified | Offset 8191, 15 lines modified | ||
8191 | <li><p>New·<code·class="docutils·literal·notranslate"><span·class="pre">xray.Dataset.where</span></code>·method·for·masking·xray·objects·according | 8191 | <li><p>New·<code·class="docutils·literal·notranslate"><span·class="pre">xray.Dataset.where</span></code>·method·for·masking·xray·objects·according |
8192 | to·some·criteria.·This·works·particularly·well·with·multi-dimensional·data:</p> | 8192 | to·some·criteria.·This·works·particularly·well·with·multi-dimensional·data:</p> |
8193 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[45]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xray</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">(</span><span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">100</span><span·class="p">),</span>·<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">100</span><span·class="p">)})</span> | 8193 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[45]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xray</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">(</span><span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">100</span><span·class="p">),</span>·<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">100</span><span·class="p">)})</span> |
8194 | <span·class="gp">In·[46]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">"distance"</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">sqrt</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">x</span><span·class="o">**</span><span·class="mi">2</span>·<span·class="o">+</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">y</span><span·class="o">**</span><span·class="mi">2</span><span·class="p">)</span> | 8194 | <span·class="gp">In·[46]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">"distance"</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">sqrt</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">x</span><span·class="o">**</span><span·class="mi">2</span>·<span·class="o">+</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">y</span><span·class="o">**</span><span·class="mi">2</span><span·class="p">)</span> |
8195 | <span·class="gp">In·[47]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">distance</span><span·class="o">.</span><span·class="n">where</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">distance</span>·<span·class="o"><</span>·<span·class="mi">100</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span> | 8195 | <span·class="gp">In·[47]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">distance</span><span·class="o">.</span><span·class="n">where</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">distance</span>·<span·class="o"><</span>·<span·class="mi">100</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span> |
8196 | <span·class="gh">Out[47]:·</span><span·class="go"><matplotlib.collections.QuadMesh·at·0x | 8196 | <span·class="gh">Out[47]:·</span><span·class="go"><matplotlib.collections.QuadMesh·at·0xe2ee5b30></span> |
8197 | </pre></div> | 8197 | </pre></div> |
8198 | </div> | 8198 | </div> |
8199 | <a·class="reference·internal·image-reference"·href="_images/where_example.png"><img·alt="_images/where_example.png"·src="_images/where_example.png"·style="width:·4in;·height:·4in;"·/> | 8199 | <a·class="reference·internal·image-reference"·href="_images/where_example.png"><img·alt="_images/where_example.png"·src="_images/where_example.png"·style="width:·4in;·height:·4in;"·/> |
8200 | </a> | 8200 | </a> |
8201 | </li> | 8201 | </li> |
8202 | <li><p>Added·new·methods·<code·class="docutils·literal·notranslate"><span·class="pre">xray.DataArray.diff</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">xray.Dataset.diff</span></code> | 8202 | <li><p>Added·new·methods·<code·class="docutils·literal·notranslate"><span·class="pre">xray.DataArray.diff</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">xray.Dataset.diff</span></code> |
8203 | for·finite·difference·calculations·along·a·given·axis.</p></li> | 8203 | for·finite·difference·calculations·along·a·given·axis.</p></li> |
Offset 5286, 15 lines modified | Offset 5286, 15 lines modified | ||
5286 | ····*·New·xray.Dataset.where·method·for·masking·xray·objects·according·to·some | 5286 | ····*·New·xray.Dataset.where·method·for·masking·xray·objects·according·to·some |
5287 | ······criteria.·This·works·particularly·well·with·multi-dimensional·data: | 5287 | ······criteria.·This·works·particularly·well·with·multi-dimensional·data: |
5288 | ······In·[45]:·ds·=·xray.Dataset(coords={"x":·range(100),·"y":·range(100)}) | 5288 | ······In·[45]:·ds·=·xray.Dataset(coords={"x":·range(100),·"y":·range(100)}) |
5289 | ······In·[46]:·ds["distance"]·=·np.sqrt(ds.x**2·+·ds.y**2) | 5289 | ······In·[46]:·ds["distance"]·=·np.sqrt(ds.x**2·+·ds.y**2) |
5290 | ······In·[47]:·ds.distance.where(ds.distance·<·100).plot() | 5290 | ······In·[47]:·ds.distance.where(ds.distance·<·100).plot() |
5291 | ······Out[47]:·<matplotlib.collections.QuadMesh·at·0x | 5291 | ······Out[47]:·<matplotlib.collections.QuadMesh·at·0xe2ee5b30> |
5292 | ······_\x8[_\x8__\x8i_\x8m_\x8a_\x8g_\x8e_\x8s_\x8/_\x8w_\x8h_\x8e_\x8r_\x8e_\x8__\x8e_\x8x_\x8a_\x8m_\x8p_\x8l_\x8e_\x8._\x8p_\x8n_\x8g_\x8] | 5292 | ······_\x8[_\x8__\x8i_\x8m_\x8a_\x8g_\x8e_\x8s_\x8/_\x8w_\x8h_\x8e_\x8r_\x8e_\x8__\x8e_\x8x_\x8a_\x8m_\x8p_\x8l_\x8e_\x8._\x8p_\x8n_\x8g_\x8] |
5293 | ····*·Added·new·methods·xray.DataArray.diff·and·xray.Dataset.diff·for·finite | 5293 | ····*·Added·new·methods·xray.DataArray.diff·and·xray.Dataset.diff·for·finite |
5294 | ······difference·calculations·along·a·given·axis. | 5294 | ······difference·calculations·along·a·given·axis. |
5295 | ····*·New·xray.DataArray.to_masked_array·convenience·method·for·returning·a | 5295 | ····*·New·xray.DataArray.to_masked_array·convenience·method·for·returning·a |
5296 | ······numpy.ma.MaskedArray. | 5296 | ······numpy.ma.MaskedArray. |
5297 | ······In·[48]:·da·=·xray.DataArray(np.random.random_sample(size=(5,·4))) | 5297 | ······In·[48]:·da·=·xray.DataArray(np.random.random_sample(size=(5,·4))) |