--- /srv/reproducible-results/rbuild-debian/r-b-build.58uyUoLJ/b1/python-xarray_0.16.2-2_arm64.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.58uyUoLJ/b2/python-xarray_0.16.2-2_arm64.changes ├── Files │ @@ -1,3 +1,3 @@ │ │ - 6fd40bc6a01c506561aef3434ce9c75f 2044668 doc optional python-xarray-doc_0.16.2-2_all.deb │ + 818430b1efff05836954b02a711b4379 2044792 doc optional python-xarray-doc_0.16.2-2_all.deb │ 9a2456450e2c51d89ccb00d8c4a100d8 486600 python optional python3-xarray_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 2039492 2021-01-02 13:06:33.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 4980 2021-01-02 13:06:33.000000 control.tar.xz │ │ +-rw-r--r-- 0 0 0 2039620 2021-01-02 13:06:33.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -182,50 +182,50 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 57284 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/combining.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 110193 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/computation.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 90070 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/contributing.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 79117 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/dask.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 102950 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) 17225 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) 68084 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) 68085 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) 5090 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) 49514 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) 49515 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) 18700 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) 107469 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) 107470 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) 8091 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) 38212 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) 14552 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) 47846 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) 3166 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) 41913 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) 7648 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) 81220 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) 5306 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) 38213 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) 14555 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) 47847 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) 3168 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) 41914 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) 7649 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) 81221 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) 5305 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) 90739 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) 208634 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) 208631 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) 12844 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/examples.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 33153 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/faq.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9794 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/genindex.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 38989 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/groupby.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 19098 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/howdoi.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 17531 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 183015 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/indexing.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 183016 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/indexing.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 24660 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/installing.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34152 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/internals.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 89977 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/interpolation.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34153 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/internals.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 89978 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/interpolation.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 125247 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) 41507 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/pandas.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 208687 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/plotting.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 208689 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/plotting.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 46141 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) 21186 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) 56597 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/reshaping.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 22480 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/roadmap.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7920 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/search.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 100584 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/searchindex.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 100592 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/searchindex.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 20789 2021-01-02 13:06:33.000000 ./usr/share/doc/python-xarray-doc/html/terminology.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 39824 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) 41691 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) 574383 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) 18651 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 │ │ │ │ @@ -300,15 +300,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-a94180edfd9e3550bf55a27876f45d80temperature, shape=(30, 180, 180), dtype=float64, chunksize=(10, 180, 180), chunktype=numpy.ndarray>
│ │ │ │ +dask.array<open_dataset-277162681b3377c87ddac5999bf33daetemperature, 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 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -114,15 +114,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]: │ │ │ │ │ │ │ │ │ │ -dask.array │ │ │ │ │ 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 │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/data-structures.html │ │ │ │ @@ -892,18 +892,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 0xffff88655e80>]
│ │ │ │ +Out[60]: [<matplotlib.lines.Line2D at 0xffff689d4fa0>]
│ │ │ │  
│ │ │ │  In [61]: (ds.temperature.sel(x=0).pipe(lambda x: 2 * x).mean("y").pipe(plt.plot))
│ │ │ │ -Out[61]: [<matplotlib.lines.Line2D at 0xffff886611c0>]
│ │ │ │ +Out[61]: [<matplotlib.lines.Line2D at 0xffff689df2e0>]
│ │ │ │  
│ │ │ │
│ │ │ │

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 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -619,19 +619,19 @@ │ │ │ │ │ There is also the pipe() method that allows you to use 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]: [] │ │ │ │ │ +Out[60]: [] │ │ │ │ │ │ │ │ │ │ In [61]: (ds.temperature.sel(x=0).pipe(lambda x: 2 * x).mean("y").pipe │ │ │ │ │ (plt.plot)) │ │ │ │ │ -Out[61]: [] │ │ │ │ │ +Out[61]: [] │ │ │ │ │ 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 │ │ │ │ │ of mutating existing objects often results in easier to understand code, so we │ │ │ │ │ encourage using this approach. │ │ │ │ │ **** Renaming variables¶ **** │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html │ │ │ │ @@ -523,15 +523,15 @@ │ │ │ │ /build/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data' │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second-build/.xarray_tutorial_data' │ │ │ │ │ │ │ │ │ │ │ │

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

