--- /tmp/python-xarray-0.16.2-2r7ue8j03/debian/python-xarray-doc_0.16.2-2_all.deb +++ python-xarray-doc_0.16.2-2_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2021-01-02 13:06:33.000000 debian-binary │ -rw-r--r-- 0 0 0 4984 2021-01-02 13:06:33.000000 control.tar.xz │ --rw-r--r-- 0 0 0 2041188 2021-01-02 13:06:33.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 2041220 2021-01-02 13:06:33.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./control │ │ │ @@ -1,13 +1,13 @@ │ │ │ Package: python-xarray-doc │ │ │ Source: python-xarray │ │ │ Version: 0.16.2-2 │ │ │ Architecture: all │ │ │ Maintainer: Debian Science Maintainers │ │ │ -Installed-Size: 6634 │ │ │ +Installed-Size: 6633 │ │ │ Depends: libjs-sphinxdoc (>= 2.4.3-5~), sphinx-rtd-theme-common (>= 0.5.0+dfsg), libjs-mathjax, libjs-requirejs │ │ │ Built-Using: sphinx (= 3.4.1-1) │ │ │ Section: doc │ │ │ Priority: optional │ │ │ Homepage: http://xarray.pydata.org/ │ │ │ Description: documentation for xarray │ │ │ xarray (formerly xray) is an open source project and Python package that aims │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -182,50 +182,50 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 57359 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/combining.html │ │ │ -rw-r--r-- 0 root (0) root (0) 110268 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/computation.html │ │ │ -rw-r--r-- 0 root (0) root (0) 90145 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/contributing.html │ │ │ -rw-r--r-- 0 root (0) root (0) 79239 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/dask.html │ │ │ -rw-r--r-- 0 root (0) root (0) 103025 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/data-structures.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17300 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/duckarrays.html │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/ │ │ │ --rw-r--r-- 0 root (0) root (0) 66888 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5073 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 49590 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18691 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 107548 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8087 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 38291 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14549 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 47922 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3161 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 41989 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7640 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 128031 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9341 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 66874 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5064 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 49583 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18687 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 107541 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8083 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 38284 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14545 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 47915 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3157 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 41982 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7636 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 128010 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9326 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 90817 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/weather-data.html │ │ │ --rw-r--r-- 0 root (0) root (0) 208613 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 208603 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 12919 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples.html │ │ │ -rw-r--r-- 0 root (0) root (0) 33228 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/faq.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9876 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/genindex.html │ │ │ -rw-r--r-- 0 root (0) root (0) 39064 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/groupby.html │ │ │ -rw-r--r-- 0 root (0) root (0) 19186 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/howdoi.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17618 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/index.html │ │ │ --rw-r--r-- 0 root (0) root (0) 183175 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/indexing.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 183168 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/indexing.html │ │ │ -rw-r--r-- 0 root (0) root (0) 24735 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/installing.html │ │ │ --rw-r--r-- 0 root (0) root (0) 34228 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/internals.html │ │ │ --rw-r--r-- 0 root (0) root (0) 90074 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/interpolation.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 34221 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/internals.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 90067 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/interpolation.html │ │ │ -rw-r--r-- 0 root (0) root (0) 125328 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/io.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13348 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/objects.inv │ │ │ -rw-r--r-- 0 root (0) root (0) 41582 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/pandas.html │ │ │ --rw-r--r-- 0 root (0) root (0) 208770 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/plotting.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 208756 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/plotting.html │ │ │ -rw-r--r-- 0 root (0) root (0) 46216 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/quick-overview.html │ │ │ -rw-r--r-- 0 root (0) root (0) 21273 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/related-projects.html │ │ │ -rw-r--r-- 0 root (0) root (0) 56672 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/reshaping.html │ │ │ -rw-r--r-- 0 root (0) root (0) 22555 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/roadmap.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7946 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/search.html │ │ │ --rw-r--r-- 0 root (0) root (0) 100812 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/searchindex.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 100768 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/searchindex.js │ │ │ -rw-r--r-- 0 root (0) root (0) 20864 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/terminology.html │ │ │ -rw-r--r-- 0 root (0) root (0) 40018 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/time-series.html │ │ │ -rw-r--r-- 0 root (0) root (0) 42004 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/weather-climate.html │ │ │ -rw-r--r-- 0 root (0) root (0) 574986 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/whats-new.html │ │ │ -rw-r--r-- 0 root (0) root (0) 18726 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/why-xarray.html │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-01-02 13:06:33.000000 ./usr/share/doc-base/ │ │ │ -rw-r--r-- 0 root (0) root (0) 290 2021-01-02 13:06:33.000000 ./usr/share/doc-base/python-xarray-doc │ │ ├── ./usr/share/doc/python-xarray-doc/html/dask.html │ │ │ @@ -298,15 +298,15 @@ │ │ │

You’ll notice that printing a dataset still shows a preview of array values, │ │ │ even if they are actually Dask arrays. We can do this quickly with Dask because │ │ │ we only need to compute the first few values (typically from the first block). │ │ │ To reveal the true nature of an array, print a DataArray:

│ │ │
In [3]: ds.temperature
│ │ │  Out[3]: 
│ │ │  <xarray.DataArray 'temperature' (time: 30, latitude: 180, longitude: 180)>
│ │ │ -dask.array<open_dataset-647e16a7571016661c6a18efabcf9149temperature, shape=(30, 180, 180), dtype=float64, chunksize=(10, 180, 180), chunktype=numpy.ndarray>
│ │ │ +dask.array<open_dataset-cdbd6343ed17628e81144771d71bc2d3temperature, shape=(30, 180, 180), dtype=float64, chunksize=(10, 180, 180), chunktype=numpy.ndarray>
│ │ │  Coordinates:
│ │ │    * time       (time) datetime64[ns] 2015-01-01 2015-01-02 ... 2015-01-30
│ │ │    * longitude  (longitude) int64 0 1 2 3 4 5 6 7 ... 173 174 175 176 177 178 179
│ │ │    * latitude   (latitude) float64 89.5 88.5 87.5 86.5 ... -87.5 -88.5 -89.5
│ │ │  
│ │ │
│ │ │

Once you’ve manipulated a Dask array, you can still write a dataset too big to │ │ ├── ./usr/share/doc/python-xarray-doc/html/data-structures.html │ │ │ @@ -890,18 +890,18 @@ │ │ │ a method call with an external function (e.g., ds.pipe(func)) instead of │ │ │ simply calling it (e.g., func(ds)). This allows you to write pipelines for │ │ │ transforming your data (using “method chaining”) instead of writing hard to │ │ │ follow nested function calls:

│ │ │
# these lines are equivalent, but with pipe we can make the logic flow
│ │ │  # entirely from left to right
│ │ │  In [60]: plt.plot((2 * ds.temperature.sel(x=0)).mean("y"))
│ │ │ -Out[60]: [<matplotlib.lines.Line2D at 0x7f707159cc40>]
│ │ │ +Out[60]: [<matplotlib.lines.Line2D at 0x7f786fb7fdc0>]
│ │ │  
│ │ │  In [61]: (ds.temperature.sel(x=0).pipe(lambda x: 2 * x).mean("y").pipe(plt.plot))
│ │ │ -Out[61]: [<matplotlib.lines.Line2D at 0x7f70715ab7c0>]
│ │ │ +Out[61]: [<matplotlib.lines.Line2D at 0x7f786fb0e0a0>]
│ │ │  
│ │ │
│ │ │

Both pipe and assign replicate the pandas methods of the same names │ │ │ (DataFrame.pipe and │ │ │ DataFrame.assign).

│ │ │

With xarray, there is no performance penalty for creating new datasets, even if │ │ │ variables are lazily loaded from a file on disk. Creating new objects instead │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html │ │ │ @@ -521,15 +521,15 @@ │ │ │ /build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py in open_dataset(name, cache, cache_dir, github_url, branch, **kws) │ │ │ 76 # May want to add an option to remove it. │ │ │ 77 if not _os.path.isdir(longdir): │ │ │ ---> 78 _os.mkdir(longdir) │ │ │ 79 │ │ │ 80 url = "/".join((github_url, "raw", branch, fullname)) │ │ │ │ │ │ -FileNotFoundError: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data' │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data' │ │ │ │ │ │ │ │ │

Let’s create a simple plot of 2-m air temperature in degrees Celsius:

