--- /tmp/python-xarray-0.19.0-66fnpacgl/debian/python-xarray-doc_0.19.0-6_all.deb +++ python-xarray-doc_0.19.0-6_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2021-09-06 11:21:39.000000 debian-binary │ -rw-r--r-- 0 0 0 5848 2021-09-06 11:21:39.000000 control.tar.xz │ --rw-r--r-- 0 0 0 4159044 2021-09-06 11:21:39.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 4158968 2021-09-06 11:21:39.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -212,16 +212,16 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 43053 2021-08-09 11:57:30.000000 ./usr/share/doc/python-xarray-doc/html/_static/thumbnails/visualization_gallery.png │ │ │ -rw-r--r-- 0 root (0) root (0) 24020 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/_static/where_example.png │ │ │ -rw-r--r-- 0 root (0) root (0) 4588 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/api-hidden.html │ │ │ -rw-r--r-- 0 root (0) root (0) 28948 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/api.html │ │ │ -rw-r--r-- 0 root (0) root (0) 78320 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/contributing.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17937 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/ecosystem.html │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/examples/ │ │ │ --rw-r--r-- 0 root (0) root (0) 62611 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5071 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 62604 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5062 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 45090 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html │ │ │ -rw-r--r-- 0 root (0) root (0) 18703 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 101798 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html │ │ │ -rw-r--r-- 0 root (0) root (0) 8107 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 33539 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14569 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 43268 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html │ │ │ @@ -248,21 +248,21 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 48022 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/internals/how-to-add-new-backend.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6285 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/internals/index.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9096 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/internals/variable-objects.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17871 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/internals/zarr-encoding-spec.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15041 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/objects.inv │ │ │ -rw-r--r-- 0 root (0) root (0) 17611 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/roadmap.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4856 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/search.html │ │ │ --rw-r--r-- 0 root (0) root (0) 110589 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/searchindex.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 110582 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/searchindex.js │ │ │ -rw-r--r-- 0 root (0) root (0) 5712 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/team.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6863 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/tutorials-and-videos.html │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/ │ │ │ -rw-r--r-- 0 root (0) root (0) 56793 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/combining.html │ │ │ -rw-r--r-- 0 root (0) root (0) 124471 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/computation.html │ │ │ --rw-r--r-- 0 root (0) root (0) 76121 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/dask.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 76212 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/dask.html │ │ │ -rw-r--r-- 0 root (0) root (0) 99021 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/data-structures.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14547 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/duckarrays.html │ │ │ -rw-r--r-- 0 root (0) root (0) 37249 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/groupby.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6996 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/index.html │ │ │ -rw-r--r-- 0 root (0) root (0) 245524 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/indexing.html │ │ │ -rw-r--r-- 0 root (0) root (0) 88010 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/interpolation.html │ │ │ -rw-r--r-- 0 root (0) root (0) 121676 2021-09-06 11:21:39.000000 ./usr/share/doc/python-xarray-doc/html/user-guide/io.html │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html │ │ │ @@ -600,15 +600,15 @@ │ │ │ /usr/lib/python3.9/os.py in makedirs(name, mode, exist_ok) │ │ │ 223 return │ │ │ 224 try: │ │ │ --> 225 mkdir(name, mode) │ │ │ 226 except OSError: │ │ │ 227 # Cannot rely on checking for EEXIST, since the operating system │ │ │ │ │ │ -PermissionError: [Errno 13] Permission denied: '/sbuild-nonexistent' │ │ │ +PermissionError: [Errno 13] Permission denied: '/nonexistent' │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz
│ │ │ ├── ERA5-GRIB-example.ipynb
│ │ │ │ │   --- /tmp/diffoscope_dhg8508i_/tmpdol5i630GzipContainer/667fcad3-3bf3-46cf-b840-2ced42b493c0
│ │ │ │ ├── +++ /tmp/diffoscope_dhg8508i_/tmpnzp4xcqzGzipContainer/0fcac538-7efc-4bfc-b95a-2ee601f6cf3f
│ │ │ │ │┄ Differences: {'replace': "OrderedDict([('cells', [OrderedDict([('cell_type', 'markdown'), ('metadata', "
│ │ │ │ │┄             "OrderedDict()), ('source', ['# GRIB Data Example '])]), OrderedDict([('cell_type', "
│ │ │ │ │┄             "'markdown'), ('metadata', OrderedDict()), ('source', ['GRIB format is commonly used "
│ │ │ │ │┄             'to disseminate atmospheric model data. With Xarray and the cfgrib engine, GRIB data '
│ │ │ │ │┄             "can easily be analyzed and visualized.'])]), OrderedDict([('cell_type', 'code'), "
│ │ │ │ │┄             "('execution_cou […]
│ │ │ │ │ @@ -108,15 +108,15 @@
│ │ │ │ │                          "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
│ │ │ │ │                          "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m      4\u001b[0m \u001b[0max\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maxes\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprojection\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mccrs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mRobinson\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      5\u001b[0m \u001b[0max\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcoastlines\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresolution\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'10m'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0mplot\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mt2m\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mplot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcmap\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcm\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcoolwarm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtransform\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mccrs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPlateCarree\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcbar_kwargs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m'shrink'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;36m0.6\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      7\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtitle\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'ERA5 - 2m temperature British Isles March 2019'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;31mNameError\u001b[0m: name 'ds' is not defined"
│ │ │ │ │                      ]
│ │ │ │ │                  },
│ │ │ │ │                  {
│ │ │ │ │                      "ename": "PermissionError",
│ │ │ │ │ -                    "evalue": "[Errno 13] Permission denied: '/sbuild-nonexistent'",
│ │ │ │ │ +                    "evalue": "[Errno 13] Permission denied: '/nonexistent'",
│ │ │ │ │                      "output_type": "error",
│ │ │ │ │                      "traceback": [
│ │ │ │ │                          "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
│ │ │ │ │                          "\u001b[0;31mPermissionError\u001b[0m                           Traceback (most recent call last)",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3/dist-packages/IPython/core/formatters.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, obj)\u001b[0m\n\u001b[1;32m    339\u001b[0m                 \u001b[0;32mpass\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    340\u001b[0m             \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 341\u001b[0;31m                 \u001b[0;32mreturn\u001b[0m \u001b[0mprinter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    342\u001b[0m             \u001b[0;31m# Finally look for special method names\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    343\u001b[0m             \u001b[0mmethod\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_real_method\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprint_method\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3/dist-packages/IPython/core/pylabtools.py\u001b[0m in \u001b[0;36m\u001b[0;34m(fig)\u001b[0m\n\u001b[1;32m    246\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    247\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0;34m'png'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mformats\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 248\u001b[0;31m         \u001b[0mpng_formatter\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfor_type\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mFigure\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mlambda\u001b[0m \u001b[0mfig\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mprint_figure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'png'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    249\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0;34m'retina'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mformats\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;34m'png2x'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mformats\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    250\u001b[0m         \u001b[0mpng_formatter\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfor_type\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mFigure\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mlambda\u001b[0m \u001b[0mfig\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mretina_figure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3/dist-packages/IPython/core/pylabtools.py\u001b[0m in \u001b[0;36mprint_figure\u001b[0;34m(fig, fmt, bbox_inches, **kwargs)\u001b[0m\n\u001b[1;32m    130\u001b[0m         \u001b[0mFigureCanvasBase\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfig\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    131\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 132\u001b[0;31m     \u001b[0mfig\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcanvas\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprint_figure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbytes_io\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    133\u001b[0m     \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mbytes_io\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgetvalue\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    134\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mfmt\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m'svg'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │ @@ -141,15 +141,15 @@
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhead\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtail\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexists\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mexist_ok\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mFileExistsError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m             \u001b[0;31m# Defeats race condition when another thread created the path\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │                          "\u001b[0;32m/usr/lib/python3.9/os.py\u001b[0m in \u001b[0;36mmakedirs\u001b[0;34m(name, mode, exist_ok)\u001b[0m\n\u001b[1;32m    223\u001b[0m             \u001b[0;32mreturn\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    224\u001b[0m     \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 225\u001b[0;31m         \u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmode\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    226\u001b[0m     \u001b[0;32mexcept\u001b[0m \u001b[0mOSError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    227\u001b[0m         \u001b[0;31m# Cannot rely on checking for EEXIST, since the operating system\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
│ │ │ │ │ -                        "\u001b[0;31mPermissionError\u001b[0m: [Errno 13] Permission denied: '/sbuild-nonexistent'"
│ │ │ │ │ +                        "\u001b[0;31mPermissionError\u001b[0m: [Errno 13] Permission denied: '/nonexistent'"
│ │ │ │ │                      ]
│ │ │ │ │                  },
│ │ │ │ │                  {
│ │ │ │ │                      "data": {
│ │ │ │ │                          "text/plain": [
│ │ │ │ │                              "
" │ │ │ │ │ ] │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/weather-data.html │ │ │ @@ -680,30 +680,30 @@ │ │ │
<xarray.Dataset>
│ │ │  Dimensions:   (time: 731, location: 3)
│ │ │  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]:
    │ │ │ @@ -904,15 +904,15 @@
    │ │ │  
    │ │ │
    │ │ │
    [5]:
    │ │ │  
    │ │ │
    │ │ │
    │ │ │
    │ │ │ -<seaborn.axisgrid.PairGrid at 0x7f43de792070>
    │ │ │ +<seaborn.axisgrid.PairGrid at 0x771c1376ad90>
    │ │ │  
    │ │ │
    │ │ │
    │ │ │
    │ │ │
    │ │ │
    │ │ │ ../_images/examples_weather-data_9_1.png │ │ │ @@ -1299,26 +1299,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()
    │ │ │ @@ -1817,18 +1817,18 @@
    │ │ │  Dimensions:       (time: 731, location: 3)
    │ │ │  Coordinates:
    │ │ │    * time          (time) datetime64[ns] 2000-01-01 2000-01-02 ... 2001-12-31
    │ │ │    * location      (location) object 'IA' 'IN' 'IL'
    │ │ │      month         (time) int64 1 1 1 1 1 1 1 1 1 ... 12 12 12 12 12 12 12 12 12
    │ │ │  Data variables:
    │ │ │      some_missing  (time, location) float64 nan nan nan ... 2.063 -1.346 -4.544
    │ │ │ -    filled        (time, location) float64 -5.163 -4.216 ... -1.346 -4.544
  • │ │ │ │ │ │
    │ │ │
    [12]:
    │ │ │  
    │ │ │
    │ │ │
    │ │ │  df = both.sel(time="2000").mean("location").reset_coords(drop=True).to_dataframe()
    │ │ ├── ./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz
    │ │ │ ├── weather-data.ipynb
    │ │ │ │ │   --- /tmp/diffoscope_dhg8508i_/tmplu_ic59hGzipContainer/48f3f458-6e98-4eb8-8c26-b5b9e5a3f13a
    │ │ │ │ ├── +++ /tmp/diffoscope_dhg8508i_/tmpij_k34jkGzipContainer/9b9df215-4929-47d7-a013-ddc8721b1840
    │ │ │ │ │┄ Differences: {'replace': "OrderedDict([('cells', [OrderedDict([('cell_type', 'markdown'), ('metadata', "
    │ │ │ │ │┄             "OrderedDict()), ('source', ['# Toy weather data\\n', '\\n', 'Here is an example of "
    │ │ │ │ │┄             "how to easily manipulate a toy weather dataset using\\n', 'xarray and other "
    │ │ │ │ │┄             "recommended Python libraries:'])]), OrderedDict([('cell_type', 'code'), "
    │ │ │ │ │┄             "('execution_count', 1), ('metadata', OrderedDict([('ExecuteTime', "
    │ │ │ │ │┄             "OrderedDict([('end_time', '2020-01-27T15:43:36.127 […]
    │ │ │ │ │ @@ -377,30 +377,30 @@
    │ │ │ │ │                              "
    <xarray.Dataset>\n",
    │ │ │ │ │                              "Dimensions:   (time: 731, location: 3)\n",
    │ │ │ │ │                              "Coordinates:\n",
    │ │ │ │ │                              "  * time      (time) datetime64[ns] 2000-01-01 2000-01-02 ... 2001-12-31\n",
    │ │ │ │ │                              "  * location  (location) <U2 'IA' 'IN' 'IL'\n",
    │ │ │ │ │                              "Data variables:\n",
    │ │ │ │ │                              "    tmin      (time, location) float64 -8.037 -1.788 -3.932 ... -1.346 -4.544\n",
    │ │ │ │ │ -                            "    tmax      (time, location) float64 12.98 3.31 6.779 ... 6.636 3.343 3.805
  • " │ │ │ │ │ ], │ │ │ │ │ "text/plain": [ │ │ │ │ │ "\n", │ │ │ │ │ "Dimensions: (time: 731, location: 3)\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" │ │ │ │ │ }, │ │ │ │ │ { │ │ │ │ │ @@ -1122,26 +1122,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", │ │ │ │ │ @@ -1761,18 +1761,18 @@ │ │ │ │ │ "Dimensions: (time: 731, location: 3)\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: (time: 731, location: 3)\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/getting-started-guide/quick-overview.html │ │ │ @@ -302,15 +302,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │

    Plotting

    │ │ │

    Visualizing your datasets is quick and convenient:

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

    Note the automatic labeling with names and units. Our effort in adding metadata attributes has paid off! Many aspects of these figures are customizable: see Plotting.

    │ │ │
    │ │ │
    │ │ │

    pandas

    │ │ ├── ./usr/share/doc/python-xarray-doc/html/internals/zarr-encoding-spec.html │ │ │ @@ -109,20 +109,20 @@ │ │ │ --> 116 raise ImportError( │ │ │ 117 "tutorial.open_dataset depends on pooch to download and manage datasets." │ │ │ 118 " To proceed please install pooch." │ │ │ │ │ │ ImportError: tutorial.open_dataset depends on pooch to download and manage datasets. To proceed please install pooch. │ │ │ │ │ │ In [5]: ds.to_zarr("rasm.zarr", mode="w") │ │ │ -Out[5]: <xarray.backends.zarr.ZarrStore at 0x7fc3bda59ba0> │ │ │ +Out[5]: <xarray.backends.zarr.ZarrStore at 0x701c54fd9cf0> │ │ │ │ │ │ In [6]: zgroup = zarr.open("rasm.zarr") │ │ │ │ │ │ In [7]: print(os.listdir("rasm.zarr")) │ │ │ -['.zmetadata', 'longitude', 'latitude', '.zattrs', '.zgroup'] │ │ │ +['.zgroup', '.zattrs', 'latitude', 'longitude', '.zmetadata'] │ │ │ │ │ │ In [8]: print(zgroup.tree()) │ │ │ / │ │ │ ├── latitude (50,) float64 │ │ │ └── longitude (50,) float64 │ │ │ │ │ │ In [9]: dict(zgroup["Tair"].attrs) │ │ ├── ./usr/share/doc/python-xarray-doc/html/searchindex.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -149,73 +149,73 @@ │ │ │ │ "0alpha10": 46, │ │ │ │ "0c0dc80c25a9": 32, │ │ │ │ "0e8985178ccc": 39, │ │ │ │ "0eb806e38f7f": [9, 10], │ │ │ │ "0f41191e8013": 41, │ │ │ │ "0th": [32, 37], │ │ │ │ "0x0l": 46, │ │ │ │ - "0x7f43de792070": 12, │ │ │ │ - "0x7fc396f487c0": 46, │ │ │ │ - "0x7fc396f5d340": 41, │ │ │ │ - "0x7fc396f5d3d0": 41, │ │ │ │ - "0x7fc396f5d460": 41, │ │ │ │ - "0x7fc396f5d5e0": 41, │ │ │ │ - "0x7fc396f6a1c0": 41, │ │ │ │ - "0x7fc396f71370": 41, │ │ │ │ - "0x7fc396f71430": 41, │ │ │ │ - "0x7fc396f71a00": 41, │ │ │ │ - "0x7fc396f71ee0": 41, │ │ │ │ - "0x7fc396fc5670": 41, │ │ │ │ - "0x7fc3970126a0": 41, │ │ │ │ - "0x7fc39707e340": 41, │ │ │ │ - "0x7fc39727ee80": 41, │ │ │ │ - "0x7fc3972ab520": 41, │ │ │ │ - "0x7fc3972ab5e0": 41, │ │ │ │ - "0x7fc3972b3580": 41, │ │ │ │ - "0x7fc3972c03d0": 41, │ │ │ │ - "0x7fc397327eb0": 41, │ │ │ │ - "0x7fc3973a75e0": 41, │ │ │ │ - "0x7fc3973e8b80": 41, │ │ │ │ - "0x7fc3974500d0": 41, │ │ │ │ - "0x7fc39757b760": 41, │ │ │ │ - "0x7fc3a4628820": 41, │ │ │ │ - "0x7fc3a47c74f0": 41, │ │ │ │ - "0x7fc3a49c1610": 41, │ │ │ │ - "0x7fc3a4ab2940": 41, │ │ │ │ - "0x7fc3a4b125e0": 41, │ │ │ │ - "0x7fc3a4b12d00": 41, │ │ │ │ - "0x7fc3a4b12d60": 41, │ │ │ │ - "0x7fc3a4b12e50": 41, │ │ │ │ - "0x7fc3a4b20880": 41, │ │ │ │ - "0x7fc3a4b61bb0": 41, │ │ │ │ - "0x7fc3a4b61d00": 41, │ │ │ │ - "0x7fc3a4b75910": 41, │ │ │ │ - "0x7fc3a4b75e50": 41, │ │ │ │ - "0x7fc3a4b9b6d0": 41, │ │ │ │ - "0x7fc3a4b9b850": 41, │ │ │ │ - "0x7fc3a4b9bc70": 41, │ │ │ │ - "0x7fc3a4ba8850": 41, │ │ │ │ - "0x7fc3a4d5b910": 41, │ │ │ │ - "0x7fc3a4ee2dd0": 39, │ │ │ │ - "0x7fc3a4ee2e40": 39, │ │ │ │ - "0x7fc3a4f3c4a0": 39, │ │ │ │ - "0x7fc3a4f5b820": 39, │ │ │ │ - "0x7fc3a4f5be40": 39, │ │ │ │ - "0x7fc3a4ff4880": 41, │ │ │ │ - "0x7fc3a4fff640": 41, │ │ │ │ - "0x7fc3a50a83c0": 39, │ │ │ │ - "0x7fc3a5126460": 38, │ │ │ │ - "0x7fc3a517d610": 38, │ │ │ │ - "0x7fc3a5197d60": 38, │ │ │ │ - "0x7fc3a571cb30": 39, │ │ │ │ - "0x7fc3a5721730": 33, │ │ │ │ - "0x7fc3a57256a0": 33, │ │ │ │ - "0x7fc3bd29ddf0": 17, │ │ │ │ - "0x7fc3bda59ba0": 26, │ │ │ │ - "0x7fc3bdb406a0": 38, │ │ │ │ + "0x701c347b20a0": 46, │ │ │ │ + "0x701c35401340": 41, │ │ │ │ + "0x701c35401400": 41, │ │ │ │ + "0x701c3545ec10": 41, │ │ │ │ + "0x701c3545eca0": 41, │ │ │ │ + "0x701c3545ed30": 41, │ │ │ │ + "0x701c3545eeb0": 41, │ │ │ │ + "0x701c35476640": 41, │ │ │ │ + "0x701c354c3f40": 41, │ │ │ │ + "0x701c354c6970": 41, │ │ │ │ + "0x701c354c69a0": 41, │ │ │ │ + "0x701c356d29d0": 41, │ │ │ │ + "0x701c356d2f10": 41, │ │ │ │ + "0x701c3570c9a0": 41, │ │ │ │ + "0x701c35763b20": 41, │ │ │ │ + "0x701c35785310": 41, │ │ │ │ + "0x701c35785a30": 41, │ │ │ │ + "0x701c3579dee0": 41, │ │ │ │ + "0x701c358b5520": 41, │ │ │ │ + "0x701c358b5c70": 41, │ │ │ │ + "0x701c358df640": 41, │ │ │ │ + "0x701c36aa1220": 41, │ │ │ │ + "0x701c36b158b0": 41, │ │ │ │ + "0x701c36cd5b20": 41, │ │ │ │ + "0x701c36fa4040": 41, │ │ │ │ + "0x701c36ff09a0": 41, │ │ │ │ + "0x701c36ff0ca0": 41, │ │ │ │ + "0x701c36ff0df0": 41, │ │ │ │ + "0x701c36ff0e20": 41, │ │ │ │ + "0x701c370580d0": 41, │ │ │ │ + "0x701c37058250": 41, │ │ │ │ + "0x701c370584c0": 41, │ │ │ │ + "0x701c37058970": 41, │ │ │ │ + "0x701c37058a90": 41, │ │ │ │ + "0x701c37058b20": 41, │ │ │ │ + "0x701c3707d850": 41, │ │ │ │ + "0x701c3708acd0": 41, │ │ │ │ + "0x701c371c2910": 41, │ │ │ │ + "0x701c371c2f70": 41, │ │ │ │ + "0x701c37219a90": 41, │ │ │ │ + "0x701c373c0120": 39, │ │ │ │ + "0x701c373cc0b0": 39, │ │ │ │ + "0x701c3741d430": 39, │ │ │ │ + "0x701c3741d5f0": 39, │ │ │ │ + "0x701c37432970": 39, │ │ │ │ + "0x701c3747e580": 41, │ │ │ │ + "0x701c3758a510": 39, │ │ │ │ + "0x701c37603670": 38, │ │ │ │ + "0x701c37603d30": 38, │ │ │ │ + "0x701c3c0ff640": 41, │ │ │ │ + "0x701c3c41aa30": 33, │ │ │ │ + "0x701c3c420c80": 39, │ │ │ │ + "0x701c3c42c670": 33, │ │ │ │ + "0x701c3fce0820": 17, │ │ │ │ + "0x701c54fd9cf0": 26, │ │ │ │ + "0x701c54fe1850": 38, │ │ │ │ + "0x701c54ffc370": 41, │ │ │ │ + "0x701c626783d0": 38, │ │ │ │ + "0x771c1376ad90": 12, │ │ │ │ "100": [6, 7, 23, 30, 31, 32, 37, 38, 39, 41, 42, 46], │ │ │ │ "1000": [23, 32, 46], │ │ │ │ "10000": 31, │ │ │ │ "100000": 32, │ │ │ │ "1000x1000": 32, │ │ │ │ "1003": 31, │ │ │ │ "101": [31, 37, 41, 46], │ │ │ │ @@ -413,19 +413,19 @@ │ │ │ │ "194": 11, │ │ │ │ "195": 11, │ │ │ │ "1970": [23, 27, 46], │ │ │ │ "1991": 46, │ │ │ │ "1999": 31, │ │ │ │ "19t00": 32, │ │ │ │ "1MS": 12, │ │ │ │ + "1c338037": 39, │ │ │ │ "1c96aded89da": 5, │ │ │ │ "1d37fb2cd247": 26, │ │ │ │ "1d727aa86050": 41, │ │ │ │ "1e6": 31, │ │ │ │ - "1f992a72462bbf01f0a4af7f5d4cdadetemperatur": 32, │ │ │ │ "1st": 37, │ │ │ │ "200": [31, 37, 41, 42], │ │ │ │ "2000": [12, 14, 23, 31, 33, 37, 38, 39, 40, 44, 45, 46], │ │ │ │ "2001": [6, 12, 39, 45, 46], │ │ │ │ "201": [5, 37], │ │ │ │ "2014": [18, 20, 33], │ │ │ │ "2015": [29, 32], │ │ │ │ @@ -731,15 +731,14 @@ │ │ │ │ "3963": 31, │ │ │ │ "3989": 31, │ │ │ │ "3abb1c6d1b71": 41, │ │ │ │ "3bfc08fe27f1": 9, │ │ │ │ "3coordin": 12, │ │ │ │ "3d453eb07989": 11, │ │ │ │ "3d6c6379dd80": 41, │ │ │ │ - "3f2ef7872d55": 39, │ │ │ │ "3fb59b6d9b77": 11, │ │ │ │ "3rd": 16, │ │ │ │ "400": [41, 42], │ │ │ │ "40015721": 31, │ │ │ │ "4007ab11e232": 37, │ │ │ │ "401": 37, │ │ │ │ "40324704": 31, │ │ │ │ @@ -780,15 +779,14 @@ │ │ │ │ "435": 33, │ │ │ │ "4361268a2eea": 41, │ │ │ │ "438": 40, │ │ │ │ "44785582": 12, │ │ │ │ "447856": 12, │ │ │ │ "4479968246859435": [39, 46], │ │ │ │ "448": [33, 35, 37, 42, 46], │ │ │ │ - "4484": 39, │ │ │ │ "449": 31, │ │ │ │ "451": [33, 37, 46], │ │ │ │ "45137647047539964": [39, 46], │ │ │ │ "4514": 35, │ │ │ │ "452": 45, │ │ │ │ "45209466": 17, │ │ │ │ "452ca4959e9": 8, │ │ │ │ @@ -826,14 +824,15 @@ │ │ │ │ "4875": 31, │ │ │ │ "4909415": 17, │ │ │ │ "494929": 40, │ │ │ │ "49492927": 17, │ │ │ │ "49497537": 17, │ │ │ │ "495": 40, │ │ │ │ "497": 37, │ │ │ │ + "4cbd": 39, │ │ │ │ "4e6a2933d208": 37, │ │ │ │ "500": [11, 39, 41, 46], │ │ │ │ "502": 38, │ │ │ │ "504": 35, │ │ │ │ "506234": 12, │ │ │ │ "508": 38, │ │ │ │ "509": [17, 30, 40, 42], │ │ │ │ @@ -899,14 +898,15 @@ │ │ │ │ "576": 37, │ │ │ │ "577": 37, │ │ │ │ "577e": 32, │ │ │ │ "578": 37, │ │ │ │ "58479532": 31, │ │ │ │ "5895cff3b7f0": 41, │ │ │ │ "589e3eedfe36": 38, │ │ │ │ + "58c297e9f6692b8495e98010797a3d77temperatur": 32, │ │ │ │ "5947835894851238": 39, │ │ │ │ "5948": [37, 39], │ │ │ │ "59499": 14, │ │ │ │ "595c3f6366f3": 41, │ │ │ │ "596": 37, │ │ │ │ "59984279": 31, │ │ │ │ "59de69f7967f": 41, │ │ │ │ @@ -978,14 +978,15 @@ │ │ │ │ "728": 44, │ │ │ │ "729": 44, │ │ │ │ "730": 44, │ │ │ │ "73078492": 12, │ │ │ │ "731": [12, 44], │ │ │ │ "731locat": 12, │ │ │ │ "733": 37, │ │ │ │ + "733e": 39, │ │ │ │ "734e": 45, │ │ │ │ "735": [37, 41], │ │ │ │ "736": [41, 44], │ │ │ │ "737": [41, 44], │ │ │ │ "738": [38, 41, 44], │ │ │ │ "739": [41, 44], │ │ │ │ "740": [41, 44], │ │ │ │ @@ -1068,15 +1069,14 @@ │ │ │ │ "833": [39, 40], │ │ │ │ "8333": [38, 39], │ │ │ │ "834": 38, │ │ │ │ "835": [37, 38], │ │ │ │ "836": [37, 38], │ │ │ │ "8362b177be7e": 41, │ │ │ │ "837": [37, 38], │ │ │ │ - "837d": 39, │ │ │ │ "838": 38, │ │ │ │ "839": 37, │ │ │ │ "8402550832613813": 39, │ │ │ │ "8403": 35, │ │ │ │ "84076387": 17, │ │ │ │ "84113658": 17, │ │ │ │ "8415": 46, │ │ │ │ @@ -1099,14 +1099,15 @@ │ │ │ │ "8628": 44, │ │ │ │ "863": 38, │ │ │ │ "86436763": 17, │ │ │ │ "8652": 44, │ │ │ │ "867": 38, │ │ │ │ "86755799": 31, │ │ │ │ "8676": 44, │ │ │ │ + "86b8fea62dba": 39, │ │ │ │ "8700": 44, │ │ │ │ "871": [33, 37], │ │ │ │ "8724": 44, │ │ │ │ "874": 32, │ │ │ │ "8742ef454e3d": 6, │ │ │ │ "8748": 44, │ │ │ │ "875": 39, │ │ │ │ @@ -1632,14 +1633,15 @@ │ │ │ │ axisgrid: 12, │ │ │ │ ayrton: 46, │ │ │ │ azur: 46, │ │ │ │ b0dd519cfb30: 41, │ │ │ │ b0e609ec01c0: 37, │ │ │ │ b193806a3ee8: 41, │ │ │ │ b347cf3a8c47: 41, │ │ │ │ + b479: 39, │ │ │ │ b7284116c837: 10, │ │ │ │ b834aeff258: 41, │ │ │ │ back: [7, 14, 17, 18, 22, 31, 32, 33, 35, 37, 39, 41, 42, 46], │ │ │ │ backend: [1, 5, 16, 25, 26, 27, 32, 37, 39, 46], │ │ │ │ backend_arrai: 23, │ │ │ │ backend_bas: 5, │ │ │ │ backend_kwarg: [23, 39, 46], │ │ │ │ @@ -2595,15 +2597,14 @@ │ │ │ │ extract: [19, 32, 37, 42, 46], │ │ │ │ extractal: 46, │ │ │ │ extrapol: [38, 46], │ │ │ │ extras_requir: 16, │ │ │ │ extrem: [32, 37, 39, 41], │ │ │ │ eye: 21, │ │ │ │ f2ef6402a2c4: 41, │ │ │ │ - f378: 39, │ │ │ │ f4da044a917f: 41, │ │ │ │ f6219653038f: 7, │ │ │ │ f62677abb3ca: 38, │ │ │ │ f6e5aae51f8: 6, │ │ │ │ f75038449fe8: 41, │ │ │ │ f9603d06ba9e: 39, │ │ │ │ fa69ef050591: 37, │ │ │ │ @@ -2637,15 +2638,14 @@ │ │ │ │ fashion: [7, 32, 46], │ │ │ │ fast: [18, 31, 32, 33, 37, 39, 43, 46], │ │ │ │ faster: [7, 14, 26, 31, 32, 35, 39, 41, 46], │ │ │ │ fauchereau: 29, │ │ │ │ fault: 46, │ │ │ │ favor: [14, 40, 46], │ │ │ │ favour: 46, │ │ │ │ - fb38ea2f: 39, │ │ │ │ fd4a50ef6023: 41, │ │ │ │ fe3a6c077cad: 37, │ │ │ │ fe9c0d0f0fd: 6, │ │ │ │ featur: [3, 5, 6, 14, 16, 20, 21, 23, 27, 32, 37, 39, 40, 42, 44, 45], │ │ │ │ feature_artist: [5, 41], │ │ │ │ featureartist: 41, │ │ │ │ feb: 45, │ │ │ │ @@ -5372,15 +5372,14 @@ │ │ │ │ satisfi: 34, │ │ │ │ satpi: 4, │ │ │ │ satur: 46, │ │ │ │ saurav: 46, │ │ │ │ save: [3, 18, 22, 32, 39, 44, 46], │ │ │ │ save_mfdataset: [17, 46], │ │ │ │ saved_on_disk: 39, │ │ │ │ - sbuild: 5, │ │ │ │ scalar: [3, 10, 17, 31, 33, 37, 39, 40, 43, 46], │ │ │ │ scale: [4, 5, 31, 40, 41, 46], │ │ │ │ scale_factor: [23, 39, 46], │ │ │ │ scale_from_ext: 5, │ │ │ │ scaler: 5, │ │ │ │ scanpydoc: 16, │ │ │ │ scatter: 46, │ │ ├── ./usr/share/doc/python-xarray-doc/html/user-guide/dask.html │ │ │ @@ -103,15 +103,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-1f992a72462bbf01f0a4af7f5d4cdadetemperature, shape=(30, 180, 180), dtype=float64, chunksize=(10, 180, 180), chunktype=numpy.ndarray>
    │ │ │ +dask.array<open_dataset-58c297e9f6692b8495e98010797a3d77temperature, 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 │ │ │ @@ -128,15 +128,16 @@ │ │ │ In [6]: delayed_obj = ds.to_netcdf("manipulated-example-data.nc", compute=False) │ │ │ │ │ │ In [7]: with ProgressBar(): │ │ │ ...: results = delayed_obj.compute() │ │ │ ...: │ │ │ │ │ │ [ ] | 0% Completed | 0.0s │ │ │ -[########################################] | 100% Completed | 0.1s │ │ │ +[################################### ] | 87% Completed | 0.8s │ │ │ +[########################################] | 100% Completed | 0.9s │ │ │

    │ │ │ │ │ │
    │ │ │

    Note

    │ │ │

    When using Dask’s distributed scheduler to write NETCDF4 files, │ │ │ it may be necessary to set the environment variable HDF5_USE_FILE_LOCKING=FALSE │ │ │ to avoid competing locks within the HDF5 SWMR file locking scheme. Note that │ │ ├── ./usr/share/doc/python-xarray-doc/html/user-guide/data-structures.html │ │ │ @@ -684,18 +684,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 0x7fc3a5721730>]
    │ │ │ +Out[60]: [<matplotlib.lines.Line2D at 0x701c3c41aa30>]
    │ │ │  
    │ │ │  In [61]: (ds.temperature.sel(x=0).pipe(lambda x: 2 * x).mean("y").pipe(plt.plot))
    │ │ │ -Out[61]: [<matplotlib.lines.Line2D at 0x7fc3a57256a0>]
    │ │ │ +Out[61]: [<matplotlib.lines.Line2D at 0x701c3c42c670>]
    │ │ │  
    │ │ │
    │ │ │

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

    │ │ │

    With xarray, there is no performance penalty for creating new datasets, even if │ │ │ variables are lazily loaded from a file on disk. Creating new objects instead │ │ ├── ./usr/share/doc/python-xarray-doc/html/user-guide/interpolation.html │ │ │ @@ -215,24 +215,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 0x7fc3a5197d60>] │ │ │ +Out[17]: [<matplotlib.lines.Line2D at 0x701c37603670>] │ │ │ │ │ │ In [18]: da.interp(x=np.linspace(0, 1, 100)).plot.line(label="linear (default)") │ │ │ -Out[18]: [<matplotlib.lines.Line2D at 0x7fc3a517d610>] │ │ │ +Out[18]: [<matplotlib.lines.Line2D at 0x701c54fe1850>] │ │ │ │ │ │ In [19]: da.interp(x=np.linspace(0, 1, 100), method="cubic").plot.line(label="cubic") │ │ │ -Out[19]: [<matplotlib.lines.Line2D at 0x7fc3a5126460>] │ │ │ +Out[19]: [<matplotlib.lines.Line2D at 0x701c37603d30>] │ │ │ │ │ │ In [20]: plt.legend() │ │ │ -Out[20]: <matplotlib.legend.Legend at 0x7fc3bdb406a0> │ │ │ +Out[20]: <matplotlib.legend.Legend at 0x701c626783d0> │ │ │

    │ │ │ │ │ │ ../_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]: 
    │ │ ├── ./usr/share/doc/python-xarray-doc/html/user-guide/io.html
    │ │ │ @@ -834,15 +834,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 0x7fc3a4f3c4a0>
    │ │ │ +Out[39]: <xarray.backends.zarr.ZarrStore at 0x701c3741d5f0>
    │ │ │  
    │ │ │
    │ │ │

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

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

    Note

    │ │ │

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

    │ │ │
    │ │ │ @@ -977,28 +977,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 0x7fc3a4f5b820> │ │ │ +Out[46]: <xarray.backends.zarr.ZarrStore at 0x701c37432970> │ │ │ │ │ │ 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 0x7fc3a4f5be40> │ │ │ +Out[48]: <xarray.backends.zarr.ZarrStore at 0x701c373c0120> │ │ │ │ │ │ │ │ │

    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 │ │ │ @@ -1013,33 +1013,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) │ │ │ -Out[53]: Delayed('_finalize_store-fb38ea2f-f378-4484-837d-3f2ef7872d55') │ │ │ +Out[53]: Delayed('_finalize_store-1c338037-733e-4cbd-b479-86b8fea62dba') │ │ │ │ │ │ │ │ │

    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 0x7fc3a4ee2e40>
    │ │ │ +Out[55]: <xarray.backends.zarr.ZarrStore at 0x701c3741d430>
    │ │ │  
    │ │ │  In [56]: ds.isel(x=slice(10, 20)).to_zarr(path, region={"x": slice(10, 20)})
    │ │ │ -Out[56]: <xarray.backends.zarr.ZarrStore at 0x7fc3a4ee2dd0>
    │ │ │ +Out[56]: <xarray.backends.zarr.ZarrStore at 0x701c373cc0b0>
    │ │ │  
    │ │ │  In [57]: ds.isel(x=slice(20, 30)).to_zarr(path, region={"x": slice(20, 30)})
    │ │ │ -Out[57]: <xarray.backends.zarr.ZarrStore at 0x7fc3a571cb30>
    │ │ │ +Out[57]: <xarray.backends.zarr.ZarrStore at 0x701c3c420c80>
    │ │ │  
    │ │ │
    │ │ │

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

    │ │ │

    As a safety check to make it harder to inadvertently override existing values, │ │ │ if you set region then all variables included in a Dataset must have │ │ │ dimensions included in region. Other variables (typically coordinates) │ │ ├── ./usr/share/doc/python-xarray-doc/html/user-guide/plotting.html │ │ │ @@ -631,15 +631,15 @@ │ │ │ --> 173 ref_var = variables[ref_name] │ │ │ 174 │ │ │ 175 if var_name is None: │ │ │ │ │ │ KeyError: 'lat' │ │ │ │ │ │ In [51]: b.plot() │ │ │ -Out[51]: [<matplotlib.lines.Line2D at 0x7fc3a4d5b910>] │ │ │ +Out[51]: [<matplotlib.lines.Line2D at 0x701c371c2f70>] │ │ │ │ │ │ │ │ │ ../_images/plotting_nonuniform_coords.png │ │ │ │ │ │

    │ │ │

    Other types of plot

    │ │ │

    There are several other options for plotting 2D data.

    │ │ │ @@ -1133,88 +1133,88 @@ │ │ │ B (x, y, z, w) float64 0.0 0.0 0.0 0.0 ... 1.369 1.408 1.387 1.417 │ │ │
    │ │ │ │ │ │
    │ │ │

    Scatter

    │ │ │

    Suppose we want to scatter A against B

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

    The hue kwarg lets you vary the color by variable value

    │ │ │
    In [99]: ds.plot.scatter(x="A", y="B", hue="w")
    │ │ │  Out[99]: 
    │ │ │ -[<matplotlib.collections.PathCollection at 0x7fc3a4b61d00>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7fc3a4b61bb0>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7fc3a4b75910>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7fc3a4b75e50>]
    │ │ │ +[<matplotlib.collections.PathCollection at 0x701c370580d0>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x701c37058b20>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x701c37058250>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x701c37058a90>]
    │ │ │  
    │ │ │
    │ │ │ ../_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 [100]: ds = ds.assign(w=[1, 2, 3, 5])
    │ │ │  
    │ │ │  In [101]: ds.plot.scatter(x="A", y="B", hue="w", hue_style="discrete")
    │ │ │  Out[101]: 
    │ │ │ -[<matplotlib.collections.PathCollection at 0x7fc3a4b20880>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7fc3a4b9bc70>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7fc3a4b9b850>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7fc3a4b9b6d0>]
    │ │ │ +[<matplotlib.collections.PathCollection at 0x701c371c2910>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x701c37058970>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x701c3707d850>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x701c370584c0>]
    │ │ │  
    │ │ │
    │ │ │ ../_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 [102]: ds.plot.scatter(x="A", y="B", hue="z", hue_style="discrete", markersize="z")
    │ │ │  Out[102]: 
    │ │ │ -[<matplotlib.collections.PathCollection at 0x7fc3a4b12d00>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7fc3a4b125e0>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7fc3a4b12e50>,
    │ │ │ - <matplotlib.collections.PathCollection at 0x7fc3a4b12d60>]
    │ │ │ +[<matplotlib.collections.PathCollection at 0x701c36ff0e20>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x701c36ff0df0>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x701c36ff0ca0>,
    │ │ │ + <matplotlib.collections.PathCollection at 0x701c36ff09a0>]
    │ │ │  
    │ │ │
    │ │ │ ../_images/ds_hue_size_scatter.png │ │ │

    Faceting is also possible

    │ │ │
    In [103]: ds.plot.scatter(x="A", y="B", col="x", row="z", hue="w", hue_style="discrete")
    │ │ │ -Out[103]: <xarray.plot.facetgrid.FacetGrid at 0x7fc3a4ab2940>
    │ │ │ +Out[103]: <xarray.plot.facetgrid.FacetGrid at 0x701c36fa4040>
    │ │ │  
    │ │ │
    │ │ │ ../_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.

    │ │ │
    │ │ │
    │ │ │

    Quiver

    │ │ │

    Visualizing vector fields is supported with quiver plots:

    │ │ │
    In [104]: ds.isel(w=1, z=1).plot.quiver(x="x", y="y", u="A", v="B")
    │ │ │ -Out[104]: <matplotlib.quiver.Quiver at 0x7fc3a4ff4880>
    │ │ │ +Out[104]: <matplotlib.quiver.Quiver at 0x701c3747e580>
    │ │ │  
    │ │ │
    │ │ │ ../_images/ds_simple_quiver.png │ │ │

    where u and v denote the x and y direction components of the arrow vectors. Again, faceting is also possible:

    │ │ │
    In [105]: ds.plot.quiver(x="x", y="y", u="A", v="B", col="w", row="z", scale=4)
    │ │ │ -Out[105]: <xarray.plot.facetgrid.FacetGrid at 0x7fc3a49c1610>
    │ │ │ +Out[105]: <xarray.plot.facetgrid.FacetGrid at 0x701c36cd5b20>
    │ │ │  
    │ │ │
    │ │ │ ../_images/ds_facet_quiver.png │ │ │

    scale is required for faceted quiver plots. The scale determines the number of data units per arrow length unit, i.e. a smaller scale parameter makes the arrow longer.

    │ │ │
    │ │ │
    │ │ │

    Streamplot

    │ │ │

    Visualizing vector fields is also supported with streamline plots:

    │ │ │
    In [106]: ds.isel(w=1, z=1).plot.streamplot(x="x", y="y", u="A", v="B")
    │ │ │ -Out[106]: <matplotlib.collections.LineCollection at 0x7fc3a4628820>
    │ │ │ +Out[106]: <matplotlib.collections.LineCollection at 0x701c36b158b0>
    │ │ │  
    │ │ │
    │ │ │ ../_images/ds_simple_streamplot.png │ │ │

    where u and v denote the x and y direction components of the vectors tangent to the streamlines. Again, faceting is also possible:

    │ │ │
    In [107]: ds.plot.streamplot(x="x", y="y", u="A", v="B", col="w", row="z")
    │ │ │ -Out[107]: <xarray.plot.facetgrid.FacetGrid at 0x7fc3a4fff640>
    │ │ │ +Out[107]: <xarray.plot.facetgrid.FacetGrid at 0x701c54ffc370>
    │ │ │  
    │ │ │
    │ │ │ ../_images/ds_facet_streamplot.png │ │ │
    │ │ │ │ │ │
    │ │ │

    Maps

    │ │ │ @@ -1333,24 +1333,24 @@ │ │ │
    In [116]: import xarray.plot as xplt
    │ │ │  
    │ │ │  In [117]: da = xr.DataArray(range(5))
    │ │ │  
    │ │ │  In [118]: fig, axes = plt.subplots(ncols=2, nrows=2)
    │ │ │  
    │ │ │  In [119]: da.plot(ax=axes[0, 0])
    │ │ │ -Out[119]: [<matplotlib.lines.Line2D at 0x7fc39757b760>]
    │ │ │ +Out[119]: [<matplotlib.lines.Line2D at 0x701c37219a90>]
    │ │ │  
    │ │ │  In [120]: da.plot.line(ax=axes[0, 1])
    │ │ │ -Out[120]: [<matplotlib.lines.Line2D at 0x7fc3a47c74f0>]
    │ │ │ +Out[120]: [<matplotlib.lines.Line2D at 0x701c3c0ff640>]
    │ │ │  
    │ │ │  In [121]: xplt.plot(da, ax=axes[1, 0])
    │ │ │ -Out[121]: [<matplotlib.lines.Line2D at 0x7fc3973e8b80>]
    │ │ │ +Out[121]: [<matplotlib.lines.Line2D at 0x701c358df640>]
    │ │ │  
    │ │ │  In [122]: xplt.line(da, ax=axes[1, 1])
    │ │ │ -Out[122]: [<matplotlib.lines.Line2D at 0x7fc3974500d0>]
    │ │ │ +Out[122]: [<matplotlib.lines.Line2D at 0x701c36aa1220>]
    │ │ │  
    │ │ │  In [123]: plt.tight_layout()
    │ │ │  
    │ │ │  In [124]: plt.draw()
    │ │ │  
    │ │ │
    │ │ │ ../_images/plotting_ways_to_use.png │ │ │ @@ -1403,15 +1403,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 [129]: a.plot()
    │ │ │ -Out[129]: <matplotlib.collections.QuadMesh at 0x7fc3973a75e0>
    │ │ │ +Out[129]: <matplotlib.collections.QuadMesh at 0x701c358b5c70>
    │ │ │  
    │ │ │
    │ │ │ ../_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 │ │ │ @@ -1433,81 +1433,81 @@ │ │ │ .....: np.arange(20).reshape(4, 5), │ │ │ .....: dims=["y", "x"], │ │ │ .....: coords={"lat": (("y", "x"), lat), "lon": (("y", "x"), lon)}, │ │ │ .....: ) │ │ │ .....: │ │ │ │ │ │ In [134]: da.plot.pcolormesh("lon", "lat") │ │ │ -Out[134]: <matplotlib.collections.QuadMesh at 0x7fc397327eb0> │ │ │ +Out[134]: <matplotlib.collections.QuadMesh at 0x701c358b5520> │ │ │ │ │ │ │ │ │ ../_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 [135]: import cartopy.crs as ccrs
    │ │ │  
    │ │ │  In [136]: ax = plt.subplot(projection=ccrs.PlateCarree())
    │ │ │  
    │ │ │  In [137]: da.plot.pcolormesh("lon", "lat", ax=ax)
    │ │ │ -Out[137]: <cartopy.mpl.geocollection.GeoQuadMesh at 0x7fc3972b3580>
    │ │ │ +Out[137]: <cartopy.mpl.geocollection.GeoQuadMesh at 0x701c35785310>
    │ │ │  
    │ │ │  In [138]: ax.scatter(lon, lat, transform=ccrs.PlateCarree())
    │ │ │ -Out[138]: <matplotlib.collections.PathCollection at 0x7fc39727ee80>
    │ │ │ +Out[138]: <matplotlib.collections.PathCollection at 0x701c3570c9a0>
    │ │ │  
    │ │ │  In [139]: ax.coastlines()
    │ │ │ -Out[139]: <cartopy.mpl.feature_artist.FeatureArtist at 0x7fc3972ab5e0>
    │ │ │ +Out[139]: <cartopy.mpl.feature_artist.FeatureArtist at 0x701c35785a30>
    │ │ │  
    │ │ │  In [140]: ax.gridlines(draw_labels=True)
    │ │ │ -Out[140]: <cartopy.mpl.gridliner.Gridliner at 0x7fc3972ab520>
    │ │ │ +Out[140]: <cartopy.mpl.gridliner.Gridliner at 0x701c3579dee0>
    │ │ │  
    │ │ │
    │ │ │ _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 [141]: ax = plt.subplot(projection=ccrs.PlateCarree())
    │ │ │  
    │ │ │  In [142]: da.plot.pcolormesh("lon", "lat", ax=ax, infer_intervals=True)
    │ │ │ -Out[142]: <cartopy.mpl.geocollection.GeoQuadMesh at 0x7fc3970126a0>
    │ │ │ +Out[142]: <cartopy.mpl.geocollection.GeoQuadMesh at 0x701c35763b20>
    │ │ │  
    │ │ │  In [143]: ax.scatter(lon, lat, transform=ccrs.PlateCarree())
    │ │ │ -Out[143]: <matplotlib.collections.PathCollection at 0x7fc396fc5670>
    │ │ │ +Out[143]: <matplotlib.collections.PathCollection at 0x701c354c3f40>
    │ │ │  
    │ │ │  In [144]: ax.coastlines()
    │ │ │ -Out[144]: <cartopy.mpl.feature_artist.FeatureArtist at 0x7fc39707e340>
    │ │ │ +Out[144]: <cartopy.mpl.feature_artist.FeatureArtist at 0x701c356d2f10>
    │ │ │  
    │ │ │  In [145]: ax.gridlines(draw_labels=True)
    │ │ │ -Out[145]: <cartopy.mpl.gridliner.Gridliner at 0x7fc3972c03d0>
    │ │ │ +Out[145]: <cartopy.mpl.gridliner.Gridliner at 0x701c356d29d0>
    │ │ │  
    │ │ │
    │ │ │ _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 [146]: f, ax = plt.subplots(2, 1)
    │ │ │  
    │ │ │  In [147]: da.plot.line(x="lon", hue="y", ax=ax[0])
    │ │ │  Out[147]: 
    │ │ │ -[<matplotlib.lines.Line2D at 0x7fc396f5d340>,
    │ │ │ - <matplotlib.lines.Line2D at 0x7fc396f5d3d0>,
    │ │ │ - <matplotlib.lines.Line2D at 0x7fc396f5d460>,
    │ │ │ - <matplotlib.lines.Line2D at 0x7fc396f5d5e0>]
    │ │ │ +[<matplotlib.lines.Line2D at 0x701c3545ec10>,
    │ │ │ + <matplotlib.lines.Line2D at 0x701c3545eca0>,
    │ │ │ + <matplotlib.lines.Line2D at 0x701c3545ed30>,
    │ │ │ + <matplotlib.lines.Line2D at 0x701c3545eeb0>]
    │ │ │  
    │ │ │  In [148]: da.plot.line(x="lon", hue="x", ax=ax[1])
    │ │ │  Out[148]: 
    │ │ │ -[<matplotlib.lines.Line2D at 0x7fc396f6a1c0>,
    │ │ │ - <matplotlib.lines.Line2D at 0x7fc396f71a00>,
    │ │ │ - <matplotlib.lines.Line2D at 0x7fc396f71ee0>,
    │ │ │ - <matplotlib.lines.Line2D at 0x7fc396f71430>,
    │ │ │ - <matplotlib.lines.Line2D at 0x7fc396f71370>]
    │ │ │ +[<matplotlib.lines.Line2D at 0x701c354c6970>,
    │ │ │ + <matplotlib.lines.Line2D at 0x701c354c69a0>,
    │ │ │ + <matplotlib.lines.Line2D at 0x701c35476640>,
    │ │ │ + <matplotlib.lines.Line2D at 0x701c35401400>,
    │ │ │ + <matplotlib.lines.Line2D at 0x701c35401340>]
    │ │ │  
    │ │ │
    │ │ │ ../_images/plotting_example_2d_hue_xy.png │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/python-xarray-doc/html/whats-new.html │ │ │ @@ -4717,15 +4717,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 0x7fc396f487c0>
    │ │ │ +Out[46]: <matplotlib.collections.QuadMesh at 0x701c347b20a0>
    │ │ │  
    │ │ │
    │ │ │ _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