│ │ │ │
│ │ │ │
[3]:
│ │ │ │  
│ │ │ │
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -84,15 +84,15 @@ │ │ │ │ │ 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: '/nonexistent/first- │ │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second- │ │ │ │ │ build/.xarray_tutorial_data' │ │ │ │ │ Let’s create a simple plot of 2-m air temperature in degrees Celsius: │ │ │ │ │ [3]: │ │ │ │ │ ds = ds - 273.15 │ │ │ │ │ ds.t2m[0].plot(cmap=plt.cm.coolwarm) │ │ │ │ │ --------------------------------------------------------------------------- │ │ │ │ │ NameError Traceback (most recent call last) │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz │ │ │ │ ├── ERA5-GRIB-example.ipynb │ │ │ │ │ ├── Pretty-printed │ │ │ │ │ │┄ Similarity: 0.9998173701298702% │ │ │ │ │ │┄ Differences: {"'cells'": '{4: {\'outputs\': {0: {\'evalue\': "[Errno 2] No such file or directory: ' │ │ │ │ │ │┄ '\'/nonexistent/second-build/.xarray_tutorial_data\'", \'traceback\': {insert: [(5, ' │ │ │ │ │ │┄ '"\\x1b[0;31mFileNotFoundError\\x1b[0m: [Errno 2] No such file or directory: ' │ │ │ │ │ │┄ '\'/nonexistent/second-build/.xarray_tutorial_data\'")], delete: [5]}}}}}'} │ │ │ │ │ │ @@ -34,23 +34,23 @@ │ │ │ │ │ │ { │ │ │ │ │ │ "cell_type": "code", │ │ │ │ │ │ "execution_count": 2, │ │ │ │ │ │ "metadata": {}, │ │ │ │ │ │ "outputs": [ │ │ │ │ │ │ { │ │ │ │ │ │ "ename": "FileNotFoundError", │ │ │ │ │ │ - "evalue": "[Errno 2] No such file or directory: '/nonexistent/first-build/.xarray_tutorial_data'", │ │ │ │ │ │ + "evalue": "[Errno 2] No such file or directory: '/nonexistent/second-build/.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/reproducible-path/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/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data'" │ │ │ │ │ │ + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/nonexistent/second-build/.xarray_tutorial_data'" │ │ │ │ │ │ ] │ │ │ │ │ │ } │ │ │ │ │ │ ], │ │ │ │ │ │ "source": [ │ │ │ │ │ │ "ds = xr.tutorial.load_dataset('era5-2mt-2019-03-uk.grib', engine='cfgrib')" │ │ │ │ │ │ ] │ │ │ │ │ │ }, │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html │ │ │ │ @@ -561,15 +561,15 @@ │ │ │ │ /build/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data' │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second-build/.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,

│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -125,15 +125,15 @@ │ │ │ │ │ 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: '/nonexistent/first- │ │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second- │ │ │ │ │ build/.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 │ │ │ │ │ ├── Pretty-printed │ │ │ │ │ │┄ Similarity: 0.9998774509803922% │ │ │ │ │ │┄ Differences: {"'cells'": '{5: {\'outputs\': {0: {\'evalue\': "[Errno 2] No such file or directory: ' │ │ │ │ │ │┄ '\'/nonexistent/second-build/.xarray_tutorial_data\'", \'traceback\': {insert: [(4, ' │ │ │ │ │ │┄ '"\\x1b[0;31mFileNotFoundError\\x1b[0m: [Errno 2] No such file or directory: ' │ │ │ │ │ │┄ '\'/nonexistent/second-build/.xarray_tutorial_data\'")], delete: [4]}}}}}'} │ │ │ │ │ │ @@ -69,22 +69,22 @@ │ │ │ │ │ │ { │ │ │ │ │ │ "cell_type": "code", │ │ │ │ │ │ "execution_count": 2, │ │ │ │ │ │ "metadata": {}, │ │ │ │ │ │ "outputs": [ │ │ │ │ │ │ { │ │ │ │ │ │ "ename": "FileNotFoundError", │ │ │ │ │ │ - "evalue": "[Errno 2] No such file or directory: '/nonexistent/first-build/.xarray_tutorial_data'", │ │ │ │ │ │ + "evalue": "[Errno 2] No such file or directory: '/nonexistent/second-build/.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/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data'" │ │ │ │ │ │ + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/nonexistent/second-build/.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 │ │ │ │ @@ -555,15 +555,15 @@ │ │ │ │ /build/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data' │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second-build/.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]:
│ │ │ │  
│ │ │ │
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -116,15 +116,15 @@ │ │ │ │ │ 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: '/nonexistent/first- │ │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second- │ │ │ │ │ build/.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]: │ │ │ │ │ newlat = np.linspace(15, 75, 100) │ │ │ │ │ air.interp(lat=newlat) │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz │ │ │ │ ├── apply_ufunc_vectorize_1d.ipynb │ │ │ │ │ ├── Pretty-printed │ │ │ │ │ │┄ Similarity: 0.9999510017421602% │ │ │ │ │ │┄ Differences: {"'cells'": '{2: {\'outputs\': {0: {\'evalue\': "[Errno 2] No such file or directory: ' │ │ │ │ │ │┄ '\'/nonexistent/second-build/.xarray_tutorial_data\'", \'traceback\': {insert: [(5, ' │ │ │ │ │ │┄ '"\\x1b[0;31mFileNotFoundError\\x1b[0m: [Errno 2] No such file or directory: ' │ │ │ │ │ │┄ '\'/nonexistent/second-build/.xarray_tutorial_data\'")], delete: [5]}}}}}'} │ │ │ │ │ │ @@ -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: '/nonexistent/first-build/.xarray_tutorial_data'", │ │ │ │ │ │ + "evalue": "[Errno 2] No such file or directory: '/nonexistent/second-build/.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/reproducible-path/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/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data'" │ │ │ │ │ │ + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/nonexistent/second-build/.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 │ │ │ │ @@ -555,15 +555,15 @@ │ │ │ │ /build/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data' │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second-build/.xarray_tutorial_data' │ │ │ │
│ │ │ │ │ │ │ │

Plot the first timestep:

│ │ │ │
│ │ │ │
[3]:
│ │ │ │  
│ │ │ │
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -113,15 +113,15 @@ │ │ │ │ │ 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: '/nonexistent/first- │ │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second- │ │ │ │ │ build/.xarray_tutorial_data' │ │ │ │ │ Plot the first timestep: │ │ │ │ │ [3]: │ │ │ │ │ projection = ccrs.LambertConformal(central_longitude=-95, central_latitude=45) │ │ │ │ │ │ │ │ │ │ f, ax = plt.subplots(subplot_kw=dict(projection=projection)) │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz │ │ │ │ ├── area_weighted_temperature.ipynb │ │ │ │ │ ├── Pretty-printed │ │ │ │ │ │┄ Similarity: 0.9998565051020408% │ │ │ │ │ │┄ Differences: {"'cells'": '{4: {\'outputs\': {0: {\'evalue\': "[Errno 2] No such file or directory: ' │ │ │ │ │ │┄ '\'/nonexistent/second-build/.xarray_tutorial_data\'", \'traceback\': {insert: [(5, ' │ │ │ │ │ │┄ '"\\x1b[0;31mFileNotFoundError\\x1b[0m: [Errno 2] No such file or directory: ' │ │ │ │ │ │┄ '\'/nonexistent/second-build/.xarray_tutorial_data\'")], delete: [5]}}}}}'} │ │ │ │ │ │ @@ -60,23 +60,23 @@ │ │ │ │ │ │ "end_time": "2020-03-17T14:43:57.831734Z", │ │ │ │ │ │ "start_time": "2020-03-17T14:43:57.651845Z" │ │ │ │ │ │ } │ │ │ │ │ │ }, │ │ │ │ │ │ "outputs": [ │ │ │ │ │ │ { │ │ │ │ │ │ "ename": "FileNotFoundError", │ │ │ │ │ │ - "evalue": "[Errno 2] No such file or directory: '/nonexistent/first-build/.xarray_tutorial_data'", │ │ │ │ │ │ + "evalue": "[Errno 2] No such file or directory: '/nonexistent/second-build/.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[1;32m 2\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;31m# to celsius\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mair\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mair\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0;36m273.15\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ │ "\u001b[0;32m/build/reproducible-path/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/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data'" │ │ │ │ │ │ + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/nonexistent/second-build/.xarray_tutorial_data'" │ │ │ │ │ │ ] │ │ │ │ │ │ } │ │ │ │ │ │ ], │ │ │ │ │ │ "source": [ │ │ │ │ │ │ "ds = xr.tutorial.load_dataset(\"air_temperature\")\n", │ │ │ │ │ │ "\n", │ │ │ │ │ │ "# to celsius\n", │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html │ │ │ │ @@ -528,15 +528,15 @@ │ │ │ │ /build/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data' │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second-build/.xarray_tutorial_data' │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │

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.

│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -85,15 +85,15 @@ │ │ │ │ │ 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: '/nonexistent/first- │ │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second- │ │ │ │ │ build/.xarray_tutorial_data' │ │ │ │ │ ***** 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 │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz │ │ │ │ ├── monthly-means.ipynb │ │ │ │ │ ├── Pretty-printed │ │ │ │ │ │┄ Similarity: 0.999810606060606% │ │ │ │ │ │┄ Differences: {"'cells'": '{3: {\'outputs\': {0: {\'evalue\': "[Errno 2] No such file or directory: ' │ │ │ │ │ │┄ '\'/nonexistent/second-build/.xarray_tutorial_data\'", \'traceback\': {insert: [(4, ' │ │ │ │ │ │┄ '"\\x1b[0;31mFileNotFoundError\\x1b[0m: [Errno 2] No such file or directory: ' │ │ │ │ │ │┄ '\'/nonexistent/second-build/.xarray_tutorial_data\'")], delete: [4]}}}}}'} │ │ │ │ │ │ @@ -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: '/nonexistent/first-build/.xarray_tutorial_data'", │ │ │ │ │ │ + "evalue": "[Errno 2] No such file or directory: '/nonexistent/second-build/.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/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data'" │ │ │ │ │ │ + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/nonexistent/second-build/.xarray_tutorial_data'" │ │ │ │ │ │ ] │ │ │ │ │ │ } │ │ │ │ │ │ ], │ │ │ │ │ │ "source": [ │ │ │ │ │ │ "ds = xr.tutorial.open_dataset('rasm').load()\n", │ │ │ │ │ │ "ds" │ │ │ │ │ │ ] │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html │ │ │ │ @@ -527,15 +527,15 @@ │ │ │ │ /build/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data' │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second-build/.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]:
│ │ │ │  
│ │ │ │
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │ │ 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: '/nonexistent/first- │ │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second- │ │ │ │ │ build/.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]: │ │ │ │ │ print(ds.xc.attrs) │ │ │ │ │ print(ds.yc.attrs) │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz │ │ │ │ ├── multidimensional-coords.ipynb │ │ │ │ │ ├── Pretty-printed │ │ │ │ │ │┄ Similarity: 0.9998697916666667% │ │ │ │ │ │┄ Differences: {"'cells'": '{3: {\'outputs\': {0: {\'evalue\': "[Errno 2] No such file or directory: ' │ │ │ │ │ │┄ '\'/nonexistent/second-build/.xarray_tutorial_data\'", \'traceback\': {insert: [(4, ' │ │ │ │ │ │┄ '"\\x1b[0;31mFileNotFoundError\\x1b[0m: [Errno 2] No such file or directory: ' │ │ │ │ │ │┄ '\'/nonexistent/second-build/.xarray_tutorial_data\'")], delete: [4]}}}}}'} │ │ │ │ │ │ @@ -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: '/nonexistent/first-build/.xarray_tutorial_data'", │ │ │ │ │ │ + "evalue": "[Errno 2] No such file or directory: '/nonexistent/second-build/.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/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data'" │ │ │ │ │ │ + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/nonexistent/second-build/.xarray_tutorial_data'" │ │ │ │ │ │ ] │ │ │ │ │ │ } │ │ │ │ │ │ ], │ │ │ │ │ │ "source": [ │ │ │ │ │ │ "ds = xr.tutorial.open_dataset('rasm').load()\n", │ │ │ │ │ │ "ds" │ │ │ │ │ │ ] │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html │ │ │ │ @@ -533,15 +533,15 @@ │ │ │ │ /build/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data' │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second-build/.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.

│ │ │ │ @@ -770,15 +770,15 @@ │ │ │ │ 200 except KeyError: │ │ │ │ │ │ │ │ /build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py in __getitem__(self, key) │ │ │ │ 52 with self._lock: │ │ │ │ ---> 53 value = self._cache[key] │ │ │ │ 54 self._cache.move_to_end(key) │ │ │ │ │ │ │ │ -KeyError: [<function open at 0xffff721038b0>, ('https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif',), 'r', ()] │ │ │ │ +KeyError: [<function open at 0xffff787868b0>, ('https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif',), 'r', ()] │ │ │ │ │ │ │ │ During handling of the above exception, another exception occurred: │ │ │ │ │ │ │ │ CPLE_HttpResponseError Traceback (most recent call last) │ │ │ │ rasterio/_base.pyx in rasterio._base.DatasetBase.__init__() │ │ │ │ │ │ │ │ rasterio/_shim.pyx in rasterio._shim.open_dataset() │ │ │ │ @@ -889,15 +889,15 @@ │ │ │ │ 200 except KeyError: │ │ │ │ │ │ │ │ /build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py in __getitem__(self, key) │ │ │ │ 52 with self._lock: │ │ │ │ ---> 53 value = self._cache[key] │ │ │ │ 54 self._cache.move_to_end(key) │ │ │ │ │ │ │ │ -KeyError: [<function open at 0xffff721038b0>, ('https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif',), 'r', ()] │ │ │ │ +KeyError: [<function open at 0xffff787868b0>, ('https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif',), 'r', ()] │ │ │ │ │ │ │ │ During handling of the above exception, another exception occurred: │ │ │ │ │ │ │ │ CPLE_OpenFailedError Traceback (most recent call last) │ │ │ │ rasterio/_base.pyx in rasterio._base.DatasetBase.__init__() │ │ │ │ │ │ │ │ rasterio/_shim.pyx in rasterio._shim.open_dataset() │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -89,15 +89,15 @@ │ │ │ │ │ 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: '/nonexistent/first- │ │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second- │ │ │ │ │ build/.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. │ │ │ │ │ [3]: │ │ │ │ │ @@ -255,15 +255,15 @@ │ │ │ │ │ │ │ │ │ │ /build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py in │ │ │ │ │ __getitem__(self, key) │ │ │ │ │ 52 with self._lock: │ │ │ │ │ ---> 53 value = self._cache[key] │ │ │ │ │ 54 self._cache.move_to_end(key) │ │ │ │ │ │ │ │ │ │ -KeyError: [, ('https://github.com/mapbox/ │ │ │ │ │ +KeyError: [, ('https://github.com/mapbox/ │ │ │ │ │ rasterio/raw/master/tests/data/RGB.byte.tif',), 'r', ()] │ │ │ │ │ │ │ │ │ │ During handling of the above exception, another exception occurred: │ │ │ │ │ │ │ │ │ │ CPLE_HttpResponseError Traceback (most recent call last) │ │ │ │ │ rasterio/_base.pyx in rasterio._base.DatasetBase.__init__() │ │ │ │ │ │ │ │ │ │ @@ -374,15 +374,15 @@ │ │ │ │ │ │ │ │ │ │ /build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py in │ │ │ │ │ __getitem__(self, key) │ │ │ │ │ 52 with self._lock: │ │ │ │ │ ---> 53 value = self._cache[key] │ │ │ │ │ 54 self._cache.move_to_end(key) │ │ │ │ │ │ │ │ │ │ -KeyError: [, ('https://github.com/mapbox/ │ │ │ │ │ +KeyError: [, ('https://github.com/mapbox/ │ │ │ │ │ rasterio/raw/master/tests/data/RGB.byte.tif',), 'r', ()] │ │ │ │ │ │ │ │ │ │ During handling of the above exception, another exception occurred: │ │ │ │ │ │ │ │ │ │ CPLE_OpenFailedError Traceback (most recent call last) │ │ │ │ │ rasterio/_base.pyx in rasterio._base.DatasetBase.__init__() │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz │ │ │ │ ├── visualization_gallery.ipynb │ │ │ │ │ ├── Pretty-printed │ │ │ │ │ │┄ Similarity: 0.9998566862824675% │ │ │ │ │ │┄ Differences: {"'cells'": '{3: {\'outputs\': {0: {\'evalue\': "[Errno 2] No such file or directory: ' │ │ │ │ │ │┄ '\'/nonexistent/second-build/.xarray_tutorial_data\'", \'traceback\': {insert: [(5, ' │ │ │ │ │ │┄ '"\\x1b[0;31mFileNotFoundError\\x1b[0m: [Errno 2] No such file or directory: ' │ │ │ │ │ │┄ '\'/nonexistent/second-build/.xarray_tutorial_data\'")], delete: [5]}}}}, 13: ' │ │ │ │ │ │┄ '{\'outputs\': {0: {\'traceback\': {insert: [(4, "\\x1b[0;31mKeyError\\x1b[0m: ' │ │ │ │ │ │┄ '[, ' […] │ │ │ │ │ │ @@ -31,23 +31,23 @@ │ │ │ │ │ │ { │ │ │ │ │ │ "cell_type": "code", │ │ │ │ │ │ "execution_count": 2, │ │ │ │ │ │ "metadata": {}, │ │ │ │ │ │ "outputs": [ │ │ │ │ │ │ { │ │ │ │ │ │ "ename": "FileNotFoundError", │ │ │ │ │ │ - "evalue": "[Errno 2] No such file or directory: '/nonexistent/first-build/.xarray_tutorial_data'", │ │ │ │ │ │ + "evalue": "[Errno 2] No such file or directory: '/nonexistent/second-build/.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/reproducible-path/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/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data'" │ │ │ │ │ │ + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/nonexistent/second-build/.xarray_tutorial_data'" │ │ │ │ │ │ ] │ │ │ │ │ │ } │ │ │ │ │ │ ], │ │ │ │ │ │ "source": [ │ │ │ │ │ │ "ds = xr.tutorial.load_dataset('air_temperature')" │ │ │ │ │ │ ] │ │ │ │ │ │ }, │ │ │ │ │ │ @@ -275,15 +275,15 @@ │ │ │ │ │ │ "evalue": "CURL error: Could not resolve host: github.com", │ │ │ │ │ │ "output_type": "error", │ │ │ │ │ │ "traceback": [ │ │ │ │ │ │ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", │ │ │ │ │ │ "\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)", │ │ │ │ │ │ "\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/backends/file_manager.py\u001b[0m in \u001b[0;36m_acquire_with_cache_info\u001b[0;34m(self, needs_lock)\u001b[0m\n\u001b[1;32m 198\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--> 199\u001b[0;31m \u001b[0mfile\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_key\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 200\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ │ "\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 52\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_lock\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 53\u001b[0;31m \u001b[0mvalue\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mkey\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 54\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmove_to_end\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ │ - "\u001b[0;31mKeyError\u001b[0m: [, ('https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif',), 'r', ()]", │ │ │ │ │ │ + "\u001b[0;31mKeyError\u001b[0m: [, ('https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif',), 'r', ()]", │ │ │ │ │ │ "\nDuring handling of the above exception, another exception occurred:\n", │ │ │ │ │ │ "\u001b[0;31mCPLE_HttpResponseError\u001b[0m Traceback (most recent call last)", │ │ │ │ │ │ "\u001b[0;32mrasterio/_base.pyx\u001b[0m in \u001b[0;36mrasterio._base.DatasetBase.__init__\u001b[0;34m()\u001b[0m\n", │ │ │ │ │ │ "\u001b[0;32mrasterio/_shim.pyx\u001b[0m in \u001b[0;36mrasterio._shim.open_dataset\u001b[0;34m()\u001b[0m\n", │ │ │ │ │ │ "\u001b[0;32mrasterio/_err.pyx\u001b[0m in \u001b[0;36mrasterio._err.exc_wrap_pointer\u001b[0;34m()\u001b[0m\n", │ │ │ │ │ │ "\u001b[0;31mCPLE_HttpResponseError\u001b[0m: CURL error: Could not resolve host: github.com", │ │ │ │ │ │ "\nDuring handling of the above exception, another exception occurred:\n", │ │ │ │ │ │ @@ -338,15 +338,15 @@ │ │ │ │ │ │ "evalue": "'/vsicurl/https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif' does not exist in the file system, and is not recognized as a supported dataset name.", │ │ │ │ │ │ "output_type": "error", │ │ │ │ │ │ "traceback": [ │ │ │ │ │ │ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", │ │ │ │ │ │ "\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)", │ │ │ │ │ │ "\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/backends/file_manager.py\u001b[0m in \u001b[0;36m_acquire_with_cache_info\u001b[0;34m(self, needs_lock)\u001b[0m\n\u001b[1;32m 198\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--> 199\u001b[0;31m \u001b[0mfile\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_key\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 200\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ │ "\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 52\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_lock\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 53\u001b[0;31m \u001b[0mvalue\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mkey\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 54\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmove_to_end\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", │ │ │ │ │ │ - "\u001b[0;31mKeyError\u001b[0m: [, ('https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif',), 'r', ()]", │ │ │ │ │ │ + "\u001b[0;31mKeyError\u001b[0m: [, ('https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif',), 'r', ()]", │ │ │ │ │ │ "\nDuring handling of the above exception, another exception occurred:\n", │ │ │ │ │ │ "\u001b[0;31mCPLE_OpenFailedError\u001b[0m Traceback (most recent call last)", │ │ │ │ │ │ "\u001b[0;32mrasterio/_base.pyx\u001b[0m in \u001b[0;36mrasterio._base.DatasetBase.__init__\u001b[0;34m()\u001b[0m\n", │ │ │ │ │ │ "\u001b[0;32mrasterio/_shim.pyx\u001b[0m in \u001b[0;36mrasterio._shim.open_dataset\u001b[0;34m()\u001b[0m\n", │ │ │ │ │ │ "\u001b[0;32mrasterio/_err.pyx\u001b[0m in \u001b[0;36mrasterio._err.exc_wrap_pointer\u001b[0;34m()\u001b[0m\n", │ │ │ │ │ │ "\u001b[0;31mCPLE_OpenFailedError\u001b[0m: '/vsicurl/https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif' does not exist in the file system, and is not recognized as a supported dataset name.", │ │ │ │ │ │ "\nDuring handling of the above exception, another exception occurred:\n", │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/weather-data.html │ │ │ │ @@ -889,30 +889,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]:
    │ │ │ │ @@ -1112,15 +1112,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    [5]:
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ -<seaborn.axisgrid.PairGrid at 0xffff965173a0>
    │ │ │ │ +<seaborn.axisgrid.PairGrid at 0xffff9745ecd0>
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ ../_images/examples_weather-data_9_1.png │ │ │ │ @@ -1507,26 +1507,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()
    │ │ │ │ @@ -2025,18 +2025,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()
    │ │ │ │ ├── html2text {}
    │ │ │ │ │ @@ -188,15 +188,15 @@
    │ │ │ │ │  [4]:
    │ │ │ │ │  
    │ │ │ │ │  [../_images/examples_weather-data_7_1.png]
    │ │ │ │ │  **** Visualize using seaborn¶ ****
    │ │ │ │ │  [5]:
    │ │ │ │ │  sns.pairplot(df.reset_index(), vars=ds.data_vars)
    │ │ │ │ │  [5]:
    │ │ │ │ │ -
    │ │ │ │ │ +
    │ │ │ │ │  [../_images/examples_weather-data_9_1.png]
    │ │ │ │ │  ***** Probability of freeze by calendar month¶ *****
    │ │ │ │ │  [6]:
    │ │ │ │ │  freeze = (ds["tmin"] <= 0).groupby("time.month").mean("time")
    │ │ │ │ │  freeze
    │ │ │ │ │  [6]:
    │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz
    │ │ │ │ ├── weather-data.ipynb
    │ │ │ │ │ ├── Pretty-printed
    │ │ │ │ │ │┄ Similarity: 0.999984729458033%
    │ │ │ │ │ │┄ Differences: {"'cells'": '{1: {\'outputs\': {0: {\'data\': {\'text/html\': {insert: [(358, "    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 │ │ │ │ @@ -875,15 +875,15 @@ │ │ │ │ /build/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data' │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second-build/.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) │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -563,15 +563,15 @@ │ │ │ │ │ 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: '/nonexistent/first- │ │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second- │ │ │ │ │ build/.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) │ │ │ │ │ in │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/internals.html │ │ │ │ @@ -431,18 +431,18 @@ │ │ │ │ /build/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data' │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second-build/.xarray_tutorial_data' │ │ │ │ │ │ │ │ In [5]: ds.to_zarr("rasm.zarr", mode="w") │ │ │ │ -Out[5]: <xarray.backends.zarr.ZarrStore at 0xffff575fca00> │ │ │ │ +Out[5]: <xarray.backends.zarr.ZarrStore at 0xffff58045520> │ │ │ │ │ │ │ │ In [6]: import zarr │ │ │ │ │ │ │ │ In [7]: zgroup = zarr.open("rasm.zarr") │ │ │ │ │ │ │ │ In [8]: print(zgroup.tree()) │ │ │ │ / │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -225,19 +225,19 @@ │ │ │ │ │ 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: '/nonexistent/first- │ │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second- │ │ │ │ │ build/.xarray_tutorial_data' │ │ │ │ │ │ │ │ │ │ In [5]: ds.to_zarr("rasm.zarr", mode="w") │ │ │ │ │ -Out[5]: │ │ │ │ │ +Out[5]: │ │ │ │ │ │ │ │ │ │ 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 │ │ │ │ @@ -408,24 +408,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 0xffff57588b80>] │ │ │ │ +Out[17]: [<matplotlib.lines.Line2D at 0xffff4077d280>] │ │ │ │ │ │ │ │ In [18]: da.interp(x=np.linspace(0, 1, 100)).plot.line(label="linear (default)") │ │ │ │ -Out[18]: [<matplotlib.lines.Line2D at 0xffff57581550>] │ │ │ │ +Out[18]: [<matplotlib.lines.Line2D at 0xffff40798400>] │ │ │ │ │ │ │ │ In [19]: da.interp(x=np.linspace(0, 1, 100), method="cubic").plot.line(label="cubic") │ │ │ │ -Out[19]: [<matplotlib.lines.Line2D at 0xffff57593400>] │ │ │ │ +Out[19]: [<matplotlib.lines.Line2D at 0xffff407980a0>] │ │ │ │ │ │ │ │ In [20]: plt.legend() │ │ │ │ -Out[20]: <matplotlib.legend.Legend at 0xffff57525fd0> │ │ │ │ +Out[20]: <matplotlib.legend.Legend at 0xffff40782490> │ │ │ │ │ │ │ │ │ │ │ │ _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]: 
    │ │ │ │ @@ -611,15 +611,15 @@
    │ │ │ │  /build/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data'
    │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second-build/.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>
    │ │ │ │ ├── html2text {}
    │ │ │ │ │ @@ -202,26 +202,26 @@
    │ │ │ │ │     ....:     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]: []
    │ │ │ │ │ +Out[17]: []
    │ │ │ │ │  
    │ │ │ │ │  In [18]: da.interp(x=np.linspace(0, 1, 100)).plot.line(label="linear
    │ │ │ │ │  (default)")
    │ │ │ │ │ -Out[18]: []
    │ │ │ │ │ +Out[18]: []
    │ │ │ │ │  
    │ │ │ │ │  In [19]: da.interp(x=np.linspace(0, 1, 100), method="cubic").plot.line
    │ │ │ │ │  (label="cubic")
    │ │ │ │ │ -Out[19]: []
    │ │ │ │ │ +Out[19]: []
    │ │ │ │ │  
    │ │ │ │ │  In [20]: plt.legend()
    │ │ │ │ │ -Out[20]: 
    │ │ │ │ │ +Out[20]: 
    │ │ │ │ │  [_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]:
    │ │ │ │ │  
    │ │ │ │ │  array([ 0.   ,  0.   ,  0.   ,  0.814,  0.604, -0.604, -0.814,  0.   ,  0.   ,
    │ │ │ │ │ @@ -390,15 +390,15 @@
    │ │ │ │ │  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: '/nonexistent/first-
    │ │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second-
    │ │ │ │ │  build/.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)
    │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/io.html
    │ │ │ │ @@ -1059,15 +1059,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 0xffff57542040>
    │ │ │ │ +Out[39]: <xarray.backends.zarr.ZarrStore at 0xffff4074e1c0>
    │ │ │ │  
    │ │ │ │
    │ │ │ │

    (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().

    │ │ │ │ @@ -1113,15 +1113,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 0xffff57542400>
    │ │ │ │ +Out[44]: <xarray.backends.zarr.ZarrStore at 0xffff4074e520>
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Note

    │ │ │ │

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

    │ │ │ │
    │ │ │ │ @@ -1182,28 +1182,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 0xffff57542d60> │ │ │ │ +Out[46]: <xarray.backends.zarr.ZarrStore at 0xffff4074ee80> │ │ │ │ │ │ │ │ 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 0xffff57542ee0> │ │ │ │ +Out[48]: <xarray.backends.zarr.ZarrStore at 0xffff4074efa0> │ │ │ │ │ │ │ │ │ │ │ │

    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 │ │ │ │ @@ -1218,33 +1218,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-03d2aeb5-469e-4639-96ca-4f833ed6b714') │ │ │ │ +Out[53]: Delayed('_finalize_store-aa004604-7456-43e7-a304-cbd78eb3f262') │ │ │ │ │ │ │ │ │ │ │ │

    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 0xffff5752cc40>
    │ │ │ │ +Out[55]: <xarray.backends.zarr.ZarrStore at 0xffff4074eac0>
    │ │ │ │  
    │ │ │ │  In [56]: ds.isel(x=slice(10, 20)).to_zarr(path, region={"x": slice(10, 20)})
    │ │ │ │ -Out[56]: <xarray.backends.zarr.ZarrStore at 0xffff57542ca0>
    │ │ │ │ +Out[56]: <xarray.backends.zarr.ZarrStore at 0xffff4074e700>
    │ │ │ │  
    │ │ │ │  In [57]: ds.isel(x=slice(20, 30)).to_zarr(path, region={"x": slice(20, 30)})
    │ │ │ │ -Out[57]: <xarray.backends.zarr.ZarrStore at 0xffff886f31c0>
    │ │ │ │ +Out[57]: <xarray.backends.zarr.ZarrStore at 0xffff68a71340>
    │ │ │ │  
    │ │ │ │
    │ │ │ │

    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) │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -762,15 +762,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]: │ │ │ │ │ +Out[39]: │ │ │ │ │ (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(). │ │ │ │ │ To store variable length strings, convert them to object arrays first with │ │ │ │ │ dtype=object. │ │ │ │ │ @@ -806,15 +806,15 @@ │ │ │ │ │ zarr. These are described in the zarr_documentation. 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]: │ │ │ │ │ +Out[44]: │ │ │ │ │ Note │ │ │ │ │ Not all native zarr compression and filtering options have been tested with │ │ │ │ │ xarray. │ │ │ │ │ **** Consolidated Metadata¶ **** │ │ │ │ │ Xarray needs to read all of the zarr metadata when it opens a dataset. In some │ │ │ │ │ storage mediums, such as with cloud object storage (e.g. amazon S3), this can │ │ │ │ │ introduce significant overhead, because two separate HTTP calls to the object │ │ │ │ │ @@ -854,28 +854,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]: │ │ │ │ │ +Out[46]: │ │ │ │ │ │ │ │ │ │ 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]: │ │ │ │ │ +Out[48]: │ │ │ │ │ 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 │ │ │ │ │ first creating a Dataset with dummy values stored in dask, and then calling │ │ │ │ │ to_zarr with compute=False to write only metadata (including attrs) to Zarr: │ │ │ │ │ @@ -887,31 +887,31 @@ │ │ │ │ │ │ │ │ │ │ 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-03d2aeb5-469e-4639-96ca-4f833ed6b714') │ │ │ │ │ +Out[53]: Delayed('_finalize_store-aa004604-7456-43e7-a304-cbd78eb3f262') │ │ │ │ │ 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]: │ │ │ │ │ +Out[55]: │ │ │ │ │ │ │ │ │ │ In [56]: ds.isel(x=slice(10, 20)).to_zarr(path, region={"x": slice(10, 20)}) │ │ │ │ │ -Out[56]: │ │ │ │ │ +Out[56]: │ │ │ │ │ │ │ │ │ │ In [57]: ds.isel(x=slice(20, 30)).to_zarr(path, region={"x": slice(20, 30)}) │ │ │ │ │ -Out[57]: │ │ │ │ │ +Out[57]: │ │ │ │ │ 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) need to be │ │ │ │ │ explicitly dropped and/or written in a separate calls to to_zarr with mode='a'. │ │ │ │ │ ***** GRIB format via cfgrib¶ ***** │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/plotting.html │ │ │ │ @@ -326,15 +326,15 @@ │ │ │ │ /build/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data' │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second-build/.xarray_tutorial_data' │ │ │ │ │ │ │ │ In [6]: airtemps │ │ │ │ --------------------------------------------------------------------------- │ │ │ │ NameError Traceback (most recent call last) │ │ │ │ <ipython-input-6-eb57b540ddce> in <module> │ │ │ │ ----> 1 airtemps │ │ │ │ │ │ │ │ @@ -852,15 +852,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 0xffff56f524c0>] │ │ │ │ +Out[51]: [<matplotlib.lines.Line2D at 0xffff40184d00>] │ │ │ │ │ │ │ │ │ │ │ │ _images/plotting_nonuniform_coords.png │ │ │ │ │ │ │ │

    │ │ │ │

    Calling Matplotlib

    │ │ │ │

    Since this is a thin wrapper around matplotlib, all the functionality of │ │ │ │ @@ -1314,56 +1314,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 0xffff570bd760>
    │ │ │ │ +Out[95]: <matplotlib.collections.PathCollection at 0xffff402f9580>
    │ │ │ │  
    │ │ │ │
    │ │ │ │ _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 0xffff6c7d9760>,
    │ │ │ │ - <matplotlib.collections.PathCollection at 0xffff6c7d9f70>,
    │ │ │ │ - <matplotlib.collections.PathCollection at 0xffff6c3df6d0>,
    │ │ │ │ - <matplotlib.collections.PathCollection at 0xffff57521cd0>]
    │ │ │ │ +[<matplotlib.collections.PathCollection at 0xffff682bbe80>,
    │ │ │ │ + <matplotlib.collections.PathCollection at 0xffff688c7100>,
    │ │ │ │ + <matplotlib.collections.PathCollection at 0xffff6acc2df0>,
    │ │ │ │ + <matplotlib.collections.PathCollection at 0xffff6812a580>]
    │ │ │ │  
    │ │ │ │
    │ │ │ │ _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 0xffff6c08c6a0>,
    │ │ │ │ - <matplotlib.collections.PathCollection at 0xffff6c0e0250>,
    │ │ │ │ - <matplotlib.collections.PathCollection at 0xffff6c076b50>,
    │ │ │ │ - <matplotlib.collections.PathCollection at 0xffff6c0b6af0>]
    │ │ │ │ +[<matplotlib.collections.PathCollection at 0xffff68277040>,
    │ │ │ │ + <matplotlib.collections.PathCollection at 0xffff582932b0>,
    │ │ │ │ + <matplotlib.collections.PathCollection at 0xffff5836ff10>,
    │ │ │ │ + <matplotlib.collections.PathCollection at 0xffff690cc430>]
    │ │ │ │  
    │ │ │ │
    │ │ │ │ _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 0xffff56f20520>,
    │ │ │ │ - <matplotlib.collections.PathCollection at 0xffff57555970>,
    │ │ │ │ - <matplotlib.collections.PathCollection at 0xffff56f8dc70>,
    │ │ │ │ - <matplotlib.collections.PathCollection at 0xffff570e7760>]
    │ │ │ │ +[<matplotlib.collections.PathCollection at 0xffff585f61c0>,
    │ │ │ │ + <matplotlib.collections.PathCollection at 0xffff40241640>,
    │ │ │ │ + <matplotlib.collections.PathCollection at 0xffff68d013a0>,
    │ │ │ │ + <matplotlib.collections.PathCollection at 0xffff40241e80>]
    │ │ │ │  
    │ │ │ │
    │ │ │ │ _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 0xffff56f5dd30>
    │ │ │ │ +Out[100]: <xarray.plot.facetgrid.FacetGrid at 0xffff40100160>
    │ │ │ │  
    │ │ │ │
    │ │ │ │ _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

    │ │ │ │ @@ -1380,15 +1380,15 @@ │ │ │ │ /build/reproducible-path/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: '/nonexistent/first-build/.xarray_tutorial_data' │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second-build/.xarray_tutorial_data' │ │ │ │ │ │ │ │ In [103]: p = air.isel(time=0).plot( │ │ │ │ .....: subplot_kws=dict(projection=ccrs.Orthographic(-80, 35), facecolor="gray"), │ │ │ │ .....: transform=ccrs.PlateCarree(), │ │ │ │ .....: ) │ │ │ │ .....: │ │ │ │ --------------------------------------------------------------------------- │ │ │ │ @@ -1472,24 +1472,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 0xffff56cea4f0>]
    │ │ │ │ +Out[112]: [<matplotlib.lines.Line2D at 0xffff2b6d8df0>]
    │ │ │ │  
    │ │ │ │  In [113]: da.plot.line(ax=axes[0, 1])
    │ │ │ │ -Out[113]: [<matplotlib.lines.Line2D at 0xffff6c0ef160>]
    │ │ │ │ +Out[113]: [<matplotlib.lines.Line2D at 0xffff82dc2af0>]
    │ │ │ │  
    │ │ │ │  In [114]: xplt.plot(da, ax=axes[1, 0])
    │ │ │ │ -Out[114]: [<matplotlib.lines.Line2D at 0xffff56cd5e80>]
    │ │ │ │ +Out[114]: [<matplotlib.lines.Line2D at 0xffff2b6d8430>]
    │ │ │ │  
    │ │ │ │  In [115]: xplt.line(da, ax=axes[1, 1])
    │ │ │ │ -Out[115]: [<matplotlib.lines.Line2D at 0xffff56cd5940>]
    │ │ │ │ +Out[115]: [<matplotlib.lines.Line2D at 0xffff2b663dc0>]
    │ │ │ │  
    │ │ │ │  In [116]: plt.tight_layout()
    │ │ │ │  
    │ │ │ │  In [117]: plt.draw()
    │ │ │ │  
    │ │ │ │
    │ │ │ │ _images/plotting_ways_to_use.png │ │ │ │ @@ -1542,15 +1542,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 0xffff56d273a0>
    │ │ │ │ +Out[122]: <matplotlib.collections.QuadMesh at 0xffff2b731700>
    │ │ │ │  
    │ │ │ │
    │ │ │ │ _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 │ │ │ │ @@ -1572,81 +1572,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 0xffffae3e6c70> │ │ │ │ +Out[127]: <matplotlib.collections.QuadMesh at 0xffff82de7610> │ │ │ │ │ │ │ │ │ │ │ │ _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 0xffff6c3a67f0>
    │ │ │ │ +Out[130]: <matplotlib.collections.QuadMesh at 0xffff402ea850>
    │ │ │ │  
    │ │ │ │  In [131]: ax.scatter(lon, lat, transform=ccrs.PlateCarree())
    │ │ │ │ -Out[131]: <matplotlib.collections.PathCollection at 0xffff56c8f5b0>
    │ │ │ │ +Out[131]: <matplotlib.collections.PathCollection at 0xffff82f86130>
    │ │ │ │  
    │ │ │ │  In [132]: ax.coastlines()
    │ │ │ │ -Out[132]: <cartopy.mpl.feature_artist.FeatureArtist at 0xffffae50cf10>
    │ │ │ │ +Out[132]: <cartopy.mpl.feature_artist.FeatureArtist at 0xffff582934f0>
    │ │ │ │  
    │ │ │ │  In [133]: ax.gridlines(draw_labels=True)
    │ │ │ │ -Out[133]: <cartopy.mpl.gridliner.Gridliner at 0xffffae50ca30>
    │ │ │ │ +Out[133]: <cartopy.mpl.gridliner.Gridliner at 0xffff58293af0>
    │ │ │ │  
    │ │ │ │
    │ │ │ │ _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 0xffffae57ea00>
    │ │ │ │ +Out[135]: <matplotlib.collections.QuadMesh at 0xffff82fd67c0>
    │ │ │ │  
    │ │ │ │  In [136]: ax.scatter(lon, lat, transform=ccrs.PlateCarree())
    │ │ │ │ -Out[136]: <matplotlib.collections.PathCollection at 0xffffae57e3d0>
    │ │ │ │ +Out[136]: <matplotlib.collections.PathCollection at 0xffff2b376730>
    │ │ │ │  
    │ │ │ │  In [137]: ax.coastlines()
    │ │ │ │ -Out[137]: <cartopy.mpl.feature_artist.FeatureArtist at 0xffff5695ad60>
    │ │ │ │ +Out[137]: <cartopy.mpl.feature_artist.FeatureArtist at 0xffff2b3ac790>
    │ │ │ │  
    │ │ │ │  In [138]: ax.gridlines(draw_labels=True)
    │ │ │ │ -Out[138]: <cartopy.mpl.gridliner.Gridliner at 0xffff5695ad30>
    │ │ │ │ +Out[138]: <cartopy.mpl.gridliner.Gridliner at 0xffff2b3acc70>
    │ │ │ │  
    │ │ │ │
    │ │ │ │ _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 0xffff57525280>,
    │ │ │ │ - <matplotlib.lines.Line2D at 0xffff56c54dc0>,
    │ │ │ │ - <matplotlib.lines.Line2D at 0xffff56d1a8b0>,
    │ │ │ │ - <matplotlib.lines.Line2D at 0xffff570f30a0>]
    │ │ │ │ +[<matplotlib.lines.Line2D at 0xffff82ef1d90>,
    │ │ │ │ + <matplotlib.lines.Line2D at 0xffff58589b20>,
    │ │ │ │ + <matplotlib.lines.Line2D at 0xffff40067fa0>,
    │ │ │ │ + <matplotlib.lines.Line2D at 0xffff82f865e0>]
    │ │ │ │  
    │ │ │ │  In [141]: da.plot.line(x="lon", hue="x", ax=ax[1])
    │ │ │ │  Out[141]: 
    │ │ │ │ -[<matplotlib.lines.Line2D at 0xffff56882160>,
    │ │ │ │ - <matplotlib.lines.Line2D at 0xffff56882400>,
    │ │ │ │ - <matplotlib.lines.Line2D at 0xffff56882460>,
    │ │ │ │ - <matplotlib.lines.Line2D at 0xffff568825b0>,
    │ │ │ │ - <matplotlib.lines.Line2D at 0xffff56882670>]
    │ │ │ │ +[<matplotlib.lines.Line2D at 0xffff2b292220>,
    │ │ │ │ + <matplotlib.lines.Line2D at 0xffff2b292b80>,
    │ │ │ │ + <matplotlib.lines.Line2D at 0xffff2b292be0>,
    │ │ │ │ + <matplotlib.lines.Line2D at 0xffff2b292d30>,
    │ │ │ │ + <matplotlib.lines.Line2D at 0xffff2b292df0>]
    │ │ │ │  
    │ │ │ │
    │ │ │ │ _images/plotting_example_2d_hue_xy.png │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -121,15 +121,15 @@ │ │ │ │ │ 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: '/nonexistent/first- │ │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second- │ │ │ │ │ build/.xarray_tutorial_data' │ │ │ │ │ │ │ │ │ │ In [6]: airtemps │ │ │ │ │ --------------------------------------------------------------------------- │ │ │ │ │ NameError Traceback (most recent call last) │ │ │ │ │ in │ │ │ │ │ ----> 1 airtemps │ │ │ │ │ @@ -588,15 +588,15 @@ │ │ │ │ │ --> 171 ref_var = variables[ref_name] │ │ │ │ │ 172 │ │ │ │ │ 173 if var_name is None: │ │ │ │ │ │ │ │ │ │ KeyError: 'lat' │ │ │ │ │ │ │ │ │ │ In [51]: b.plot() │ │ │ │ │ -Out[51]: [] │ │ │ │ │ +Out[51]: [] │ │ │ │ │ [_images/plotting_nonuniform_coords.png] │ │ │ │ │ *** Calling Matplotlib¶ *** │ │ │ │ │ Since this is a thin wrapper around matplotlib, all the functionality of │ │ │ │ │ matplotlib is available. │ │ │ │ │ In [52]: air2d.plot(cmap=plt.cm.Blues) │ │ │ │ │ --------------------------------------------------------------------------- │ │ │ │ │ NameError Traceback (most recent call last) │ │ │ │ │ @@ -984,53 +984,53 @@ │ │ │ │ │ * z (z) int64 0 1 2 3 │ │ │ │ │ * w (w) │ │ │ │ │ +Out[95]: │ │ │ │ │ [_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]: │ │ │ │ │ -[, │ │ │ │ │ - , │ │ │ │ │ - , │ │ │ │ │ - ] │ │ │ │ │ +[, │ │ │ │ │ + , │ │ │ │ │ + , │ │ │ │ │ + ] │ │ │ │ │ [_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]: │ │ │ │ │ -[, │ │ │ │ │ - , │ │ │ │ │ - , │ │ │ │ │ - ] │ │ │ │ │ +[, │ │ │ │ │ + , │ │ │ │ │ + , │ │ │ │ │ + ] │ │ │ │ │ [_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]: │ │ │ │ │ -[, │ │ │ │ │ - , │ │ │ │ │ - , │ │ │ │ │ - ] │ │ │ │ │ +[, │ │ │ │ │ + , │ │ │ │ │ + , │ │ │ │ │ + ] │ │ │ │ │ [_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]: │ │ │ │ │ +Out[100]: │ │ │ │ │ [_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¶ ***** │ │ │ │ │ To follow this section you’ll need to have Cartopy installed and working. │ │ │ │ │ This script will plot the air temperature on a map. │ │ │ │ │ @@ -1046,15 +1046,15 @@ │ │ │ │ │ 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: '/nonexistent/first- │ │ │ │ │ +FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/second- │ │ │ │ │ build/.xarray_tutorial_data' │ │ │ │ │ │ │ │ │ │ In [103]: p = air.isel(time=0).plot( │ │ │ │ │ .....: subplot_kws=dict(projection=ccrs.Orthographic(-80, 35), │ │ │ │ │ facecolor="gray"), │ │ │ │ │ .....: transform=ccrs.PlateCarree(), │ │ │ │ │ .....: ) │ │ │ │ │ @@ -1131,24 +1131,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]: [] │ │ │ │ │ +Out[112]: [] │ │ │ │ │ │ │ │ │ │ In [113]: da.plot.line(ax=axes[0, 1]) │ │ │ │ │ -Out[113]: [] │ │ │ │ │ +Out[113]: [] │ │ │ │ │ │ │ │ │ │ In [114]: xplt.plot(da, ax=axes[1, 0]) │ │ │ │ │ -Out[114]: [] │ │ │ │ │ +Out[114]: [] │ │ │ │ │ │ │ │ │ │ In [115]: xplt.line(da, ax=axes[1, 1]) │ │ │ │ │ -Out[115]: [] │ │ │ │ │ +Out[115]: [] │ │ │ │ │ │ │ │ │ │ In [116]: plt.tight_layout() │ │ │ │ │ │ │ │ │ │ In [117]: plt.draw() │ │ │ │ │ [_images/plotting_ways_to_use.png] │ │ │ │ │ Here the output is the same. Since the data is 1 dimensional the line plot was │ │ │ │ │ used. │ │ │ │ │ @@ -1179,15 +1179,15 @@ │ │ │ │ │ [0., 0., 0.]]) │ │ │ │ │ Dimensions without coordinates: y, x │ │ │ │ │ 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]: │ │ │ │ │ +Out[122]: │ │ │ │ │ [_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 coordinates. │ │ │ │ │ **** Multidimensional coordinates¶ **** │ │ │ │ │ See also: Working_with_Multidimensional_Coordinates. │ │ │ │ │ You can plot irregular grids defined by multidimensional coordinates with │ │ │ │ │ @@ -1204,72 +1204,72 @@ │ │ │ │ │ .....: 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]: │ │ │ │ │ +Out[127]: │ │ │ │ │ [_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]: │ │ │ │ │ +Out[130]: │ │ │ │ │ │ │ │ │ │ In [131]: ax.scatter(lon, lat, transform=ccrs.PlateCarree()) │ │ │ │ │ -Out[131]: │ │ │ │ │ +Out[131]: │ │ │ │ │ │ │ │ │ │ In [132]: ax.coastlines() │ │ │ │ │ -Out[132]: │ │ │ │ │ +Out[132]: │ │ │ │ │ │ │ │ │ │ In [133]: ax.gridlines(draw_labels=True) │ │ │ │ │ -Out[133]: │ │ │ │ │ +Out[133]: │ │ │ │ │ [_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]: │ │ │ │ │ +Out[135]: │ │ │ │ │ │ │ │ │ │ In [136]: ax.scatter(lon, lat, transform=ccrs.PlateCarree()) │ │ │ │ │ -Out[136]: │ │ │ │ │ +Out[136]: │ │ │ │ │ │ │ │ │ │ In [137]: ax.coastlines() │ │ │ │ │ -Out[137]: │ │ │ │ │ +Out[137]: │ │ │ │ │ │ │ │ │ │ In [138]: ax.gridlines(draw_labels=True) │ │ │ │ │ -Out[138]: │ │ │ │ │ +Out[138]: │ │ │ │ │ [_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]: │ │ │ │ │ -[, │ │ │ │ │ - , │ │ │ │ │ - , │ │ │ │ │ - ] │ │ │ │ │ +[, │ │ │ │ │ + , │ │ │ │ │ + , │ │ │ │ │ + ] │ │ │ │ │ │ │ │ │ │ In [141]: da.plot.line(x="lon", hue="x", ax=ax[1]) │ │ │ │ │ Out[141]: │ │ │ │ │ -[, │ │ │ │ │ - , │ │ │ │ │ - , │ │ │ │ │ - , │ │ │ │ │ - ] │ │ │ │ │ +[, │ │ │ │ │ + , │ │ │ │ │ + , │ │ │ │ │ + , │ │ │ │ │ + ] │ │ │ │ │ [_images/plotting_example_2d_hue_xy.png] │ │ │ │ │ Next Previous │ │ │ │ │ =============================================================================== │ │ │ │ │ © Copyright 2014-2021, xarray Developers. Last updated on 2021-01-02. │ │ │ │ │ Built with Sphinx using a theme provided by Read_the_Docs. │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/quick-overview.html │ │ │ │ @@ -498,15 +498,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    Plotting

    │ │ │ │

    Visualizing your datasets is quick and convenient:

    │ │ │ │
    In [37]: data.plot()
    │ │ │ │ -Out[37]: <matplotlib.collections.QuadMesh at 0xffff567e1e50>
    │ │ │ │ +Out[37]: <matplotlib.collections.QuadMesh at 0xffff2b1f8610>
    │ │ │ │  
    │ │ │ │
    │ │ │ │ _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

    │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -304,15 +304,15 @@ │ │ │ │ │ [0.787, 0. , 1.199]]) │ │ │ │ │ Coordinates: │ │ │ │ │ * x (x) int64 10 20 │ │ │ │ │ Dimensions without coordinates: y │ │ │ │ │ ***** Plotting¶ ***** │ │ │ │ │ Visualizing your datasets is quick and convenient: │ │ │ │ │ In [37]: data.plot() │ │ │ │ │ -Out[37]: │ │ │ │ │ +Out[37]: │ │ │ │ │ [_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¶ ***** │ │ │ │ │ Xarray objects can be easily converted to and from pandas objects using the │ │ │ │ │ to_series(), to_dataframe() and to_xarray() methods: │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/searchindex.js │ │ │ │ ├── js-beautify {} │ │ │ │ │ @@ -76,15 +76,14 @@ │ │ │ │ │ "03642301": 4, │ │ │ │ │ "037": 17, │ │ │ │ │ "037369": 17, │ │ │ │ │ "03736932": 17, │ │ │ │ │ "0379266750948": 26, │ │ │ │ │ "038": 22, │ │ │ │ │ "039": 29, │ │ │ │ │ - "03d2aeb5": 26, │ │ │ │ │ "03e": 26, │ │ │ │ │ "03t00": [6, 7, 17], │ │ │ │ │ "040347": 17, │ │ │ │ │ "041": 7, │ │ │ │ │ "0417827": 26, │ │ │ │ │ "041782729805": 26, │ │ │ │ │ "0425": 28, │ │ │ │ │ @@ -152,70 +151,70 @@ │ │ │ │ │ "0alpha10": 36, │ │ │ │ │ "0c0dc80c25a9": 6, │ │ │ │ │ "0e8985178ccc": 26, │ │ │ │ │ "0eb806e38f7f": [14, 15], │ │ │ │ │ "0f41191e8013": 28, │ │ │ │ │ "0th": [6, 22], │ │ │ │ │ "0x0l": 36, │ │ │ │ │ - "0xffff5679fc10": 36, │ │ │ │ │ - "0xffff567e1e50": 29, │ │ │ │ │ - "0xffff56882160": 28, │ │ │ │ │ - "0xffff56882400": 28, │ │ │ │ │ - "0xffff56882460": 28, │ │ │ │ │ - "0xffff568825b0": 28, │ │ │ │ │ - "0xffff56882670": 28, │ │ │ │ │ - "0xffff5695ad30": 28, │ │ │ │ │ - "0xffff5695ad60": 28, │ │ │ │ │ - "0xffff56c54dc0": 28, │ │ │ │ │ - "0xffff56c8f5b0": 28, │ │ │ │ │ - "0xffff56cd5940": 28, │ │ │ │ │ - "0xffff56cd5e80": 28, │ │ │ │ │ - "0xffff56cea4f0": 28, │ │ │ │ │ - "0xffff56d1a8b0": 28, │ │ │ │ │ - "0xffff56d273a0": 28, │ │ │ │ │ - "0xffff56f20520": 28, │ │ │ │ │ - "0xffff56f524c0": 28, │ │ │ │ │ - "0xffff56f5dd30": 28, │ │ │ │ │ - "0xffff56f8dc70": 28, │ │ │ │ │ - "0xffff570bd760": 28, │ │ │ │ │ - "0xffff570e7760": 28, │ │ │ │ │ - "0xffff570f30a0": 28, │ │ │ │ │ - "0xffff57521cd0": 28, │ │ │ │ │ - "0xffff57525280": 28, │ │ │ │ │ - "0xffff57525fd0": 25, │ │ │ │ │ - "0xffff5752cc40": 26, │ │ │ │ │ - "0xffff57542040": 26, │ │ │ │ │ - "0xffff57542400": 26, │ │ │ │ │ - "0xffff57542ca0": 26, │ │ │ │ │ - "0xffff57542d60": 26, │ │ │ │ │ - "0xffff57542ee0": 26, │ │ │ │ │ - "0xffff57555970": 28, │ │ │ │ │ - "0xffff57581550": 25, │ │ │ │ │ - "0xffff57588b80": 25, │ │ │ │ │ - "0xffff57593400": 25, │ │ │ │ │ - "0xffff575fca00": 24, │ │ │ │ │ - "0xffff6c076b50": 28, │ │ │ │ │ - "0xffff6c08c6a0": 28, │ │ │ │ │ - "0xffff6c0b6af0": 28, │ │ │ │ │ - "0xffff6c0e0250": 28, │ │ │ │ │ - "0xffff6c0ef160": 28, │ │ │ │ │ - "0xffff6c3a67f0": 28, │ │ │ │ │ - "0xffff6c3df6d0": 28, │ │ │ │ │ - "0xffff6c7d9760": 28, │ │ │ │ │ - "0xffff6c7d9f70": 28, │ │ │ │ │ - "0xffff721038b0": 16, │ │ │ │ │ - "0xffff88655e80": 7, │ │ │ │ │ - "0xffff886611c0": 7, │ │ │ │ │ - "0xffff886f31c0": 26, │ │ │ │ │ - "0xffff965173a0": 17, │ │ │ │ │ - "0xffffae3e6c70": 28, │ │ │ │ │ - "0xffffae50ca30": 28, │ │ │ │ │ - "0xffffae50cf10": 28, │ │ │ │ │ - "0xffffae57e3d0": 28, │ │ │ │ │ - "0xffffae57ea00": 28, │ │ │ │ │ + "0xffff2a3553d0": 36, │ │ │ │ │ + "0xffff2b1f8610": 29, │ │ │ │ │ + "0xffff2b292220": 28, │ │ │ │ │ + "0xffff2b292b80": 28, │ │ │ │ │ + "0xffff2b292be0": 28, │ │ │ │ │ + "0xffff2b292d30": 28, │ │ │ │ │ + "0xffff2b292df0": 28, │ │ │ │ │ + "0xffff2b376730": 28, │ │ │ │ │ + "0xffff2b3ac790": 28, │ │ │ │ │ + "0xffff2b3acc70": 28, │ │ │ │ │ + "0xffff2b663dc0": 28, │ │ │ │ │ + "0xffff2b6d8430": 28, │ │ │ │ │ + "0xffff2b6d8df0": 28, │ │ │ │ │ + "0xffff2b731700": 28, │ │ │ │ │ + "0xffff40067fa0": 28, │ │ │ │ │ + "0xffff40100160": 28, │ │ │ │ │ + "0xffff40184d00": 28, │ │ │ │ │ + "0xffff40241640": 28, │ │ │ │ │ + "0xffff40241e80": 28, │ │ │ │ │ + "0xffff402ea850": 28, │ │ │ │ │ + "0xffff402f9580": 28, │ │ │ │ │ + "0xffff4074e1c0": 26, │ │ │ │ │ + "0xffff4074e520": 26, │ │ │ │ │ + "0xffff4074e700": 26, │ │ │ │ │ + "0xffff4074eac0": 26, │ │ │ │ │ + "0xffff4074ee80": 26, │ │ │ │ │ + "0xffff4074efa0": 26, │ │ │ │ │ + "0xffff4077d280": 25, │ │ │ │ │ + "0xffff40782490": 25, │ │ │ │ │ + "0xffff407980a0": 25, │ │ │ │ │ + "0xffff40798400": 25, │ │ │ │ │ + "0xffff58045520": 24, │ │ │ │ │ + "0xffff582932b0": 28, │ │ │ │ │ + "0xffff582934f0": 28, │ │ │ │ │ + "0xffff58293af0": 28, │ │ │ │ │ + "0xffff5836ff10": 28, │ │ │ │ │ + "0xffff58589b20": 28, │ │ │ │ │ + "0xffff585f61c0": 28, │ │ │ │ │ + "0xffff6812a580": 28, │ │ │ │ │ + "0xffff68277040": 28, │ │ │ │ │ + "0xffff682bbe80": 28, │ │ │ │ │ + "0xffff688c7100": 28, │ │ │ │ │ + "0xffff689d4fa0": 7, │ │ │ │ │ + "0xffff689df2e0": 7, │ │ │ │ │ + "0xffff68a71340": 26, │ │ │ │ │ + "0xffff68d013a0": 28, │ │ │ │ │ + "0xffff690cc430": 28, │ │ │ │ │ + "0xffff6acc2df0": 28, │ │ │ │ │ + "0xffff787868b0": 16, │ │ │ │ │ + "0xffff82dc2af0": 28, │ │ │ │ │ + "0xffff82de7610": 28, │ │ │ │ │ + "0xffff82ef1d90": 28, │ │ │ │ │ + "0xffff82f86130": 28, │ │ │ │ │ + "0xffff82f865e0": 28, │ │ │ │ │ + "0xffff82fd67c0": 28, │ │ │ │ │ + "0xffff9745ecd0": 17, │ │ │ │ │ "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, │ │ │ │ │ @@ -522,14 +521,15 @@ │ │ │ │ │ "2748": 10, │ │ │ │ │ "27483458": 4, │ │ │ │ │ "2749": 10, │ │ │ │ │ "275": [7, 16, 22], │ │ │ │ │ "276": 29, │ │ │ │ │ "2762": 29, │ │ │ │ │ "276232": 29, │ │ │ │ │ + "277162681b3377c87ddac5999bf33daetemperatur": 6, │ │ │ │ │ "2778": 25, │ │ │ │ │ "278": 25, │ │ │ │ │ "2785": 26, │ │ │ │ │ "2786": 26, │ │ │ │ │ "27861203": 4, │ │ │ │ │ "2787": 26, │ │ │ │ │ "2788": 26, │ │ │ │ │ @@ -739,14 +739,15 @@ │ │ │ │ │ "433e5c8b0d13": 25, │ │ │ │ │ "434": 16, │ │ │ │ │ "435": [7, 16], │ │ │ │ │ "436": 16, │ │ │ │ │ "4361268a2eea": 28, │ │ │ │ │ "437": 16, │ │ │ │ │ "438": 27, │ │ │ │ │ + "43e7": 26, │ │ │ │ │ "4432": 3, │ │ │ │ │ "447129": 17, │ │ │ │ │ "44785582": 17, │ │ │ │ │ "447856": 17, │ │ │ │ │ "4479968246859435": [26, 36], │ │ │ │ │ "448": [7, 19, 22, 31, 36], │ │ │ │ │ "451": [7, 22, 36], │ │ │ │ │ @@ -762,22 +763,20 @@ │ │ │ │ │ "459e": 34, │ │ │ │ │ "46010423e": 4, │ │ │ │ │ "461": 27, │ │ │ │ │ "4615": 27, │ │ │ │ │ "46194319": 4, │ │ │ │ │ "462": [7, 22, 29], │ │ │ │ │ "46376911": 17, │ │ │ │ │ - "4639": 26, │ │ │ │ │ "466": 25, │ │ │ │ │ "46830462": 4, │ │ │ │ │ "469": [26, 27, 31], │ │ │ │ │ "4691": [3, 4, 6, 27], │ │ │ │ │ "469112": 27, │ │ │ │ │ "4691123": 3, │ │ │ │ │ - "469e": 26, │ │ │ │ │ "471": 22, │ │ │ │ │ "47145519": 4, │ │ │ │ │ "47146929": 4, │ │ │ │ │ "47179359": 4, │ │ │ │ │ "47195655": 4, │ │ │ │ │ "477": 10, │ │ │ │ │ "478": [10, 29], │ │ │ │ │ @@ -790,15 +789,14 @@ │ │ │ │ │ "4867138": 4, │ │ │ │ │ "48671934": 4, │ │ │ │ │ "48672119": 4, │ │ │ │ │ "492914": 17, │ │ │ │ │ "494929": 27, │ │ │ │ │ "495": 27, │ │ │ │ │ "497": 22, │ │ │ │ │ - "4f833ed6b714": 26, │ │ │ │ │ "500": [16, 26, 28, 36], │ │ │ │ │ "501": 29, │ │ │ │ │ "5011": 3, │ │ │ │ │ "502": 25, │ │ │ │ │ "504": 19, │ │ │ │ │ "506234": 17, │ │ │ │ │ "508": 25, │ │ │ │ │ @@ -959,14 +957,15 @@ │ │ │ │ │ "739": 34, │ │ │ │ │ "740": 34, │ │ │ │ │ "741": 34, │ │ │ │ │ "74165739": 4, │ │ │ │ │ "742": 34, │ │ │ │ │ "743": 34, │ │ │ │ │ "744": 34, │ │ │ │ │ + "7456": 26, │ │ │ │ │ "746": 6, │ │ │ │ │ "74795302": 17, │ │ │ │ │ "753": 29, │ │ │ │ │ "754": [22, 29], │ │ │ │ │ "759": 22, │ │ │ │ │ "7591068": 4, │ │ │ │ │ "7619": 3, │ │ │ │ │ @@ -1115,15 +1114,14 @@ │ │ │ │ │ "963228": 17, │ │ │ │ │ "964": 27, │ │ │ │ │ "964fc47f8cb2": 28, │ │ │ │ │ "9667": [7, 19, 26], │ │ │ │ │ "966717838482003": 26, │ │ │ │ │ "967": [4, 7, 19, 22], │ │ │ │ │ "967409": 17, │ │ │ │ │ - "96ca": 26, │ │ │ │ │ "971999": 6, │ │ │ │ │ "974": 25, │ │ │ │ │ "975426": 17, │ │ │ │ │ "97727788": 4, │ │ │ │ │ "97873798": 4, │ │ │ │ │ "979": 27, │ │ │ │ │ "98033045": 17, │ │ │ │ │ @@ -1285,18 +1283,19 @@ │ │ │ │ │ _synchron: 24, │ │ │ │ │ _unsign: 36, │ │ │ │ │ _update_coord: 28, │ │ │ │ │ _update_title_posit: 10, │ │ │ │ │ _validate_index: 25, │ │ │ │ │ _validate_interp_index: 25, │ │ │ │ │ _variabl: [22, 36], │ │ │ │ │ + a304: 26, │ │ │ │ │ a5788991cda7: 28, │ │ │ │ │ a81e2080b7fb: 28, │ │ │ │ │ a8809283349: 28, │ │ │ │ │ - a94180edfd9e3550bf55a27876f45d80temperatur: 6, │ │ │ │ │ + aa004604: 26, │ │ │ │ │ aaron: 36, │ │ │ │ │ abba: 19, │ │ │ │ │ abbrevi: 29, │ │ │ │ │ abc: [7, 22, 29, 36], │ │ │ │ │ abcd: [3, 26], │ │ │ │ │ abcdefg: 36, │ │ │ │ │ abdennur: 36, │ │ │ │ │ @@ -1767,14 +1766,15 @@ │ │ │ │ │ caught: 36, │ │ │ │ │ caus: [5, 6, 26, 36], │ │ │ │ │ caution: [22, 35], │ │ │ │ │ caveat: 36, │ │ │ │ │ cb8f083667be: 25, │ │ │ │ │ cbar_ax: 36, │ │ │ │ │ cbar_kwarg: [10, 13, 16, 28, 36], │ │ │ │ │ + cbd78eb3f262: 26, │ │ │ │ │ cbook: 10, │ │ │ │ │ cca90e1ed038: 26, │ │ │ │ │ ccr: [10, 11, 13, 15, 16, 28], │ │ │ │ │ cdat: [18, 36], │ │ │ │ │ cdc0b84add6a: 28, │ │ │ │ │ cdms2: 36, │ │ │ │ │ ceil: [1, 20, 34, 35, 36], │ │ │ │ │ @@ -2545,15 +2545,15 @@ │ │ │ │ │ filter_by_attr: 36, │ │ │ │ │ financ: [32, 37], │ │ │ │ │ find: [0, 1, 5, 8, 18, 20, 22, 26, 28, 32, 36], │ │ │ │ │ fine: [5, 26], │ │ │ │ │ finish: [5, 36], │ │ │ │ │ finit: [4, 15, 30, 36], │ │ │ │ │ firm: 18, │ │ │ │ │ - first: [1, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 22, 23, 24, 25, 26, 28, 29, 32, 34, 36], │ │ │ │ │ + first: [1, 3, 4, 5, 6, 7, 12, 13, 14, 16, 17, 22, 23, 24, 25, 26, 28, 29, 32, 34, 36], │ │ │ │ │ fiscal: [21, 32, 36], │ │ │ │ │ fit: [6, 18, 26, 28, 32, 36], │ │ │ │ │ fitzgerald: [18, 36], │ │ │ │ │ five: [28, 36], │ │ │ │ │ fix: [1, 5, 6, 7, 12, 18, 23, 26, 28, 33, 35], │ │ │ │ │ fixtur: 5, │ │ │ │ │ flag: [5, 18, 36], │ │ │ │ │ @@ -4978,15 +4978,15 @@ │ │ │ │ │ seaborn: [23, 27, 28, 36], │ │ │ │ │ seamlessli: 5, │ │ │ │ │ search: [5, 26], │ │ │ │ │ searchsort: 1, │ │ │ │ │ season: [9, 17, 34, 35, 36], │ │ │ │ │ season_mean: 14, │ │ │ │ │ sec: 29, │ │ │ │ │ - second: [3, 5, 7, 12, 16, 22, 24, 26, 27, 29, 34, 35], │ │ │ │ │ + second: [3, 5, 7, 10, 11, 12, 13, 14, 15, 16, 22, 24, 25, 26, 27, 28, 29, 34, 35], │ │ │ │ │ section: [5, 11, 18, 23, 26, 28, 30, 36], │ │ │ │ │ see: [1, 3, 4, 5, 6, 7, 8, 11, 12, 16, 18, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37], │ │ │ │ │ seed: 17, │ │ │ │ │ seem: [11, 12, 28, 36], │ │ │ │ │ seen: [4, 19, 23], │ │ │ │ │ segment: 36, │ │ │ │ │ seguinot: 36, │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/whats-new.html │ │ │ │ @@ -4447,15 +4447,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 0xffff5679fc10>
    │ │ │ │ +Out[46]: <matplotlib.collections.QuadMesh at 0xffff2a3553d0>
    │ │ │ │  
    │ │ │ │
    │ │ │ │ _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 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2957,15 +2957,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]: │ │ │ │ │ + Out[46]: │ │ │ │ │ [_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 returning a │ │ │ │ │ numpy.ma.MaskedArray. │ │ │ │ │ In [47]: da = xray.DataArray(np.random.random_sample(size=(5, 4)))