│ │ │
│ │ │
[3]:
│ │ │  
│ │ │
│ │ │ @@ -784,15 +784,15 @@ │ │ │ /usr/lib/python3.9/os.py in makedirs(name, mode, exist_ok) │ │ │ 223 return │ │ │ 224 try: │ │ │ --> 225 mkdir(name, mode) │ │ │ 226 except OSError: │ │ │ 227 # Cannot rely on checking for EEXIST, since the operating system │ │ │ │ │ │ -PermissionError: [Errno 13] Permission denied: '/sbuild-nonexistent' │ │ │ +PermissionError: [Errno 13] Permission denied: '/nonexistent' │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz
│ │ │ ├── ERA5-GRIB-example.ipynb
│ │ │ │ │   --- /tmp/diffoscope_dn2f40t9_/tmpm69qhgd0GzipContainer/bd821191-a56b-4cac-a1b9-fe925a358a43
│ │ │ │ ├── +++ /tmp/diffoscope_dn2f40t9_/tmpe2fkaf35GzipContainer/2c4e3a47-cd41-468b-9496-fc04a8fd07da
│ │ │ │ │┄ Differences: {'replace': "OrderedDict([('cells', [OrderedDict([('cell_type', 'markdown'), ('metadata', "
│ │ │ │ │┄             "OrderedDict()), ('source', ['# GRIB Data Example '])]), OrderedDict([('cell_type', "
│ │ │ │ │┄             "'markdown'), ('metadata', OrderedDict()), ('source', ['GRIB format is commonly used "
│ │ │ │ │┄             'to disemminate atmospheric model data. With Xarray and the cfgrib engine, GRIB data '
│ │ │ │ │┄             "can easily be analyzed and visualized.'])]), OrderedDict([('cell_type', 'code'), "
│ │ │ │ │┄             "('execution_cou […]
│ │ │ │ │ @@ -34,23 +34,23 @@
│ │ │ │ │          {
│ │ │ │ │              "cell_type": "code",
│ │ │ │ │              "execution_count": 2,
│ │ │ │ │              "metadata": {},
│ │ │ │ │              "outputs": [
│ │ │ │ │                  {
│ │ │ │ │                      "ename": "FileNotFoundError",
│ │ │ │ │ -                    "evalue": "[Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data'",
│ │ │ │ │ +                    "evalue": "[Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data'",
│ │ │ │ │                      "output_type": "error",
│ │ │ │ │                      "traceback": [
│ │ │ │ │                          "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
│ │ │ │ │                          "\u001b[0;31mFileNotFoundError\u001b[0m                         Traceback (most recent call last)",
│ │ │ │ │                          "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mds\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'era5-2mt-2019-03-uk.grib'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mengine\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'cfgrib'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
│ │ │ │ │                          "\u001b[0;32m/build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m in \u001b[0;36mload_dataset\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m    111\u001b[0m     \u001b[0mopen_dataset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    112\u001b[0m     \"\"\"\n\u001b[0;32m--> 113\u001b[0;31m     \u001b[0;32mwith\u001b[0m \u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mds\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    114\u001b[0m         \u001b[0;32mreturn\u001b[0m \u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    115\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m in \u001b[0;36mopen_dataset\u001b[0;34m(name, cache, cache_dir, github_url, branch, **kws)\u001b[0m\n\u001b[1;32m     76\u001b[0m         \u001b[0;31m# May want to add an option to remove it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     77\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 78\u001b[0;31m             \u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     79\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     80\u001b[0m         \u001b[0murl\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │ -                        "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data'"
│ │ │ │ │ +                        "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data'"
│ │ │ │ │                      ]
│ │ │ │ │                  }
│ │ │ │ │              ],
│ │ │ │ │              "source": [
│ │ │ │ │                  "ds = xr.tutorial.load_dataset('era5-2mt-2019-03-uk.grib', engine='cfgrib')"
│ │ │ │ │              ]
│ │ │ │ │          },
│ │ │ │ │ @@ -104,15 +104,15 @@
│ │ │ │ │                          "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
│ │ │ │ │                          "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m      4\u001b[0m \u001b[0max\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maxes\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprojection\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mccrs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mRobinson\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      5\u001b[0m \u001b[0max\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcoastlines\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresolution\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'10m'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0mplot\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mt2m\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mplot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcmap\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcm\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcoolwarm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtransform\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mccrs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPlateCarree\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcbar_kwargs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m'shrink'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;36m0.6\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      7\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtitle\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'ERA5 - 2m temperature British Isles March 2019'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;31mNameError\u001b[0m: name 'ds' is not defined"
│ │ │ │ │                      ]
│ │ │ │ │                  },
│ │ │ │ │                  {
│ │ │ │ │                      "ename": "PermissionError",
│ │ │ │ │ -                    "evalue": "[Errno 13] Permission denied: '/sbuild-nonexistent'",
│ │ │ │ │ +                    "evalue": "[Errno 13] Permission denied: '/nonexistent'",
│ │ │ │ │                      "output_type": "error",
│ │ │ │ │                      "traceback": [
│ │ │ │ │                          "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
│ │ │ │ │                          "\u001b[0;31mPermissionError\u001b[0m                           Traceback (most recent call last)",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3/dist-packages/IPython/core/formatters.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, obj)\u001b[0m\n\u001b[1;32m    339\u001b[0m                 \u001b[0;32mpass\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    340\u001b[0m             \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 341\u001b[0;31m                 \u001b[0;32mreturn\u001b[0m \u001b[0mprinter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    342\u001b[0m             \u001b[0;31m# Finally look for special method names\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    343\u001b[0m             \u001b[0mmethod\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_real_method\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprint_method\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3/dist-packages/IPython/core/pylabtools.py\u001b[0m in \u001b[0;36m\u001b[0;34m(fig)\u001b[0m\n\u001b[1;32m    246\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    247\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0;34m'png'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mformats\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 248\u001b[0;31m         \u001b[0mpng_formatter\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfor_type\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mFigure\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mlambda\u001b[0m \u001b[0mfig\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mprint_figure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'png'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    249\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0;34m'retina'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mformats\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;34m'png2x'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mformats\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    250\u001b[0m         \u001b[0mpng_formatter\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfor_type\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mFigure\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mlambda\u001b[0m \u001b[0mfig\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mretina_figure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3/dist-packages/IPython/core/pylabtools.py\u001b[0m in \u001b[0;36mprint_figure\u001b[0;34m(fig, fmt, bbox_inches, **kwargs)\u001b[0m\n\u001b[1;32m    130\u001b[0m         \u001b[0mFigureCanvasBase\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfig\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    131\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 132\u001b[0;31m     \u001b[0mfig\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcanvas\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprint_figure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbytes_io\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    133\u001b[0m     \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mbytes_io\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgetvalue\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    134\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mfmt\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m'svg'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │ @@ -137,15 +137,15 @@
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    223\u001b[0m             \u001b[0;32mreturn\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    224\u001b[0m     \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 225\u001b[0;31m         \u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmode\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    226\u001b[0m     \u001b[0;32mexcept\u001b[0m \u001b[0mOSError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    227\u001b[0m         \u001b[0;31m# Cannot rely on checking for EEXIST, since the operating system\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │ -                        "\u001b[0;31mPermissionError\u001b[0m: [Errno 13] Permission denied: '/sbuild-nonexistent'"
│ │ │ │ │ +                        "\u001b[0;31mPermissionError\u001b[0m: [Errno 13] Permission denied: '/nonexistent'"
│ │ │ │ │                      ]
│ │ │ │ │                  },
│ │ │ │ │                  {
│ │ │ │ │                      "data": {
│ │ │ │ │                          "text/plain": [
│ │ │ │ │                              "
" │ │ │ │ │ ] │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html │ │ │ @@ -559,15 +559,15 @@ │ │ │ /build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py in open_dataset(name, cache, cache_dir, github_url, branch, **kws) │ │ │ 76 # May want to add an option to remove it. │ │ │ 77 if not _os.path.isdir(longdir): │ │ │ ---> 78 _os.mkdir(longdir) │ │ │ 79 │ │ │ 80 url = "/".join((github_url, "raw", branch, fullname)) │ │ │ │ │ │ -FileNotFoundError: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data' │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data' │ │ │
│ │ │
│ │ │ │ │ │
│ │ │

Add a lazilly calculated vertical coordinates

│ │ │

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]

│ │ │

In short, for Vtransform==2 as used in this example,

│ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz │ │ │ ├── ROMS_ocean_model.ipynb │ │ │ │ │ --- /tmp/diffoscope_dn2f40t9_/tmppiw76r5vGzipContainer/75384067-a040-483f-92b6-3f4b8c52b5e7 │ │ │ │ ├── +++ /tmp/diffoscope_dn2f40t9_/tmpx5e2xdd1GzipContainer/6b91b89d-13f5-4592-a59a-97eb1fce8152 │ │ │ │ │┄ Differences: {'replace': "OrderedDict([('cells', [OrderedDict([('cell_type', 'markdown'), ('metadata', " │ │ │ │ │┄ "OrderedDict()), ('source', ['# ROMS Ocean Model Example'])]), " │ │ │ │ │┄ "OrderedDict([('cell_type', 'markdown'), ('metadata', OrderedDict()), ('source', ['The " │ │ │ │ │┄ 'Regional Ocean Modeling System ([ROMS](http://myroms.org)) is an open source ' │ │ │ │ │┄ 'hydrodynamic model that is used for simulating currents and water properties in ' │ │ │ │ │┄ 'coastal and estuarine regions. ROMS is one […] │ │ │ │ │ @@ -69,22 +69,22 @@ │ │ │ │ │ { │ │ │ │ │ "cell_type": "code", │ │ │ │ │ "execution_count": 2, │ │ │ │ │ "metadata": {}, │ │ │ │ │ "outputs": [ │ │ │ │ │ { │ │ │ │ │ "ename": "FileNotFoundError", │ │ │ │ │ - "evalue": "[Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data'", │ │ │ │ │ + "evalue": "[Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data'", │ │ │ │ │ "output_type": "error", │ │ │ │ │ "traceback": [ │ │ │ │ │ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", │ │ │ │ │ "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", │ │ │ │ │ "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# load in the file\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mds\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'ROMS_example.nc'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mchunks\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m'ocean_time'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;31m# This is a way to turn on chunking and lazy evaluation. Opening with mfdataset, or\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;31m# setting the chunking in the open_dataset would also achive this.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ "\u001b[0;32m/build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m in \u001b[0;36mopen_dataset\u001b[0;34m(name, cache, cache_dir, github_url, branch, **kws)\u001b[0m\n\u001b[1;32m 76\u001b[0m \u001b[0;31m# May want to add an option to remove it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 77\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 78\u001b[0;31m \u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 79\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 80\u001b[0m \u001b[0murl\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ - "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data'" │ │ │ │ │ + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data'" │ │ │ │ │ ] │ │ │ │ │ } │ │ │ │ │ ], │ │ │ │ │ "source": [ │ │ │ │ │ "# load in the file\n", │ │ │ │ │ "ds = xr.tutorial.open_dataset('ROMS_example.nc', chunks={'ocean_time': 1})\n", │ │ │ │ │ "\n", │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html │ │ │ @@ -553,15 +553,15 @@ │ │ │ /build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py in open_dataset(name, cache, cache_dir, github_url, branch, **kws) │ │ │ 76 # May want to add an option to remove it. │ │ │ 77 if not _os.path.isdir(longdir): │ │ │ ---> 78 _os.mkdir(longdir) │ │ │ 79 │ │ │ 80 url = "/".join((github_url, "raw", branch, fullname)) │ │ │ │ │ │ -FileNotFoundError: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data' │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data' │ │ │
│ │ │ │ │ │

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]:
│ │ │  
│ │ │
│ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz │ │ │ ├── apply_ufunc_vectorize_1d.ipynb │ │ │ │ │ --- /tmp/diffoscope_dn2f40t9_/tmp99qm63wdGzipContainer/faa8e74c-59b1-437a-a434-1b4f9ee15ec8 │ │ │ │ ├── +++ /tmp/diffoscope_dn2f40t9_/tmpn9i7qkzlGzipContainer/d38d9026-9f0b-406f-939e-1414ce714b30 │ │ │ │ │┄ Differences: {'replace': "OrderedDict([('cells', [OrderedDict([('cell_type', 'markdown'), ('metadata', " │ │ │ │ │┄ "OrderedDict()), ('source', ['## Applying unvectorized functions with " │ │ │ │ │┄ "`apply_ufunc`'])]), OrderedDict([('cell_type', 'markdown'), ('metadata', " │ │ │ │ │┄ "OrderedDict()), ('source', ['This example will illustrate how to conveniently apply " │ │ │ │ │┄ 'an unvectorized function `func` to xarray objects using `apply_ufunc`. `func` expects ' │ │ │ │ │┄ '1D numpy arrays and returns a 1D nu […] │ │ │ │ │ @@ -39,23 +39,23 @@ │ │ │ │ │ "end_time": "2020-01-15T14:45:51.659160Z", │ │ │ │ │ "start_time": "2020-01-15T14:45:50.528742Z" │ │ │ │ │ } │ │ │ │ │ }, │ │ │ │ │ "outputs": [ │ │ │ │ │ { │ │ │ │ │ "ename": "FileNotFoundError", │ │ │ │ │ - "evalue": "[Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data'", │ │ │ │ │ + "evalue": "[Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data'", │ │ │ │ │ "output_type": "error", │ │ │ │ │ "traceback": [ │ │ │ │ │ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", │ │ │ │ │ "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", │ │ │ │ │ "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m air = (\n\u001b[0;32m----> 7\u001b[0;31m \u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"air_temperature\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 8\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mair\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msortby\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"lat\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# np.interp needs coordinate in ascending order\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0misel\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mslice\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlon\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mslice\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ "\u001b[0;32m/build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m in \u001b[0;36mload_dataset\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 111\u001b[0m \u001b[0mopen_dataset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 112\u001b[0m \"\"\"\n\u001b[0;32m--> 113\u001b[0;31m \u001b[0;32mwith\u001b[0m \u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mds\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 114\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 115\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ "\u001b[0;32m/build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m in \u001b[0;36mopen_dataset\u001b[0;34m(name, cache, cache_dir, github_url, branch, **kws)\u001b[0m\n\u001b[1;32m 76\u001b[0m \u001b[0;31m# May want to add an option to remove it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 77\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 78\u001b[0;31m \u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 79\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 80\u001b[0m \u001b[0murl\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ - "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data'" │ │ │ │ │ + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data'" │ │ │ │ │ ] │ │ │ │ │ } │ │ │ │ │ ], │ │ │ │ │ "source": [ │ │ │ │ │ "import xarray as xr\n", │ │ │ │ │ "import numpy as np\n", │ │ │ │ │ "\n", │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html │ │ │ @@ -553,15 +553,15 @@ │ │ │ /build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py in open_dataset(name, cache, cache_dir, github_url, branch, **kws) │ │ │ 76 # May want to add an option to remove it. │ │ │ 77 if not _os.path.isdir(longdir): │ │ │ ---> 78 _os.mkdir(longdir) │ │ │ 79 │ │ │ 80 url = "/".join((github_url, "raw", branch, fullname)) │ │ │ │ │ │ -FileNotFoundError: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data' │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data' │ │ │
│ │ │ │ │ │

Plot the first timestep:

│ │ │
│ │ │
[3]:
│ │ │  
│ │ │
│ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz │ │ │ ├── area_weighted_temperature.ipynb │ │ │ │ │ --- /tmp/diffoscope_dn2f40t9_/tmpww_jx00qGzipContainer/9a0cc40f-9d2e-4761-bade-8e6d2d6a6276 │ │ │ │ ├── +++ /tmp/diffoscope_dn2f40t9_/tmpaz8hm2umGzipContainer/155bfe70-299d-4a9f-ba26-fcf559fda86f │ │ │ │ │┄ Differences: {'replace': "OrderedDict([('cells', [OrderedDict([('cell_type', 'markdown'), ('metadata', " │ │ │ │ │┄ "OrderedDict([('toc', True)])), ('source', ['

Table of Contents

\\n\', \'
│ │ │ │ │ │ │ │ │
│ │ │

Now for the heavy lifting:

│ │ │

We first have to come up with the weights, - calculate the month lengths for each monthly data record - calculate weights using groupby('time.season')

│ │ │

Finally, we just need to multiply our weights by the Dataset and sum allong 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.

│ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz │ │ │ ├── monthly-means.ipynb │ │ │ │ │ --- /tmp/diffoscope_dn2f40t9_/tmponyfih7jGzipContainer/5a4a0eca-8885-4a09-b723-8d45b95540cd │ │ │ │ ├── +++ /tmp/diffoscope_dn2f40t9_/tmpdmpqkgdfGzipContainer/da72fa57-2a91-45b5-93c6-dd5fb5998530 │ │ │ │ │┄ Differences: {'replace': "OrderedDict([('cells', [OrderedDict([('cell_type', 'markdown'), ('metadata', " │ │ │ │ │┄ "OrderedDict()), ('source', ['Calculating Seasonal Averages from Timeseries of Monthly " │ │ │ │ │┄ "Means \\n', '=====\\n', '\\n', 'Author: [Joe " │ │ │ │ │┄ "Hamman](https://github.com/jhamman/)\\n', '\\n', 'The data used for this example can " │ │ │ │ │┄ 'be found in the [xarray-data](https://github.com/pydata/xarray-data) repository. You ' │ │ │ │ │┄ "may need to change the path to `rasm.nc` below […] │ │ │ │ │ @@ -47,22 +47,22 @@ │ │ │ │ │ "end_time": "2018-11-28T20:51:36.072316Z", │ │ │ │ │ "start_time": "2018-11-28T20:51:36.016594Z" │ │ │ │ │ } │ │ │ │ │ }, │ │ │ │ │ "outputs": [ │ │ │ │ │ { │ │ │ │ │ "ename": "FileNotFoundError", │ │ │ │ │ - "evalue": "[Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data'", │ │ │ │ │ + "evalue": "[Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data'", │ │ │ │ │ "output_type": "error", │ │ │ │ │ "traceback": [ │ │ │ │ │ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", │ │ │ │ │ "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", │ │ │ │ │ "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mds\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'rasm'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mds\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ "\u001b[0;32m/build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m in \u001b[0;36mopen_dataset\u001b[0;34m(name, cache, cache_dir, github_url, branch, **kws)\u001b[0m\n\u001b[1;32m 76\u001b[0m \u001b[0;31m# May want to add an option to remove it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 77\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 78\u001b[0;31m \u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 79\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 80\u001b[0m \u001b[0murl\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ - "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data'" │ │ │ │ │ + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data'" │ │ │ │ │ ] │ │ │ │ │ } │ │ │ │ │ ], │ │ │ │ │ "source": [ │ │ │ │ │ "ds = xr.tutorial.open_dataset('rasm').load()\n", │ │ │ │ │ "ds" │ │ │ │ │ ] │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html │ │ │ @@ -525,15 +525,15 @@ │ │ │ /build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py in open_dataset(name, cache, cache_dir, github_url, branch, **kws) │ │ │ 76 # May want to add an option to remove it. │ │ │ 77 if not _os.path.isdir(longdir): │ │ │ ---> 78 _os.mkdir(longdir) │ │ │ 79 │ │ │ 80 url = "/".join((github_url, "raw", branch, fullname)) │ │ │ │ │ │ -FileNotFoundError: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data' │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data' │ │ │
│ │ │ │ │ │

In this example, the logical coordinates are x and y, while the physical coordinates are xc and yc, which represent the latitudes and longitude of the data.

│ │ │
│ │ │
[3]:
│ │ │  
│ │ │
│ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz │ │ │ ├── multidimensional-coords.ipynb │ │ │ │ │ --- /tmp/diffoscope_dn2f40t9_/tmpik0yrvu0GzipContainer/3950e4c4-cf74-4e77-a9eb-ce60ecc085a1 │ │ │ │ ├── +++ /tmp/diffoscope_dn2f40t9_/tmpd5eimro2GzipContainer/644d0df4-d9d2-4496-997d-1f12fa6466e8 │ │ │ │ │┄ Differences: {'replace': "OrderedDict([('cells', [OrderedDict([('cell_type', 'markdown'), ('metadata', " │ │ │ │ │┄ "OrderedDict()), ('source', ['# Working with Multidimensional Coordinates\\n', '\\n', " │ │ │ │ │┄ "'Author: [Ryan Abernathey](https://github.com/rabernat)\\n', '\\n', 'Many datasets " │ │ │ │ │┄ 'have _physical coordinates_ which differ from their _logical coordinates_. Xarray ' │ │ │ │ │┄ "provides several ways to plot and analyze such datasets.'])]), " │ │ │ │ │┄ "OrderedDict([('cell_type', 'code') […] │ │ │ │ │ @@ -45,22 +45,22 @@ │ │ │ │ │ "end_time": "2018-11-28T20:50:13.629720Z", │ │ │ │ │ "start_time": "2018-11-28T20:50:13.484542Z" │ │ │ │ │ } │ │ │ │ │ }, │ │ │ │ │ "outputs": [ │ │ │ │ │ { │ │ │ │ │ "ename": "FileNotFoundError", │ │ │ │ │ - "evalue": "[Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data'", │ │ │ │ │ + "evalue": "[Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data'", │ │ │ │ │ "output_type": "error", │ │ │ │ │ "traceback": [ │ │ │ │ │ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", │ │ │ │ │ "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", │ │ │ │ │ "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mds\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'rasm'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mds\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ "\u001b[0;32m/build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m in \u001b[0;36mopen_dataset\u001b[0;34m(name, cache, cache_dir, github_url, branch, **kws)\u001b[0m\n\u001b[1;32m 76\u001b[0m \u001b[0;31m# May want to add an option to remove it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 77\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 78\u001b[0;31m \u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 79\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 80\u001b[0m \u001b[0murl\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ - "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data'" │ │ │ │ │ + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data'" │ │ │ │ │ ] │ │ │ │ │ } │ │ │ │ │ ], │ │ │ │ │ "source": [ │ │ │ │ │ "ds = xr.tutorial.open_dataset('rasm').load()\n", │ │ │ │ │ "ds" │ │ │ │ │ ] │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html │ │ │ @@ -531,15 +531,15 @@ │ │ │ /build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py in open_dataset(name, cache, cache_dir, github_url, branch, **kws) │ │ │ 76 # May want to add an option to remove it. │ │ │ 77 if not _os.path.isdir(longdir): │ │ │ ---> 78 _os.mkdir(longdir) │ │ │ 79 │ │ │ 80 url = "/".join((github_url, "raw", branch, fullname)) │ │ │ │ │ │ -FileNotFoundError: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data' │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data' │ │ │
│ │ │ │ │ │
│ │ │

Multiple plots and map projections

│ │ │

Control the map projection parameters on multiple axes

│ │ │

This example illustrates how to plot multiple maps and control their extent and aspect ratio.

│ │ │

For more details see this discussion on github.

│ │ │ @@ -757,15 +757,15 @@ │ │ │
│ │ │
│ │ │
[7]:
│ │ │  
│ │ │
│ │ │
│ │ │
│ │ │ -<cartopy.mpl.feature_artist.FeatureArtist at 0x7f476cbe45b0>
│ │ │ +<cartopy.mpl.feature_artist.FeatureArtist at 0x7f8dd96245b0>
│ │ │  
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ @@ -963,15 +963,15 @@
│ │ │  /usr/lib/python3.9/os.py in makedirs(name, mode, exist_ok)
│ │ │      223             return
│ │ │      224     try:
│ │ │  --> 225         mkdir(name, mode)
│ │ │      226     except OSError:
│ │ │      227         # Cannot rely on checking for EEXIST, since the operating system
│ │ │  
│ │ │ -PermissionError: [Errno 13] Permission denied: '/sbuild-nonexistent'
│ │ │ +PermissionError: [Errno 13] Permission denied: '/nonexistent'
│ │ │  
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ @@ -1019,15 +1019,15 @@
│ │ │  
│ │ │
│ │ │
[8]:
│ │ │  
│ │ │
│ │ │
│ │ │
│ │ │ -<cartopy.mpl.feature_artist.FeatureArtist at 0x7f476c91b1c0>
│ │ │ +<cartopy.mpl.feature_artist.FeatureArtist at 0x7f8dd935c160>
│ │ │  
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ @@ -1225,15 +1225,15 @@
│ │ │  /usr/lib/python3.9/os.py in makedirs(name, mode, exist_ok)
│ │ │      223             return
│ │ │      224     try:
│ │ │  --> 225         mkdir(name, mode)
│ │ │      226     except OSError:
│ │ │      227         # Cannot rely on checking for EEXIST, since the operating system
│ │ │  
│ │ │ -PermissionError: [Errno 13] Permission denied: '/sbuild-nonexistent'
│ │ │ +PermissionError: [Errno 13] Permission denied: '/nonexistent'
│ │ │  
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz
│ │ │ ├── visualization_gallery.ipynb
│ │ │ │ │   --- /tmp/diffoscope_dn2f40t9_/tmp1mksro0bGzipContainer/c72523da-a4f1-4dcf-94bd-1a6779257800
│ │ │ │ ├── +++ /tmp/diffoscope_dn2f40t9_/tmpby9olxepGzipContainer/bfc2d9ee-21b0-4728-8046-4d7e7f75c564
│ │ │ │ │┄ Differences: {'replace': "OrderedDict([('cells', [OrderedDict([('cell_type', 'markdown'), ('metadata', "
│ │ │ │ │┄             "OrderedDict()), ('source', ['# Visualization Gallery\\n', '\\n', 'This notebook shows "
│ │ │ │ │┄             "common visualization issues encountered in Xarray.'])]), OrderedDict([('cell_type', "
│ │ │ │ │┄             "'code'), ('execution_count', 1), ('metadata', OrderedDict()), ('outputs', []), "
│ │ │ │ │┄             "('source', ['import cartopy.crs as ccrs\\n', 'import matplotlib.pyplot as plt\\n', "
│ │ │ │ │┄             "'import xarray  […]
│ │ │ │ │ @@ -31,23 +31,23 @@
│ │ │ │ │          {
│ │ │ │ │              "cell_type": "code",
│ │ │ │ │              "execution_count": 2,
│ │ │ │ │              "metadata": {},
│ │ │ │ │              "outputs": [
│ │ │ │ │                  {
│ │ │ │ │                      "ename": "FileNotFoundError",
│ │ │ │ │ -                    "evalue": "[Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data'",
│ │ │ │ │ +                    "evalue": "[Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data'",
│ │ │ │ │                      "output_type": "error",
│ │ │ │ │                      "traceback": [
│ │ │ │ │                          "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
│ │ │ │ │                          "\u001b[0;31mFileNotFoundError\u001b[0m                         Traceback (most recent call last)",
│ │ │ │ │                          "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mds\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'air_temperature'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
│ │ │ │ │                          "\u001b[0;32m/build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m in \u001b[0;36mload_dataset\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m    111\u001b[0m     \u001b[0mopen_dataset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    112\u001b[0m     \"\"\"\n\u001b[0;32m--> 113\u001b[0;31m     \u001b[0;32mwith\u001b[0m \u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mds\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    114\u001b[0m         \u001b[0;32mreturn\u001b[0m \u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    115\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m in \u001b[0;36mopen_dataset\u001b[0;34m(name, cache, cache_dir, github_url, branch, **kws)\u001b[0m\n\u001b[1;32m     76\u001b[0m         \u001b[0;31m# May want to add an option to remove it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     77\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 78\u001b[0;31m             \u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     79\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     80\u001b[0m         \u001b[0murl\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │ -                        "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data'"
│ │ │ │ │ +                        "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data'"
│ │ │ │ │                      ]
│ │ │ │ │                  }
│ │ │ │ │              ],
│ │ │ │ │              "source": [
│ │ │ │ │                  "ds = xr.tutorial.load_dataset('air_temperature')"
│ │ │ │ │              ]
│ │ │ │ │          },
│ │ │ │ │ @@ -269,24 +269,24 @@
│ │ │ │ │              "cell_type": "code",
│ │ │ │ │              "execution_count": 7,
│ │ │ │ │              "metadata": {},
│ │ │ │ │              "outputs": [
│ │ │ │ │                  {
│ │ │ │ │                      "data": {
│ │ │ │ │                          "text/plain": [
│ │ │ │ │ -                            ""
│ │ │ │ │ +                            ""
│ │ │ │ │                          ]
│ │ │ │ │                      },
│ │ │ │ │                      "execution_count": 7,
│ │ │ │ │                      "metadata": {},
│ │ │ │ │                      "output_type": "execute_result"
│ │ │ │ │                  },
│ │ │ │ │                  {
│ │ │ │ │                      "ename": "PermissionError",
│ │ │ │ │ -                    "evalue": "[Errno 13] Permission denied: '/sbuild-nonexistent'",
│ │ │ │ │ +                    "evalue": "[Errno 13] Permission denied: '/nonexistent'",
│ │ │ │ │                      "output_type": "error",
│ │ │ │ │                      "traceback": [
│ │ │ │ │                          "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
│ │ │ │ │                          "\u001b[0;31mPermissionError\u001b[0m                           Traceback (most recent call last)",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3/dist-packages/IPython/core/formatters.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, obj)\u001b[0m\n\u001b[1;32m    339\u001b[0m                 \u001b[0;32mpass\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    340\u001b[0m             \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 341\u001b[0;31m                 \u001b[0;32mreturn\u001b[0m \u001b[0mprinter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    342\u001b[0m             \u001b[0;31m# Finally look for special method names\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    343\u001b[0m             \u001b[0mmethod\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_real_method\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprint_method\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3/dist-packages/IPython/core/pylabtools.py\u001b[0m in \u001b[0;36m\u001b[0;34m(fig)\u001b[0m\n\u001b[1;32m    246\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    247\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0;34m'png'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mformats\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 248\u001b[0;31m         \u001b[0mpng_formatter\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfor_type\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mFigure\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mlambda\u001b[0m \u001b[0mfig\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mprint_figure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'png'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    249\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0;34m'retina'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mformats\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;34m'png2x'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mformats\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    250\u001b[0m         \u001b[0mpng_formatter\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfor_type\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mFigure\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mlambda\u001b[0m \u001b[0mfig\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mretina_figure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3/dist-packages/IPython/core/pylabtools.py\u001b[0m in \u001b[0;36mprint_figure\u001b[0;34m(fig, fmt, bbox_inches, **kwargs)\u001b[0m\n\u001b[1;32m    130\u001b[0m         \u001b[0mFigureCanvasBase\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfig\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    131\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 132\u001b[0;31m     \u001b[0mfig\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcanvas\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprint_figure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbytes_io\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    133\u001b[0m     \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mbytes_io\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgetvalue\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    134\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mfmt\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m'svg'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │ @@ -311,15 +311,15 @@
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    223\u001b[0m             \u001b[0;32mreturn\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    224\u001b[0m     \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 225\u001b[0;31m         \u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmode\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    226\u001b[0m     \u001b[0;32mexcept\u001b[0m \u001b[0mOSError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    227\u001b[0m         \u001b[0;31m# Cannot rely on checking for EEXIST, since the operating system\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │ -                        "\u001b[0;31mPermissionError\u001b[0m: [Errno 13] Permission denied: '/sbuild-nonexistent'"
│ │ │ │ │ +                        "\u001b[0;31mPermissionError\u001b[0m: [Errno 13] Permission denied: '/nonexistent'"
│ │ │ │ │                      ]
│ │ │ │ │                  },
│ │ │ │ │                  {
│ │ │ │ │                      "data": {
│ │ │ │ │                          "text/plain": [
│ │ │ │ │                              "
" │ │ │ │ │ ] │ │ │ │ │ @@ -363,24 +363,24 @@ │ │ │ │ │ "cell_type": "code", │ │ │ │ │ "execution_count": 8, │ │ │ │ │ "metadata": {}, │ │ │ │ │ "outputs": [ │ │ │ │ │ { │ │ │ │ │ "data": { │ │ │ │ │ "text/plain": [ │ │ │ │ │ - "" │ │ │ │ │ + "" │ │ │ │ │ ] │ │ │ │ │ }, │ │ │ │ │ "execution_count": 8, │ │ │ │ │ "metadata": {}, │ │ │ │ │ "output_type": "execute_result" │ │ │ │ │ }, │ │ │ │ │ { │ │ │ │ │ "ename": "PermissionError", │ │ │ │ │ - "evalue": "[Errno 13] Permission denied: '/sbuild-nonexistent'", │ │ │ │ │ + "evalue": "[Errno 13] Permission denied: '/nonexistent'", │ │ │ │ │ "output_type": "error", │ │ │ │ │ "traceback": [ │ │ │ │ │ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", │ │ │ │ │ "\u001b[0;31mPermissionError\u001b[0m Traceback (most recent call last)", │ │ │ │ │ "\u001b[0;32m/usr/lib/python3/dist-packages/IPython/core/formatters.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, obj)\u001b[0m\n\u001b[1;32m 339\u001b[0m \u001b[0;32mpass\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 340\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 341\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mprinter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 342\u001b[0m \u001b[0;31m# Finally look for special method names\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 343\u001b[0m \u001b[0mmethod\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_real_method\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprint_method\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ "\u001b[0;32m/usr/lib/python3/dist-packages/IPython/core/pylabtools.py\u001b[0m in \u001b[0;36m\u001b[0;34m(fig)\u001b[0m\n\u001b[1;32m 246\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 247\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;34m'png'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mformats\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 248\u001b[0;31m \u001b[0mpng_formatter\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfor_type\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mFigure\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mlambda\u001b[0m \u001b[0mfig\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mprint_figure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'png'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 249\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;34m'retina'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mformats\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;34m'png2x'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mformats\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 250\u001b[0m \u001b[0mpng_formatter\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfor_type\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mFigure\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mlambda\u001b[0m \u001b[0mfig\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mretina_figure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ "\u001b[0;32m/usr/lib/python3/dist-packages/IPython/core/pylabtools.py\u001b[0m in \u001b[0;36mprint_figure\u001b[0;34m(fig, fmt, bbox_inches, **kwargs)\u001b[0m\n\u001b[1;32m 130\u001b[0m \u001b[0mFigureCanvasBase\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfig\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 131\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 132\u001b[0;31m \u001b[0mfig\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcanvas\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprint_figure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbytes_io\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 133\u001b[0m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mbytes_io\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgetvalue\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 134\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mfmt\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m'svg'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ @@ -405,15 +405,15 @@ │ │ │ │ │ "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m 213\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 214\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 216\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 217\u001b[0m \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m 213\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 214\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 216\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 217\u001b[0m \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m 213\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 214\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 216\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 217\u001b[0m \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m 213\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 214\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 216\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 217\u001b[0m \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m 213\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 214\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 216\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 217\u001b[0m \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m 213\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 214\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 216\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 217\u001b[0m \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m 223\u001b[0m \u001b[0;32mreturn\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 224\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 225\u001b[0;31m \u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmode\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 226\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mOSError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 227\u001b[0m \u001b[0;31m# Cannot rely on checking for EEXIST, since the operating system\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ - "\u001b[0;31mPermissionError\u001b[0m: [Errno 13] Permission denied: '/sbuild-nonexistent'" │ │ │ │ │ + "\u001b[0;31mPermissionError\u001b[0m: [Errno 13] Permission denied: '/nonexistent'" │ │ │ │ │ ] │ │ │ │ │ }, │ │ │ │ │ { │ │ │ │ │ "data": { │ │ │ │ │ "text/plain": [ │ │ │ │ │ "
" │ │ │ │ │ ] │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/weather-data.html │ │ │ @@ -887,30 +887,30 @@ │ │ │
<xarray.Dataset>
│ │ │  Dimensions:   (location: 3, time: 731)
│ │ │  Coordinates:
│ │ │    * time      (time) datetime64[ns] 2000-01-01 2000-01-02 ... 2001-12-31
│ │ │    * location  (location) <U2 'IA' 'IN' 'IL'
│ │ │  Data variables:
│ │ │      tmin      (time, location) float64 -8.037 -1.788 -3.932 ... -1.346 -4.544
│ │ │ -    tmax      (time, location) float64 12.98 3.31 6.779 ... 6.636 3.343 3.805
  • │ │ │ │ │ │
    │ │ │

    Examine a dataset with pandas and seaborn

    │ │ │
    │ │ │

    Convert to a pandas DataFrame

    │ │ │
    │ │ │
    [2]:
    │ │ │ @@ -1110,15 +1110,15 @@
    │ │ │  
    │ │ │
    │ │ │
    [5]:
    │ │ │  
    │ │ │
    │ │ │
    │ │ │
    │ │ │ -<seaborn.axisgrid.PairGrid at 0x7f5fc503e490>
    │ │ │ +<seaborn.axisgrid.PairGrid at 0x7f87b3263820>
    │ │ │  
    │ │ │
    │ │ │
    │ │ │
    │ │ │
    │ │ │
    │ │ │ ../_images/examples_weather-data_9_1.png │ │ │ @@ -1505,26 +1505,26 @@ │ │ │ [0. , 0. , 0. ], │ │ │ [0. , 0. , 0. ], │ │ │ [0. , 0.01612903, 0. ], │ │ │ [0.33333333, 0.35 , 0.23333333], │ │ │ [0.93548387, 0.85483871, 0.82258065]]) │ │ │ Coordinates: │ │ │ * location (location) <U2 'IA' 'IN' 'IL' │ │ │ - * month (month) int64 1 2 3 4 5 6 7 8 9 10 11 12
    • location
      (location)
      <U2
      'IA' 'IN' 'IL'
      array(['IA', 'IN', 'IL'], dtype='<U2')
    • month
      (month)
      int64
      1 2 3 4 5 6 7 8 9 10 11 12
      array([ 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12])
  • │ │ │
    │ │ │
    │ │ │
    [7]:
    │ │ │  
    │ │ │
    │ │ │
    │ │ │  freeze.to_pandas().plot()
    │ │ │ @@ -2023,18 +2023,18 @@
    │ │ │  Dimensions:       (location: 3, time: 731)
    │ │ │  Coordinates:
    │ │ │    * time          (time) datetime64[ns] 2000-01-01 2000-01-02 ... 2001-12-31
    │ │ │    * location      (location) object 'IA' 'IN' 'IL'
    │ │ │      month         (time) int64 1 1 1 1 1 1 1 1 1 ... 12 12 12 12 12 12 12 12 12
    │ │ │  Data variables:
    │ │ │      some_missing  (time, location) float64 nan nan nan ... 2.063 -1.346 -4.544
    │ │ │ -    filled        (time, location) float64 -5.163 -4.216 ... -1.346 -4.544
  • │ │ │ │ │ │
    │ │ │
    [12]:
    │ │ │  
    │ │ │
    │ │ │
    │ │ │  df = both.sel(time="2000").mean("location").reset_coords(drop=True).to_dataframe()
    │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz
    │ │ │ ├── weather-data.ipynb
    │ │ │ │ │   --- /tmp/diffoscope_dn2f40t9_/tmp4jx_hwdvGzipContainer/d8a4f346-05ae-4a06-91a7-f51bedab518d
    │ │ │ │ ├── +++ /tmp/diffoscope_dn2f40t9_/tmpv05d_lxlGzipContainer/3d2cbaef-5a4e-4f51-ad90-24d3faa9d4e7
    │ │ │ │ │┄ Differences: {'replace': "OrderedDict([('cells', [OrderedDict([('cell_type', 'markdown'), ('metadata', "
    │ │ │ │ │┄             "OrderedDict()), ('source', ['# Toy weather data\\n', '\\n', 'Here is an example of "
    │ │ │ │ │┄             "how to easily manipulate a toy weather dataset using\\n', 'xarray and other "
    │ │ │ │ │┄             "recommended Python libraries:'])]), OrderedDict([('cell_type', 'code'), "
    │ │ │ │ │┄             "('execution_count', 1), ('metadata', OrderedDict([('ExecuteTime', "
    │ │ │ │ │┄             "OrderedDict([('end_time', '2020-01-27T15:43:36.127 […]
    │ │ │ │ │ @@ -377,30 +377,30 @@
    │ │ │ │ │                              "
    <xarray.Dataset>\n",
    │ │ │ │ │                              "Dimensions:   (location: 3, time: 731)\n",
    │ │ │ │ │                              "Coordinates:\n",
    │ │ │ │ │                              "  * time      (time) datetime64[ns] 2000-01-01 2000-01-02 ... 2001-12-31\n",
    │ │ │ │ │                              "  * location  (location) <U2 'IA' 'IN' 'IL'\n",
    │ │ │ │ │                              "Data variables:\n",
    │ │ │ │ │                              "    tmin      (time, location) float64 -8.037 -1.788 -3.932 ... -1.346 -4.544\n",
    │ │ │ │ │ -                            "    tmax      (time, location) float64 12.98 3.31 6.779 ... 6.636 3.343 3.805
  • " │ │ │ │ │ ], │ │ │ │ │ "text/plain": [ │ │ │ │ │ "\n", │ │ │ │ │ "Dimensions: (location: 3, time: 731)\n", │ │ │ │ │ "Coordinates:\n", │ │ │ │ │ " * time (time) datetime64[ns] 2000-01-01 2000-01-02 ... 2001-12-31\n", │ │ │ │ │ " * location (location) " │ │ │ │ │ + "" │ │ │ │ │ ] │ │ │ │ │ }, │ │ │ │ │ "execution_count": 5, │ │ │ │ │ "metadata": {}, │ │ │ │ │ "output_type": "execute_result" │ │ │ │ │ }, │ │ │ │ │ { │ │ │ │ │ @@ -1121,26 +1121,26 @@ │ │ │ │ │ " [0. , 0. , 0. ],\n", │ │ │ │ │ " [0. , 0. , 0. ],\n", │ │ │ │ │ " [0. , 0.01612903, 0. ],\n", │ │ │ │ │ " [0.33333333, 0.35 , 0.23333333],\n", │ │ │ │ │ " [0.93548387, 0.85483871, 0.82258065]])\n", │ │ │ │ │ "Coordinates:\n", │ │ │ │ │ " * location (location) <U2 'IA' 'IN' 'IL'\n", │ │ │ │ │ - " * month (month) int64 1 2 3 4 5 6 7 8 9 10 11 12
    • location
      (location)
      <U2
      'IA' 'IN' 'IL'
      array(['IA', 'IN', 'IL'], dtype='<U2')
    • month
      (month)
      int64
      1 2 3 4 5 6 7 8 9 10 11 12
      array([ 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12])
  • " │ │ │ │ │ ], │ │ │ │ │ "text/plain": [ │ │ │ │ │ "\n", │ │ │ │ │ "array([[0.9516129 , 0.88709677, 0.93548387],\n", │ │ │ │ │ " [0.84210526, 0.71929825, 0.77192982],\n", │ │ │ │ │ " [0.24193548, 0.12903226, 0.16129032],\n", │ │ │ │ │ " [0. , 0. , 0. ],\n", │ │ │ │ │ @@ -1760,18 +1760,18 @@ │ │ │ │ │ "Dimensions: (location: 3, time: 731)\n", │ │ │ │ │ "Coordinates:\n", │ │ │ │ │ " * time (time) datetime64[ns] 2000-01-01 2000-01-02 ... 2001-12-31\n", │ │ │ │ │ " * location (location) object 'IA' 'IN' 'IL'\n", │ │ │ │ │ " month (time) int64 1 1 1 1 1 1 1 1 1 ... 12 12 12 12 12 12 12 12 12\n", │ │ │ │ │ "Data variables:\n", │ │ │ │ │ " some_missing (time, location) float64 nan nan nan ... 2.063 -1.346 -4.544\n", │ │ │ │ │ - " filled (time, location) float64 -5.163 -4.216 ... -1.346 -4.544
  • " │ │ │ │ │ ], │ │ │ │ │ "text/plain": [ │ │ │ │ │ "\n", │ │ │ │ │ "Dimensions: (location: 3, time: 731)\n", │ │ │ │ │ "Coordinates:\n", │ │ │ │ │ " * time (time) datetime64[ns] 2000-01-01 2000-01-02 ... 2001-12-31\n", │ │ │ │ │ " * location (location) object 'IA' 'IN' 'IL'\n", │ │ ├── ./usr/share/doc/python-xarray-doc/html/indexing.html │ │ │ @@ -873,15 +873,15 @@ │ │ │ /build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py in open_dataset(name, cache, cache_dir, github_url, branch, **kws) │ │ │ 76 # May want to add an option to remove it. │ │ │ 77 if not _os.path.isdir(longdir): │ │ │ ---> 78 _os.mkdir(longdir) │ │ │ 79 │ │ │ 80 url = "/".join((github_url, "raw", branch, fullname)) │ │ │ │ │ │ -FileNotFoundError: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data' │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data' │ │ │ │ │ │ # add an empty 2D dataarray │ │ │ In [54]: ds["empty"] = xr.full_like(ds.air.mean("time"), fill_value=0) │ │ │ --------------------------------------------------------------------------- │ │ │ AttributeError Traceback (most recent call last) │ │ │ <ipython-input-54-6709edaff03d> in <module> │ │ │ ----> 1 ds["empty"] = xr.full_like(ds.air.mean("time"), fill_value=0) │ │ ├── ./usr/share/doc/python-xarray-doc/html/internals.html │ │ │ @@ -429,18 +429,18 @@ │ │ │ /build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py in open_dataset(name, cache, cache_dir, github_url, branch, **kws) │ │ │ 76 # May want to add an option to remove it. │ │ │ 77 if not _os.path.isdir(longdir): │ │ │ ---> 78 _os.mkdir(longdir) │ │ │ 79 │ │ │ 80 url = "/".join((github_url, "raw", branch, fullname)) │ │ │ │ │ │ -FileNotFoundError: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data' │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data' │ │ │ │ │ │ In [5]: ds.to_zarr("rasm.zarr", mode="w") │ │ │ -Out[5]: <xarray.backends.zarr.ZarrStore at 0x7f705ccf9520> │ │ │ +Out[5]: <xarray.backends.zarr.ZarrStore at 0x7f78581b08e0> │ │ │ │ │ │ In [6]: import zarr │ │ │ │ │ │ In [7]: zgroup = zarr.open("rasm.zarr") │ │ │ │ │ │ In [8]: print(zgroup.tree()) │ │ │ / │ │ ├── ./usr/share/doc/python-xarray-doc/html/interpolation.html │ │ │ @@ -406,24 +406,24 @@ │ │ │ ....: np.sin(np.linspace(0, 2 * np.pi, 10)), │ │ │ ....: dims="x", │ │ │ ....: coords={"x": np.linspace(0, 1, 10)}, │ │ │ ....: ) │ │ │ ....: │ │ │ │ │ │ In [17]: da.plot.line("o", label="original") │ │ │ -Out[17]: [<matplotlib.lines.Line2D at 0x7f705d1eeb20>] │ │ │ +Out[17]: [<matplotlib.lines.Line2D at 0x7f78586da400>] │ │ │ │ │ │ In [18]: da.interp(x=np.linspace(0, 1, 100)).plot.line(label="linear (default)") │ │ │ -Out[18]: [<matplotlib.lines.Line2D at 0x7f705d1d8220>] │ │ │ +Out[18]: [<matplotlib.lines.Line2D at 0x7f7858761ca0>] │ │ │ │ │ │ In [19]: da.interp(x=np.linspace(0, 1, 100), method="cubic").plot.line(label="cubic") │ │ │ -Out[19]: [<matplotlib.lines.Line2D at 0x7f705d1d8eb0>] │ │ │ +Out[19]: [<matplotlib.lines.Line2D at 0x7f78587617c0>] │ │ │ │ │ │ In [20]: plt.legend() │ │ │ -Out[20]: <matplotlib.legend.Legend at 0x7f705cfc7340> │ │ │ +Out[20]: <matplotlib.legend.Legend at 0x7f785861c3a0> │ │ │ │ │ │ │ │ │ _images/interpolation_sample1.png │ │ │

    Additional keyword arguments can be passed to scipy’s functions.

    │ │ │
    # fill 0 for the outside of the original coordinates.
    │ │ │  In [21]: da.interp(x=np.linspace(-0.5, 1.5, 10), kwargs={"fill_value": 0.0})
    │ │ │  Out[21]: 
    │ │ │ @@ -609,15 +609,15 @@
    │ │ │  /build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py in open_dataset(name, cache, cache_dir, github_url, branch, **kws)
    │ │ │       76         # May want to add an option to remove it.
    │ │ │       77         if not _os.path.isdir(longdir):
    │ │ │  ---> 78             _os.mkdir(longdir)
    │ │ │       79 
    │ │ │       80         url = "/".join((github_url, "raw", branch, fullname))
    │ │ │  
    │ │ │ -FileNotFoundError: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data'
    │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data'
    │ │ │  
    │ │ │  In [45]: fig, axes = plt.subplots(ncols=2, figsize=(10, 4))
    │ │ │  
    │ │ │  In [46]: ds.air.plot(ax=axes[0])
    │ │ │  ---------------------------------------------------------------------------
    │ │ │  AttributeError                            Traceback (most recent call last)
    │ │ │  <ipython-input-46-cb8f083667be> in <module>
    │ │ │ @@ -764,15 +764,15 @@
    │ │ │  /build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/core/utils.py in drop_dims_from_indexers(indexers, dims, missing_dims)
    │ │ │      766         invalid = indexers.keys() - set(dims)
    │ │ │      767         if invalid:
    │ │ │  --> 768             raise ValueError(
    │ │ │      769                 f"dimensions {invalid} do not exist. Expected one or more of {dims}"
    │ │ │      770             )
    │ │ │  
    │ │ │ -ValueError: dimensions {'lat', 'lon'} do not exist. Expected one or more of Frozen(SortedKeysDict({'longitude': 50, 'latitude': 50}))
    │ │ │ +ValueError: dimensions {'lon', 'lat'} do not exist. Expected one or more of Frozen(SortedKeysDict({'longitude': 50, 'latitude': 50}))
    │ │ │  
    │ │ │  In [63]: dsi.air.plot(ax=axes[1])
    │ │ │  ---------------------------------------------------------------------------
    │ │ │  NameError                                 Traceback (most recent call last)
    │ │ │  <ipython-input-63-433e5c8b0d13> in <module>
    │ │ │  ----> 1 dsi.air.plot(ax=axes[1])
    │ │ ├── ./usr/share/doc/python-xarray-doc/html/io.html
    │ │ │ @@ -1057,15 +1057,15 @@
    │ │ │     ....:         "y": pd.date_range("2000-01-01", periods=5),
    │ │ │     ....:         "z": ("x", list("abcd")),
    │ │ │     ....:     },
    │ │ │     ....: )
    │ │ │     ....: 
    │ │ │  
    │ │ │  In [39]: ds.to_zarr("path/to/directory.zarr")
    │ │ │ -Out[39]: <xarray.backends.zarr.ZarrStore at 0x7f705cca5520>
    │ │ │ +Out[39]: <xarray.backends.zarr.ZarrStore at 0x7f786c187940>
    │ │ │  
    │ │ │
    │ │ │

    (The suffix .zarr is optional–just a reminder that a zarr store lives │ │ │ there.) If the directory does not exist, it will be created. If a zarr │ │ │ store is already present at that path, an error will be raised, preventing it │ │ │ from being overwritten. To override this behavior and overwrite an existing │ │ │ store, add mode='w' when invoking to_zarr().

    │ │ │ @@ -1111,15 +1111,15 @@ │ │ │ These options can be passed to the to_zarr method as variable encoding. │ │ │ For example:

    │ │ │
    In [42]: import zarr
    │ │ │  
    │ │ │  In [43]: compressor = zarr.Blosc(cname="zstd", clevel=3, shuffle=2)
    │ │ │  
    │ │ │  In [44]: ds.to_zarr("foo.zarr", encoding={"foo": {"compressor": compressor}})
    │ │ │ -Out[44]: <xarray.backends.zarr.ZarrStore at 0x7f705cca56a0>
    │ │ │ +Out[44]: <xarray.backends.zarr.ZarrStore at 0x7f786c397580>
    │ │ │  
    │ │ │
    │ │ │
    │ │ │

    Note

    │ │ │

    Not all native zarr compression and filtering options have been tested with │ │ │ xarray.

    │ │ │
    │ │ │ @@ -1180,28 +1180,28 @@ │ │ │ ....: "y": [1, 2, 3, 4, 5], │ │ │ ....: "t": pd.date_range("2001-01-01", periods=2), │ │ │ ....: }, │ │ │ ....: ) │ │ │ ....: │ │ │ │ │ │ In [46]: ds1.to_zarr("path/to/directory.zarr") │ │ │ -Out[46]: <xarray.backends.zarr.ZarrStore at 0x7f705c99e280> │ │ │ +Out[46]: <xarray.backends.zarr.ZarrStore at 0x7f786c2a5640> │ │ │ │ │ │ In [47]: ds2 = xr.Dataset( │ │ │ ....: {"foo": (("x", "y", "t"), np.random.rand(4, 5, 2))}, │ │ │ ....: coords={ │ │ │ ....: "x": [10, 20, 30, 40], │ │ │ ....: "y": [1, 2, 3, 4, 5], │ │ │ ....: "t": pd.date_range("2001-01-03", periods=2), │ │ │ ....: }, │ │ │ ....: ) │ │ │ ....: │ │ │ │ │ │ In [48]: ds2.to_zarr("path/to/directory.zarr", append_dim="t") │ │ │ -Out[48]: <xarray.backends.zarr.ZarrStore at 0x7f705c99e340> │ │ │ +Out[48]: <xarray.backends.zarr.ZarrStore at 0x7f7858586f40> │ │ │ │ │ │ │ │ │

    Finally, you can use region to write to limited regions of existing arrays │ │ │ in an existing Zarr store. This is a good option for writing data in parallel │ │ │ from independent processes.

    │ │ │

    To scale this up to writing large datasets, the first step is creating an │ │ │ initial Zarr store without writing all of its array data. This can be done by │ │ │ @@ -1216,33 +1216,33 @@ │ │ │ │ │ │ In [51]: ds = xr.Dataset({"foo": ("x", dummies)}) │ │ │ │ │ │ In [52]: path = "path/to/directory.zarr" │ │ │ │ │ │ # Now we write the metadata without computing any array values │ │ │ In [53]: ds.to_zarr(path, compute=False, consolidated=True) │ │ │ -Out[53]: Delayed('_finalize_store-1cf228a7-668a-4a9d-814a-cc1458d05c32') │ │ │ +Out[53]: Delayed('_finalize_store-cc2bed2f-261c-4b61-88b7-125cc58608fb') │ │ │ │ │ │ │ │ │

    Now, a Zarr store with the correct variable shapes and attributes exists that │ │ │ can be filled out by subsequent calls to to_zarr. The region provides a │ │ │ mapping from dimension names to Python slice objects indicating where the │ │ │ data should be written (in index space, not coordinate space), e.g.,

    │ │ │
    # For convenience, we'll slice a single dataset, but in the real use-case
    │ │ │  # we would create them separately, possibly even from separate processes.
    │ │ │  In [54]: ds = xr.Dataset({"foo": ("x", np.arange(30))})
    │ │ │  
    │ │ │  In [55]: ds.isel(x=slice(0, 10)).to_zarr(path, region={"x": slice(0, 10)})
    │ │ │ -Out[55]: <xarray.backends.zarr.ZarrStore at 0x7f705cca5dc0>
    │ │ │ +Out[55]: <xarray.backends.zarr.ZarrStore at 0x7f786c187fa0>
    │ │ │  
    │ │ │  In [56]: ds.isel(x=slice(10, 20)).to_zarr(path, region={"x": slice(10, 20)})
    │ │ │ -Out[56]: <xarray.backends.zarr.ZarrStore at 0x7f705c99e8e0>
    │ │ │ +Out[56]: <xarray.backends.zarr.ZarrStore at 0x7f788431f460>
    │ │ │  
    │ │ │  In [57]: ds.isel(x=slice(20, 30)).to_zarr(path, region={"x": slice(20, 30)})
    │ │ │ -Out[57]: <xarray.backends.zarr.ZarrStore at 0x7f707160ef40>
    │ │ │ +Out[57]: <xarray.backends.zarr.ZarrStore at 0x7f786fba5520>
    │ │ │  
    │ │ │
    │ │ │

    Concurrent writes with region are safe as long as they modify distinct │ │ │ chunks in the underlying Zarr arrays (or use an appropriate lock).

    │ │ │

    As a safety check to make it harder to inadvertently override existing values, │ │ │ if you set region then all variables included in a Dataset must have │ │ │ dimensions included in region. Other variables (typically coordinates) │ │ ├── ./usr/share/doc/python-xarray-doc/html/plotting.html │ │ │ @@ -324,15 +324,15 @@ │ │ │ /build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py in open_dataset(name, cache, cache_dir, github_url, branch, **kws) │ │ │ 76 # May want to add an option to remove it. │ │ │ 77 if not _os.path.isdir(longdir): │ │ │ ---> 78 _os.mkdir(longdir) │ │ │ 79 │ │ │ 80 url = "/".join((github_url, "raw", branch, fullname)) │ │ │ │ │ │ -FileNotFoundError: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data' │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data' │ │ │ │ │ │ In [6]: airtemps │ │ │ --------------------------------------------------------------------------- │ │ │ NameError Traceback (most recent call last) │ │ │ <ipython-input-6-eb57b540ddce> in <module> │ │ │ ----> 1 airtemps │ │ │ │ │ │ @@ -850,15 +850,15 @@ │ │ │ --> 171 ref_var = variables[ref_name] │ │ │ 172 │ │ │ 173 if var_name is None: │ │ │ │ │ │ KeyError: 'lat' │ │ │ │ │ │ In [51]: b.plot() │ │ │ -Out[51]: [<matplotlib.lines.Line2D at 0x7f705c7f07f0>] │ │ │ +Out[51]: [<matplotlib.lines.Line2D at 0x7f78384f5280>] │ │ │ │ │ │ │ │ │ _images/plotting_nonuniform_coords.png │ │ │ │ │ │

    │ │ │

    Calling Matplotlib

    │ │ │

    Since this is a thin wrapper around matplotlib, all the functionality of │ │ │ @@ -1312,56 +1312,56 @@ │ │ │ Data variables: │ │ │ A (x, y, z, w) float64 -0.104 0.02719 -0.0425 ... -0.1175 -0.0183 │ │ │ B (x, y, z, w) float64 0.0 0.0 0.0 0.0 ... 1.369 1.408 1.387 1.417 │ │ │

    │ │ │ │ │ │

    Suppose we want to scatter A against B

    │ │ │
    In [95]: ds.plot.scatter(x="A", y="B")
    │ │ │ -Out[95]: <matplotlib.collections.PathCollection at 0x7f705d20d730>
    │ │ │ +Out[95]: <matplotlib.collections.PathCollection at 0x7f786c2a3ac0>
    │ │ │  
    │ │ │
    │ │ │ _images/ds_simple_scatter.png │ │ │

    The hue kwarg lets you vary the color by variable value

    │ │ │
    In [96]: ds.plot.scatter(x="A", y="B", hue="w")
    │ │ │  Out[96]: 
    │ │ │ -[<matplotlib.collections.PathCollection at 0x7f705cf0aa30>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7f705cf792e0>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7f705cf50eb0>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7f705d6f07c0>]
    │ │ │ +[<matplotlib.collections.PathCollection at 0x7f786fc28640>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x7f786ff11d90>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x7f786fc3bd30>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x7f78586c4c70>]
    │ │ │  
    │ │ │
    │ │ │ _images/ds_hue_scatter.png │ │ │

    When hue is specified, a colorbar is added for numeric hue DataArrays by │ │ │ default and a legend is added for non-numeric hue DataArrays (as above). │ │ │ You can force a legend instead of a colorbar by setting hue_style='discrete'. │ │ │ Additionally, the boolean kwarg add_guide can be used to prevent the display of a legend or colorbar (as appropriate).

    │ │ │
    In [97]: ds = ds.assign(w=[1, 2, 3, 5])
    │ │ │  
    │ │ │  In [98]: ds.plot.scatter(x="A", y="B", hue="w", hue_style="discrete")
    │ │ │  Out[98]: 
    │ │ │ -[<matplotlib.collections.PathCollection at 0x7f70719bad60>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7f70716e6fa0>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7f705cfeda60>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7f705c6d4c40>]
    │ │ │ +[<matplotlib.collections.PathCollection at 0x7f7858600760>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x7f785844aa00>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x7f78584317f0>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x7f78583b0340>]
    │ │ │  
    │ │ │
    │ │ │ _images/ds_discrete_legend_hue_scatter.png │ │ │

    The markersize kwarg lets you vary the point’s size by variable value. You can additionally pass size_norm to control how the variable’s values are mapped to point sizes.

    │ │ │
    In [99]: ds.plot.scatter(x="A", y="B", hue="z", hue_style="discrete", markersize="z")
    │ │ │  Out[99]: 
    │ │ │ -[<matplotlib.collections.PathCollection at 0x7f705c692bb0>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7f705c6a1d00>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7f705c692e20>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7f705c6a1ee0>]
    │ │ │ +[<matplotlib.collections.PathCollection at 0x7f78384ceee0>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x7f78384cea90>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x7f786fb7f400>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x7f786fb700d0>]
    │ │ │  
    │ │ │
    │ │ │ _images/ds_hue_size_scatter.png │ │ │

    Faceting is also possible

    │ │ │
    In [100]: ds.plot.scatter(x="A", y="B", col="x", row="z", hue="w", hue_style="discrete")
    │ │ │ -Out[100]: <xarray.plot.facetgrid.FacetGrid at 0x7f705c6f99d0>
    │ │ │ +Out[100]: <xarray.plot.facetgrid.FacetGrid at 0x7f786c3727f0>
    │ │ │  
    │ │ │
    │ │ │ _images/ds_facet_scatter.png │ │ │

    For more advanced scatter plots, we recommend converting the relevant data variables to a pandas DataFrame and using the extensive plotting capabilities of seaborn.

    │ │ │ │ │ │
    │ │ │

    Maps

    │ │ │ @@ -1378,15 +1378,15 @@ │ │ │ /build/python-xarray-zcUjoD/python-xarray-0.16.2/xarray/tutorial.py in open_dataset(name, cache, cache_dir, github_url, branch, **kws) │ │ │ 76 # May want to add an option to remove it. │ │ │ 77 if not _os.path.isdir(longdir): │ │ │ ---> 78 _os.mkdir(longdir) │ │ │ 79 │ │ │ 80 url = "/".join((github_url, "raw", branch, fullname)) │ │ │ │ │ │ -FileNotFoundError: [Errno 2] No such file or directory: '/sbuild-nonexistent/.xarray_tutorial_data' │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/.xarray_tutorial_data' │ │ │ │ │ │ In [103]: p = air.isel(time=0).plot( │ │ │ .....: subplot_kws=dict(projection=ccrs.Orthographic(-80, 35), facecolor="gray"), │ │ │ .....: transform=ccrs.PlateCarree(), │ │ │ .....: ) │ │ │ .....: │ │ │ --------------------------------------------------------------------------- │ │ │ @@ -1470,24 +1470,24 @@ │ │ │
    In [109]: import xarray.plot as xplt
    │ │ │  
    │ │ │  In [110]: da = xr.DataArray(range(5))
    │ │ │  
    │ │ │  In [111]: fig, axes = plt.subplots(ncols=2, nrows=2)
    │ │ │  
    │ │ │  In [112]: da.plot(ax=axes[0, 0])
    │ │ │ -Out[112]: [<matplotlib.lines.Line2D at 0x7f705c37f160>]
    │ │ │ +Out[112]: [<matplotlib.lines.Line2D at 0x7f7838209c40>]
    │ │ │  
    │ │ │  In [113]: da.plot.line(ax=axes[0, 1])
    │ │ │ -Out[113]: [<matplotlib.lines.Line2D at 0x7f705c3669a0>]
    │ │ │ +Out[113]: [<matplotlib.lines.Line2D at 0x7f7838209fd0>]
    │ │ │  
    │ │ │  In [114]: xplt.plot(da, ax=axes[1, 0])
    │ │ │ -Out[114]: [<matplotlib.lines.Line2D at 0x7f705c3666d0>]
    │ │ │ +Out[114]: [<matplotlib.lines.Line2D at 0x7f785840e9d0>]
    │ │ │  
    │ │ │  In [115]: xplt.line(da, ax=axes[1, 1])
    │ │ │ -Out[115]: [<matplotlib.lines.Line2D at 0x7f705c37fbe0>]
    │ │ │ +Out[115]: [<matplotlib.lines.Line2D at 0x7f7838200ee0>]
    │ │ │  
    │ │ │  In [116]: plt.tight_layout()
    │ │ │  
    │ │ │  In [117]: plt.draw()
    │ │ │  
    │ │ │
    │ │ │ _images/plotting_ways_to_use.png │ │ │ @@ -1540,15 +1540,15 @@ │ │ │
    │ │ │

    The plot will produce an image corresponding to the values of the array. │ │ │ Hence the top left pixel will be a different color than the others. │ │ │ Before reading on, you may want to look at the coordinates and │ │ │ think carefully about what the limits, labels, and orientation for │ │ │ each of the axes should be.

    │ │ │
    In [122]: a.plot()
    │ │ │ -Out[122]: <matplotlib.collections.QuadMesh at 0x7f705d1b7670>
    │ │ │ +Out[122]: <matplotlib.collections.QuadMesh at 0x7f7838275d90>
    │ │ │  
    │ │ │
    │ │ │ _images/plotting_example_2d_simple.png │ │ │

    It may seem strange that │ │ │ the values on the y axis are decreasing with -0.5 on the top. This is because │ │ │ the pixels are centered over their coordinates, and the │ │ │ axis labels and ranges correspond to the values of the │ │ │ @@ -1570,81 +1570,81 @@ │ │ │ .....: np.arange(20).reshape(4, 5), │ │ │ .....: dims=["y", "x"], │ │ │ .....: coords={"lat": (("y", "x"), lat), "lon": (("y", "x"), lon)}, │ │ │ .....: ) │ │ │ .....: │ │ │ │ │ │ In [127]: da.plot.pcolormesh("lon", "lat") │ │ │ -Out[127]: <matplotlib.collections.QuadMesh at 0x7f705c56e820> │ │ │ +Out[127]: <matplotlib.collections.QuadMesh at 0x7f781877b850> │ │ │ │ │ │ │ │ │ _images/plotting_example_2d_irreg.png │ │ │

    Note that in this case, xarray still follows the pixel centered convention. │ │ │ This might be undesirable in some cases, for example when your data is defined │ │ │ on a polar projection (GH781). This is why the default is to not follow │ │ │ this convention when plotting on a map:

    │ │ │
    In [128]: import cartopy.crs as ccrs
    │ │ │  
    │ │ │  In [129]: ax = plt.subplot(projection=ccrs.PlateCarree())
    │ │ │  
    │ │ │  In [130]: da.plot.pcolormesh("lon", "lat", ax=ax)
    │ │ │ -Out[130]: <matplotlib.collections.QuadMesh at 0x7f705c272250>
    │ │ │ +Out[130]: <matplotlib.collections.QuadMesh at 0x7f78187bb610>
    │ │ │  
    │ │ │  In [131]: ax.scatter(lon, lat, transform=ccrs.PlateCarree())
    │ │ │ -Out[131]: <matplotlib.collections.PathCollection at 0x7f705c277be0>
    │ │ │ +Out[131]: <matplotlib.collections.PathCollection at 0x7f78186f28b0>
    │ │ │  
    │ │ │  In [132]: ax.coastlines()
    │ │ │ -Out[132]: <cartopy.mpl.feature_artist.FeatureArtist at 0x7f705c6f9f70>
    │ │ │ +Out[132]: <cartopy.mpl.feature_artist.FeatureArtist at 0x7f783842abe0>
    │ │ │  
    │ │ │  In [133]: ax.gridlines(draw_labels=True)
    │ │ │ -Out[133]: <cartopy.mpl.gridliner.Gridliner at 0x7f705c225310>
    │ │ │ +Out[133]: <cartopy.mpl.gridliner.Gridliner at 0x7f78186f2a00>
    │ │ │  
    │ │ │
    │ │ │ _build/html/_static/plotting_example_2d_irreg_map.png │ │ │

    You can however decide to infer the cell boundaries and use the │ │ │ infer_intervals keyword:

    │ │ │
    In [134]: ax = plt.subplot(projection=ccrs.PlateCarree())
    │ │ │  
    │ │ │  In [135]: da.plot.pcolormesh("lon", "lat", ax=ax, infer_intervals=True)
    │ │ │ -Out[135]: <matplotlib.collections.QuadMesh at 0x7f705c625250>
    │ │ │ +Out[135]: <matplotlib.collections.QuadMesh at 0x7f78184e4ca0>
    │ │ │  
    │ │ │  In [136]: ax.scatter(lon, lat, transform=ccrs.PlateCarree())
    │ │ │ -Out[136]: <matplotlib.collections.PathCollection at 0x7f705c5e8730>
    │ │ │ +Out[136]: <matplotlib.collections.PathCollection at 0x7f78184969a0>
    │ │ │  
    │ │ │  In [137]: ax.coastlines()
    │ │ │ -Out[137]: <cartopy.mpl.feature_artist.FeatureArtist at 0x7f705c229910>
    │ │ │ +Out[137]: <cartopy.mpl.feature_artist.FeatureArtist at 0x7f7818698cd0>
    │ │ │  
    │ │ │  In [138]: ax.gridlines(draw_labels=True)
    │ │ │ -Out[138]: <cartopy.mpl.gridliner.Gridliner at 0x7f705c229580>
    │ │ │ +Out[138]: <cartopy.mpl.gridliner.Gridliner at 0x7f78186986a0>
    │ │ │  
    │ │ │
    │ │ │ _build/html/_static/plotting_example_2d_irreg_map_infer.png │ │ │
    │ │ │

    Note

    │ │ │

    The data model of xarray does not support datasets with cell boundaries │ │ │ yet. If you want to use these coordinates, you’ll have to make the plots │ │ │ outside the xarray framework.

    │ │ │
    │ │ │

    One can also make line plots with multidimensional coordinates. In this case, hue must be a dimension name, not a coordinate name.

    │ │ │
    In [139]: f, ax = plt.subplots(2, 1)
    │ │ │  
    │ │ │  In [140]: da.plot.line(x="lon", hue="y", ax=ax[0])
    │ │ │  Out[140]: 
    │ │ │ -[<matplotlib.lines.Line2D at 0x7f704fef87f0>,
    │ │ │ - <matplotlib.lines.Line2D at 0x7f704fef8850>,
    │ │ │ - <matplotlib.lines.Line2D at 0x7f704fef8910>,
    │ │ │ - <matplotlib.lines.Line2D at 0x7f704fef8a90>]
    │ │ │ +[<matplotlib.lines.Line2D at 0x7f7838440400>,
    │ │ │ + <matplotlib.lines.Line2D at 0x7f78384405b0>,
    │ │ │ + <matplotlib.lines.Line2D at 0x7f78187d1eb0>,
    │ │ │ + <matplotlib.lines.Line2D at 0x7f78187d15e0>]
    │ │ │  
    │ │ │  In [141]: da.plot.line(x="lon", hue="x", ax=ax[1])
    │ │ │  Out[141]: 
    │ │ │ -[<matplotlib.lines.Line2D at 0x7f704fe99100>,
    │ │ │ - <matplotlib.lines.Line2D at 0x7f704fe99220>,
    │ │ │ - <matplotlib.lines.Line2D at 0x7f704fe99280>,
    │ │ │ - <matplotlib.lines.Line2D at 0x7f704fe993d0>,
    │ │ │ - <matplotlib.lines.Line2D at 0x7f704fe99490>]
    │ │ │ +[<matplotlib.lines.Line2D at 0x7f7818415a60>,
    │ │ │ + <matplotlib.lines.Line2D at 0x7f7818415a00>,
    │ │ │ + <matplotlib.lines.Line2D at 0x7f7818415ac0>,
    │ │ │ + <matplotlib.lines.Line2D at 0x7f78184314c0>,
    │ │ │ + <matplotlib.lines.Line2D at 0x7f78184312e0>]
    │ │ │  
    │ │ │
    │ │ │ _images/plotting_example_2d_hue_xy.png │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/quick-overview.html │ │ │ @@ -496,15 +496,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │

    Plotting

    │ │ │

    Visualizing your datasets is quick and convenient:

    │ │ │
    In [37]: data.plot()
    │ │ │ -Out[37]: <matplotlib.collections.QuadMesh at 0x7f704fdeffd0>
    │ │ │ +Out[37]: <matplotlib.collections.QuadMesh at 0x7f781830ff70>
    │ │ │  
    │ │ │
    │ │ │ _images/plotting_quick_overview.png │ │ │

    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.

    │ │ │
    │ │ │
    │ │ │

    pandas

    │ │ ├── ./usr/share/doc/python-xarray-doc/html/searchindex.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -151,71 +151,71 @@ │ │ │ │ "0alpha10": 36, │ │ │ │ "0c0dc80c25a9": 6, │ │ │ │ "0e8985178ccc": 26, │ │ │ │ "0eb806e38f7f": [14, 15], │ │ │ │ "0f41191e8013": 28, │ │ │ │ "0th": [6, 22], │ │ │ │ "0x0l": 36, │ │ │ │ - "0x7f476c91b1c0": 16, │ │ │ │ - "0x7f476cbe45b0": 16, │ │ │ │ - "0x7f5fc503e490": 17, │ │ │ │ - "0x7f704fd9fc40": 36, │ │ │ │ - "0x7f704fdeffd0": 29, │ │ │ │ - "0x7f704fe99100": 28, │ │ │ │ - "0x7f704fe99220": 28, │ │ │ │ - "0x7f704fe99280": 28, │ │ │ │ - "0x7f704fe993d0": 28, │ │ │ │ - "0x7f704fe99490": 28, │ │ │ │ - "0x7f704fef87f0": 28, │ │ │ │ - "0x7f704fef8850": 28, │ │ │ │ - "0x7f704fef8910": 28, │ │ │ │ - "0x7f704fef8a90": 28, │ │ │ │ - "0x7f705c225310": 28, │ │ │ │ - "0x7f705c229580": 28, │ │ │ │ - "0x7f705c229910": 28, │ │ │ │ - "0x7f705c272250": 28, │ │ │ │ - "0x7f705c277be0": 28, │ │ │ │ - "0x7f705c3666d0": 28, │ │ │ │ - "0x7f705c3669a0": 28, │ │ │ │ - "0x7f705c37f160": 28, │ │ │ │ - "0x7f705c37fbe0": 28, │ │ │ │ - "0x7f705c56e820": 28, │ │ │ │ - "0x7f705c5e8730": 28, │ │ │ │ - "0x7f705c625250": 28, │ │ │ │ - "0x7f705c692bb0": 28, │ │ │ │ - "0x7f705c692e20": 28, │ │ │ │ - "0x7f705c6a1d00": 28, │ │ │ │ - "0x7f705c6a1ee0": 28, │ │ │ │ - "0x7f705c6d4c40": 28, │ │ │ │ - "0x7f705c6f99d0": 28, │ │ │ │ - "0x7f705c6f9f70": 28, │ │ │ │ - "0x7f705c7f07f0": 28, │ │ │ │ - "0x7f705c99e280": 26, │ │ │ │ - "0x7f705c99e340": 26, │ │ │ │ - "0x7f705c99e8e0": 26, │ │ │ │ - "0x7f705cca5520": 26, │ │ │ │ - "0x7f705cca56a0": 26, │ │ │ │ - "0x7f705cca5dc0": 26, │ │ │ │ - "0x7f705ccf9520": 24, │ │ │ │ - "0x7f705cf0aa30": 28, │ │ │ │ - "0x7f705cf50eb0": 28, │ │ │ │ - "0x7f705cf792e0": 28, │ │ │ │ - "0x7f705cfc7340": 25, │ │ │ │ - "0x7f705cfeda60": 28, │ │ │ │ - "0x7f705d1b7670": 28, │ │ │ │ - "0x7f705d1d8220": 25, │ │ │ │ - "0x7f705d1d8eb0": 25, │ │ │ │ - "0x7f705d1eeb20": 25, │ │ │ │ - "0x7f705d20d730": 28, │ │ │ │ - "0x7f705d6f07c0": 28, │ │ │ │ - "0x7f707159cc40": 7, │ │ │ │ - "0x7f70715ab7c0": 7, │ │ │ │ - "0x7f707160ef40": 26, │ │ │ │ - "0x7f70716e6fa0": 28, │ │ │ │ - "0x7f70719bad60": 28, │ │ │ │ + "0x7f77e346ebe0": 36, │ │ │ │ + "0x7f781830ff70": 29, │ │ │ │ + "0x7f7818415a00": 28, │ │ │ │ + "0x7f7818415a60": 28, │ │ │ │ + "0x7f7818415ac0": 28, │ │ │ │ + "0x7f78184312e0": 28, │ │ │ │ + "0x7f78184314c0": 28, │ │ │ │ + "0x7f78184969a0": 28, │ │ │ │ + "0x7f78184e4ca0": 28, │ │ │ │ + "0x7f78186986a0": 28, │ │ │ │ + "0x7f7818698cd0": 28, │ │ │ │ + "0x7f78186f28b0": 28, │ │ │ │ + "0x7f78186f2a00": 28, │ │ │ │ + "0x7f781877b850": 28, │ │ │ │ + "0x7f78187bb610": 28, │ │ │ │ + "0x7f78187d15e0": 28, │ │ │ │ + "0x7f78187d1eb0": 28, │ │ │ │ + "0x7f7838200ee0": 28, │ │ │ │ + "0x7f7838209c40": 28, │ │ │ │ + "0x7f7838209fd0": 28, │ │ │ │ + "0x7f7838275d90": 28, │ │ │ │ + "0x7f783842abe0": 28, │ │ │ │ + "0x7f7838440400": 28, │ │ │ │ + "0x7f78384405b0": 28, │ │ │ │ + "0x7f78384cea90": 28, │ │ │ │ + "0x7f78384ceee0": 28, │ │ │ │ + "0x7f78384f5280": 28, │ │ │ │ + "0x7f78581b08e0": 24, │ │ │ │ + "0x7f78583b0340": 28, │ │ │ │ + "0x7f785840e9d0": 28, │ │ │ │ + "0x7f78584317f0": 28, │ │ │ │ + "0x7f785844aa00": 28, │ │ │ │ + "0x7f7858586f40": 26, │ │ │ │ + "0x7f7858600760": 28, │ │ │ │ + "0x7f785861c3a0": 25, │ │ │ │ + "0x7f78586c4c70": 28, │ │ │ │ + "0x7f78586da400": 25, │ │ │ │ + "0x7f78587617c0": 25, │ │ │ │ + "0x7f7858761ca0": 25, │ │ │ │ + "0x7f786c187940": 26, │ │ │ │ + "0x7f786c187fa0": 26, │ │ │ │ + "0x7f786c2a3ac0": 28, │ │ │ │ + "0x7f786c2a5640": 26, │ │ │ │ + "0x7f786c3727f0": 28, │ │ │ │ + "0x7f786c397580": 26, │ │ │ │ + "0x7f786fb0e0a0": 7, │ │ │ │ + "0x7f786fb700d0": 28, │ │ │ │ + "0x7f786fb7f400": 28, │ │ │ │ + "0x7f786fb7fdc0": 7, │ │ │ │ + "0x7f786fba5520": 26, │ │ │ │ + "0x7f786fc28640": 28, │ │ │ │ + "0x7f786fc3bd30": 28, │ │ │ │ + "0x7f786ff11d90": 28, │ │ │ │ + "0x7f788431f460": 26, │ │ │ │ + "0x7f87b3263820": 17, │ │ │ │ + "0x7f8dd935c160": 16, │ │ │ │ + "0x7f8dd96245b0": 16, │ │ │ │ "100": [3, 4, 6, 11, 12, 22, 25, 26, 28, 31, 36], │ │ │ │ "1000": [6, 36], │ │ │ │ "100000": 6, │ │ │ │ "1000x1000": 6, │ │ │ │ "1003": 4, │ │ │ │ "101": [4, 22, 28, 36], │ │ │ │ "101985": 26, │ │ │ │ @@ -267,14 +267,15 @@ │ │ │ │ "12310214428849964": [26, 36], │ │ │ │ "1234": 5, │ │ │ │ "124": [26, 28], │ │ │ │ "12428": 35, │ │ │ │ "125": [26, 28], │ │ │ │ "1258": 22, │ │ │ │ "1259": 22, │ │ │ │ + "125cc58608fb": 26, │ │ │ │ "126": [28, 36], │ │ │ │ "1260": 22, │ │ │ │ "1261": 22, │ │ │ │ "1262": 22, │ │ │ │ "1263": 22, │ │ │ │ "12696983303810094": [26, 36], │ │ │ │ "127": [7, 19, 22, 26, 28, 36], │ │ │ │ @@ -398,15 +399,14 @@ │ │ │ │ "1970": [32, 36], │ │ │ │ "199": 29, │ │ │ │ "1991": 36, │ │ │ │ "1999": 4, │ │ │ │ "19t00": 6, │ │ │ │ "1MS": 17, │ │ │ │ "1c96aded89da": 10, │ │ │ │ - "1cf228a7": 26, │ │ │ │ "1d37fb2cd247": 24, │ │ │ │ "1d727aa86050": 28, │ │ │ │ "1e6": 4, │ │ │ │ "1st": 22, │ │ │ │ "200": [4, 28, 31], │ │ │ │ "2000": [4, 7, 17, 18, 22, 25, 26, 27, 34, 35, 36], │ │ │ │ "2001": [11, 17, 26, 35, 36], │ │ │ │ @@ -482,14 +482,15 @@ │ │ │ │ "2554": 19, │ │ │ │ "25828142": 4, │ │ │ │ "259": 25, │ │ │ │ "25t00": 6, │ │ │ │ "260": [16, 22], │ │ │ │ "26047600586578334": [26, 36], │ │ │ │ "2605": [7, 19, 26], │ │ │ │ + "261c": 26, │ │ │ │ "26297658": 4, │ │ │ │ "26410385": 4, │ │ │ │ "2643e81aa1a9": 28, │ │ │ │ "265": 16, │ │ │ │ "26522911": 4, │ │ │ │ "26585059": 4, │ │ │ │ "266": 31, │ │ │ │ @@ -773,15 +774,15 @@ │ │ │ │ "4867138": 4, │ │ │ │ "48671934": 4, │ │ │ │ "48672119": 4, │ │ │ │ "492914": 17, │ │ │ │ "494929": 27, │ │ │ │ "495": 27, │ │ │ │ "497": 22, │ │ │ │ - "4a9d": 26, │ │ │ │ + "4b61": 26, │ │ │ │ "500": [16, 26, 28, 36], │ │ │ │ "501": 29, │ │ │ │ "5011": 3, │ │ │ │ "502": 25, │ │ │ │ "504": 19, │ │ │ │ "506234": 17, │ │ │ │ "508": 25, │ │ │ │ @@ -877,21 +878,19 @@ │ │ │ │ "62b0a60dbc78": 28, │ │ │ │ "635": [25, 29], │ │ │ │ "63593435": 17, │ │ │ │ "636": 17, │ │ │ │ "642": [7, 22], │ │ │ │ "644": 4, │ │ │ │ "646": 27, │ │ │ │ - "647e16a7571016661c6a18efabcf9149temperatur": 6, │ │ │ │ "648000": 6, │ │ │ │ "648627c40eb5": 13, │ │ │ │ "6494": 4, │ │ │ │ "6606": 4, │ │ │ │ "6667": 26, │ │ │ │ - "668a": 26, │ │ │ │ "6709edaff03d": 22, │ │ │ │ "67283594": 17, │ │ │ │ "673690": 29, │ │ │ │ "6737": 29, │ │ │ │ "674": [19, 29], │ │ │ │ "675": 25, │ │ │ │ "68137385": 17, │ │ │ │ @@ -998,15 +997,14 @@ │ │ │ │ "805": 23, │ │ │ │ "80527925": 17, │ │ │ │ "805arrai": 17, │ │ │ │ "805xarrai": 17, │ │ │ │ "8093f205bc0d": 28, │ │ │ │ "813": 16, │ │ │ │ "814": 25, │ │ │ │ - "814a": 26, │ │ │ │ "814e": 6, │ │ │ │ "816": 18, │ │ │ │ "816497": 18, │ │ │ │ "81t": 35, │ │ │ │ "8203883631195572": 26, │ │ │ │ "8204": 22, │ │ │ │ "82258065": 17, │ │ │ │ @@ -1057,14 +1055,15 @@ │ │ │ │ "8755": 34, │ │ │ │ "885": 29, │ │ │ │ "88709677": 17, │ │ │ │ "8871": 17, │ │ │ │ "887251674a5f": 12, │ │ │ │ "888": 25, │ │ │ │ "889425": 17, │ │ │ │ + "88b7": 26, │ │ │ │ "892": 27, │ │ │ │ "893": 25, │ │ │ │ "897": [7, 22], │ │ │ │ "8972": [19, 26], │ │ │ │ "8972365243645735": 26, │ │ │ │ "89bc1504b066": 28, │ │ │ │ "8ff3ba4430a3": 28, │ │ │ │ @@ -1742,18 +1741,19 @@ │ │ │ │ caus: [5, 6, 26, 36], │ │ │ │ caution: [22, 35], │ │ │ │ caveat: 36, │ │ │ │ cb8f083667be: 25, │ │ │ │ cbar_ax: 36, │ │ │ │ cbar_kwarg: [10, 13, 16, 28, 36], │ │ │ │ cbook: [10, 16], │ │ │ │ - cc1458d05c32: 26, │ │ │ │ + cc2bed2f: 26, │ │ │ │ cca90e1ed038: 26, │ │ │ │ ccr: [10, 11, 13, 15, 16, 28], │ │ │ │ cdat: [18, 36], │ │ │ │ + cdbd6343ed17628e81144771d71bc2d3temperatur: 6, │ │ │ │ cdc0b84add6a: 28, │ │ │ │ cdms2: 36, │ │ │ │ ceil: [1, 20, 34, 35, 36], │ │ │ │ cell: [3, 13, 15, 19, 28, 30, 36], │ │ │ │ celsiu: [10, 13, 16, 28, 36], │ │ │ │ celsius_scal: 26, │ │ │ │ center: [4, 15, 19, 24, 28, 36], │ │ │ │ @@ -4899,15 +4899,14 @@ │ │ │ │ satisfi: 8, │ │ │ │ satpi: 30, │ │ │ │ satur: 36, │ │ │ │ saurav: 36, │ │ │ │ save: [5, 6, 24, 26, 34, 36, 37], │ │ │ │ save_mfdataset: [29, 36], │ │ │ │ saved_on_disk: 26, │ │ │ │ - sbuild: [10, 11, 12, 13, 14, 15, 16, 22, 24, 25, 28], │ │ │ │ scalar: [4, 5, 7, 15, 22, 26, 27, 29, 33, 36], │ │ │ │ scale: [10, 16, 27, 28, 30, 36], │ │ │ │ scale_factor: [26, 36], │ │ │ │ scale_from_ext: [10, 16], │ │ │ │ scaler: [10, 16], │ │ │ │ scanpydoc: 23, │ │ │ │ scatter: [28, 36], │ │ ├── ./usr/share/doc/python-xarray-doc/html/whats-new.html │ │ │ @@ -4445,15 +4445,15 @@ │ │ │
  • New xray.Dataset.where method for masking xray objects according │ │ │ to some criteria. This works particularly well with multi-dimensional data:

    │ │ │
    In [44]: ds = xray.Dataset(coords={"x": range(100), "y": range(100)})
    │ │ │  
    │ │ │  In [45]: ds["distance"] = np.sqrt(ds.x ** 2 + ds.y ** 2)
    │ │ │  
    │ │ │  In [46]: ds.distance.where(ds.distance < 100).plot()
    │ │ │ -Out[46]: <matplotlib.collections.QuadMesh at 0x7f704fd9fc40>
    │ │ │ +Out[46]: <matplotlib.collections.QuadMesh at 0x7f77e346ebe0>
    │ │ │  
    │ │ │
    │ │ │ _images/where_example.png │ │ │
  • │ │ │
  • Added new methods xray.DataArray.diff and xray.Dataset.diff │ │ │ for finite difference calculations along a given axis.

  • │ │ │
  • New xray.DataArray.to_masked_array convenience method for