{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.DermTyR6/b1/python-xarray_2025.03.1-2_amd64.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.DermTyR6/b2/python-xarray_2025.03.1-2_amd64.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,3 +1,3 @@\n \n- ce4776fab526d0380f2e989881f12bd8 5274300 doc optional python-xarray-doc_2025.03.1-2_all.deb\n+ 3a31903a8ab9a86876cacfa7be61dd81 5274380 doc optional python-xarray-doc_2025.03.1-2_all.deb\n a6fa78f342b9d909976941371603383a 819812 python optional python3-xarray_2025.03.1-2_all.deb\n"}, {"source1": "python-xarray-doc_2025.03.1-2_all.deb", "source2": "python-xarray-doc_2025.03.1-2_all.deb", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -1,3 +1,3 @@\n -rw-r--r-- 0 0 0 4 2025-04-10 15:13:46.000000 debian-binary\n--rw-r--r-- 0 0 0 7564 2025-04-10 15:13:46.000000 control.tar.xz\n--rw-r--r-- 0 0 0 5266544 2025-04-10 15:13:46.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 7560 2025-04-10 15:13:46.000000 control.tar.xz\n+-rw-r--r-- 0 0 0 5266628 2025-04-10 15:13:46.000000 data.tar.xz\n"}, {"source1": "control.tar.xz", "source2": "control.tar.xz", "unified_diff": null, "details": [{"source1": "control.tar", "source2": "control.tar", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "comments": ["Files differ"], "unified_diff": null}]}]}]}, {"source1": "data.tar.xz", "source2": "data.tar.xz", "unified_diff": null, "details": [{"source1": "data.tar", "source2": "data.tar", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -278,31 +278,31 @@\n -rw-r--r-- 0 root (0) root (0) 461 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/dask.html\n -rw-r--r-- 0 root (0) root (0) 494 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/data-structures.html\n -rw-r--r-- 0 root (0) root (0) 8448 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/developers-meeting.html\n -rw-r--r-- 0 root (0) root (0) 479 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/duckarrays.html\n -rw-r--r-- 0 root (0) root (0) 22909 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/ecosystem.html\n drwxr-xr-x 0 root (0) root (0) 0 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/\n -rw-r--r-- 0 root (0) root (0) 196815 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html\n--rw-r--r-- 0 root (0) root (0) 16012 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz\n+-rw-r--r-- 0 root (0) root (0) 16006 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz\n -rw-r--r-- 0 root (0) root (0) 82000 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html\n--rw-r--r-- 0 root (0) root (0) 27744 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz\n+-rw-r--r-- 0 root (0) root (0) 27740 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz\n -rw-r--r-- 0 root (0) root (0) 165093 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html\n--rw-r--r-- 0 root (0) root (0) 13303 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz\n+-rw-r--r-- 0 root (0) root (0) 13301 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz\n -rw-r--r-- 0 root (0) root (0) 73045 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html\n--rw-r--r-- 0 root (0) root (0) 25152 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz\n+-rw-r--r-- 0 root (0) root (0) 25154 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz\n -rw-r--r-- 0 root (0) root (0) 58861 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/blank_template.html\n--rw-r--r-- 0 root (0) root (0) 5161 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb.gz\n+-rw-r--r-- 0 root (0) root (0) 5160 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb.gz\n -rw-r--r-- 0 root (0) root (0) 81893 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html\n--rw-r--r-- 0 root (0) root (0) 7238 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz\n+-rw-r--r-- 0 root (0) root (0) 7225 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz\n -rw-r--r-- 0 root (0) root (0) 74674 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html\n -rw-r--r-- 0 root (0) root (0) 14764 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz\n -rw-r--r-- 0 root (0) root (0) 81800 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html\n--rw-r--r-- 0 root (0) root (0) 7008 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz\n+-rw-r--r-- 0 root (0) root (0) 7005 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz\n -rw-r--r-- 0 root (0) root (0) 87944 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/weather-data.html\n--rw-r--r-- 0 root (0) root (0) 368097 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz\n+-rw-r--r-- 0 root (0) root (0) 368074 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz\n -rw-r--r-- 0 root (0) root (0) 491 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/faq.html\n -rw-r--r-- 0 root (0) root (0) 15073 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/gallery.html\n -rw-r--r-- 0 root (0) root (0) 16306 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/genindex.html\n drwxr-xr-x 0 root (0) root (0) 0 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/getting-started-guide/\n -rw-r--r-- 0 root (0) root (0) 51674 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/getting-started-guide/faq.html\n -rw-r--r-- 0 root (0) root (0) 7741 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/getting-started-guide/index.html\n -rw-r--r-- 0 root (0) root (0) 25661 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/getting-started-guide/installing.html\n@@ -332,36 +332,36 @@\n -rw-r--r-- 0 root (0) root (0) 473 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/plotting.html\n -rw-r--r-- 0 root (0) root (0) 6546 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/py-modindex.html\n -rw-r--r-- 0 root (0) root (0) 524 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/quick-overview.html\n -rw-r--r-- 0 root (0) root (0) 443 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/related-projects.html\n -rw-r--r-- 0 root (0) root (0) 476 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/reshaping.html\n -rw-r--r-- 0 root (0) root (0) 24428 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/roadmap.html\n -rw-r--r-- 0 root (0) root (0) 6341 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/search.html\n--rw-r--r-- 0 root (0) root (0) 270445 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/searchindex.js\n+-rw-r--r-- 0 root (0) root (0) 270589 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/searchindex.js\n -rw-r--r-- 0 root (0) root (0) 482 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/terminology.html\n -rw-r--r-- 0 root (0) root (0) 482 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/time-series.html\n -rw-r--r-- 0 root (0) root (0) 13358 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/tutorials-and-videos.html\n drwxr-xr-x 0 root (0) root (0) 0 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/\n -rw-r--r-- 0 root (0) root (0) 58676 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/combining.html\n--rw-r--r-- 0 root (0) root (0) 140285 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/computation.html\n+-rw-r--r-- 0 root (0) root (0) 140282 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/computation.html\n -rw-r--r-- 0 root (0) root (0) 71358 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/dask.html\n -rw-r--r-- 0 root (0) root (0) 150064 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/data-structures.html\n -rw-r--r-- 0 root (0) root (0) 35119 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/duckarrays.html\n -rw-r--r-- 0 root (0) root (0) 50924 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/groupby.html\n -rw-r--r-- 0 root (0) root (0) 120436 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/hierarchical-data.html\n -rw-r--r-- 0 root (0) root (0) 9025 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/index.html\n -rw-r--r-- 0 root (0) root (0) 140669 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/indexing.html\n -rw-r--r-- 0 root (0) root (0) 68768 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/interpolation.html\n -rw-r--r-- 0 root (0) root (0) 147716 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/io.html\n -rw-r--r-- 0 root (0) root (0) 11704 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/options.html\n -rw-r--r-- 0 root (0) root (0) 42223 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/pandas.html\n -rw-r--r-- 0 root (0) root (0) 135402 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/plotting.html\n -rw-r--r-- 0 root (0) root (0) 63021 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/reshaping.html\n -rw-r--r-- 0 root (0) root (0) 46813 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/terminology.html\n--rw-r--r-- 0 root (0) root (0) 49446 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/testing.html\n+-rw-r--r-- 0 root (0) root (0) 49351 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/testing.html\n -rw-r--r-- 0 root (0) root (0) 53681 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/time-series.html\n -rw-r--r-- 0 root (0) root (0) 47248 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/weather-climate.html\n -rw-r--r-- 0 root (0) root (0) 494 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/weather-climate.html\n -rw-r--r-- 0 root (0) root (0) 1051865 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/whats-new.html\n -rw-r--r-- 0 root (0) root (0) 512 2025-04-10 15:13:46.000000 ./usr/share/doc/python-xarray-doc/html/why-xarray.html\n drwxr-xr-x 0 root (0) root (0) 0 2025-04-10 15:13:46.000000 ./usr/share/doc-base/\n -rw-r--r-- 0 root (0) root (0) 290 2025-04-08 14:50:56.000000 ./usr/share/doc-base/python-xarray-doc.python-xarray-doc\n"}, {"source1": "./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html", "source2": "./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html", "unified_diff": "@@ -149,15 +149,15 @@\n 705 server_hostname: str = self.host\n \n File /usr/lib/python3/dist-packages/urllib3/connection.py:205, in HTTPConnection._new_conn(self)\n 204 except socket.gaierror as e:\n --> 205 raise NameResolutionError(self.host, self, e) from e\n 206 except SocketTimeout as e:\n \n-NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x7fe65e424050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\n+NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x7f6d96b94050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\n \n The above exception was the direct cause of the following exception:\n \n MaxRetryError Traceback (most recent call last)\n File /usr/lib/python3/dist-packages/requests/adapters.py:667, in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)\n 666 try:\n --> 667 resp = conn.urlopen(\n@@ -183,15 +183,15 @@\n 844 retries.sleep()\n \n File /usr/lib/python3/dist-packages/urllib3/util/retry.py:519, in Retry.increment(self, method, url, response, error, _pool, _stacktrace)\n 518 reason = error or ResponseError(cause)\n --> 519 raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]\n 521 log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)\n \n-MaxRetryError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/era5-2mt-2019-03-uk.grib (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fe65e424050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+MaxRetryError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/era5-2mt-2019-03-uk.grib (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f6d96b94050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n \n During handling of the above exception, another exception occurred:\n \n ConnectionError Traceback (most recent call last)\n Cell In[2], line 1\n ----> 1 ds = xr.tutorial.load_dataset("era5-2mt-2019-03-uk.grib", engine="cfgrib")\n \n@@ -280,15 +280,15 @@\n 696 if isinstance(e.reason, _SSLError):\n 697 # This branch is for urllib3 v1.22 and later.\n 698 raise SSLError(e, request=request)\n --> 700 raise ConnectionError(e, request=request)\n 702 except ClosedPoolError as e:\n 703 raise ConnectionError(e, request=request)\n \n-ConnectionError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/era5-2mt-2019-03-uk.grib (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fe65e424050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+ConnectionError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/era5-2mt-2019-03-uk.grib (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f6d96b94050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n \n \n
Let\u2019s create a simple plot of 2-m air temperature in degrees Celsius:
\n[3]:\n
\n-Error in callback <function _draw_all_if_interactive at 0x7fe65e7e8fe0> (for post_execute), with arguments args (),kwargs {}:\n+Error in callback <function _draw_all_if_interactive at 0x7f6d96f50fe0> (for post_execute), with arguments args (),kwargs {}:\n
\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -93,15 +93,15 @@\n File /usr/lib/python3/dist-packages/urllib3/connection.py:205, in\n HTTPConnection._new_conn(self)\n 204 except socket.gaierror as e:\n --> 205 raise NameResolutionError(self.host, self, e) from e\n 206 except SocketTimeout as e:\n \n NameResolutionError: : Failed to resolve 'github.com' ([Errno -3] Temporary failure\n+0x7f6d96b94050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure\n in name resolution)\n \n The above exception was the direct cause of the following exception:\n \n MaxRetryError Traceback (most recent call last)\n File /usr/lib/python3/dist-packages/requests/adapters.py:667, in\n HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)\n@@ -137,15 +137,15 @@\n --> 519 raise MaxRetryError(_pool, url, reason) from reason # type: ignore\n [arg-type]\n 521 log.debug(\"Incremented Retry for (url='%s'): %r\", url, new_retry)\n \n MaxRetryError: HTTPSConnectionPool(host='github.com', port=443): Max retries\n exceeded with url: /pydata/xarray-data/raw/master/era5-2mt-2019-03-uk.grib\n (Caused by NameResolutionError(\": Failed to resolve 'github.com' ([Errno -3] Temporary failure\n+0x7f6d96b94050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure\n in name resolution)\"))\n \n During handling of the above exception, another exception occurred:\n \n ConnectionError Traceback (most recent call last)\n Cell In[2], line 1\n ----> 1 ds = xr.tutorial.load_dataset(\"era5-2mt-2019-03-uk.grib\",\n@@ -255,15 +255,15 @@\n --> 700 raise ConnectionError(e, request=request)\n 702 except ClosedPoolError as e:\n 703 raise ConnectionError(e, request=request)\n \n ConnectionError: HTTPSConnectionPool(host='github.com', port=443): Max retries\n exceeded with url: /pydata/xarray-data/raw/master/era5-2mt-2019-03-uk.grib\n (Caused by NameResolutionError(\": Failed to resolve 'github.com' ([Errno -3] Temporary failure\n+0x7f6d96b94050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure\n in name resolution)\"))\n Let\u2019s create a simple plot of 2-m air temperature in degrees Celsius:\n [3]:\n ds = ds - 273.15\n ds.t2m[0].plot(cmap=plt.cm.coolwarm)\n ---------------------------------------------------------------------------\n NameError Traceback (most recent call last)\n@@ -298,15 +298,15 @@\n 10 plt.title(\"ERA5 - 2m temperature British Isles March 2019\")\n \n NameError: name 'ds' is not defined\n /usr/lib/python3/dist-packages/cartopy/io/__init__.py:241: DownloadWarning:\n Downloading: https://naturalearth.s3.amazonaws.com/10m_physical/\n ne_10m_coastline.zip\n warnings.warn(f'Downloading: {url}', DownloadWarning)\n-Error in callback (for\n+Error in callback (for\n post_execute), with arguments args (),kwargs {}:\n ---------------------------------------------------------------------------\n gaierror Traceback (most recent call last)\n File /usr/lib/python3.13/urllib/request.py:1319, in AbstractHTTPHandler.do_open\n (self, http_class, req, **http_conn_args)\n 1318 try:\n -> 1319 h.request(req.get_method(), req.selector, req.data, headers,\n"}]}, {"source1": "./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz", "source2": "./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz", "unified_diff": null, "details": [{"source1": "ERA5-GRIB-example.ipynb", "source2": "ERA5-GRIB-example.ipynb", "unified_diff": null, "details": [{"source1": "Pretty-printed", "source2": "Pretty-printed", "comments": ["Similarity: 0.9983880154932787%", "Differences: {\"'cells'\": \"{2: {'metadata': {'execution': {'iopub.execute_input': '2026-05-15T22:14:01.560179Z', \"", " \"'iopub.status.busy': '2026-05-15T22:14:01.559939Z', 'iopub.status.idle': \"", " \"'2026-05-15T22:14:03.077483Z', 'shell.execute_reply': \"", " \"'2026-05-15T22:14:03.076728Z'}}}, 4: {'metadata': {'execution': \"", " \"{'iopub.execute_input': '2026-05-15T22:14:03.080452Z', 'iopub.status.busy': \"", " \"'2026-05-15T22:14:03.080030Z', 'iopub.status.idle': '2026-05-15T22:14:0 [\u2026]"], "unified_diff": "@@ -15,18 +15,18 @@\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"metadata\": {\n \"execution\": {\n- \"iopub.execute_input\": \"2025-04-12T15:18:57.017583Z\",\n- \"iopub.status.busy\": \"2025-04-12T15:18:57.017116Z\",\n- \"iopub.status.idle\": \"2025-04-12T15:19:01.979328Z\",\n- \"shell.execute_reply\": \"2025-04-12T15:19:01.978114Z\"\n+ \"iopub.execute_input\": \"2026-05-15T22:14:01.560179Z\",\n+ \"iopub.status.busy\": \"2026-05-15T22:14:01.559939Z\",\n+ \"iopub.status.idle\": \"2026-05-15T22:14:03.077483Z\",\n+ \"shell.execute_reply\": \"2026-05-15T22:14:03.076728Z\"\n }\n },\n \"outputs\": [],\n \"source\": [\n \"import xarray as xr\\n\",\n \"import matplotlib.pyplot as plt\"\n ]\n@@ -39,24 +39,24 @@\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"metadata\": {\n \"execution\": {\n- \"iopub.execute_input\": \"2025-04-12T15:19:01.984413Z\",\n- \"iopub.status.busy\": \"2025-04-12T15:19:01.983575Z\",\n- \"iopub.status.idle\": \"2025-04-12T15:19:03.673987Z\",\n- \"shell.execute_reply\": \"2025-04-12T15:19:03.672049Z\"\n+ \"iopub.execute_input\": \"2026-05-15T22:14:03.080452Z\",\n+ \"iopub.status.busy\": \"2026-05-15T22:14:03.080030Z\",\n+ \"iopub.status.idle\": \"2026-05-15T22:14:03.739018Z\",\n+ \"shell.execute_reply\": \"2026-05-15T22:14:03.738095Z\"\n }\n },\n \"outputs\": [\n {\n \"ename\": \"ConnectionError\",\n- \"evalue\": \"HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/era5-2mt-2019-03-uk.grib (Caused by NameResolutionError(\\\": Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\\\"))\",\n+ \"evalue\": \"HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/era5-2mt-2019-03-uk.grib (Caused by NameResolutionError(\\\": Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\\\"))\",\n \"output_type\": \"error\",\n \"traceback\": [\n \"\\u001b[0;31m---------------------------------------------------------------------------\\u001b[0m\",\n \"\\u001b[0;31mgaierror\\u001b[0m Traceback (most recent call last)\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connection.py:198\\u001b[0m, in \\u001b[0;36mHTTPConnection._new_conn\\u001b[0;34m(self)\\u001b[0m\\n\\u001b[1;32m 197\\u001b[0m \\u001b[38;5;28;01mtry\\u001b[39;00m:\\n\\u001b[0;32m--> 198\\u001b[0m sock \\u001b[38;5;241m=\\u001b[39m \\u001b[43mconnection\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mcreate_connection\\u001b[49m\\u001b[43m(\\u001b[49m\\n\\u001b[1;32m 199\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43m_dns_host\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mport\\u001b[49m\\u001b[43m)\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 200\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mtimeout\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 201\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43msource_address\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43msource_address\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 202\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43msocket_options\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43msocket_options\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 203\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 204\\u001b[0m \\u001b[38;5;28;01mexcept\\u001b[39;00m socket\\u001b[38;5;241m.\\u001b[39mgaierror \\u001b[38;5;28;01mas\\u001b[39;00m e:\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/util/connection.py:60\\u001b[0m, in \\u001b[0;36mcreate_connection\\u001b[0;34m(address, timeout, source_address, socket_options)\\u001b[0m\\n\\u001b[1;32m 58\\u001b[0m \\u001b[38;5;28;01mraise\\u001b[39;00m LocationParseError(\\u001b[38;5;124mf\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;132;01m{\\u001b[39;00mhost\\u001b[38;5;132;01m}\\u001b[39;00m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m, label empty or too long\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m) \\u001b[38;5;28;01mfrom\\u001b[39;00m \\u001b[38;5;28;01mNone\\u001b[39;00m\\n\\u001b[0;32m---> 60\\u001b[0m \\u001b[38;5;28;01mfor\\u001b[39;00m res \\u001b[38;5;129;01min\\u001b[39;00m \\u001b[43msocket\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mgetaddrinfo\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mhost\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mport\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mfamily\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43msocket\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mSOCK_STREAM\\u001b[49m\\u001b[43m)\\u001b[49m:\\n\\u001b[1;32m 61\\u001b[0m af, socktype, proto, canonname, sa \\u001b[38;5;241m=\\u001b[39m res\\n\",\n \"File \\u001b[0;32m/usr/lib/python3.13/socket.py:977\\u001b[0m, in \\u001b[0;36mgetaddrinfo\\u001b[0;34m(host, port, family, type, proto, flags)\\u001b[0m\\n\\u001b[1;32m 976\\u001b[0m addrlist \\u001b[38;5;241m=\\u001b[39m []\\n\\u001b[0;32m--> 977\\u001b[0m \\u001b[38;5;28;01mfor\\u001b[39;00m res \\u001b[38;5;129;01min\\u001b[39;00m \\u001b[43m_socket\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mgetaddrinfo\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mhost\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mport\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mfamily\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;28;43mtype\\u001b[39;49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mproto\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mflags\\u001b[49m\\u001b[43m)\\u001b[49m:\\n\\u001b[1;32m 978\\u001b[0m af, socktype, proto, canonname, sa \\u001b[38;5;241m=\\u001b[39m res\\n\",\n@@ -65,35 +65,35 @@\n \"\\u001b[0;31mNameResolutionError\\u001b[0m Traceback (most recent call last)\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connectionpool.py:787\\u001b[0m, in \\u001b[0;36mHTTPConnectionPool.urlopen\\u001b[0;34m(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw)\\u001b[0m\\n\\u001b[1;32m 786\\u001b[0m \\u001b[38;5;66;03m# Make the request on the HTTPConnection object\\u001b[39;00m\\n\\u001b[0;32m--> 787\\u001b[0m response \\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43m_make_request\\u001b[49m\\u001b[43m(\\u001b[49m\\n\\u001b[1;32m 788\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mconn\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 789\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mmethod\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 790\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 791\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mtimeout\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mtimeout_obj\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 792\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mbody\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mbody\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 793\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mheaders\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mheaders\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 794\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mchunked\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mchunked\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 795\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mretries\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mretries\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 796\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mresponse_conn\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mresponse_conn\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 797\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mpreload_content\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mpreload_content\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 798\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mdecode_content\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mdecode_content\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 799\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43mresponse_kw\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 800\\u001b[0m \\u001b[43m\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 802\\u001b[0m \\u001b[38;5;66;03m# Everything went great!\\u001b[39;00m\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connectionpool.py:488\\u001b[0m, in \\u001b[0;36mHTTPConnectionPool._make_request\\u001b[0;34m(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length)\\u001b[0m\\n\\u001b[1;32m 487\\u001b[0m new_e \\u001b[38;5;241m=\\u001b[39m _wrap_proxy_error(new_e, conn\\u001b[38;5;241m.\\u001b[39mproxy\\u001b[38;5;241m.\\u001b[39mscheme)\\n\\u001b[0;32m--> 488\\u001b[0m \\u001b[38;5;28;01mraise\\u001b[39;00m new_e\\n\\u001b[1;32m 490\\u001b[0m \\u001b[38;5;66;03m# conn.request() calls http.client.*.request, not the method in\\u001b[39;00m\\n\\u001b[1;32m 491\\u001b[0m \\u001b[38;5;66;03m# urllib3.request. It also calls makefile (recv) on the socket.\\u001b[39;00m\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connectionpool.py:464\\u001b[0m, in \\u001b[0;36mHTTPConnectionPool._make_request\\u001b[0;34m(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length)\\u001b[0m\\n\\u001b[1;32m 463\\u001b[0m \\u001b[38;5;28;01mtry\\u001b[39;00m:\\n\\u001b[0;32m--> 464\\u001b[0m \\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43m_validate_conn\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mconn\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 465\\u001b[0m \\u001b[38;5;28;01mexcept\\u001b[39;00m (SocketTimeout, BaseSSLError) \\u001b[38;5;28;01mas\\u001b[39;00m e:\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connectionpool.py:1093\\u001b[0m, in \\u001b[0;36mHTTPSConnectionPool._validate_conn\\u001b[0;34m(self, conn)\\u001b[0m\\n\\u001b[1;32m 1092\\u001b[0m \\u001b[38;5;28;01mif\\u001b[39;00m conn\\u001b[38;5;241m.\\u001b[39mis_closed:\\n\\u001b[0;32m-> 1093\\u001b[0m \\u001b[43mconn\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mconnect\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 1095\\u001b[0m \\u001b[38;5;66;03m# TODO revise this, see https://github.com/urllib3/urllib3/issues/2791\\u001b[39;00m\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connection.py:704\\u001b[0m, in \\u001b[0;36mHTTPSConnection.connect\\u001b[0;34m(self)\\u001b[0m\\n\\u001b[1;32m 703\\u001b[0m sock: socket\\u001b[38;5;241m.\\u001b[39msocket \\u001b[38;5;241m|\\u001b[39m ssl\\u001b[38;5;241m.\\u001b[39mSSLSocket\\n\\u001b[0;32m--> 704\\u001b[0m \\u001b[38;5;28mself\\u001b[39m\\u001b[38;5;241m.\\u001b[39msock \\u001b[38;5;241m=\\u001b[39m sock \\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43m_new_conn\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 705\\u001b[0m server_hostname: \\u001b[38;5;28mstr\\u001b[39m \\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;28mself\\u001b[39m\\u001b[38;5;241m.\\u001b[39mhost\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connection.py:205\\u001b[0m, in \\u001b[0;36mHTTPConnection._new_conn\\u001b[0;34m(self)\\u001b[0m\\n\\u001b[1;32m 204\\u001b[0m \\u001b[38;5;28;01mexcept\\u001b[39;00m socket\\u001b[38;5;241m.\\u001b[39mgaierror \\u001b[38;5;28;01mas\\u001b[39;00m e:\\n\\u001b[0;32m--> 205\\u001b[0m \\u001b[38;5;28;01mraise\\u001b[39;00m NameResolutionError(\\u001b[38;5;28mself\\u001b[39m\\u001b[38;5;241m.\\u001b[39mhost, \\u001b[38;5;28mself\\u001b[39m, e) \\u001b[38;5;28;01mfrom\\u001b[39;00m \\u001b[38;5;21;01me\\u001b[39;00m\\n\\u001b[1;32m 206\\u001b[0m \\u001b[38;5;28;01mexcept\\u001b[39;00m SocketTimeout \\u001b[38;5;28;01mas\\u001b[39;00m e:\\n\",\n- \"\\u001b[0;31mNameResolutionError\\u001b[0m: : Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\",\n+ \"\\u001b[0;31mNameResolutionError\\u001b[0m: : Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\",\n \"\\nThe above exception was the direct cause of the following exception:\\n\",\n \"\\u001b[0;31mMaxRetryError\\u001b[0m Traceback (most recent call last)\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/requests/adapters.py:667\\u001b[0m, in \\u001b[0;36mHTTPAdapter.send\\u001b[0;34m(self, request, stream, timeout, verify, cert, proxies)\\u001b[0m\\n\\u001b[1;32m 666\\u001b[0m \\u001b[38;5;28;01mtry\\u001b[39;00m:\\n\\u001b[0;32m--> 667\\u001b[0m resp \\u001b[38;5;241m=\\u001b[39m \\u001b[43mconn\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43murlopen\\u001b[49m\\u001b[43m(\\u001b[49m\\n\\u001b[1;32m 668\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mmethod\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mrequest\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mmethod\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 669\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 670\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mbody\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mrequest\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mbody\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 671\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mheaders\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mrequest\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mheaders\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 672\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mredirect\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43;01mFalse\\u001b[39;49;00m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 673\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43massert_same_host\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43;01mFalse\\u001b[39;49;00m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 674\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mpreload_content\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43;01mFalse\\u001b[39;49;00m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 675\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mdecode_content\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43;01mFalse\\u001b[39;49;00m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 676\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mretries\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mmax_retries\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 677\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mtimeout\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mtimeout\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 678\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mchunked\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mchunked\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 679\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 681\\u001b[0m \\u001b[38;5;28;01mexcept\\u001b[39;00m (ProtocolError, \\u001b[38;5;167;01mOSError\\u001b[39;00m) \\u001b[38;5;28;01mas\\u001b[39;00m err:\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connectionpool.py:841\\u001b[0m, in \\u001b[0;36mHTTPConnectionPool.urlopen\\u001b[0;34m(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw)\\u001b[0m\\n\\u001b[1;32m 839\\u001b[0m new_e \\u001b[38;5;241m=\\u001b[39m ProtocolError(\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mConnection aborted.\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m, new_e)\\n\\u001b[0;32m--> 841\\u001b[0m retries \\u001b[38;5;241m=\\u001b[39m \\u001b[43mretries\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mincrement\\u001b[49m\\u001b[43m(\\u001b[49m\\n\\u001b[1;32m 842\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mmethod\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43merror\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mnew_e\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43m_pool\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43m_stacktrace\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43msys\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mexc_info\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43m)\\u001b[49m\\u001b[43m[\\u001b[49m\\u001b[38;5;241;43m2\\u001b[39;49m\\u001b[43m]\\u001b[49m\\n\\u001b[1;32m 843\\u001b[0m \\u001b[43m\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 844\\u001b[0m retries\\u001b[38;5;241m.\\u001b[39msleep()\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/util/retry.py:519\\u001b[0m, in \\u001b[0;36mRetry.increment\\u001b[0;34m(self, method, url, response, error, _pool, _stacktrace)\\u001b[0m\\n\\u001b[1;32m 518\\u001b[0m reason \\u001b[38;5;241m=\\u001b[39m error \\u001b[38;5;129;01mor\\u001b[39;00m ResponseError(cause)\\n\\u001b[0;32m--> 519\\u001b[0m \\u001b[38;5;28;01mraise\\u001b[39;00m MaxRetryError(_pool, url, reason) \\u001b[38;5;28;01mfrom\\u001b[39;00m \\u001b[38;5;21;01mreason\\u001b[39;00m \\u001b[38;5;66;03m# type: ignore[arg-type]\\u001b[39;00m\\n\\u001b[1;32m 521\\u001b[0m log\\u001b[38;5;241m.\\u001b[39mdebug(\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mIncremented Retry for (url=\\u001b[39m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;132;01m%s\\u001b[39;00m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m): \\u001b[39m\\u001b[38;5;132;01m%r\\u001b[39;00m\\u001b[38;5;124m\\\"\\u001b[39m, url, new_retry)\\n\",\n- \"\\u001b[0;31mMaxRetryError\\u001b[0m: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/era5-2mt-2019-03-uk.grib (Caused by NameResolutionError(\\\": Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\\\"))\",\n+ \"\\u001b[0;31mMaxRetryError\\u001b[0m: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/era5-2mt-2019-03-uk.grib (Caused by NameResolutionError(\\\": Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\\\"))\",\n \"\\nDuring handling of the above exception, another exception occurred:\\n\",\n \"\\u001b[0;31mConnectionError\\u001b[0m Traceback (most recent call last)\",\n \"Cell \\u001b[0;32mIn[2], line 1\\u001b[0m\\n\\u001b[0;32m----> 1\\u001b[0m ds \\u001b[38;5;241m=\\u001b[39m \\u001b[43mxr\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mtutorial\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mload_dataset\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[38;5;124;43m\\\"\\u001b[39;49m\\u001b[38;5;124;43mera5-2mt-2019-03-uk.grib\\u001b[39;49m\\u001b[38;5;124;43m\\\"\\u001b[39;49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mengine\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;124;43m\\\"\\u001b[39;49m\\u001b[38;5;124;43mcfgrib\\u001b[39;49m\\u001b[38;5;124;43m\\\"\\u001b[39;49m\\u001b[43m)\\u001b[49m\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:215\\u001b[0m, in \\u001b[0;36mload_dataset\\u001b[0;34m(*args, **kwargs)\\u001b[0m\\n\\u001b[1;32m 178\\u001b[0m \\u001b[38;5;28;01mdef\\u001b[39;00m \\u001b[38;5;21mload_dataset\\u001b[39m(\\u001b[38;5;241m*\\u001b[39margs, \\u001b[38;5;241m*\\u001b[39m\\u001b[38;5;241m*\\u001b[39mkwargs) \\u001b[38;5;241m-\\u001b[39m\\u001b[38;5;241m>\\u001b[39m Dataset:\\n\\u001b[1;32m 179\\u001b[0m \\u001b[38;5;250m \\u001b[39m\\u001b[38;5;124;03m\\\"\\\"\\\"\\u001b[39;00m\\n\\u001b[1;32m 180\\u001b[0m \\u001b[38;5;124;03m Open, load into memory, and close a dataset from the online repository\\u001b[39;00m\\n\\u001b[1;32m 181\\u001b[0m \\u001b[38;5;124;03m (requires internet).\\u001b[39;00m\\n\\u001b[0;32m (...)\\u001b[0m\\n\\u001b[1;32m 213\\u001b[0m \\u001b[38;5;124;03m load_dataset\\u001b[39;00m\\n\\u001b[1;32m 214\\u001b[0m \\u001b[38;5;124;03m \\\"\\\"\\\"\\u001b[39;00m\\n\\u001b[0;32m--> 215\\u001b[0m \\u001b[38;5;28;01mwith\\u001b[39;00m \\u001b[43mopen_dataset\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43margs\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43mkwargs\\u001b[49m\\u001b[43m)\\u001b[49m \\u001b[38;5;28;01mas\\u001b[39;00m ds:\\n\\u001b[1;32m 216\\u001b[0m \\u001b[38;5;28;01mreturn\\u001b[39;00m ds\\u001b[38;5;241m.\\u001b[39mload()\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:167\\u001b[0m, in \\u001b[0;36mopen_dataset\\u001b[0;34m(name, cache, cache_dir, engine, **kws)\\u001b[0m\\n\\u001b[1;32m 164\\u001b[0m downloader \\u001b[38;5;241m=\\u001b[39m pooch\\u001b[38;5;241m.\\u001b[39mHTTPDownloader(headers\\u001b[38;5;241m=\\u001b[39mheaders)\\n\\u001b[1;32m 166\\u001b[0m \\u001b[38;5;66;03m# retrieve the file\\u001b[39;00m\\n\\u001b[0;32m--> 167\\u001b[0m filepath \\u001b[38;5;241m=\\u001b[39m \\u001b[43mpooch\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mretrieve\\u001b[49m\\u001b[43m(\\u001b[49m\\n\\u001b[1;32m 168\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mknown_hash\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43;01mNone\\u001b[39;49;00m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mpath\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mcache_dir\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mdownloader\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mdownloader\\u001b[49m\\n\\u001b[1;32m 169\\u001b[0m \\u001b[43m\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 170\\u001b[0m ds \\u001b[38;5;241m=\\u001b[39m _open_dataset(filepath, engine\\u001b[38;5;241m=\\u001b[39mengine, \\u001b[38;5;241m*\\u001b[39m\\u001b[38;5;241m*\\u001b[39mkws)\\n\\u001b[1;32m 171\\u001b[0m \\u001b[38;5;28;01mif\\u001b[39;00m \\u001b[38;5;129;01mnot\\u001b[39;00m cache:\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:239\\u001b[0m, in \\u001b[0;36mretrieve\\u001b[0;34m(url, known_hash, fname, path, processor, downloader, progressbar)\\u001b[0m\\n\\u001b[1;32m 236\\u001b[0m \\u001b[38;5;28;01mif\\u001b[39;00m downloader \\u001b[38;5;129;01mis\\u001b[39;00m \\u001b[38;5;28;01mNone\\u001b[39;00m:\\n\\u001b[1;32m 237\\u001b[0m downloader \\u001b[38;5;241m=\\u001b[39m choose_downloader(url, progressbar\\u001b[38;5;241m=\\u001b[39mprogressbar)\\n\\u001b[0;32m--> 239\\u001b[0m \\u001b[43mstream_download\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mfull_path\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mknown_hash\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mdownloader\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mpooch\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43;01mNone\\u001b[39;49;00m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 241\\u001b[0m \\u001b[38;5;28;01mif\\u001b[39;00m known_hash \\u001b[38;5;129;01mis\\u001b[39;00m \\u001b[38;5;28;01mNone\\u001b[39;00m:\\n\\u001b[1;32m 242\\u001b[0m get_logger()\\u001b[38;5;241m.\\u001b[39minfo(\\n\\u001b[1;32m 243\\u001b[0m \\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mSHA256 hash of downloaded file: \\u001b[39m\\u001b[38;5;132;01m%s\\u001b[39;00m\\u001b[38;5;130;01m\\\\n\\u001b[39;00m\\u001b[38;5;124m\\\"\\u001b[39m\\n\\u001b[1;32m 244\\u001b[0m \\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mUse this value as the \\u001b[39m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124mknown_hash\\u001b[39m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m argument of \\u001b[39m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124mpooch.retrieve\\u001b[39m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\n\\u001b[0;32m (...)\\u001b[0m\\n\\u001b[1;32m 247\\u001b[0m file_hash(\\u001b[38;5;28mstr\\u001b[39m(full_path)),\\n\\u001b[1;32m 248\\u001b[0m )\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:807\\u001b[0m, in \\u001b[0;36mstream_download\\u001b[0;34m(url, fname, known_hash, downloader, pooch, retry_if_failed)\\u001b[0m\\n\\u001b[1;32m 803\\u001b[0m \\u001b[38;5;28;01mtry\\u001b[39;00m:\\n\\u001b[1;32m 804\\u001b[0m \\u001b[38;5;66;03m# Stream the file to a temporary so that we can safely check its\\u001b[39;00m\\n\\u001b[1;32m 805\\u001b[0m \\u001b[38;5;66;03m# hash before overwriting the original.\\u001b[39;00m\\n\\u001b[1;32m 806\\u001b[0m \\u001b[38;5;28;01mwith\\u001b[39;00m temporary_file(path\\u001b[38;5;241m=\\u001b[39m\\u001b[38;5;28mstr\\u001b[39m(fname\\u001b[38;5;241m.\\u001b[39mparent)) \\u001b[38;5;28;01mas\\u001b[39;00m tmp:\\n\\u001b[0;32m--> 807\\u001b[0m \\u001b[43mdownloader\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mtmp\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mpooch\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 808\\u001b[0m hash_matches(tmp, known_hash, strict\\u001b[38;5;241m=\\u001b[39m\\u001b[38;5;28;01mTrue\\u001b[39;00m, source\\u001b[38;5;241m=\\u001b[39m\\u001b[38;5;28mstr\\u001b[39m(fname\\u001b[38;5;241m.\\u001b[39mname))\\n\\u001b[1;32m 809\\u001b[0m shutil\\u001b[38;5;241m.\\u001b[39mmove(tmp, \\u001b[38;5;28mstr\\u001b[39m(fname))\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/pooch/downloaders.py:220\\u001b[0m, in \\u001b[0;36mHTTPDownloader.__call__\\u001b[0;34m(self, url, output_file, pooch, check_only)\\u001b[0m\\n\\u001b[1;32m 218\\u001b[0m \\u001b[38;5;66;03m# pylint: enable=consider-using-with\\u001b[39;00m\\n\\u001b[1;32m 219\\u001b[0m \\u001b[38;5;28;01mtry\\u001b[39;00m:\\n\\u001b[0;32m--> 220\\u001b[0m response \\u001b[38;5;241m=\\u001b[39m \\u001b[43mrequests\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mget\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mtimeout\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mtimeout\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43mkwargs\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 221\\u001b[0m response\\u001b[38;5;241m.\\u001b[39mraise_for_status()\\n\\u001b[1;32m 222\\u001b[0m content \\u001b[38;5;241m=\\u001b[39m response\\u001b[38;5;241m.\\u001b[39miter_content(chunk_size\\u001b[38;5;241m=\\u001b[39m\\u001b[38;5;28mself\\u001b[39m\\u001b[38;5;241m.\\u001b[39mchunk_size)\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/requests/api.py:73\\u001b[0m, in \\u001b[0;36mget\\u001b[0;34m(url, params, **kwargs)\\u001b[0m\\n\\u001b[1;32m 62\\u001b[0m \\u001b[38;5;28;01mdef\\u001b[39;00m \\u001b[38;5;21mget\\u001b[39m(url, params\\u001b[38;5;241m=\\u001b[39m\\u001b[38;5;28;01mNone\\u001b[39;00m, \\u001b[38;5;241m*\\u001b[39m\\u001b[38;5;241m*\\u001b[39mkwargs):\\n\\u001b[1;32m 63\\u001b[0m \\u001b[38;5;250m \\u001b[39m\\u001b[38;5;124mr\\u001b[39m\\u001b[38;5;124;03m\\\"\\\"\\\"Sends a GET request.\\u001b[39;00m\\n\\u001b[1;32m 64\\u001b[0m \\n\\u001b[1;32m 65\\u001b[0m \\u001b[38;5;124;03m :param url: URL for the new :class:`Request` object.\\u001b[39;00m\\n\\u001b[0;32m (...)\\u001b[0m\\n\\u001b[1;32m 70\\u001b[0m \\u001b[38;5;124;03m :rtype: requests.Response\\u001b[39;00m\\n\\u001b[1;32m 71\\u001b[0m \\u001b[38;5;124;03m \\\"\\\"\\\"\\u001b[39;00m\\n\\u001b[0;32m---> 73\\u001b[0m \\u001b[38;5;28;01mreturn\\u001b[39;00m \\u001b[43mrequest\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[38;5;124;43m\\\"\\u001b[39;49m\\u001b[38;5;124;43mget\\u001b[39;49m\\u001b[38;5;124;43m\\\"\\u001b[39;49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mparams\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mparams\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43mkwargs\\u001b[49m\\u001b[43m)\\u001b[49m\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/requests/api.py:59\\u001b[0m, in \\u001b[0;36mrequest\\u001b[0;34m(method, url, **kwargs)\\u001b[0m\\n\\u001b[1;32m 55\\u001b[0m \\u001b[38;5;66;03m# By using the 'with' statement we are sure the session is closed, thus we\\u001b[39;00m\\n\\u001b[1;32m 56\\u001b[0m \\u001b[38;5;66;03m# avoid leaving sockets open which can trigger a ResourceWarning in some\\u001b[39;00m\\n\\u001b[1;32m 57\\u001b[0m \\u001b[38;5;66;03m# cases, and look like a memory leak in others.\\u001b[39;00m\\n\\u001b[1;32m 58\\u001b[0m \\u001b[38;5;28;01mwith\\u001b[39;00m sessions\\u001b[38;5;241m.\\u001b[39mSession() \\u001b[38;5;28;01mas\\u001b[39;00m session:\\n\\u001b[0;32m---> 59\\u001b[0m \\u001b[38;5;28;01mreturn\\u001b[39;00m \\u001b[43msession\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mrequest\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mmethod\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mmethod\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43mkwargs\\u001b[49m\\u001b[43m)\\u001b[49m\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/requests/sessions.py:589\\u001b[0m, in \\u001b[0;36mSession.request\\u001b[0;34m(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)\\u001b[0m\\n\\u001b[1;32m 584\\u001b[0m send_kwargs \\u001b[38;5;241m=\\u001b[39m {\\n\\u001b[1;32m 585\\u001b[0m \\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mtimeout\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m: timeout,\\n\\u001b[1;32m 586\\u001b[0m \\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mallow_redirects\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m: allow_redirects,\\n\\u001b[1;32m 587\\u001b[0m }\\n\\u001b[1;32m 588\\u001b[0m send_kwargs\\u001b[38;5;241m.\\u001b[39mupdate(settings)\\n\\u001b[0;32m--> 589\\u001b[0m resp \\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43msend\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mprep\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43msend_kwargs\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 591\\u001b[0m \\u001b[38;5;28;01mreturn\\u001b[39;00m resp\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/requests/sessions.py:703\\u001b[0m, in \\u001b[0;36mSession.send\\u001b[0;34m(self, request, **kwargs)\\u001b[0m\\n\\u001b[1;32m 700\\u001b[0m start \\u001b[38;5;241m=\\u001b[39m preferred_clock()\\n\\u001b[1;32m 702\\u001b[0m \\u001b[38;5;66;03m# Send the request\\u001b[39;00m\\n\\u001b[0;32m--> 703\\u001b[0m r \\u001b[38;5;241m=\\u001b[39m \\u001b[43madapter\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43msend\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mrequest\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43mkwargs\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 705\\u001b[0m \\u001b[38;5;66;03m# Total elapsed time of the request (approximately)\\u001b[39;00m\\n\\u001b[1;32m 706\\u001b[0m elapsed \\u001b[38;5;241m=\\u001b[39m preferred_clock() \\u001b[38;5;241m-\\u001b[39m start\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/requests/adapters.py:700\\u001b[0m, in \\u001b[0;36mHTTPAdapter.send\\u001b[0;34m(self, request, stream, timeout, verify, cert, proxies)\\u001b[0m\\n\\u001b[1;32m 696\\u001b[0m \\u001b[38;5;28;01mif\\u001b[39;00m \\u001b[38;5;28misinstance\\u001b[39m(e\\u001b[38;5;241m.\\u001b[39mreason, _SSLError):\\n\\u001b[1;32m 697\\u001b[0m \\u001b[38;5;66;03m# This branch is for urllib3 v1.22 and later.\\u001b[39;00m\\n\\u001b[1;32m 698\\u001b[0m \\u001b[38;5;28;01mraise\\u001b[39;00m SSLError(e, request\\u001b[38;5;241m=\\u001b[39mrequest)\\n\\u001b[0;32m--> 700\\u001b[0m \\u001b[38;5;28;01mraise\\u001b[39;00m \\u001b[38;5;167;01mConnectionError\\u001b[39;00m(e, request\\u001b[38;5;241m=\\u001b[39mrequest)\\n\\u001b[1;32m 702\\u001b[0m \\u001b[38;5;28;01mexcept\\u001b[39;00m ClosedPoolError \\u001b[38;5;28;01mas\\u001b[39;00m e:\\n\\u001b[1;32m 703\\u001b[0m \\u001b[38;5;28;01mraise\\u001b[39;00m \\u001b[38;5;167;01mConnectionError\\u001b[39;00m(e, request\\u001b[38;5;241m=\\u001b[39mrequest)\\n\",\n- \"\\u001b[0;31mConnectionError\\u001b[0m: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/era5-2mt-2019-03-uk.grib (Caused by NameResolutionError(\\\": Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\\\"))\"\n+ \"\\u001b[0;31mConnectionError\\u001b[0m: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/era5-2mt-2019-03-uk.grib (Caused by NameResolutionError(\\\": Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\\\"))\"\n ]\n }\n ],\n \"source\": [\n \"ds = xr.tutorial.load_dataset(\\\"era5-2mt-2019-03-uk.grib\\\", engine=\\\"cfgrib\\\")\"\n ]\n },\n@@ -105,18 +105,18 @@\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"metadata\": {\n \"execution\": {\n- \"iopub.execute_input\": \"2025-04-12T15:19:03.829507Z\",\n- \"iopub.status.busy\": \"2025-04-12T15:19:03.829040Z\",\n- \"iopub.status.idle\": \"2025-04-12T15:19:03.869472Z\",\n- \"shell.execute_reply\": \"2025-04-12T15:19:03.867598Z\"\n+ \"iopub.execute_input\": \"2026-05-15T22:14:03.774743Z\",\n+ \"iopub.status.busy\": \"2026-05-15T22:14:03.774489Z\",\n+ \"iopub.status.idle\": \"2026-05-15T22:14:03.788782Z\",\n+ \"shell.execute_reply\": \"2026-05-15T22:14:03.788202Z\"\n }\n },\n \"outputs\": [\n {\n \"ename\": \"NameError\",\n \"evalue\": \"name 'ds' is not defined\",\n \"output_type\": \"error\",\n@@ -141,18 +141,18 @@\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"metadata\": {\n \"execution\": {\n- \"iopub.execute_input\": \"2025-04-12T15:19:03.880407Z\",\n- \"iopub.status.busy\": \"2025-04-12T15:19:03.879886Z\",\n- \"iopub.status.idle\": \"2025-04-12T15:19:07.092440Z\",\n- \"shell.execute_reply\": \"2025-04-12T15:19:07.091200Z\"\n+ \"iopub.execute_input\": \"2026-05-15T22:14:03.790750Z\",\n+ \"iopub.status.busy\": \"2026-05-15T22:14:03.790515Z\",\n+ \"iopub.status.idle\": \"2026-05-15T22:14:05.558433Z\",\n+ \"shell.execute_reply\": \"2026-05-15T22:14:05.557271Z\"\n }\n },\n \"outputs\": [\n {\n \"ename\": \"NameError\",\n \"evalue\": \"name 'ds' is not defined\",\n \"output_type\": \"error\",\n@@ -171,15 +171,15 @@\n \" warnings.warn(f'Downloading: {url}', DownloadWarning)\\n\"\n ]\n },\n {\n \"name\": \"stdout\",\n \"output_type\": \"stream\",\n \"text\": [\n- \"Error in callback (for post_execute), with arguments args (),kwargs {}:\\n\"\n+ \"Error in callback (for post_execute), with arguments args (),kwargs {}:\\n\"\n ]\n },\n {\n \"ename\": \"URLError\",\n \"evalue\": \"\",\n \"output_type\": \"error\",\n \"traceback\": [\n@@ -318,18 +318,18 @@\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"metadata\": {\n \"execution\": {\n- \"iopub.execute_input\": \"2025-04-12T15:19:07.096559Z\",\n- \"iopub.status.busy\": \"2025-04-12T15:19:07.095807Z\",\n- \"iopub.status.idle\": \"2025-04-12T15:19:07.115868Z\",\n- \"shell.execute_reply\": \"2025-04-12T15:19:07.115051Z\"\n+ \"iopub.execute_input\": \"2026-05-15T22:14:05.561260Z\",\n+ \"iopub.status.busy\": \"2026-05-15T22:14:05.560820Z\",\n+ \"iopub.status.idle\": \"2026-05-15T22:14:05.577300Z\",\n+ \"shell.execute_reply\": \"2026-05-15T22:14:05.576494Z\"\n }\n },\n \"outputs\": [\n {\n \"ename\": \"NameError\",\n \"evalue\": \"name 'ds' is not defined\",\n \"output_type\": \"error\",\n"}]}]}, {"source1": "./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html", "source2": "./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html", "unified_diff": "@@ -185,15 +185,15 @@\n 705 server_hostname: str = self.host\n \n File /usr/lib/python3/dist-packages/urllib3/connection.py:205, in HTTPConnection._new_conn(self)\n 204 except socket.gaierror as e:\n --> 205 raise NameResolutionError(self.host, self, e) from e\n 206 except SocketTimeout as e:\n \n-NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x7f4accacc050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\n+NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x7fbe5bc90050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\n \n The above exception was the direct cause of the following exception:\n \n MaxRetryError Traceback (most recent call last)\n File /usr/lib/python3/dist-packages/requests/adapters.py:667, in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)\n 666 try:\n --> 667 resp = conn.urlopen(\n@@ -219,15 +219,15 @@\n 844 retries.sleep()\n \n File /usr/lib/python3/dist-packages/urllib3/util/retry.py:519, in Retry.increment(self, method, url, response, error, _pool, _stacktrace)\n 518 reason = error or ResponseError(cause)\n --> 519 raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]\n 521 log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)\n \n-MaxRetryError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/ROMS_example.nc (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f4accacc050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+MaxRetryError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/ROMS_example.nc (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fbe5bc90050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n \n During handling of the above exception, another exception occurred:\n \n ConnectionError Traceback (most recent call last)\n Cell In[2], line 2\n 1 # load in the file\n ----> 2 ds = xr.tutorial.open_dataset("ROMS_example.nc", chunks={"ocean_time": 1})\n@@ -309,15 +309,15 @@\n 696 if isinstance(e.reason, _SSLError):\n 697 # This branch is for urllib3 v1.22 and later.\n 698 raise SSLError(e, request=request)\n --> 700 raise ConnectionError(e, request=request)\n 702 except ClosedPoolError as e:\n 703 raise ConnectionError(e, request=request)\n \n-ConnectionError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/ROMS_example.nc (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f4accacc050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+ConnectionError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/ROMS_example.nc (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fbe5bc90050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n
Write equations to calculate the vertical coordinate. These will be only evaluated when data is requested. Information about the ROMS vertical coordinate can be found (here)[https://www.myroms.org/wiki/Vertical_S-coordinate]
\nIn short, for Vtransform==2
as used in this example,
The function we will apply is np.interp
which expects 1D numpy arrays. This functionality is already implemented in xarray so we use that capability to make sure we are not making mistakes.
[2]:\n
Plot the first timestep:
\n[3]:\n
[ ]:\n
\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -92,15 +92,15 @@\n File /usr/lib/python3/dist-packages/urllib3/connection.py:205, in\n HTTPConnection._new_conn(self)\n 204 except socket.gaierror as e:\n --> 205 raise NameResolutionError(self.host, self, e) from e\n 206 except SocketTimeout as e:\n \n NameResolutionError: : Failed to resolve 'github.com' ([Errno -3] Temporary failure\n+0x7fd4bd586660>: Failed to resolve 'github.com' ([Errno -3] Temporary failure\n in name resolution)\n \n The above exception was the direct cause of the following exception:\n \n MaxRetryError Traceback (most recent call last)\n File /usr/lib/python3/dist-packages/requests/adapters.py:667, in\n HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)\n@@ -136,15 +136,15 @@\n --> 519 raise MaxRetryError(_pool, url, reason) from reason # type: ignore\n [arg-type]\n 521 log.debug(\"Incremented Retry for (url='%s'): %r\", url, new_retry)\n \n MaxRetryError: HTTPSConnectionPool(host='github.com', port=443): Max retries\n exceeded with url: /pydata/xarray-data/raw/master/air_temperature.nc (Caused by\n NameResolutionError(\": Failed to resolve 'github.com' ([Errno -3] Temporary failure\n+0x7fd4bd586660>: Failed to resolve 'github.com' ([Errno -3] Temporary failure\n in name resolution)\"))\n \n During handling of the above exception, another exception occurred:\n \n ConnectionError Traceback (most recent call last)\n Cell In[1], line 5\n 2 import numpy as np\n@@ -256,15 +256,15 @@\n --> 700 raise ConnectionError(e, request=request)\n 702 except ClosedPoolError as e:\n 703 raise ConnectionError(e, request=request)\n \n ConnectionError: HTTPSConnectionPool(host='github.com', port=443): Max retries\n exceeded with url: /pydata/xarray-data/raw/master/air_temperature.nc (Caused by\n NameResolutionError(\": Failed to resolve 'github.com' ([Errno -3] Temporary failure\n+0x7fd4bd586660>: Failed to resolve 'github.com' ([Errno -3] Temporary failure\n in name resolution)\"))\n [ ]:\n _\b[_\bL_\bo_\bg_\bo_\b _\bo_\bf_\b _\bx_\ba_\br_\br_\ba_\by_\b]\n *\b**\b**\b**\b**\b**\b* _\bx\bx_\ba\ba_\br\br_\br\br_\ba\ba_\by\by *\b**\b**\b**\b**\b**\b*\n *\b**\b**\b**\b* N\bNa\bav\bvi\big\bga\bat\bti\bio\bon\bn *\b**\b**\b**\b*\n For users\n * _\bG_\be_\bt_\bt_\bi_\bn_\bg_\b _\bS_\bt_\ba_\br_\bt_\be_\bd\n"}]}, {"source1": "./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb.gz", "source2": "./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb.gz", "unified_diff": null, "details": [{"source1": "blank_template.ipynb", "source2": "blank_template.ipynb", "unified_diff": null, "details": [{"source1": "Pretty-printed", "source2": "Pretty-printed", "comments": ["Similarity: 0.9986293859649122%", "Differences: {\"'cells'\": \"{1: {'metadata': {'execution': {'iopub.execute_input': '2026-05-15T22:14:21.478652Z', \"", " \"'iopub.status.busy': '2026-05-15T22:14:21.478404Z', 'iopub.status.idle': \"", " \"'2026-05-15T22:14:22.681633Z', 'shell.execute_reply': \"", " \"'2026-05-15T22:14:22.680479Z'}}, 'outputs': {0: {'evalue': \"", " \"'HTTPSConnectionPool(host=\\\\'github.com\\\\', port=443): Max retries exceeded with url: \"", " '/pydata/xarray-data/raw/master/air_temperature.nc (Caused by '", " [\u2026]"], "unified_diff": "@@ -12,24 +12,24 @@\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"41b90ede\",\n \"metadata\": {\n \"execution\": {\n- \"iopub.execute_input\": \"2025-04-12T15:19:26.891837Z\",\n- \"iopub.status.busy\": \"2025-04-12T15:19:26.891593Z\",\n- \"iopub.status.idle\": \"2025-04-12T15:19:28.081368Z\",\n- \"shell.execute_reply\": \"2025-04-12T15:19:28.080301Z\"\n+ \"iopub.execute_input\": \"2026-05-15T22:14:21.478652Z\",\n+ \"iopub.status.busy\": \"2026-05-15T22:14:21.478404Z\",\n+ \"iopub.status.idle\": \"2026-05-15T22:14:22.681633Z\",\n+ \"shell.execute_reply\": \"2026-05-15T22:14:22.680479Z\"\n }\n },\n \"outputs\": [\n {\n \"ename\": \"ConnectionError\",\n- \"evalue\": \"HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/air_temperature.nc (Caused by NameResolutionError(\\\": Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\\\"))\",\n+ \"evalue\": \"HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/air_temperature.nc (Caused by NameResolutionError(\\\": Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\\\"))\",\n \"output_type\": \"error\",\n \"traceback\": [\n \"\\u001b[0;31m---------------------------------------------------------------------------\\u001b[0m\",\n \"\\u001b[0;31mgaierror\\u001b[0m Traceback (most recent call last)\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connection.py:198\\u001b[0m, in \\u001b[0;36mHTTPConnection._new_conn\\u001b[0;34m(self)\\u001b[0m\\n\\u001b[1;32m 197\\u001b[0m \\u001b[38;5;28;01mtry\\u001b[39;00m:\\n\\u001b[0;32m--> 198\\u001b[0m sock \\u001b[38;5;241m=\\u001b[39m \\u001b[43mconnection\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mcreate_connection\\u001b[49m\\u001b[43m(\\u001b[49m\\n\\u001b[1;32m 199\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43m_dns_host\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mport\\u001b[49m\\u001b[43m)\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 200\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mtimeout\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 201\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43msource_address\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43msource_address\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 202\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43msocket_options\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43msocket_options\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 203\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 204\\u001b[0m \\u001b[38;5;28;01mexcept\\u001b[39;00m socket\\u001b[38;5;241m.\\u001b[39mgaierror \\u001b[38;5;28;01mas\\u001b[39;00m e:\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/util/connection.py:60\\u001b[0m, in \\u001b[0;36mcreate_connection\\u001b[0;34m(address, timeout, source_address, socket_options)\\u001b[0m\\n\\u001b[1;32m 58\\u001b[0m \\u001b[38;5;28;01mraise\\u001b[39;00m LocationParseError(\\u001b[38;5;124mf\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;132;01m{\\u001b[39;00mhost\\u001b[38;5;132;01m}\\u001b[39;00m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m, label empty or too long\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m) \\u001b[38;5;28;01mfrom\\u001b[39;00m \\u001b[38;5;28;01mNone\\u001b[39;00m\\n\\u001b[0;32m---> 60\\u001b[0m \\u001b[38;5;28;01mfor\\u001b[39;00m res \\u001b[38;5;129;01min\\u001b[39;00m \\u001b[43msocket\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mgetaddrinfo\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mhost\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mport\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mfamily\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43msocket\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mSOCK_STREAM\\u001b[49m\\u001b[43m)\\u001b[49m:\\n\\u001b[1;32m 61\\u001b[0m af, socktype, proto, canonname, sa \\u001b[38;5;241m=\\u001b[39m res\\n\",\n \"File \\u001b[0;32m/usr/lib/python3.13/socket.py:977\\u001b[0m, in \\u001b[0;36mgetaddrinfo\\u001b[0;34m(host, port, family, type, proto, flags)\\u001b[0m\\n\\u001b[1;32m 976\\u001b[0m addrlist \\u001b[38;5;241m=\\u001b[39m []\\n\\u001b[0;32m--> 977\\u001b[0m \\u001b[38;5;28;01mfor\\u001b[39;00m res \\u001b[38;5;129;01min\\u001b[39;00m \\u001b[43m_socket\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mgetaddrinfo\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mhost\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mport\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mfamily\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;28;43mtype\\u001b[39;49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mproto\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mflags\\u001b[49m\\u001b[43m)\\u001b[49m:\\n\\u001b[1;32m 978\\u001b[0m af, socktype, proto, canonname, sa \\u001b[38;5;241m=\\u001b[39m res\\n\",\n@@ -38,35 +38,35 @@\n \"\\u001b[0;31mNameResolutionError\\u001b[0m Traceback (most recent call last)\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connectionpool.py:787\\u001b[0m, in \\u001b[0;36mHTTPConnectionPool.urlopen\\u001b[0;34m(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw)\\u001b[0m\\n\\u001b[1;32m 786\\u001b[0m \\u001b[38;5;66;03m# Make the request on the HTTPConnection object\\u001b[39;00m\\n\\u001b[0;32m--> 787\\u001b[0m response \\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43m_make_request\\u001b[49m\\u001b[43m(\\u001b[49m\\n\\u001b[1;32m 788\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mconn\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 789\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mmethod\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 790\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 791\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mtimeout\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mtimeout_obj\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 792\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mbody\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mbody\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 793\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mheaders\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mheaders\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 794\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mchunked\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mchunked\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 795\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mretries\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mretries\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 796\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mresponse_conn\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mresponse_conn\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 797\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mpreload_content\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mpreload_content\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 798\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mdecode_content\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mdecode_content\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 799\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43mresponse_kw\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 800\\u001b[0m \\u001b[43m\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 802\\u001b[0m \\u001b[38;5;66;03m# Everything went great!\\u001b[39;00m\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connectionpool.py:488\\u001b[0m, in \\u001b[0;36mHTTPConnectionPool._make_request\\u001b[0;34m(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length)\\u001b[0m\\n\\u001b[1;32m 487\\u001b[0m new_e \\u001b[38;5;241m=\\u001b[39m _wrap_proxy_error(new_e, conn\\u001b[38;5;241m.\\u001b[39mproxy\\u001b[38;5;241m.\\u001b[39mscheme)\\n\\u001b[0;32m--> 488\\u001b[0m \\u001b[38;5;28;01mraise\\u001b[39;00m new_e\\n\\u001b[1;32m 490\\u001b[0m \\u001b[38;5;66;03m# conn.request() calls http.client.*.request, not the method in\\u001b[39;00m\\n\\u001b[1;32m 491\\u001b[0m \\u001b[38;5;66;03m# urllib3.request. It also calls makefile (recv) on the socket.\\u001b[39;00m\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connectionpool.py:464\\u001b[0m, in \\u001b[0;36mHTTPConnectionPool._make_request\\u001b[0;34m(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length)\\u001b[0m\\n\\u001b[1;32m 463\\u001b[0m \\u001b[38;5;28;01mtry\\u001b[39;00m:\\n\\u001b[0;32m--> 464\\u001b[0m \\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43m_validate_conn\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mconn\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 465\\u001b[0m \\u001b[38;5;28;01mexcept\\u001b[39;00m (SocketTimeout, BaseSSLError) \\u001b[38;5;28;01mas\\u001b[39;00m e:\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connectionpool.py:1093\\u001b[0m, in \\u001b[0;36mHTTPSConnectionPool._validate_conn\\u001b[0;34m(self, conn)\\u001b[0m\\n\\u001b[1;32m 1092\\u001b[0m \\u001b[38;5;28;01mif\\u001b[39;00m conn\\u001b[38;5;241m.\\u001b[39mis_closed:\\n\\u001b[0;32m-> 1093\\u001b[0m \\u001b[43mconn\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mconnect\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 1095\\u001b[0m \\u001b[38;5;66;03m# TODO revise this, see https://github.com/urllib3/urllib3/issues/2791\\u001b[39;00m\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connection.py:704\\u001b[0m, in \\u001b[0;36mHTTPSConnection.connect\\u001b[0;34m(self)\\u001b[0m\\n\\u001b[1;32m 703\\u001b[0m sock: socket\\u001b[38;5;241m.\\u001b[39msocket \\u001b[38;5;241m|\\u001b[39m ssl\\u001b[38;5;241m.\\u001b[39mSSLSocket\\n\\u001b[0;32m--> 704\\u001b[0m \\u001b[38;5;28mself\\u001b[39m\\u001b[38;5;241m.\\u001b[39msock \\u001b[38;5;241m=\\u001b[39m sock \\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43m_new_conn\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 705\\u001b[0m server_hostname: \\u001b[38;5;28mstr\\u001b[39m \\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;28mself\\u001b[39m\\u001b[38;5;241m.\\u001b[39mhost\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connection.py:205\\u001b[0m, in \\u001b[0;36mHTTPConnection._new_conn\\u001b[0;34m(self)\\u001b[0m\\n\\u001b[1;32m 204\\u001b[0m \\u001b[38;5;28;01mexcept\\u001b[39;00m socket\\u001b[38;5;241m.\\u001b[39mgaierror \\u001b[38;5;28;01mas\\u001b[39;00m e:\\n\\u001b[0;32m--> 205\\u001b[0m \\u001b[38;5;28;01mraise\\u001b[39;00m NameResolutionError(\\u001b[38;5;28mself\\u001b[39m\\u001b[38;5;241m.\\u001b[39mhost, \\u001b[38;5;28mself\\u001b[39m, e) \\u001b[38;5;28;01mfrom\\u001b[39;00m \\u001b[38;5;21;01me\\u001b[39;00m\\n\\u001b[1;32m 206\\u001b[0m \\u001b[38;5;28;01mexcept\\u001b[39;00m SocketTimeout \\u001b[38;5;28;01mas\\u001b[39;00m e:\\n\",\n- \"\\u001b[0;31mNameResolutionError\\u001b[0m: : Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\",\n+ \"\\u001b[0;31mNameResolutionError\\u001b[0m: : Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\",\n \"\\nThe above exception was the direct cause of the following exception:\\n\",\n \"\\u001b[0;31mMaxRetryError\\u001b[0m Traceback (most recent call last)\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/requests/adapters.py:667\\u001b[0m, in \\u001b[0;36mHTTPAdapter.send\\u001b[0;34m(self, request, stream, timeout, verify, cert, proxies)\\u001b[0m\\n\\u001b[1;32m 666\\u001b[0m \\u001b[38;5;28;01mtry\\u001b[39;00m:\\n\\u001b[0;32m--> 667\\u001b[0m resp \\u001b[38;5;241m=\\u001b[39m \\u001b[43mconn\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43murlopen\\u001b[49m\\u001b[43m(\\u001b[49m\\n\\u001b[1;32m 668\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mmethod\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mrequest\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mmethod\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 669\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 670\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mbody\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mrequest\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mbody\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 671\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mheaders\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mrequest\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mheaders\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 672\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mredirect\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43;01mFalse\\u001b[39;49;00m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 673\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43massert_same_host\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43;01mFalse\\u001b[39;49;00m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 674\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mpreload_content\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43;01mFalse\\u001b[39;49;00m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 675\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mdecode_content\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43;01mFalse\\u001b[39;49;00m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 676\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mretries\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mmax_retries\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 677\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mtimeout\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mtimeout\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 678\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mchunked\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mchunked\\u001b[49m\\u001b[43m,\\u001b[49m\\n\\u001b[1;32m 679\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 681\\u001b[0m \\u001b[38;5;28;01mexcept\\u001b[39;00m (ProtocolError, \\u001b[38;5;167;01mOSError\\u001b[39;00m) \\u001b[38;5;28;01mas\\u001b[39;00m err:\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/connectionpool.py:841\\u001b[0m, in \\u001b[0;36mHTTPConnectionPool.urlopen\\u001b[0;34m(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw)\\u001b[0m\\n\\u001b[1;32m 839\\u001b[0m new_e \\u001b[38;5;241m=\\u001b[39m ProtocolError(\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mConnection aborted.\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m, new_e)\\n\\u001b[0;32m--> 841\\u001b[0m retries \\u001b[38;5;241m=\\u001b[39m \\u001b[43mretries\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mincrement\\u001b[49m\\u001b[43m(\\u001b[49m\\n\\u001b[1;32m 842\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43mmethod\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43merror\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mnew_e\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43m_pool\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43m_stacktrace\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43msys\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mexc_info\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43m)\\u001b[49m\\u001b[43m[\\u001b[49m\\u001b[38;5;241;43m2\\u001b[39;49m\\u001b[43m]\\u001b[49m\\n\\u001b[1;32m 843\\u001b[0m \\u001b[43m\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 844\\u001b[0m retries\\u001b[38;5;241m.\\u001b[39msleep()\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/urllib3/util/retry.py:519\\u001b[0m, in \\u001b[0;36mRetry.increment\\u001b[0;34m(self, method, url, response, error, _pool, _stacktrace)\\u001b[0m\\n\\u001b[1;32m 518\\u001b[0m reason \\u001b[38;5;241m=\\u001b[39m error \\u001b[38;5;129;01mor\\u001b[39;00m ResponseError(cause)\\n\\u001b[0;32m--> 519\\u001b[0m \\u001b[38;5;28;01mraise\\u001b[39;00m MaxRetryError(_pool, url, reason) \\u001b[38;5;28;01mfrom\\u001b[39;00m \\u001b[38;5;21;01mreason\\u001b[39;00m \\u001b[38;5;66;03m# type: ignore[arg-type]\\u001b[39;00m\\n\\u001b[1;32m 521\\u001b[0m log\\u001b[38;5;241m.\\u001b[39mdebug(\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mIncremented Retry for (url=\\u001b[39m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;132;01m%s\\u001b[39;00m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m): \\u001b[39m\\u001b[38;5;132;01m%r\\u001b[39;00m\\u001b[38;5;124m\\\"\\u001b[39m, url, new_retry)\\n\",\n- \"\\u001b[0;31mMaxRetryError\\u001b[0m: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/air_temperature.nc (Caused by NameResolutionError(\\\": Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\\\"))\",\n+ \"\\u001b[0;31mMaxRetryError\\u001b[0m: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/air_temperature.nc (Caused by NameResolutionError(\\\": Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\\\"))\",\n \"\\nDuring handling of the above exception, another exception occurred:\\n\",\n \"\\u001b[0;31mConnectionError\\u001b[0m Traceback (most recent call last)\",\n \"Cell \\u001b[0;32mIn[1], line 5\\u001b[0m\\n\\u001b[1;32m 2\\u001b[0m \\u001b[38;5;28;01mimport\\u001b[39;00m \\u001b[38;5;21;01mnumpy\\u001b[39;00m \\u001b[38;5;28;01mas\\u001b[39;00m \\u001b[38;5;21;01mnp\\u001b[39;00m\\n\\u001b[1;32m 3\\u001b[0m \\u001b[38;5;28;01mimport\\u001b[39;00m \\u001b[38;5;21;01mpandas\\u001b[39;00m \\u001b[38;5;28;01mas\\u001b[39;00m \\u001b[38;5;21;01mpd\\u001b[39;00m\\n\\u001b[0;32m----> 5\\u001b[0m ds \\u001b[38;5;241m=\\u001b[39m \\u001b[43mxr\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mtutorial\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mload_dataset\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[38;5;124;43m\\\"\\u001b[39;49m\\u001b[38;5;124;43mair_temperature\\u001b[39;49m\\u001b[38;5;124;43m\\\"\\u001b[39;49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 6\\u001b[0m da \\u001b[38;5;241m=\\u001b[39m ds[\\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mair\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m]\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:215\\u001b[0m, in \\u001b[0;36mload_dataset\\u001b[0;34m(*args, **kwargs)\\u001b[0m\\n\\u001b[1;32m 178\\u001b[0m \\u001b[38;5;28;01mdef\\u001b[39;00m \\u001b[38;5;21mload_dataset\\u001b[39m(\\u001b[38;5;241m*\\u001b[39margs, \\u001b[38;5;241m*\\u001b[39m\\u001b[38;5;241m*\\u001b[39mkwargs) \\u001b[38;5;241m-\\u001b[39m\\u001b[38;5;241m>\\u001b[39m Dataset:\\n\\u001b[1;32m 179\\u001b[0m \\u001b[38;5;250m \\u001b[39m\\u001b[38;5;124;03m\\\"\\\"\\\"\\u001b[39;00m\\n\\u001b[1;32m 180\\u001b[0m \\u001b[38;5;124;03m Open, load into memory, and close a dataset from the online repository\\u001b[39;00m\\n\\u001b[1;32m 181\\u001b[0m \\u001b[38;5;124;03m (requires internet).\\u001b[39;00m\\n\\u001b[0;32m (...)\\u001b[0m\\n\\u001b[1;32m 213\\u001b[0m \\u001b[38;5;124;03m load_dataset\\u001b[39;00m\\n\\u001b[1;32m 214\\u001b[0m \\u001b[38;5;124;03m \\\"\\\"\\\"\\u001b[39;00m\\n\\u001b[0;32m--> 215\\u001b[0m \\u001b[38;5;28;01mwith\\u001b[39;00m \\u001b[43mopen_dataset\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43margs\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43mkwargs\\u001b[49m\\u001b[43m)\\u001b[49m \\u001b[38;5;28;01mas\\u001b[39;00m ds:\\n\\u001b[1;32m 216\\u001b[0m \\u001b[38;5;28;01mreturn\\u001b[39;00m ds\\u001b[38;5;241m.\\u001b[39mload()\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:167\\u001b[0m, in \\u001b[0;36mopen_dataset\\u001b[0;34m(name, cache, cache_dir, engine, **kws)\\u001b[0m\\n\\u001b[1;32m 164\\u001b[0m downloader \\u001b[38;5;241m=\\u001b[39m pooch\\u001b[38;5;241m.\\u001b[39mHTTPDownloader(headers\\u001b[38;5;241m=\\u001b[39mheaders)\\n\\u001b[1;32m 166\\u001b[0m \\u001b[38;5;66;03m# retrieve the file\\u001b[39;00m\\n\\u001b[0;32m--> 167\\u001b[0m filepath \\u001b[38;5;241m=\\u001b[39m \\u001b[43mpooch\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mretrieve\\u001b[49m\\u001b[43m(\\u001b[49m\\n\\u001b[1;32m 168\\u001b[0m \\u001b[43m \\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mknown_hash\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43;01mNone\\u001b[39;49;00m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mpath\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mcache_dir\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mdownloader\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mdownloader\\u001b[49m\\n\\u001b[1;32m 169\\u001b[0m \\u001b[43m\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 170\\u001b[0m ds \\u001b[38;5;241m=\\u001b[39m _open_dataset(filepath, engine\\u001b[38;5;241m=\\u001b[39mengine, \\u001b[38;5;241m*\\u001b[39m\\u001b[38;5;241m*\\u001b[39mkws)\\n\\u001b[1;32m 171\\u001b[0m \\u001b[38;5;28;01mif\\u001b[39;00m \\u001b[38;5;129;01mnot\\u001b[39;00m cache:\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:239\\u001b[0m, in \\u001b[0;36mretrieve\\u001b[0;34m(url, known_hash, fname, path, processor, downloader, progressbar)\\u001b[0m\\n\\u001b[1;32m 236\\u001b[0m \\u001b[38;5;28;01mif\\u001b[39;00m downloader \\u001b[38;5;129;01mis\\u001b[39;00m \\u001b[38;5;28;01mNone\\u001b[39;00m:\\n\\u001b[1;32m 237\\u001b[0m downloader \\u001b[38;5;241m=\\u001b[39m choose_downloader(url, progressbar\\u001b[38;5;241m=\\u001b[39mprogressbar)\\n\\u001b[0;32m--> 239\\u001b[0m \\u001b[43mstream_download\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mfull_path\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mknown_hash\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mdownloader\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mpooch\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[38;5;28;43;01mNone\\u001b[39;49;00m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 241\\u001b[0m \\u001b[38;5;28;01mif\\u001b[39;00m known_hash \\u001b[38;5;129;01mis\\u001b[39;00m \\u001b[38;5;28;01mNone\\u001b[39;00m:\\n\\u001b[1;32m 242\\u001b[0m get_logger()\\u001b[38;5;241m.\\u001b[39minfo(\\n\\u001b[1;32m 243\\u001b[0m \\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mSHA256 hash of downloaded file: \\u001b[39m\\u001b[38;5;132;01m%s\\u001b[39;00m\\u001b[38;5;130;01m\\\\n\\u001b[39;00m\\u001b[38;5;124m\\\"\\u001b[39m\\n\\u001b[1;32m 244\\u001b[0m \\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mUse this value as the \\u001b[39m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124mknown_hash\\u001b[39m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m argument of \\u001b[39m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124mpooch.retrieve\\u001b[39m\\u001b[38;5;124m'\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m\\n\\u001b[0;32m (...)\\u001b[0m\\n\\u001b[1;32m 247\\u001b[0m file_hash(\\u001b[38;5;28mstr\\u001b[39m(full_path)),\\n\\u001b[1;32m 248\\u001b[0m )\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:807\\u001b[0m, in \\u001b[0;36mstream_download\\u001b[0;34m(url, fname, known_hash, downloader, pooch, retry_if_failed)\\u001b[0m\\n\\u001b[1;32m 803\\u001b[0m \\u001b[38;5;28;01mtry\\u001b[39;00m:\\n\\u001b[1;32m 804\\u001b[0m \\u001b[38;5;66;03m# Stream the file to a temporary so that we can safely check its\\u001b[39;00m\\n\\u001b[1;32m 805\\u001b[0m \\u001b[38;5;66;03m# hash before overwriting the original.\\u001b[39;00m\\n\\u001b[1;32m 806\\u001b[0m \\u001b[38;5;28;01mwith\\u001b[39;00m temporary_file(path\\u001b[38;5;241m=\\u001b[39m\\u001b[38;5;28mstr\\u001b[39m(fname\\u001b[38;5;241m.\\u001b[39mparent)) \\u001b[38;5;28;01mas\\u001b[39;00m tmp:\\n\\u001b[0;32m--> 807\\u001b[0m \\u001b[43mdownloader\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mtmp\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mpooch\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 808\\u001b[0m hash_matches(tmp, known_hash, strict\\u001b[38;5;241m=\\u001b[39m\\u001b[38;5;28;01mTrue\\u001b[39;00m, source\\u001b[38;5;241m=\\u001b[39m\\u001b[38;5;28mstr\\u001b[39m(fname\\u001b[38;5;241m.\\u001b[39mname))\\n\\u001b[1;32m 809\\u001b[0m shutil\\u001b[38;5;241m.\\u001b[39mmove(tmp, \\u001b[38;5;28mstr\\u001b[39m(fname))\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/pooch/downloaders.py:220\\u001b[0m, in \\u001b[0;36mHTTPDownloader.__call__\\u001b[0;34m(self, url, output_file, pooch, check_only)\\u001b[0m\\n\\u001b[1;32m 218\\u001b[0m \\u001b[38;5;66;03m# pylint: enable=consider-using-with\\u001b[39;00m\\n\\u001b[1;32m 219\\u001b[0m \\u001b[38;5;28;01mtry\\u001b[39;00m:\\n\\u001b[0;32m--> 220\\u001b[0m response \\u001b[38;5;241m=\\u001b[39m \\u001b[43mrequests\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mget\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mtimeout\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mtimeout\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43mkwargs\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 221\\u001b[0m response\\u001b[38;5;241m.\\u001b[39mraise_for_status()\\n\\u001b[1;32m 222\\u001b[0m content \\u001b[38;5;241m=\\u001b[39m response\\u001b[38;5;241m.\\u001b[39miter_content(chunk_size\\u001b[38;5;241m=\\u001b[39m\\u001b[38;5;28mself\\u001b[39m\\u001b[38;5;241m.\\u001b[39mchunk_size)\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/requests/api.py:73\\u001b[0m, in \\u001b[0;36mget\\u001b[0;34m(url, params, **kwargs)\\u001b[0m\\n\\u001b[1;32m 62\\u001b[0m \\u001b[38;5;28;01mdef\\u001b[39;00m \\u001b[38;5;21mget\\u001b[39m(url, params\\u001b[38;5;241m=\\u001b[39m\\u001b[38;5;28;01mNone\\u001b[39;00m, \\u001b[38;5;241m*\\u001b[39m\\u001b[38;5;241m*\\u001b[39mkwargs):\\n\\u001b[1;32m 63\\u001b[0m \\u001b[38;5;250m \\u001b[39m\\u001b[38;5;124mr\\u001b[39m\\u001b[38;5;124;03m\\\"\\\"\\\"Sends a GET request.\\u001b[39;00m\\n\\u001b[1;32m 64\\u001b[0m \\n\\u001b[1;32m 65\\u001b[0m \\u001b[38;5;124;03m :param url: URL for the new :class:`Request` object.\\u001b[39;00m\\n\\u001b[0;32m (...)\\u001b[0m\\n\\u001b[1;32m 70\\u001b[0m \\u001b[38;5;124;03m :rtype: requests.Response\\u001b[39;00m\\n\\u001b[1;32m 71\\u001b[0m \\u001b[38;5;124;03m \\\"\\\"\\\"\\u001b[39;00m\\n\\u001b[0;32m---> 73\\u001b[0m \\u001b[38;5;28;01mreturn\\u001b[39;00m \\u001b[43mrequest\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[38;5;124;43m\\\"\\u001b[39;49m\\u001b[38;5;124;43mget\\u001b[39;49m\\u001b[38;5;124;43m\\\"\\u001b[39;49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43mparams\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mparams\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43mkwargs\\u001b[49m\\u001b[43m)\\u001b[49m\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/requests/api.py:59\\u001b[0m, in \\u001b[0;36mrequest\\u001b[0;34m(method, url, **kwargs)\\u001b[0m\\n\\u001b[1;32m 55\\u001b[0m \\u001b[38;5;66;03m# By using the 'with' statement we are sure the session is closed, thus we\\u001b[39;00m\\n\\u001b[1;32m 56\\u001b[0m \\u001b[38;5;66;03m# avoid leaving sockets open which can trigger a ResourceWarning in some\\u001b[39;00m\\n\\u001b[1;32m 57\\u001b[0m \\u001b[38;5;66;03m# cases, and look like a memory leak in others.\\u001b[39;00m\\n\\u001b[1;32m 58\\u001b[0m \\u001b[38;5;28;01mwith\\u001b[39;00m sessions\\u001b[38;5;241m.\\u001b[39mSession() \\u001b[38;5;28;01mas\\u001b[39;00m session:\\n\\u001b[0;32m---> 59\\u001b[0m \\u001b[38;5;28;01mreturn\\u001b[39;00m \\u001b[43msession\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43mrequest\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mmethod\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43mmethod\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[43murl\\u001b[49m\\u001b[38;5;241;43m=\\u001b[39;49m\\u001b[43murl\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43mkwargs\\u001b[49m\\u001b[43m)\\u001b[49m\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/requests/sessions.py:589\\u001b[0m, in \\u001b[0;36mSession.request\\u001b[0;34m(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)\\u001b[0m\\n\\u001b[1;32m 584\\u001b[0m send_kwargs \\u001b[38;5;241m=\\u001b[39m {\\n\\u001b[1;32m 585\\u001b[0m \\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mtimeout\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m: timeout,\\n\\u001b[1;32m 586\\u001b[0m \\u001b[38;5;124m\\\"\\u001b[39m\\u001b[38;5;124mallow_redirects\\u001b[39m\\u001b[38;5;124m\\\"\\u001b[39m: allow_redirects,\\n\\u001b[1;32m 587\\u001b[0m }\\n\\u001b[1;32m 588\\u001b[0m send_kwargs\\u001b[38;5;241m.\\u001b[39mupdate(settings)\\n\\u001b[0;32m--> 589\\u001b[0m resp \\u001b[38;5;241m=\\u001b[39m \\u001b[38;5;28;43mself\\u001b[39;49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43msend\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mprep\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43msend_kwargs\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 591\\u001b[0m \\u001b[38;5;28;01mreturn\\u001b[39;00m resp\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/requests/sessions.py:703\\u001b[0m, in \\u001b[0;36mSession.send\\u001b[0;34m(self, request, **kwargs)\\u001b[0m\\n\\u001b[1;32m 700\\u001b[0m start \\u001b[38;5;241m=\\u001b[39m preferred_clock()\\n\\u001b[1;32m 702\\u001b[0m \\u001b[38;5;66;03m# Send the request\\u001b[39;00m\\n\\u001b[0;32m--> 703\\u001b[0m r \\u001b[38;5;241m=\\u001b[39m \\u001b[43madapter\\u001b[49m\\u001b[38;5;241;43m.\\u001b[39;49m\\u001b[43msend\\u001b[49m\\u001b[43m(\\u001b[49m\\u001b[43mrequest\\u001b[49m\\u001b[43m,\\u001b[49m\\u001b[43m \\u001b[49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[38;5;241;43m*\\u001b[39;49m\\u001b[43mkwargs\\u001b[49m\\u001b[43m)\\u001b[49m\\n\\u001b[1;32m 705\\u001b[0m \\u001b[38;5;66;03m# Total elapsed time of the request (approximately)\\u001b[39;00m\\n\\u001b[1;32m 706\\u001b[0m elapsed \\u001b[38;5;241m=\\u001b[39m preferred_clock() \\u001b[38;5;241m-\\u001b[39m start\\n\",\n \"File \\u001b[0;32m/usr/lib/python3/dist-packages/requests/adapters.py:700\\u001b[0m, in \\u001b[0;36mHTTPAdapter.send\\u001b[0;34m(self, request, stream, timeout, verify, cert, proxies)\\u001b[0m\\n\\u001b[1;32m 696\\u001b[0m \\u001b[38;5;28;01mif\\u001b[39;00m \\u001b[38;5;28misinstance\\u001b[39m(e\\u001b[38;5;241m.\\u001b[39mreason, _SSLError):\\n\\u001b[1;32m 697\\u001b[0m \\u001b[38;5;66;03m# This branch is for urllib3 v1.22 and later.\\u001b[39;00m\\n\\u001b[1;32m 698\\u001b[0m \\u001b[38;5;28;01mraise\\u001b[39;00m SSLError(e, request\\u001b[38;5;241m=\\u001b[39mrequest)\\n\\u001b[0;32m--> 700\\u001b[0m \\u001b[38;5;28;01mraise\\u001b[39;00m \\u001b[38;5;167;01mConnectionError\\u001b[39;00m(e, request\\u001b[38;5;241m=\\u001b[39mrequest)\\n\\u001b[1;32m 702\\u001b[0m \\u001b[38;5;28;01mexcept\\u001b[39;00m ClosedPoolError \\u001b[38;5;28;01mas\\u001b[39;00m e:\\n\\u001b[1;32m 703\\u001b[0m \\u001b[38;5;28;01mraise\\u001b[39;00m \\u001b[38;5;167;01mConnectionError\\u001b[39;00m(e, request\\u001b[38;5;241m=\\u001b[39mrequest)\\n\",\n- \"\\u001b[0;31mConnectionError\\u001b[0m: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/air_temperature.nc (Caused by NameResolutionError(\\\": Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\\\"))\"\n+ \"\\u001b[0;31mConnectionError\\u001b[0m: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/air_temperature.nc (Caused by NameResolutionError(\\\": Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\\\"))\"\n ]\n }\n ],\n \"source\": [\n \"import xarray as xr\\n\",\n \"import numpy as np\\n\",\n \"import pandas as pd\\n\",\n"}]}]}, {"source1": "./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html", "source2": "./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html", "unified_diff": "@@ -156,15 +156,15 @@\n 705 server_hostname: str = self.host\n \n File /usr/lib/python3/dist-packages/urllib3/connection.py:205, in HTTPConnection._new_conn(self)\n 204 except socket.gaierror as e:\n --> 205 raise NameResolutionError(self.host, self, e) from e\n 206 except SocketTimeout as e:\n \n-NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x7f3dcad05be0>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\n+NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x7f5186285be0>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)\n \n The above exception was the direct cause of the following exception:\n \n MaxRetryError Traceback (most recent call last)\n File /usr/lib/python3/dist-packages/requests/adapters.py:667, in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)\n 666 try:\n --> 667 resp = conn.urlopen(\n@@ -190,15 +190,15 @@\n 844 retries.sleep()\n \n File /usr/lib/python3/dist-packages/urllib3/util/retry.py:519, in Retry.increment(self, method, url, response, error, _pool, _stacktrace)\n 518 reason = error or ResponseError(cause)\n --> 519 raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]\n 521 log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)\n \n-MaxRetryError: 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 0x7f3dcad05be0>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+MaxRetryError: 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 0x7f5186285be0>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n \n During handling of the above exception, another exception occurred:\n \n ConnectionError Traceback (most recent call last)\n Cell In[2], line 1\n ----> 1 ds = xr.tutorial.open_dataset("rasm").load()\n 2 ds\n@@ -277,15 +277,15 @@\n 696 if isinstance(e.reason, _SSLError):\n 697 # This branch is for urllib3 v1.22 and later.\n 698 raise SSLError(e, request=request)\n --> 700 raise ConnectionError(e, request=request)\n 702 except ClosedPoolError as e:\n 703 raise ConnectionError(e, request=request)\n \n-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 0x7f3dcad05be0>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+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 0x7f5186285be0>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n
We first have to come up with the weights, - calculate the month length for each monthly data record - calculate weights using groupby('time.season')
Finally, we just need to multiply our weights by the Dataset
and sum along the time dimension. Creating a DataArray
for the month length is as easy as using the days_in_month
accessor on the time coordinate. The calendar type, in this case 'noleap'
, is automatically considered in this operation.
In this example, the logical coordinates are x
and y
, while the physical coordinates are xc
and yc
, which represent the longitudes and latitudes of the data.
[3]:\n
Control the map projection parameters on multiple axes
\nThis example illustrates how to plot multiple maps and control their extent and aspect ratio.
\nFor more details see this discussion on github.
\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -94,15 +94,15 @@\n File /usr/lib/python3/dist-packages/urllib3/connection.py:205, in\n HTTPConnection._new_conn(self)\n 204 except socket.gaierror as e:\n --> 205 raise NameResolutionError(self.host, self, e) from e\n 206 except SocketTimeout as e:\n \n NameResolutionError:<xarray.Dataset> Size: 41kB\n Dimensions: (time: 731, location: 3)\n Coordinates:\n * time (time) datetime64[ns] 6kB 2000-01-01 2000-01-02 ... 2001-12-31\n * location (location) <U2 24B 'IA' 'IN' 'IL'\n Data variables:\n tmin (time, location) float64 18kB -8.037 -1.788 ... -1.346 -4.544\n- tmax (time, location) float64 18kB 12.98 3.31 6.779 ... 3.343 3.805
PandasIndex(Index(['IA', 'IN', 'IL'], dtype='object', name='location'))
[2]:\n@@ -697,15 +697,15 @@\n
[5]:\n
\n-<seaborn.axisgrid.PairGrid at 0x7f0d73a92cf0>\n+<seaborn.axisgrid.PairGrid at 0x7fcd9276acf0>\n
array(['IA', 'IN', 'IL'], dtype='<U2')
array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
PandasIndex(Index(['IA', 'IN', 'IL'], dtype='object', name='location'))
PandasIndex(Index([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], dtype='int64', name='month'))
[7]:\n
freeze.to_pandas().plot()\n
PandasIndex(Index(['IA', 'IN', 'IL'], dtype='object', name='location'))
[12]:\n
df = both.sel(time="2000").mean("location").reset_coords(drop=True).to_dataframe()\n df.head()\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -142,15 +142,15 @@\n [4]:\n \n [../_images/examples_weather-data_7_1.png]\n *\b**\b**\b**\b* V\bVi\bis\bsu\bua\bal\bli\biz\bze\be u\bus\bsi\bin\bng\bg s\bse\bea\bab\bbo\bor\brn\bn_\b?\b\u00b6 *\b**\b**\b**\b*\n [5]:\n sns.pairplot(df.reset_index(), vars=ds.data_vars)\n [5]:\n-\n+\n [../_images/examples_weather-data_9_1.png]\n *\b**\b**\b**\b**\b* P\bPr\bro\bob\bba\bab\bbi\bil\bli\bit\bty\by o\bof\bf f\bfr\bre\bee\bez\bze\be b\bby\by c\bca\bal\ble\ben\bnd\bda\bar\br m\bmo\bon\bnt\bth\bh_\b?\b\u00b6 *\b**\b**\b**\b**\b*\n [6]:\n freeze = (ds[\"tmin\"] <= 0).groupby(\"time.month\").mean(\"time\")\n freeze\n [6]:\n Size: 288B\n"}]}, {"source1": "./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz", "source2": "./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz", "unified_diff": null, "details": [{"source1": "weather-data.ipynb", "source2": "weather-data.ipynb", "unified_diff": null, "details": [{"source1": "Pretty-printed", "source2": "Pretty-printed", "comments": ["Similarity: 0.9992323269378145%", "Differences: {\"'cells'\": \"{1: {'metadata': {'execution': {'iopub.execute_input': '2026-05-15T22:14:39.702565Z', \"", " \"'iopub.status.busy': '2026-05-15T22:14:39.702107Z', 'iopub.status.idle': \"", " \"'2026-05-15T22:14:42.097130Z', 'shell.execute_reply': \"", " \"'2026-05-15T22:14:42.096246Z'}}, 'outputs': {0: {'data': {'text/html': {insert: \"", " '[(377, \" tmax (time, location) float64 18kB 12.98 3.31 6.779 ... 3.343 '", " \"3.805
array(['IA', 'IN', 'IL'], dtype='<U2')
array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
PandasIndex(Index(['IA', 'IN', 'IL'], dtype='object', name='location'))
PandasIndex(Index([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], dtype='int64', name='month'))
Visualizing your datasets is quick and convenient:
\nIn [37]: data.plot()\n-Out[37]: <matplotlib.collections.QuadMesh at 0x7fe58ad7a660>\n+Out[37]: <matplotlib.collections.QuadMesh at 0x7feee879a660>\n
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 Plotting.
\napply_ufunc
\", \"Compare weighted and unweighted mean temperature\", \"Blank template\", \"Calculating Seasonal Averages from Time Series of Monthly Means\", \"Working with Multidimensional Coordinates\", \"Visualization Gallery\", \"Toy weather data\", \"Gallery\", \"Frequently Asked Questions\", \"Getting Started\", \"Installation\", \"Quick overview\", \"Overview: Why xarray?\", \"Getting Help\", \"How do I \\u2026\", \"Xarray documentation\", \"Alternative chunked array types\", \"Integrating with duck arrays\", \"Extending xarray using accessors\", \"How to add a new backend\", \"How to create a custom index\", \"Xarray Internals\", \"Internal Design\", \"Interoperability of Xarray\", \"Time Coding\", \"Zarr Encoding Specification\", \"Development roadmap\", \"Tutorials and Videos\", \"Combining data\", \"Computation\", \"Parallel Computing with Dask\", \"Data Structures\", \"Working with numpy-like arrays\", \"GroupBy: Group and Bin Data\", \"Hierarchical data\", \"User Guide\", \"Indexing and selecting data\", \"Interpolating data\", \"Reading and writing files\", \"Configuration\", \"Working with pandas\", \"Plotting\", \"Reshaping and reorganizing data\", \"Terminology\", \"Testing your code\", \"Time series data\", \"Weather and climate data\", \"What\\u2019s New\"],\n \"titleterms\": {\n \"\": [13, 16, 55],\n \"0\": 55,\n \"01\": 55,\n \"02\": 55,\n"}]}, {"source1": "./usr/share/doc/python-xarray-doc/html/user-guide/computation.html", "source2": "./usr/share/doc/python-xarray-doc/html/user-guide/computation.html", "unified_diff": "@@ -934,16 +934,16 @@\n <xarray.Dataset> Size: 2kB\n Dimensions: (param: 10, cov_i: 10, cov_j: 10)\n Coordinates:\n * param (param) <U7 280B 'a0' 'xc0' ... 'xalpha1' 'yalpha1'\n * cov_i (cov_i) <U7 280B 'a0' 'xc0' ... 'xalpha1' 'yalpha1'\n * cov_j (cov_j) <U7 280B 'a0' 'xc0' ... 'xalpha1' 'yalpha1'\n Data variables:\n- curvefit_coefficients (param) float64 80B 3.0 1.004 1.003 ... 1.007 1.008\n- curvefit_covariance (cov_i, cov_j) float64 800B 3.362e-05 ... 2.125e-05\n+ curvefit_coefficients (param) float64 80B -0.659 4.858 ... 2.066 1.329\n+ curvefit_covariance (cov_i, cov_j) float64 800B 5.662e+11 ... 6.911e-05\n \n \n Note
\nThis method replicates the behavior of scipy.optimize.curve_fit()
.
func(ds)
). This allows you to write pipelines for\n transforming your data (using \u201cmethod chaining\u201d) instead of writing hard to\n follow nested function calls:\n # these lines are equivalent, but with pipe we can make the logic flow\n # entirely from left to right\n In [64]: plt.plot((2 * ds.temperature.sel(loc=0)).mean("instrument"))\n-Out[64]: [<matplotlib.lines.Line2D at 0x7fe55c75ad50>]\n+Out[64]: [<matplotlib.lines.Line2D at 0x7feeb3312c10>]\n \n In [65]: (ds.temperature.sel(loc=0).pipe(lambda x: 2 * x).mean("instrument").pipe(plt.plot))\n-Out[65]: [<matplotlib.lines.Line2D at 0x7fe55c75aad0>]\n+Out[65]: [<matplotlib.lines.Line2D at 0x7feeb3312990>]\n
Both pipe
and assign
replicate the pandas methods of the same names\n (DataFrame.pipe
and\n DataFrame.assign
).
With xarray, there is no performance penalty for creating new datasets, even if\n variables are lazily loaded from a file on disk. Creating new objects instead\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -585,19 +585,19 @@\n There is also the pipe() method that allows you to use a method call with an\n external function (e.g., ds.pipe(func)) instead of simply calling it (e.g.,\n func(ds)). This allows you to write pipelines for transforming your data (using\n \u201cmethod chaining\u201d) instead of writing hard to follow nested function calls:\n # these lines are equivalent, but with pipe we can make the logic flow\n # entirely from left to right\n In [64]: plt.plot((2 * ds.temperature.sel(loc=0)).mean(\"instrument\"))\n-Out[64]: [ If you were a previous user of the prototype xarray-contrib/datatree package, this is different from what you\u2019re used to!\n 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.\n This allows us to provide features like Coordinate Inheritance. To demonstrate, let\u2019s first generate some example datasets which are not aligned with one another: To select and assign values to a portion of a You can also assign values to all variables of a Additional keyword arguments can be passed to scipy\u2019s functions. Let\u2019s see how (The suffix To read back a zarr dataset that has been created this way, we use the\n Now, a Zarr store with the correct variable shapes and attributes exists that\n can be filled out by subsequent calls to Concurrent writes with As a safety check to make it harder to inadvertently override existing values,\n if you set Chunk sizes may be specified in one of three ways when writing to a zarr store: For example, let\u2019s say we\u2019re working with a dataset with dimensions\n These multi-dimensional coordinates are only two-dimensional and take up very little\n space on disk or in memory, yet when writing to disk the default zarr behavior is to\n split them into chunks: Ncdata provides more sophisticated means of transferring data, including entire\n datasets. It uses the file saving and loading functions in both projects to provide a\n more \u201ccorrect\u201d translation between them, but still with very low overhead and not\n using actual disk files. For example: For these examples we\u2019ll use the North American air temperature dataset. Same plot can be displayed using the dataset: Now suppose we want to scatter the The You can force a legend instead of a colorbar by setting The The Faceting is also possible And adding the z-axis For more advanced scatter plots, we recommend converting the relevant data variables\n to a pandas DataFrame and using the extensive plotting capabilities of # (drop the attributes just to make the printed representation shorter)\n In [89]: ds = xr.tutorial.open_dataset("air_temperature").drop_attrs()\n-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 0x7fe55b3e6990>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+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 0x7feeb1da2850>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n \n \n In [90]: ds_daily = ds.resample(time="D").mean("time")\n KeyError: "No variable named 'time'. Variables on the dataset include ['foo', 'x', 'letters']"\n \n \n In [91]: ds_weekly = ds.resample(time="W").mean("time")\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -871,15 +871,15 @@\n To demonstrate, let\u2019s first generate some example datasets which are not\n aligned with one another:\n # (drop the attributes just to make the printed representation shorter)\n In [89]: ds = xr.tutorial.open_dataset(\"air_temperature\").drop_attrs()\n ConnectionError: HTTPSConnectionPool(host='github.com', port=443): Max retries\n exceeded with url: /pydata/xarray-data/raw/master/air_temperature.nc (Caused by\n NameResolutionError(\"
In [52]: ds = xr.tutorial.open_dataset("air_temperature")\n-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 0x7fe55b3e6710>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+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 0x7feeb1da25d0>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n \n \n # Define target latitude and longitude (where weather stations might be)\n In [53]: target_lon = xr.DataArray([200, 201, 202, 205], dims="points")\n \n In [54]: target_lat = xr.DataArray([31, 41, 42, 42], dims="points")\n \n@@ -697,15 +697,15 @@\n
Assigning values with indexing\u00b6
\n DataArray()
you\n can use indexing with .loc
:In [57]: ds = xr.tutorial.open_dataset("air_temperature")\n-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 0x7fe55b3e4b90>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+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 0x7feeb3313ed0>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n \n \n # add an empty 2D dataarray\n In [58]: ds["empty"] = xr.full_like(ds.air.mean("time"), fill_value=0)\n AttributeError: 'Dataset' object has no attribute 'air'\n \n \n@@ -869,15 +869,15 @@\n
Dataset
at once:In [83]: ds_org = xr.tutorial.open_dataset("eraint_uvz").isel(\n ....: latitude=slice(56, 59), longitude=slice(255, 258), level=0\n ....: )\n ....: \n-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 0x7fe55b3e4190>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+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 0x7feeb1da0050>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n \n \n # set all values to 0\n In [84]: ds = xr.zeros_like(ds_org)\n NameError: name 'ds_org' is not defined\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -476,15 +476,15 @@\n with a new shared output dimension name. In the example below, the selections\n of the closest latitude and longitude are renamed to an output dimension named\n \u201cpoints\u201d:\n In [52]: ds = xr.tutorial.open_dataset(\"air_temperature\")\n ConnectionError: HTTPSConnectionPool(host='github.com', port=443): Max retries\n exceeded with url: /pydata/xarray-data/raw/master/air_temperature.nc (Caused by\n NameResolutionError(\"
\n \n
# fill 0 for the outside of the original coordinates.\n In [21]: da.interp(x=np.linspace(-0.5, 1.5, 10), kwargs={"fill_value": 0.0})\n@@ -439,15 +439,15 @@\n see Missing values.\n \n
Example\u00b6
\n interp()
works on real data.# Raw data\n In [44]: ds = xr.tutorial.open_dataset("air_temperature").isel(time=0)\n-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 0x7fe57192b890>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+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 0x7feed8367d90>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n \n \n In [45]: fig, axes = plt.subplots(ncols=2, figsize=(10, 4))\n \n In [46]: ds.air.plot(ax=axes[0])\n AttributeError: 'Dataset' object has no attribute 'air'\n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -153,26 +153,26 @@\n ....: np.sin(np.linspace(0, 2 * np.pi, 10)),\n ....: dims=\"x\",\n ....: coords={\"x\": np.linspace(0, 1, 10)},\n ....: )\n ....:\n \n In [17]: da.plot.line(\"o\", label=\"original\")\n-Out[17]: [
.zarr
is optional\u2013just a reminder that a zarr store lives\n there.) If the directory does not exist, it will be created. If a zarr\n store is already present at that path, an error will be raised, preventing it\n from being overwritten. To override this behavior and overwrite an existing\n store, add mode='w'
when invoking to_zarr()
.open_zarr()
method:In [14]: ds_zarr = xr.open_zarr("path/to/directory.zarr")\n \n In [15]: ds_zarr\n Out[15]: \n <xarray.Dataset> Size: 264B\n-Dimensions: (y: 5, x: 4)\n+Dimensions: (x: 4, y: 5)\n Coordinates:\n- * y (y) datetime64[ns] 40B 2000-01-01 2000-01-02 ... 2000-01-05\n z (x) object 32B dask.array<chunksize=(4,), meta=np.ndarray>\n+ * y (y) datetime64[ns] 40B 2000-01-01 2000-01-02 ... 2000-01-05\n * x (x) int64 32B 10 20 30 40\n Data variables:\n foo (x, y) float64 160B dask.array<chunksize=(4, 5), meta=np.ndarray>\n
Cloud Storage Buckets\u00b6
\n@@ -724,36 +724,36 @@\n \n In [18]: ds = xr.Dataset({"foo": ("x", dummies)}, coords={"x": np.arange(30)})\n \n In [19]: path = "path/to/directory.zarr"\n \n # Now we write the metadata without computing any array values\n In [20]: ds.to_zarr(path, compute=False)\n-Out[20]: Delayed('_finalize_store-4132124a-a206-4851-9ea5-6e99b07ccdfd')\n+Out[20]: Delayed('_finalize_store-a07550c4-64e3-47a8-b0d2-2be09a156ad1')\n to_zarr
.\n Setting region="auto"
will open the existing store and determine the\n correct alignment of the new data with the existing dimensions, or as an\n explicit mapping from dimension names to Python slice
objects indicating\n where the data should be written (in index space, not label space), e.g.,# For convenience, we'll slice a single dataset, but in the real use-case\n # we would create them separately possibly even from separate processes.\n In [21]: ds = xr.Dataset({"foo": ("x", np.arange(30))}, coords={"x": np.arange(30)})\n \n # Any of the following region specifications are valid\n In [22]: ds.isel(x=slice(0, 10)).to_zarr(path, region="auto")\n-Out[22]: <xarray.backends.zarr.ZarrStore at 0x7fe55b75a5f0>\n+Out[22]: <xarray.backends.zarr.ZarrStore at 0x7feeb21125f0>\n \n In [23]: ds.isel(x=slice(10, 20)).to_zarr(path, region={"x": "auto"})\n-Out[23]: <xarray.backends.zarr.ZarrStore at 0x7fe55b75a4d0>\n+Out[23]: <xarray.backends.zarr.ZarrStore at 0x7feeb21123b0>\n \n In [24]: ds.isel(x=slice(20, 30)).to_zarr(path, region={"x": slice(20, 30)})\n-Out[24]: <xarray.backends.zarr.ZarrStore at 0x7fe55b920820>\n+Out[24]: <xarray.backends.zarr.ZarrStore at 0x7feeb24d4820>\n
region
are safe as long as they modify distinct\n chunks in the underlying Zarr arrays (or use an appropriate lock
).region
then all variables included in a Dataset must have\n dimensions included in region
. Other variables (typically coordinates)\n@@ -816,28 +816,28 @@\n ....: "y": [1, 2, 3, 4, 5],\n ....: "t": pd.date_range("2001-01-01", periods=2),\n ....: },\n ....: )\n ....: \n \n In [30]: ds1.to_zarr("path/to/directory.zarr")\n-Out[30]: <xarray.backends.zarr.ZarrStore at 0x7fe55b75bac0>\n+Out[30]: <xarray.backends.zarr.ZarrStore at 0x7feeb2113ac0>\n \n In [31]: ds2 = xr.Dataset(\n ....: {"foo": (("x", "y", "t"), np.random.rand(4, 5, 2))},\n ....: coords={\n ....: "x": [10, 20, 30, 40],\n ....: "y": [1, 2, 3, 4, 5],\n ....: "t": pd.date_range("2001-01-03", periods=2),\n ....: },\n ....: )\n ....: \n \n In [32]: ds2.to_zarr("path/to/directory.zarr", append_dim="t")\n-Out[32]: <xarray.backends.zarr.ZarrStore at 0x7fe55b75bb50>\n+Out[32]: <xarray.backends.zarr.ZarrStore at 0x7feeb21139a0>\n Specifying chunks in a zarr store\u00b6
\n \n@@ -861,15 +861,15 @@\n positional ordering of the dimensions in each array. Watch out for arrays with\n differently-ordered dimensions within a single Dataset.\n
('time', 'x', 'y')
, a variable Tair
which is chunked in x
and y
,\n and two multi-dimensional coordinates xc
and yc
:In [33]: ds = xr.tutorial.open_dataset("rasm")\n-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 0x7fe55b85fb10>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+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 0x7feeb221b9d0>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n \n \n In [34]: ds["Tair"] = ds["Tair"].chunk({"x": 100, "y": 100})\n KeyError: "No variable named 'Tair'. Variables on the dataset include ['foo', 'x']"\n \n \n In [35]: ds\n@@ -882,15 +882,15 @@\n foo (x) int64 240B 0 1 2 3 4 5 6 7 8 9 ... 21 22 23 24 25 26 27 28 29\n
In [36]: ds.to_zarr("path/to/directory.zarr", mode="w")\n-Out[36]: <xarray.backends.zarr.ZarrStore at 0x7fe55b9203a0>\n+Out[36]: <xarray.backends.zarr.ZarrStore at 0x7feeb24d43a0>\n \n In [37]: ! ls -R path/to/directory.zarr\n path/to/directory.zarr:\n foo x\tzarr.json\n \n path/to/directory.zarr/foo:\n c zarr.json\n@@ -1081,15 +1081,15 @@\n
Ncdata\u00b6
\n In [48]: ds = xr.tutorial.open_dataset("air_temperature_gradient")\n-ConnectionError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/air_temperature_gradient.nc (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fe5a7b5d1d0>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+ConnectionError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pydata/xarray-data/raw/master/air_temperature_gradient.nc (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7feeb21e1090>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n \n \n In [49]: cubes = ncdata.iris_xarray.cubes_from_xarray(ds)\n NameError: name 'ncdata' is not defined\n \n \n In [50]: print(cubes)\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -481,15 +481,15 @@\n ....: \"y\": pd.date_range(\"2000-01-01\", periods=5),\n ....: \"z\": (\"x\", list(\"abcd\")),\n ....: },\n ....: )\n ....:\n \n In [13]: ds.to_zarr(\"path/to/directory.zarr\")\n-Out[13]:
In [5]: airtemps = xr.tutorial.open_dataset("air_temperature")\n-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 0x7fe5a7b5c690>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+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 0x7feeb221ac10>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n \n \n In [6]: airtemps\n NameError: name 'airtemps' is not defined\n \n \n # Convert to celsius\n@@ -445,15 +445,15 @@\n \n # Apply a nonlinear transformation to one of the coords\n In [50]: b.coords["lat"] = np.log(b.coords["lat"])\n KeyError: 'lat'\n \n \n In [51]: b.plot()\n-Out[51]: [<matplotlib.lines.Line2D at 0x7fe5a74407d0>]\n+Out[51]: [<matplotlib.lines.Line2D at 0x7fef06fcc2d0>]\n
\n \n \n
Other types of plot\u00b6
\n@@ -857,117 +857,117 @@\n * 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\n * z (z) int64 32B 0 1 2 3\n * w (w) <U5 80B 'one' 'two' 'three' 'five'\n Attributes:\n units: Aunits\n \n In [99]: ds.A.plot.scatter(x="y")\n-Out[99]: <matplotlib.collections.PathCollection at 0x7fe5a7a5f4d0>\n+Out[99]: <matplotlib.collections.PathCollection at 0x7fef072d34d0>\n \n
In [100]: ds.plot.scatter(x="y", y="A")\n-Out[100]: <matplotlib.collections.PathCollection at 0x7fe5a7343890>\n+Out[100]: <matplotlib.collections.PathCollection at 0x7fef06ecf750>\n
\n
A
DataArray against the B
DataArrayIn [101]: ds.plot.scatter(x="A", y="B")\n-Out[101]: <matplotlib.collections.PathCollection at 0x7fe5a743bc50>\n+Out[101]: <matplotlib.collections.PathCollection at 0x7fef06fc7c50>\n
\n
hue
kwarg lets you vary the color by variable valueIn [102]: ds.plot.scatter(x="A", y="B", hue="w")\n-Out[102]: <matplotlib.collections.PathCollection at 0x7fe5a731ce10>\n+Out[102]: <matplotlib.collections.PathCollection at 0x7fef06ea9d10>\n
\n
add_legend=True, add_colorbar=False
.In [103]: ds.plot.scatter(x="A", y="B", hue="w", add_legend=True, add_colorbar=False)\n-Out[103]: <matplotlib.collections.PathCollection at 0x7fe571965310>\n+Out[103]: <matplotlib.collections.PathCollection at 0x7feed83951d0>\n
\n
In [104]: ds.plot.scatter(x="A", y="B", hue="w", add_legend=False, add_colorbar=True)\n-Out[104]: <matplotlib.collections.PathCollection at 0x7fe57196ccd0>\n+Out[104]: <matplotlib.collections.PathCollection at 0x7feed839c050>\n
\n
markersize
kwarg lets you vary the point\u2019s size by variable value.\n You can additionally pass size_norm
to control how the variable\u2019s values are mapped to point sizes.In [105]: ds.plot.scatter(x="A", y="B", hue="y", markersize="z")\n-Out[105]: <matplotlib.collections.PathCollection at 0x7fe55c75b250>\n+Out[105]: <matplotlib.collections.PathCollection at 0x7feeb3313390>\n
\n
z
kwarg lets you plot the data along the z-axis as well.In [106]: ds.plot.scatter(x="A", y="B", z="z", hue="y", markersize="x")\n-Out[106]: <mpl_toolkits.mplot3d.art3d.Path3DCollection at 0x7fe5a7342710>\n+Out[106]: <mpl_toolkits.mplot3d.art3d.Path3DCollection at 0x7fef06ecdd10>\n
\n
In [107]: ds.plot.scatter(x="A", y="B", hue="y", markersize="x", row="x", col="w")\n-Out[107]: <xarray.plot.facetgrid.FacetGrid at 0x7fe55b7b4980>\n+Out[107]: <xarray.plot.facetgrid.FacetGrid at 0x7feeb2174980>\n
\n
In [108]: ds.plot.scatter(x="A", y="B", z="z", hue="y", markersize="x", row="x", col="w")\n-Out[108]: <xarray.plot.facetgrid.FacetGrid at 0x7fe5a6c88a50>\n+Out[108]: <xarray.plot.facetgrid.FacetGrid at 0x7fef06818910>\n
\n
seaborn
.
Visualizing vector fields is supported with quiver plots:
\nIn [109]: ds.isel(w=1, z=1).plot.quiver(x="x", y="y", u="A", v="B")\n-Out[109]: <matplotlib.quiver.Quiver at 0x7fe55b43e900>\n+Out[109]: <matplotlib.quiver.Quiver at 0x7feeb1dfa900>\n
where u
and v
denote the x and y direction components of the arrow vectors. Again, faceting is also possible:
In [110]: ds.plot.quiver(x="x", y="y", u="A", v="B", col="w", row="z", scale=4)\n-Out[110]: <xarray.plot.facetgrid.FacetGrid at 0x7fe5a68bca50>\n+Out[110]: <xarray.plot.facetgrid.FacetGrid at 0x7fef066496d0>\n
scale
is required for faceted quiver plots.\n The scale determines the number of data units per arrow length unit, i.e. a smaller scale parameter makes the arrow longer.
Visualizing vector fields is also supported with streamline plots:
\nIn [111]: ds.isel(w=1, z=1).plot.streamplot(x="x", y="y", u="A", v="B")\n-Out[111]: <matplotlib.collections.LineCollection at 0x7fe5a64274d0>\n+Out[111]: <matplotlib.collections.LineCollection at 0x7fef05fb6c10>\n
where u
and v
denote the x and y direction components of the vectors tangent to the streamlines.\n Again, faceting is also possible:
In [112]: ds.plot.streamplot(x="x", y="y", u="A", v="B", col="w", row="z")\n-Out[112]: <xarray.plot.facetgrid.FacetGrid at 0x7fe55b7996e0>\n+Out[112]: <xarray.plot.facetgrid.FacetGrid at 0x7feeb21516e0>\n
To follow this section you\u2019ll need to have Cartopy installed and working.
\nThis script will plot the air temperature on a map.
\nIn [113]: import cartopy.crs as ccrs\n \n In [114]: air = xr.tutorial.open_dataset("air_temperature").air\n-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 0x7fe5a5f811d0>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+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 0x7fef0623aad0>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n \n \n In [115]: p = air.isel(time=0).plot(\n .....: subplot_kws=dict(projection=ccrs.Orthographic(-80, 35), facecolor="gray"),\n .....: transform=ccrs.PlateCarree(),\n .....: )\n .....: \n@@ -1024,24 +1024,24 @@\n In [121]: import xarray.plot as xplt\n \n In [122]: da = xr.DataArray(range(5))\n \n In [123]: fig, axs = plt.subplots(ncols=2, nrows=2)\n \n In [124]: da.plot(ax=axs[0, 0])\n-Out[124]: [<matplotlib.lines.Line2D at 0x7fe5a5eb2490>]\n+Out[124]: [<matplotlib.lines.Line2D at 0x7fef05afce10>]\n \n In [125]: da.plot.line(ax=axs[0, 1])\n-Out[125]: [<matplotlib.lines.Line2D at 0x7fe5a5eb25d0>]\n+Out[125]: [<matplotlib.lines.Line2D at 0x7fef05afcf50>]\n \n In [126]: xplt.plot(da, ax=axs[1, 0])\n-Out[126]: [<matplotlib.lines.Line2D at 0x7fe5a5eb2710>]\n+Out[126]: [<matplotlib.lines.Line2D at 0x7fef05afd090>]\n \n In [127]: xplt.line(da, ax=axs[1, 1])\n-Out[127]: [<matplotlib.lines.Line2D at 0x7fe5a5eb2850>]\n+Out[127]: [<matplotlib.lines.Line2D at 0x7fef05afd1d0>]\n \n In [128]: plt.tight_layout()\n \n In [129]: plt.draw()\n
\n \n
\n@@ -1091,15 +1091,15 @@\n
The plot will produce an image corresponding to the values of the array.\n Hence the top left pixel will be a different color than the others.\n Before reading on, you may want to look at the coordinates and\n think carefully about what the limits, labels, and orientation for\n each of the axes should be.
\nIn [134]: a.plot()\n-Out[134]: <matplotlib.collections.QuadMesh at 0x7fe5a5fe7c50>\n+Out[134]: <matplotlib.collections.QuadMesh at 0x7fef05be6e90>\n
It may seem strange that\n the values on the y axis are decreasing with -0.5 on the top. This is because\n the pixels are centered over their coordinates, and the\n@@ -1122,57 +1122,57 @@\n .....: np.arange(20).reshape(4, 5),\n .....: dims=["y", "x"],\n .....: coords={"lat": (("y", "x"), lat), "lon": (("y", "x"), lon)},\n .....: )\n .....: \n \n In [139]: da.plot.pcolormesh(x="lon", y="lat")\n-Out[139]: <matplotlib.collections.QuadMesh at 0x7fe5a604d950>\n+Out[139]: <matplotlib.collections.QuadMesh at 0x7fef0583d590>\n
Note that in this case, xarray still follows the pixel centered convention.\n This might be undesirable in some cases, for example when your data is defined\n on a polar projection (GH781). This is why the default is to not follow\n this convention when plotting on a map:
\nIn [140]: import cartopy.crs as ccrs\n \n In [141]: ax = plt.subplot(projection=ccrs.PlateCarree())\n \n In [142]: da.plot.pcolormesh(x="lon", y="lat", ax=ax)\n-Out[142]: <cartopy.mpl.geocollection.GeoQuadMesh at 0x7fe5a5c67250>\n+Out[142]: <cartopy.mpl.geocollection.GeoQuadMesh at 0x7fef05c46710>\n \n In [143]: ax.scatter(lon, lat, transform=ccrs.PlateCarree())\n-Out[143]: <matplotlib.collections.PathCollection at 0x7fe5a5c87250>\n+Out[143]: <matplotlib.collections.PathCollection at 0x7fef0585f890>\n \n In [144]: ax.coastlines()\n-Out[144]: <cartopy.mpl.feature_artist.FeatureArtist at 0x7fe55b43ef90>\n+Out[144]: <cartopy.mpl.feature_artist.FeatureArtist at 0x7feeb1dfaf90>\n \n In [145]: ax.gridlines(draw_labels=True)\n-Out[145]: <cartopy.mpl.gridliner.Gridliner at 0x7fe55b43c830>\n+Out[145]: <cartopy.mpl.gridliner.Gridliner at 0x7feeb1df8830>\n
You can however decide to infer the cell boundaries and use the\n infer_intervals
keyword:
In [146]: ax = plt.subplot(projection=ccrs.PlateCarree())\n \n In [147]: da.plot.pcolormesh(x="lon", y="lat", ax=ax, infer_intervals=True)\n-Out[147]: <cartopy.mpl.geocollection.GeoQuadMesh at 0x7fe5a5bd3110>\n+Out[147]: <cartopy.mpl.geocollection.GeoQuadMesh at 0x7fef05d77390>\n \n In [148]: ax.scatter(lon, lat, transform=ccrs.PlateCarree())\n-Out[148]: <matplotlib.collections.PathCollection at 0x7fe5a6a80f50>\n+Out[148]: <matplotlib.collections.PathCollection at 0x7fef057a8910>\n \n In [149]: ax.coastlines()\n-Out[149]: <cartopy.mpl.feature_artist.FeatureArtist at 0x7fe5a6a80e10>\n+Out[149]: <cartopy.mpl.feature_artist.FeatureArtist at 0x7fef057a87d0>\n \n In [150]: ax.gridlines(draw_labels=True)\n-Out[150]: <cartopy.mpl.gridliner.Gridliner at 0x7fe5a6a80cd0>\n+Out[150]: <cartopy.mpl.gridliner.Gridliner at 0x7fef057a8690>\n
Note
\nThe data model of xarray does not support datasets with cell boundaries\n@@ -1180,26 +1180,26 @@\n outside the xarray framework.
\nOne can also make line plots with multidimensional coordinates. In this case, hue
must be a dimension name, not a coordinate name.
In [151]: f, ax = plt.subplots(2, 1)\n \n In [152]: da.plot.line(x="lon", hue="y", ax=ax[0])\n Out[152]: \n-[<matplotlib.lines.Line2D at 0x7fe5a6646e90>,\n- <matplotlib.lines.Line2D at 0x7fe5a6645bd0>,\n- <matplotlib.lines.Line2D at 0x7fe5a6646850>,\n- <matplotlib.lines.Line2D at 0x7fe5a6646d50>]\n+[<matplotlib.lines.Line2D at 0x7fef0594a350>,\n+ <matplotlib.lines.Line2D at 0x7fef0594a210>,\n+ <matplotlib.lines.Line2D at 0x7fef0594a0d0>,\n+ <matplotlib.lines.Line2D at 0x7fef0594a710>]\n \n In [153]: da.plot.line(x="lon", hue="x", ax=ax[1])\n Out[153]: \n-[<matplotlib.lines.Line2D at 0x7fe5a6660550>,\n- <matplotlib.lines.Line2D at 0x7fe5a6660410>,\n- <matplotlib.lines.Line2D at 0x7fe5a6660190>,\n- <matplotlib.lines.Line2D at 0x7fe5a6660e10>,\n- <matplotlib.lines.Line2D at 0x7fe5a6660cd0>]\n+[<matplotlib.lines.Line2D at 0x7fef061a3390>,\n+ <matplotlib.lines.Line2D at 0x7fef061a39d0>,\n+ <matplotlib.lines.Line2D at 0x7fef061a3890>,\n+ <matplotlib.lines.Line2D at 0x7fef061a3750>,\n+ <matplotlib.lines.Line2D at 0x7fef061a3610>]\n
Whilst coarsen
is normally used for reducing your data\u2019s resolution by applying a reduction function\n (see the page on computation),\n it can also be used to reorganise your data without applying a computation via construct()
.
Taking our example tutorial air temperature dataset over the Northern US
\nIn [56]: air = xr.tutorial.open_dataset("air_temperature")["air"]\n-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 0x7fe5a6645450>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n+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 0x7fef05949590>: Failed to resolve 'github.com' ([Errno -3] Temporary failure in name resolution)"))\n \n \n In [57]: air.isel(time=0).plot(x="lon", y="lat")\n NameError: name 'air' is not defined\n
To see an example of what each of these strategies might produce, you can call one followed by the .example()
method,\n which is a general hypothesis method valid for all strategies.
In [2]: import xarray.testing.strategies as xrst\n \n In [3]: xrst.variables().example()\n Out[3]: \n-<xarray.Variable (\u013e\u017ew\u0116\u0161: 5, \u01412\u016b\u0136\u013e: 5, \u012e\u0146: 5)> Size: 125B\n-array([[[-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81]],\n-\n- [[-81, -81, -81, -81, -81],\n- [-81, -81, 120, -59, -81],\n- [125, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-93, -81, -81, -81, -81]],\n-\n- [[-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, 1]],\n-\n- [[-81, -81, -33, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [ -1, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81]],\n-\n- [[-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81]]], shape=(5, 5, 5), dtype=int8)\n+<xarray.Variable (\u00ec: 4, \u00d4Z\u017e: 5, q\u00d2x\u0131: 3)> Size: 60B\n+array([[[ -5, -5, -5],\n+ [ -5, -5, -5],\n+ [-122, -5, -5],\n+ [ -5, -5, 59],\n+ [ -5, -5, -5]],\n+\n+ [[ -7, -5, -5],\n+ [ -5, -5, -5],\n+ [ -5, -5, -5],\n+ [ -5, -5, -5],\n+ [ -26, -5, -5]],\n+\n+ [[ 35, -5, -6],\n+ [ -58, -5, -5],\n+ [ -5, -5, -5],\n+ [ -5, -5, -5],\n+ [ -11, -5, -5]],\n+\n+ [[ -5, -5, -5],\n+ [ -5, -23, -5],\n+ [ -5, -5, -5],\n+ [ -5, 119, -5],\n+ [-125, -5, -5]]], shape=(4, 5, 3), dtype=int8)\n Attributes:\n- \u0114\u017e\u0160: [['\\x16P\\x88\ud84e\ude30\\x02\u00b5(\\U000b7cf8M\\x07]']]\n- \u017c\u017c\u017e: [[b'{B\\xf0\\x1a/']\\n [b'\\x07']]\n- \u017a: False\n- \u0153\u0126: \u00c4\n- \u0171: [[b'\\x12<\\x85\\x18\\x98Eh\\x17\\x1eh' b'']\\n [b'\\xb1D\\xa7\\x0cer\\xa6...\n- : [b'']\n- o: [[48210]]\n- \u015b\u010c\u00d6\u012f\u0175: \u017fO\u00c6\u011e\u00c6\n- \u00fa\u017f\u017f\u00ecQ: True\n- 2\u014f: [[b'\\xc8\\r;\\x98\\xa9\\x0e']\\n [b'']]\n- u: True\n+ \u017e\u00de: \u017d\u0129\n+ \u00ef: None\n+ \u0128\u0166: False\n+ FALSE: [[b'\\x9c\\x10i*']]\n \n In [4]: xrst.variables().example()\n Out[4]: \n-<xarray.Variable (\u017d\u017dj: 3, \u014b\u00eaf\u00eb\u0158: 6)> Size: 18B\n-array([[210, 49, 192, 144, 254, 78],\n- [192, 240, 65, 162, 210, 44],\n- [ 66, 192, 192, 192, 40, 198]], shape=(3, 6), dtype=uint8)\n+<xarray.Variable (\u0158\u00ce: 1, gg\u00f6\u0119: 6, if: 1)> Size: 96B\n+array([[[ nan-6.656e+016j],\n+ [ 4.101e+015-3.333e-001j],\n+ [-1.837e+016 -infj],\n+ [-1.837e+016 -infj],\n+ [-1.837e+016 -infj],\n+ [ 2.225e-309-5.359e+126j]]])\n Attributes:\n- \u0121: {'\u011f\u015b\u01036\u012c': {'\u0122\u015e\u0135': array([-2147470400, 1529165420], dtype='>i4'...\n- B\u017fA\u0104\u00d9: {'\u00d9\u00fa\u00c8': None, 'as': array([[b'M', b'']], dtype='|S4')}\n- : {'\u0117\u012b\u00d04\u010a': False, '\u017c\u012d\u017d': array([b'', b'b\\xe3\\x9f\\x7f\\xb2\\xe1'], ...\n+ \u01461\u016f\u01684: {'1e100': None, '\u00f3j\u0120O': None, 'Y\u00fd\u017c1': False, '': array([']', ''...\n+ Inf: {'\u017d\u0167\u0162\u0128p': '\u0133z\u017eW\u0173', '\u011a\u00f0\u016b\u0139': '', 'JI\u0136\u0121\u00d2': False}\n \n In [5]: xrst.variables().example()\n Out[5]: \n-<xarray.Variable (0: 1)> Size: 1B\n-array([0], dtype=int8)\n+<xarray.Variable (\u017e\u0144A\u0118: 3, \u0118\u0175\u01171: 6)> Size: 72B\n+array([[ 1501651980, -2147447601, -2147451132, -2147483608, -2147483601, -2147483423],\n+ [-2147428390, -2147483608, 1418500220, -2147473460, -2147483608, 2147483647],\n+ [-2147436763, -330661526, -2147421310, -2147464279, 2147483647, 370369829]],\n+ shape=(3, 6), dtype=int32)\n+Attributes:\n+ \u0142\u00c6\u017e\u00c0\u00d3: None\n+ \u0161\u00eb: ['3\\x05\u00c1A-' '\\x146']\n+ : None\n+ \u017f\u016bG: [['\\x07\u00bd\u00a3\\U000ecbdb\\U0006f434\\U000f0f10']\\n ['\u00fb^']]\n
You can see that calling .example()
multiple times will generate different examples, giving you an idea of the wide\n range of data that the xarray strategies can generate.
In your tests however you should not use .example()
- instead you should parameterize your tests with the\n hypothesis.given()
decorator:
In [6]: from hypothesis import given\n@@ -167,100 +164,112 @@\n Xarray\u2019s strategies can accept other strategies as arguments, allowing you to customise the contents of the generated\n examples.
\n # generate a Variable containing an array with a complex number dtype, but all other details still arbitrary\n In [8]: from hypothesis.extra.numpy import complex_number_dtypes\n \n In [9]: xrst.variables(dtype=complex_number_dtypes()).example()\n Out[9]: \n-<xarray.Variable (\u0127\u017f\u0132\u017d\u017e: 1, m\u017d: 1, \u011e\u010b\u0106\u00f5u: 4)> Size: 64B\n-array([[[ inf+2.225e-309j, -5.046e+167-3.403e+038j, -5.046e+167-3.403e+038j,\n- -5.046e+167-3.403e+038j]]], dtype='>c16')\n-Attributes:\n- \u00fa\u0144: None\n+<xarray.Variable (\u0151: 3)> Size: 48B\n+array([2.597e-166-2.818e+16j, nan+0.000e+00j, nan+0.000e+00j])\n
\n \n This also works with custom strategies, or strategies defined in other packages.\n For example you could imagine creating a chunks
strategy to specify particular chunking patterns for a dask-backed array.
\n \n \n Fixing Arguments\u00b6
\n If you want to fix one aspect of the data structure, whilst allowing variation in the generated examples\n over all other aspects, then use hypothesis.strategies.just()
.
\n In [10]: import hypothesis.strategies as st\n \n # Generates only variable objects with dimensions ["x", "y"]\n In [11]: xrst.variables(dims=st.just(["x", "y"])).example()\n Out[11]: \n-<xarray.Variable (x: 5, y: 5)> Size: 400B\n-array([[ 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j],\n- [ 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j],\n- [ 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j],\n- [ 5.e-01+1.9j, 5.e-01+1.9j, -1.e+07+nanj, 5.e-01+1.9j, 5.e-01+1.9j],\n- [ 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j]], shape=(5, 5))\n+<xarray.Variable (x: 6, y: 1)> Size: 6B\n+array([[168],\n+ [175],\n+ [160],\n+ [252],\n+ [ 1],\n+ [251]], dtype=uint8)\n Attributes:\n- \u00cf: {'\u0130\u017d': False, '': array([[b'\\x83\\x1c\\xf2\\xadh\\xc6-F3S\\xea', b'\\...\n+ hpIX\u0115: [b'/' b'\\xae6\\xb9`d0']\n+ \u0103: [b'v']\n+ \u015bi: None\n+ \u00ff\u0144\u017f\u017c\u017d: None\n+ \u0105: \u017eof\u012d\u017f\n+ \u0172H\u00fa\u0102: True\n+ \u0109\u0157\u014c\u0135\u014b: [[b'\\xb3wv\\x02\\xe5' b'']]\n+ \u0111\u0100: ['']\n
\n \n (This is technically another example of chaining strategies - hypothesis.strategies.just()
is simply a\n special strategy that just contains a single example.)
\n To fix the length of dimensions you can instead pass dims
as a mapping of dimension names to lengths\n (i.e. following xarray objects\u2019 .sizes()
property), e.g.
\n # Generates only variables with dimensions ["x", "y"], of lengths 2 & 3 respectively\n In [12]: xrst.variables(dims=st.just({"x": 2, "y": 3})).example()\n Out[12]: \n-<xarray.Variable (x: 2, y: 3)> Size: 48B\n-array([[ 228, 159, 13403208268923546989],\n- [ 204, 182993516, 6398]], dtype=uint64)\n-Attributes:\n- \u00c3: False\n+<xarray.Variable (x: 2, y: 3)> Size: 12B\n+array([[ 21048, -28393, -18215],\n+ [ -2298, -6479, -2515]], dtype=int16)\n+Attributes: (12/36)\n+ \u00be\u00c4\u0139\u0125P: True\n+ COM1: [-10263 10026]\n+ \u017b\u0164: [[-0. 1.]]\n+ \u015fcL: \u017f\u017c\u017c\u014d\u0141\n+ : False\n+ \u010f\u00dcT\u016c\u015b: None\n+ ... ...\n+ \u00c4\u0147: None\n+ D\u017bl\u0132\u0106: None\n+ q\u016b\u00ee\u0105\u011d: [b'' b'N\\x8e\\x15']\n+ \u0116: [b'']\n+ \u00b9\u00fd\u017c\u00f5\u017f: None\n+ F\u017c\u0130v\u0117: \u017b\u0154\u00cb\n
\n \n You can also use this to specify that you want examples which are missing some part of the data structure, for instance
\n # Generates a Variable with no attributes\n In [13]: xrst.variables(attrs=st.just({})).example()\n Out[13]: \n-<xarray.Variable (\u017d\u0154\u017f: 1, \u00d1\u0130H: 3)> Size: 24B\n-array([[ inf, 0.000e+000, -2.225e-311]])\n+<xarray.Variable (\u00c6T\u00d0: 1, yMA\u00f9\u00e8: 6)> Size: 24B\n+array([[-3.333e-01, -1.000e+07, -0.000e+00, nan, 6.104e-05, inf]], dtype=float32)\n
\n \n Through a combination of chaining strategies and fixing arguments, you can specify quite complicated requirements on the\n objects your chained strategy will generate.
\n In [14]: fixed_x_variable_y_maybe_z = st.fixed_dictionaries(\n ....: {"x": st.just(2), "y": st.integers(3, 4)}, optional={"z": st.just(2)}\n ....: )\n ....: \n \n In [15]: fixed_x_variable_y_maybe_z.example()\n-Out[15]: {'x': 2, 'y': 3, 'z': 2}\n+Out[15]: {'x': 2, 'y': 4, 'z': 2}\n \n In [16]: special_variables = xrst.variables(dims=fixed_x_variable_y_maybe_z)\n \n In [17]: special_variables.example()\n Out[17]: \n-<xarray.Variable (x: 2, y: 4, z: 2)> Size: 64B\n-array([[[-3.333e-01, -3.333e-01],\n- [ 1.500e+00, 6.150e+16],\n- [-3.333e-01, -3.333e-01],\n- [-3.333e-01, -3.333e-01]],\n-\n- [[-3.333e-01, -3.333e-01],\n- [ nan, -3.333e-01],\n- [-3.333e-01, -1.214e+16],\n- [-3.333e-01, -3.333e-01]]], shape=(2, 4, 2), dtype=float32)\n-Attributes:\n- \u015b\u0176v\u0172a: True\n+<xarray.Variable (x: 2, y: 3)> Size: 6B\n+array([[0, 0, 0],\n+ [0, 0, 0]], dtype=int8)\n \n In [18]: special_variables.example()\n Out[18]: \n-<xarray.Variable (x: 2, y: 3)> Size: 12B\n-array([[31683, 4074, 27500],\n- [31683, 31683, 20933]], dtype=int16)\n-Attributes:\n- \u00cd\u0160\u00d1X\u0123: {'\u017b\u012e\u00bcf6': array([b'q\\xb4\\xcc\\x82\\xb6'], dtype='|S15'), '\u017f\u017e\u00cf9\u00ff':...\n- : {'\u00f5\u010e\u00c8': True, '\u010d': True, '\u00fe\u017f\u00e3': '\u0102\u0102U\u0106', '\u00c9\u0129\u0152rE': '\u0104', '\u00ea': None}\n+<xarray.Variable (x: 2, y: 4, z: 2)> Size: 64B\n+array([[[-2147483440, -2147483440],\n+ [-2147483440, -2147483440],\n+ [-2147483642, -2147483440],\n+ [-2147483440, -2147483440]],\n+\n+ [[-2147483440, -2147483440],\n+ [-2147483555, -2147483440],\n+ [-2147483440, -2147483440],\n+ [-2147483440, -2147483440]]], shape=(2, 4, 2), dtype=int32)\n
\n \n Here we have used one of hypothesis\u2019 built-in strategies hypothesis.strategies.fixed_dictionaries()
to create a\n strategy which generates mappings of dimension names to lengths (i.e. the size
of the xarray object we want).\n This particular strategy will always generate an x
dimension of length 2, and a y
dimension of\n length either 3 or 4, and will sometimes also generate a z
dimension of length 2.\n By feeding this strategy for dictionaries into the dims
argument of xarray\u2019s variables()
strategy,\n@@ -361,43 +370,45 @@\n ....: array_strategy_fn=xps.arrays,\n ....: dtype=xps.scalar_dtypes(),\n ....: )\n ....: \n \n In [32]: xp_variables.example()\n Out[32]: \n-<xarray.Variable (0: 1)> Size: 1B\n-array([False])\n+<xarray.Variable (\u017c: 6)> Size: 6B\n+array([False, False, False, False, True, True])\n+Attributes:\n+ g\u00be: {'u\u0172\u00fd\u011d': None, '\u0107': False, '\u0143\u012e': array(['', ''], dtype='<U12')}\n
Another array API-compliant duck array library would replace the import, e.g. import cupy as cp
instead.
A common task when testing xarray user code is checking that your function works for all valid input dimensions.\n We can chain strategies to achieve this, for which the helper strategy unique_subset_of()
\n is useful.
It works for lists of dimension names
\nIn [33]: dims = ["x", "y", "z"]\n \n In [34]: xrst.unique_subset_of(dims).example()\n-Out[34]: ['y', 'z', 'x']\n+Out[34]: ['z', 'x', 'y']\n \n In [35]: xrst.unique_subset_of(dims).example()\n-Out[35]: ['y', 'x', 'z']\n+Out[35]: ['z', 'y', 'x']\n
as well as for mappings of dimension names to sizes
\nIn [36]: dim_sizes = {"x": 2, "y": 3, "z": 4}\n \n In [37]: xrst.unique_subset_of(dim_sizes).example()\n-Out[37]: {'x': 2, 'y': 3, 'z': 4}\n+Out[37]: {}\n \n In [38]: xrst.unique_subset_of(dim_sizes).example()\n-Out[38]: {}\n+Out[38]: {'y': 3, 'z': 4, 'x': 2}\n
This is useful because operations like reductions can be performed over any subset of the xarray object\u2019s dimensions.\n For example we can write a pytest test that tests that a reduction gives the expected result when applying that reduction\n along any possible valid subset of the Variable\u2019s dimensions.
\nimport numpy.testing as npt\n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -28,75 +28,73 @@\n To see an example of what each of these strategies might produce, you can call\n one followed by the .example() method, which is a general hypothesis method\n valid for all strategies.\n In [2]: import xarray.testing.strategies as xrst\n \n In [3]: xrst.variables().example()\n Out[3]:\n- Size: 125B\n-array([[[-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81]],\n-\n- [[-81, -81, -81, -81, -81],\n- [-81, -81, 120, -59, -81],\n- [125, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-93, -81, -81, -81, -81]],\n-\n- [[-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, 1]],\n-\n- [[-81, -81, -33, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [ -1, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81]],\n-\n- [[-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81],\n- [-81, -81, -81, -81, -81]]], shape=(5, 5, 5), dtype=int8)\n+ Size: 60B\n+array([[[ -5, -5, -5],\n+ [ -5, -5, -5],\n+ [-122, -5, -5],\n+ [ -5, -5, 59],\n+ [ -5, -5, -5]],\n+\n+ [[ -7, -5, -5],\n+ [ -5, -5, -5],\n+ [ -5, -5, -5],\n+ [ -5, -5, -5],\n+ [ -26, -5, -5]],\n+\n+ [[ 35, -5, -6],\n+ [ -58, -5, -5],\n+ [ -5, -5, -5],\n+ [ -5, -5, -5],\n+ [ -11, -5, -5]],\n+\n+ [[ -5, -5, -5],\n+ [ -5, -23, -5],\n+ [ -5, -5, -5],\n+ [ -5, 119, -5],\n+ [-125, -5, -5]]], shape=(4, 5, 3), dtype=int8)\n Attributes:\n- \u0114\u017e\u0160: [['\\x16P\\x88\ud84e\ude30\\x02\u00b5(\\U000b7cf8M\\x07]']]\n- \u017c\u017c\u017e: [[b'{B\\xf0\\x1a/']\\n [b'\\x07']]\n- \u017a: False\n- \u0153\u0126: \u00c4\n- \u0171: [[b'\\x12<\\x85\\x18\\x98Eh\\x17\\x1eh' b'']\\n\n-[b'\\xb1D\\xa7\\x0cer\\xa6...\n- : [b'']\n- o: [[48210]]\n- \u015b\u010c\u00d6\u012f\u0175: \u017fO\u00c6\u011e\u00c6\n- \u00fa\u017f\u017f\u00ecQ: True\n- 2\u014f: [[b'\\xc8\\r;\\x98\\xa9\\x0e']\\n [b'']]\n- u: True\n+ \u017e\u00de: \u017d\u0129\n+ \u00ef: None\n+ \u0128\u0166: False\n+ FALSE: [[b'\\x9c\\x10i*']]\n \n In [4]: xrst.variables().example()\n Out[4]:\n- Size: 18B\n-array([[210, 49, 192, 144, 254, 78],\n- [192, 240, 65, 162, 210, 44],\n- [ 66, 192, 192, 192, 40, 198]], shape=(3, 6), dtype=uint8)\n+ Size: 96B\n+array([[[ nan-6.656e+016j],\n+ [ 4.101e+015-3.333e-001j],\n+ [-1.837e+016 -infj],\n+ [-1.837e+016 -infj],\n+ [-1.837e+016 -infj],\n+ [ 2.225e-309-5.359e+126j]]])\n Attributes:\n- \u0121: {'\u011f\u015b\u01036\u012c': {'\u0122\u015e\u0135': array([-2147470400, 1529165420],\n-dtype='>i4'...\n- B\u017fA\u0104\u00d9: {'\u00d9\u00fa\u00c8': None, 'as': array([[b'M', b'']], dtype='|S4')}\n- : {'\u0117\u012b\u00d04\u010a': False, '\u017c\u012d\u017d': array([b'', b'b\\xe3\\x9f\\x7f\\xb2\\xe1'],\n-...\n+ \u01461\u016f\u01684: {'1e100': None, '\u00f3j\u0120O': None, 'Y\u00fd\u017c1': False, '': array([']',\n+''...\n+ Inf: {'\u017d\u0167\u0162\u0128p': '\u0133z\u017eW\u0173', '\u011a\u00f0\u016b\u0139': '', 'JI\u0136\u0121\u00d2': False}\n \n In [5]: xrst.variables().example()\n Out[5]:\n- Size: 1B\n-array([0], dtype=int8)\n+ Size: 72B\n+array([[ 1501651980, -2147447601, -2147451132, -2147483608, -2147483601, -\n+2147483423],\n+ [-2147428390, -2147483608, 1418500220, -2147473460, -2147483608,\n+2147483647],\n+ [-2147436763, -330661526, -2147421310, -2147464279, 2147483647,\n+370369829]],\n+ shape=(3, 6), dtype=int32)\n+Attributes:\n+ \u0142\u00c6\u017e\u00c0\u00d3: None\n+ \u0161\u00eb: ['3\\x05\u00c1A-' '\\x146']\n+ : None\n+ \u017f\u016bG: [['\\x07\u00bd\u00a3\\U000ecbdb\\U0006f434\\U000f0f10']\\n ['\u00fb^']]\n You can see that calling .example() multiple times will generate different\n examples, giving you an idea of the wide range of data that the xarray\n strategies can generate.\n In your tests however you should not use .example() - instead you should\n parameterize your tests with the hypothesis.given() decorator:\n In [6]: from hypothesis import given\n In [7]: @given(xrst.variables())\n@@ -108,103 +106,111 @@\n customise the contents of the generated examples.\n # generate a Variable containing an array with a complex number dtype, but all\n other details still arbitrary\n In [8]: from hypothesis.extra.numpy import complex_number_dtypes\n \n In [9]: xrst.variables(dtype=complex_number_dtypes()).example()\n Out[9]:\n- Size: 64B\n-array([[[ inf+2.225e-309j, -5.046e+167-3.403e+038j, -5.046e+167-\n-3.403e+038j,\n- -5.046e+167-3.403e+038j]]], dtype='>c16')\n-Attributes:\n- \u00fa\u0144: None\n+ Size: 48B\n+array([2.597e-166-2.818e+16j, nan+0.000e+00j, nan+0.000e+00j])\n This also works with custom strategies, or strategies defined in other\n packages. For example you could imagine creating a chunks strategy to specify\n particular chunking patterns for a dask-backed array.\n *\b**\b**\b**\b* F\bFi\bix\bxi\bin\bng\bg A\bAr\brg\bgu\bum\bme\ben\bnt\bts\bs_\b?\b\u00b6 *\b**\b**\b**\b*\n If you want to fix one aspect of the data structure, whilst allowing variation\n in the generated examples over all other aspects, then use\n hypothesis.strategies.just().\n In [10]: import hypothesis.strategies as st\n \n # Generates only variable objects with dimensions [\"x\", \"y\"]\n In [11]: xrst.variables(dims=st.just([\"x\", \"y\"])).example()\n Out[11]:\n- Size: 400B\n-array([[ 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j],\n- [ 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j],\n- [ 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j],\n- [ 5.e-01+1.9j, 5.e-01+1.9j, -1.e+07+nanj, 5.e-01+1.9j, 5.e-01+1.9j],\n- [ 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j, 5.e-01+1.9j]],\n-shape=(5, 5))\n+ Size: 6B\n+array([[168],\n+ [175],\n+ [160],\n+ [252],\n+ [ 1],\n+ [251]], dtype=uint8)\n Attributes:\n- \u00cf: {'\u0130\u017d': False, '': array([[b'\\x83\\x1c\\xf2\\xadh\\xc6-F3S\\xea',\n-b'\\...\n+ hpIX\u0115: [b'/' b'\\xae6\\xb9`d0']\n+ \u0103: [b'v']\n+ \u015bi: None\n+ \u00ff\u0144\u017f\u017c\u017d: None\n+ \u0105: \u017eof\u012d\u017f\n+ \u0172H\u00fa\u0102: True\n+ \u0109\u0157\u014c\u0135\u014b: [[b'\\xb3wv\\x02\\xe5' b'']]\n+ \u0111\u0100: ['']\n (This is technically another example of chaining strategies -\n hypothesis.strategies.just() is simply a special strategy that just contains a\n single example.)\n To fix the length of dimensions you can instead pass dims as a mapping of\n dimension names to lengths (i.e. following xarray objects\u2019 .sizes() property),\n e.g.\n # Generates only variables with dimensions [\"x\", \"y\"], of lengths 2 & 3\n respectively\n In [12]: xrst.variables(dims=st.just({\"x\": 2, \"y\": 3})).example()\n Out[12]:\n- Size: 48B\n-array([[ 228, 159, 13403208268923546989],\n- [ 204, 182993516, 6398]],\n-dtype=uint64)\n-Attributes:\n- \u00c3: False\n+ Size: 12B\n+array([[ 21048, -28393, -18215],\n+ [ -2298, -6479, -2515]], dtype=int16)\n+Attributes: (12/36)\n+ \u00be\u00c4\u0139\u0125P: True\n+ COM1: [-10263 10026]\n+ \u017b\u0164: [[-0. 1.]]\n+ \u015fcL: \u017f\u017c\u017c\u014d\u0141\n+ : False\n+ \u010f\u00dcT\u016c\u015b: None\n+ ... ...\n+ \u00c4\u0147: None\n+ D\u017bl\u0132\u0106: None\n+ q\u016b\u00ee\u0105\u011d: [b'' b'N\\x8e\\x15']\n+ \u0116: [b'']\n+ \u00b9\u00fd\u017c\u00f5\u017f: None\n+ F\u017c\u0130v\u0117: \u017b\u0154\u00cb\n You can also use this to specify that you want examples which are missing some\n part of the data structure, for instance\n # Generates a Variable with no attributes\n In [13]: xrst.variables(attrs=st.just({})).example()\n Out[13]:\n- Size: 24B\n-array([[ inf, 0.000e+000, -2.225e-311]])\n+ Size: 24B\n+array([[-3.333e-01, -1.000e+07, -0.000e+00, nan, 6.104e-05,\n+inf]], dtype=float32)\n Through a combination of chaining strategies and fixing arguments, you can\n specify quite complicated requirements on the objects your chained strategy\n will generate.\n In [14]: fixed_x_variable_y_maybe_z = st.fixed_dictionaries(\n ....: {\"x\": st.just(2), \"y\": st.integers(3, 4)}, optional={\"z\": st.just\n (2)}\n ....: )\n ....:\n \n In [15]: fixed_x_variable_y_maybe_z.example()\n-Out[15]: {'x': 2, 'y': 3, 'z': 2}\n+Out[15]: {'x': 2, 'y': 4, 'z': 2}\n \n In [16]: special_variables = xrst.variables(dims=fixed_x_variable_y_maybe_z)\n \n In [17]: special_variables.example()\n Out[17]:\n- Size: 64B\n-array([[[-3.333e-01, -3.333e-01],\n- [ 1.500e+00, 6.150e+16],\n- [-3.333e-01, -3.333e-01],\n- [-3.333e-01, -3.333e-01]],\n-\n- [[-3.333e-01, -3.333e-01],\n- [ nan, -3.333e-01],\n- [-3.333e-01, -1.214e+16],\n- [-3.333e-01, -3.333e-01]]], shape=(2, 4, 2), dtype=float32)\n-Attributes:\n- \u015b\u0176v\u0172a: True\n+ Size: 6B\n+array([[0, 0, 0],\n+ [0, 0, 0]], dtype=int8)\n \n In [18]: special_variables.example()\n Out[18]:\n- Size: 12B\n-array([[31683, 4074, 27500],\n- [31683, 31683, 20933]], dtype=int16)\n-Attributes:\n- \u00cd\u0160\u00d1X\u0123: {'\u017b\u012e\u00bcf6': array([b'q\\xb4\\xcc\\x82\\xb6'], dtype='|S15'),\n-'\u017f\u017e\u00cf9\u00ff':...\n- : {'\u00f5\u010e\u00c8': True, '\u010d': True, '\u00fe\u017f\u00e3': '\u0102\u0102U\u0106', '\u00c9\u0129\u0152rE': '\u0104', '\u00ea': None}\n+ Size: 64B\n+array([[[-2147483440, -2147483440],\n+ [-2147483440, -2147483440],\n+ [-2147483642, -2147483440],\n+ [-2147483440, -2147483440]],\n+\n+ [[-2147483440, -2147483440],\n+ [-2147483555, -2147483440],\n+ [-2147483440, -2147483440],\n+ [-2147483440, -2147483440]]], shape=(2, 4, 2), dtype=int32)\n Here we have used one of hypothesis\u2019 built-in strategies\n hypothesis.strategies.fixed_dictionaries() to create a strategy which generates\n mappings of dimension names to lengths (i.e. the size of the xarray object we\n want). This particular strategy will always generate an x dimension of length\n 2, and a y dimension of length either 3 or 4, and will sometimes also generate\n a z dimension of length 2. By feeding this strategy for dictionaries into the\n dims argument of xarray\u2019s variables() strategy, we can generate arbitrary\n@@ -298,38 +304,40 @@\n ....: array_strategy_fn=xps.arrays,\n ....: dtype=xps.scalar_dtypes(),\n ....: )\n ....:\n \n In [32]: xp_variables.example()\n Out[32]:\n- Size: 1B\n-array([False])\n+ Size: 6B\n+array([False, False, False, False, True, True])\n+Attributes:\n+ g\u00be: {'u\u0172\u00fd\u011d': None, '\u0107': False, '\u0143\u012e': array(['', ''], dtype='New xray.Dataset.where
method for masking xray objects according\n to some criteria. This works particularly well with multi-dimensional data:
\n In [45]: ds = xray.Dataset(coords={"x": range(100), "y": range(100)})\n \n In [46]: ds["distance"] = np.sqrt(ds.x**2 + ds.y**2)\n \n In [47]: ds.distance.where(ds.distance < 100).plot()\n-Out[47]: <matplotlib.collections.QuadMesh at 0x7fe5a5d17b10>\n+Out[47]: <matplotlib.collections.QuadMesh at 0x7fef0730c550>\n
\n \n
\n \n \n Added new methods xray.DataArray.diff
and xray.Dataset.diff
\n for finite difference calculations along a given axis.
\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5286,15 +5286,15 @@\n * New xray.Dataset.where method for masking xray objects according to some\n criteria. This works particularly well with multi-dimensional data:\n In [45]: ds = xray.Dataset(coords={\"x\": range(100), \"y\": range(100)})\n \n In [46]: ds[\"distance\"] = np.sqrt(ds.x**2 + ds.y**2)\n \n In [47]: ds.distance.where(ds.distance < 100).plot()\n- Out[47]: \n+ Out[47]: \n _\b[_\b__\bi_\bm_\ba_\bg_\be_\bs_\b/_\bw_\bh_\be_\br_\be_\b__\be_\bx_\ba_\bm_\bp_\bl_\be_\b._\bp_\bn_\bg_\b]\n * Added new methods xray.DataArray.diff and xray.Dataset.diff for finite\n difference calculations along a given axis.\n * New xray.DataArray.to_masked_array convenience method for returning a\n numpy.ma.MaskedArray.\n In [48]: da = xray.DataArray(np.random.random_sample(size=(5, 4)))\n \n"}]}]}]}]}]}