323 KB
/srv/reproducible-results/rbuild-debian/r-b-build.CDyzW2SI/b1/python-xarray_2025.01.2-1_armhf.changes vs.
/srv/reproducible-results/rbuild-debian/r-b-build.CDyzW2SI/b2/python-xarray_2025.01.2-1_armhf.changes
309 B
Files
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
  
1 ·0e2a70ca007b593d321ceaf91ec6daf9·2010200·doc·optional·python-xarray-doc_2025.01.2-1_all.deb1 ·0f895758c5998fa19899744075571555·2010036·doc·optional·python-xarray-doc_2025.01.2-1_all.deb
2 ·4644c3352e568f782718f7d018211ae7·799852·python·optional·python3-xarray_2025.01.2-1_all.deb2 ·4644c3352e568f782718f7d018211ae7·799852·python·optional·python3-xarray_2025.01.2-1_all.deb
322 KB
python-xarray-doc_2025.01.2-1_all.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2025-02-02·11:36:57.000000·debian-binary1 -rw-r--r--···0········0········0········4·2025-02-02·11:36:57.000000·debian-binary
2 -rw-r--r--···0········0········0·····6168·2025-02-02·11:36:57.000000·control.tar.xz2 -rw-r--r--···0········0········0·····6168·2025-02-02·11:36:57.000000·control.tar.xz
3 -rw-r--r--···0········0········0··2003840·2025-02-02·11:36:57.000000·data.tar.xz3 -rw-r--r--···0········0········0··2003676·2025-02-02·11:36:57.000000·data.tar.xz
621 B
control.tar.xz
593 B
control.tar
523 B
./control
    
Offset 1, 13 lines modifiedOffset 1, 13 lines modified
1 Package:·python-xarray-doc1 Package:·python-xarray-doc
2 Source:·python-xarray2 Source:·python-xarray
3 Version:·2025.01.2-13 Version:·2025.01.2-1
4 Architecture:·all4 Architecture:·all
5 Maintainer:·Debian·Science·Maintainers·<debian-science-maintainers@lists.alioth.debian.org>5 Maintainer:·Debian·Science·Maintainers·<debian-science-maintainers@lists.alioth.debian.org>
6 Installed-Size:·80096 Installed-Size:·8010
7 Depends:·libjs-sphinxdoc·(>=·8.1),·libjs-mathjax,·libjs-requirejs7 Depends:·libjs-sphinxdoc·(>=·8.1),·libjs-mathjax,·libjs-requirejs
8 Built-Using:·alabaster·(=·0.7.16-0.1),·sphinx·(=·8.1.3-5)8 Built-Using:·alabaster·(=·0.7.16-0.1),·sphinx·(=·8.1.3-5)
9 Section:·doc9 Section:·doc
10 Priority:·optional10 Priority:·optional
11 Multi-Arch:·foreign11 Multi-Arch:·foreign
12 Homepage:·https://xarray.pydata.org/12 Homepage:·https://xarray.pydata.org/
13 Description:·documentation·for·xarray13 Description:·documentation·for·xarray
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
321 KB
data.tar.xz
321 KB
data.tar
14.5 KB
file list
    
Offset 152, 31 lines modifiedOffset 152, 31 lines modified
152 -rw-r--r--···0·root·········(0)·root·········(0)······461·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/dask.html152 -rw-r--r--···0·root·········(0)·root·········(0)······461·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/dask.html
153 -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/data-structures.html153 -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/data-structures.html
154 -rw-r--r--···0·root·········(0)·root·········(0)·····8448·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/developers-meeting.html154 -rw-r--r--···0·root·········(0)·root·········(0)·····8448·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/developers-meeting.html
155 -rw-r--r--···0·root·········(0)·root·········(0)······479·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/duckarrays.html155 -rw-r--r--···0·root·········(0)·root·········(0)······479·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/duckarrays.html
156 -rw-r--r--···0·root·········(0)·root·········(0)····22666·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/ecosystem.html156 -rw-r--r--···0·root·········(0)·root·········(0)····22666·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/ecosystem.html
157 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/157 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/
158 -rw-r--r--···0·root·········(0)·root·········(0)····21694·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html158 -rw-r--r--···0·root·········(0)·root·········(0)····21694·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html
159 -rw-r--r--···0·root·········(0)·root·········(0)·····1835·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz159 -rw-r--r--···0·root·········(0)·root·········(0)·····1833·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz
160 -rw-r--r--···0·root·········(0)·root·········(0)····38490·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html160 -rw-r--r--···0·root·········(0)·root·········(0)····38490·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html
161 -rw-r--r--···0·root·········(0)·root·········(0)····23736·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz161 -rw-r--r--···0·root·········(0)·root·········(0)····23735·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz
162 -rw-r--r--···0·root·········(0)·root·········(0)···116838·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html162 -rw-r--r--···0·root·········(0)·root·········(0)···116838·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html
163 -rw-r--r--···0·root·········(0)·root·········(0)·····8806·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz163 -rw-r--r--···0·root·········(0)·root·········(0)·····8798·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz
164 -rw-r--r--···0·root·········(0)·root·········(0)····27577·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html164 -rw-r--r--···0·root·········(0)·root·········(0)····27577·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html
165 -rw-r--r--···0·root·········(0)·root·········(0)····21008·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz165 -rw-r--r--···0·root·········(0)·root·········(0)····20996·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz
166 -rw-r--r--···0·root·········(0)·root·········(0)····11448·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.html166 -rw-r--r--···0·root·········(0)·root·········(0)····11448·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.html
167 -rw-r--r--···0·root·········(0)·root·········(0)·····2375·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb167 -rw-r--r--···0·root·········(0)·root·········(0)·····2375·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb
168 -rw-r--r--···0·root·········(0)·root·········(0)····38981·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html168 -rw-r--r--···0·root·········(0)·root·········(0)····38981·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html
169 -rw-r--r--···0·root·········(0)·root·········(0)·····3229·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz169 -rw-r--r--···0·root·········(0)·root·········(0)·····3208·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz
170 -rw-r--r--···0·root·········(0)·root·········(0)····30434·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html170 -rw-r--r--···0·root·········(0)·root·········(0)····30434·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html
171 -rw-r--r--···0·root·········(0)·root·········(0)·····3238·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz171 -rw-r--r--···0·root·········(0)·root·········(0)·····3224·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz
172 -rw-r--r--···0·root·········(0)·root·········(0)····36876·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html172 -rw-r--r--···0·root·········(0)·root·········(0)····36876·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html
173 -rw-r--r--···0·root·········(0)·root·········(0)·····2859·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz173 -rw-r--r--···0·root·········(0)·root·········(0)·····2859·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz
174 -rw-r--r--···0·root·········(0)·root·········(0)····46324·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.html174 -rw-r--r--···0·root·········(0)·root·········(0)····46324·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.html
175 -rw-r--r--···0·root·········(0)·root·········(0)·····3580·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz175 -rw-r--r--···0·root·········(0)·root·········(0)·····3574·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz
176 -rw-r--r--···0·root·········(0)·root·········(0)······491·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/faq.html176 -rw-r--r--···0·root·········(0)·root·········(0)······491·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/faq.html
177 -rw-r--r--···0·root·········(0)·root·········(0)····15073·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/gallery.html177 -rw-r--r--···0·root·········(0)·root·········(0)····15073·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/gallery.html
178 -rw-r--r--···0·root·········(0)·root·········(0)····16306·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/genindex.html178 -rw-r--r--···0·root·········(0)·root·········(0)····16306·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/genindex.html
179 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/179 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/
180 -rw-r--r--···0·root·········(0)·root·········(0)····50398·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/faq.html180 -rw-r--r--···0·root·········(0)·root·········(0)····50398·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/faq.html
181 -rw-r--r--···0·root·········(0)·root·········(0)·····7741·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/index.html181 -rw-r--r--···0·root·········(0)·root·········(0)·····7741·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/index.html
182 -rw-r--r--···0·root·········(0)·root·········(0)····23857·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/installing.html182 -rw-r--r--···0·root·········(0)·root·········(0)····23857·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/installing.html
Offset 191, 50 lines modifiedOffset 191, 50 lines modified
191 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/191 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/
192 -rw-r--r--···0·root·········(0)·root·········(0)····81178·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/chunked-arrays.html192 -rw-r--r--···0·root·········(0)·root·········(0)····81178·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/chunked-arrays.html
193 -rw-r--r--···0·root·········(0)·root·········(0)····19678·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/duck-arrays-integration.html193 -rw-r--r--···0·root·········(0)·root·········(0)····19678·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/duck-arrays-integration.html
194 -rw-r--r--···0·root·········(0)·root·········(0)····22842·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/extending-xarray.html194 -rw-r--r--···0·root·········(0)·root·········(0)····22842·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/extending-xarray.html
195 -rw-r--r--···0·root·········(0)·root·········(0)····53506·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/how-to-add-new-backend.html195 -rw-r--r--···0·root·········(0)·root·········(0)····53506·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/how-to-add-new-backend.html
196 -rw-r--r--···0·root·········(0)·root·········(0)····30758·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/how-to-create-custom-index.html196 -rw-r--r--···0·root·········(0)·root·········(0)····30758·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/how-to-create-custom-index.html
197 -rw-r--r--···0·root·········(0)·root·········(0)·····9035·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/index.html197 -rw-r--r--···0·root·········(0)·root·········(0)·····9035·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/index.html
198 -rw-r--r--···0·root·········(0)·root·········(0)····60255·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/internal-design.html198 -rw-r--r--···0·root·········(0)·root·········(0)····60257·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/internal-design.html
199 -rw-r--r--···0·root·········(0)·root·········(0)····13589·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/interoperability.html199 -rw-r--r--···0·root·········(0)·root·········(0)····13589·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/interoperability.html
200 -rw-r--r--···0·root·········(0)·root·········(0)····51538·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/zarr-encoding-spec.html200 -rw-r--r--···0·root·········(0)·root·········(0)····51539·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/zarr-encoding-spec.html
201 -rw-r--r--···0·root·········(0)·root·········(0)······488·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/interpolation.html201 -rw-r--r--···0·root·········(0)·root·········(0)······488·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/interpolation.html
202 -rw-r--r--···0·root·········(0)·root·········(0)······455·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/io.html202 -rw-r--r--···0·root·········(0)·root·········(0)······455·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/io.html
203 -rw-r--r--···0·root·········(0)·root·········(0)····22249·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/objects.inv203 -rw-r--r--···0·root·········(0)·root·········(0)····22249·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/objects.inv
204 -rw-r--r--···0·root·········(0)·root·········(0)······467·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/pandas.html204 -rw-r--r--···0·root·········(0)·root·········(0)······467·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/pandas.html
205 -rw-r--r--···0·root·········(0)·root·········(0)······473·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/plotting.html205 -rw-r--r--···0·root·········(0)·root·········(0)······473·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/plotting.html
206 -rw-r--r--···0·root·········(0)·root·········(0)·····6546·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/py-modindex.html206 -rw-r--r--···0·root·········(0)·root·········(0)·····6546·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/py-modindex.html
207 -rw-r--r--···0·root·········(0)·root·········(0)······524·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/quick-overview.html207 -rw-r--r--···0·root·········(0)·root·········(0)······524·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/quick-overview.html
208 -rw-r--r--···0·root·········(0)·root·········(0)······443·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/related-projects.html208 -rw-r--r--···0·root·········(0)·root·········(0)······443·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/related-projects.html
209 -rw-r--r--···0·root·········(0)·root·········(0)······476·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/reshaping.html209 -rw-r--r--···0·root·········(0)·root·········(0)······476·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/reshaping.html
210 -rw-r--r--···0·root·········(0)·root·········(0)····24474·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/roadmap.html210 -rw-r--r--···0·root·········(0)·root·········(0)····24474·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/roadmap.html
211 -rw-r--r--···0·root·········(0)·root·········(0)·····6341·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/search.html211 -rw-r--r--···0·root·········(0)·root·········(0)·····6341·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/search.html
212 -rw-r--r--···0·root·········(0)·root·········(0)···242503·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/searchindex.js212 -rw-r--r--···0·root·········(0)·root·········(0)···242395·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/searchindex.js
213 -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/terminology.html213 -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/terminology.html
214 -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/time-series.html214 -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/time-series.html
215 -rw-r--r--···0·root·········(0)·root·········(0)····13358·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/tutorials-and-videos.html215 -rw-r--r--···0·root·········(0)·root·········(0)····13358·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/tutorials-and-videos.html
216 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/216 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/
217 -rw-r--r--···0·root·········(0)·root·········(0)····58669·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/combining.html217 -rw-r--r--···0·root·········(0)·root·········(0)····58669·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/combining.html
218 -rw-r--r--···0·root·········(0)·root·········(0)···140306·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/computation.html218 -rw-r--r--···0·root·········(0)·root·········(0)···140306·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/computation.html
219 -rw-r--r--···0·root·········(0)·root·········(0)····71357·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/dask.html219 -rw-r--r--···0·root·········(0)·root·········(0)····71357·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/dask.html
220 -rw-r--r--···0·root·········(0)·root·········(0)···150187·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/data-structures.html220 -rw-r--r--···0·root·········(0)·root·········(0)···150187·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/data-structures.html
221 -rw-r--r--···0·root·········(0)·root·········(0)····35119·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/duckarrays.html221 -rw-r--r--···0·root·········(0)·root·········(0)····35119·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/duckarrays.html
222 -rw-r--r--···0·root·········(0)·root·········(0)····50912·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/groupby.html222 -rw-r--r--···0·root·········(0)·root·········(0)····50912·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/groupby.html
223 -rw-r--r--···0·root·········(0)·root·········(0)···120196·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/hierarchical-data.html223 -rw-r--r--···0·root·········(0)·root·········(0)···120197·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/hierarchical-data.html
224 -rw-r--r--···0·root·········(0)·root·········(0)·····9025·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/index.html224 -rw-r--r--···0·root·········(0)·root·········(0)·····9025·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/index.html
225 -rw-r--r--···0·root·········(0)·root·········(0)···140255·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/indexing.html225 -rw-r--r--···0·root·········(0)·root·········(0)···140258·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/indexing.html
226 -rw-r--r--···0·root·········(0)·root·········(0)····68701·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/interpolation.html226 -rw-r--r--···0·root·········(0)·root·········(0)····68702·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/interpolation.html
227 -rw-r--r--···0·root·········(0)·root·········(0)···144671·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/io.html227 -rw-r--r--···0·root·········(0)·root·········(0)···144673·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/io.html
228 -rw-r--r--···0·root·········(0)·root·········(0)····11704·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/options.html228 -rw-r--r--···0·root·········(0)·root·········(0)····11704·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/options.html
229 -rw-r--r--···0·root·········(0)·root·········(0)····42217·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/pandas.html229 -rw-r--r--···0·root·········(0)·root·········(0)····42217·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/pandas.html
230 -rw-r--r--···0·root·········(0)·root·········(0)···136129·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/plotting.html230 -rw-r--r--···0·root·········(0)·root·········(0)···136131·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/plotting.html
231 -rw-r--r--···0·root·········(0)·root·········(0)····62899·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/reshaping.html231 -rw-r--r--···0·root·········(0)·root·········(0)····62900·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/reshaping.html
232 -rw-r--r--···0·root·········(0)·root·········(0)····46815·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/terminology.html232 -rw-r--r--···0·root·········(0)·root·········(0)····46815·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/terminology.html
233 -rw-r--r--···0·root·········(0)·root·········(0)····48317·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/testing.html233 -rw-r--r--···0·root·········(0)·root·········(0)····49640·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/testing.html
234 -rw-r--r--···0·root·········(0)·root·········(0)····45838·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/time-series.html234 -rw-r--r--···0·root·········(0)·root·········(0)····45838·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/time-series.html
235 -rw-r--r--···0·root·········(0)·root·········(0)····45414·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/weather-climate.html235 -rw-r--r--···0·root·········(0)·root·········(0)····45414·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/weather-climate.html
236 -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/weather-climate.html236 -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/weather-climate.html
237 -rw-r--r--···0·root·········(0)·root·········(0)··1017512·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/whats-new.html237 -rw-r--r--···0·root·········(0)·root·········(0)··1017512·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/whats-new.html
238 -rw-r--r--···0·root·········(0)·root·········(0)······512·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/why-xarray.html238 -rw-r--r--···0·root·········(0)·root·········(0)······512·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/why-xarray.html
239 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc-base/239 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc-base/
240 -rw-r--r--···0·root·········(0)·root·········(0)······290·2025-02-02·11:36:57.000000·./usr/share/doc-base/python-xarray-doc.python-xarray-doc240 -rw-r--r--···0·root·········(0)·root·········(0)······290·2025-02-02·11:36:57.000000·./usr/share/doc-base/python-xarray-doc.python-xarray-doc
5.67 KB
./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz
5.53 KB
ERA5-GRIB-example.ipynb
5.48 KB
Pretty-printed
Similarity: 0.9985795454545454% Differences: {"'cells'": "{2: {'metadata': {'execution': {'iopub.execute_input': '2025-03-22T09:51:05.365146Z', " "'iopub.status.busy': '2025-03-22T09:51:05.364622Z', 'iopub.status.idle': " "'2025-03-22T09:51:05.847496Z', 'shell.execute_reply': " "'2025-03-22T09:51:05.846312Z'}}}, 4: {'metadata': {'execution': " "{'iopub.execute_input': '2025-03-22T09:51:05.969096Z', 'iopub.status.busy': " "'2025-03-22T09:51:05.968556Z', 'iopub.status.idle': '2025-03-22T09:51:0 […]
    
Offset 15, 18 lines modifiedOffset 15, 18 lines modified
15 ············]15 ············]
16 ········},16 ········},
17 ········{17 ········{
18 ············"cell_type":·"code",18 ············"cell_type":·"code",
19 ············"execution_count":·1,19 ············"execution_count":·1,
20 ············"metadata":·{20 ············"metadata":·{
21 ················"execution":·{21 ················"execution":·{
22 ····················"iopub.execute_input":·"2025-03-22T09:38:24.886183Z",22 ····················"iopub.execute_input":·"2025-03-22T09:51:05.365146Z",
23 ····················"iopub.status.busy":·"2025-03-22T09:38:24.885362Z",23 ····················"iopub.status.busy":·"2025-03-22T09:51:05.364622Z",
24 ····················"iopub.status.idle":·"2025-03-22T09:38:25.592168Z",24 ····················"iopub.status.idle":·"2025-03-22T09:51:05.847496Z",
25 ····················"shell.execute_reply":·"2025-03-22T09:38:25.590457Z"25 ····················"shell.execute_reply":·"2025-03-22T09:51:05.846312Z"
26 ················}26 ················}
27 ············},27 ············},
28 ············"outputs":·[28 ············"outputs":·[
29 ················{29 ················{
30 ····················"ename":·"ModuleNotFoundError",30 ····················"ename":·"ModuleNotFoundError",
31 ····················"evalue":·"No·module·named·'xarray'",31 ····················"evalue":·"No·module·named·'xarray'",
32 ····················"output_type":·"error",32 ····················"output_type":·"error",
Offset 51, 18 lines modifiedOffset 51, 18 lines modified
51 ············]51 ············]
52 ········},52 ········},
53 ········{53 ········{
54 ············"cell_type":·"code",54 ············"cell_type":·"code",
55 ············"execution_count":·2,55 ············"execution_count":·2,
56 ············"metadata":·{56 ············"metadata":·{
57 ················"execution":·{57 ················"execution":·{
58 ····················"iopub.execute_input":·"2025-03-22T09:38:25.790395Z",58 ····················"iopub.execute_input":·"2025-03-22T09:51:05.969096Z",
59 ····················"iopub.status.busy":·"2025-03-22T09:38:25.789597Z",59 ····················"iopub.status.busy":·"2025-03-22T09:51:05.968556Z",
60 ····················"iopub.status.idle":·"2025-03-22T09:38:25.900137Z",60 ····················"iopub.status.idle":·"2025-03-22T09:51:06.040657Z",
61 ····················"shell.execute_reply":·"2025-03-22T09:38:25.884120Z"61 ····················"shell.execute_reply":·"2025-03-22T09:51:06.039338Z"
62 ················}62 ················}
63 ············},63 ············},
64 ············"outputs":·[64 ············"outputs":·[
65 ················{65 ················{
66 ····················"ename":·"NameError",66 ····················"ename":·"NameError",
67 ····················"evalue":·"name·'xr'·is·not·defined",67 ····················"evalue":·"name·'xr'·is·not·defined",
68 ····················"output_type":·"error",68 ····················"output_type":·"error",
Offset 86, 18 lines modifiedOffset 86, 18 lines modified
86 ············]86 ············]
87 ········},87 ········},
88 ········{88 ········{
89 ············"cell_type":·"code",89 ············"cell_type":·"code",
90 ············"execution_count":·3,90 ············"execution_count":·3,
91 ············"metadata":·{91 ············"metadata":·{
92 ················"execution":·{92 ················"execution":·{
93 ····················"iopub.execute_input":·"2025-03-22T09:38:25.918326Z",93 ····················"iopub.execute_input":·"2025-03-22T09:51:06.052957Z",
94 ····················"iopub.status.busy":·"2025-03-22T09:38:25.917556Z",94 ····················"iopub.status.busy":·"2025-03-22T09:51:06.052450Z",
95 ····················"iopub.status.idle":·"2025-03-22T09:38:26.048142Z",95 ····················"iopub.status.idle":·"2025-03-22T09:51:06.167347Z",
96 ····················"shell.execute_reply":·"2025-03-22T09:38:26.032120Z"96 ····················"shell.execute_reply":·"2025-03-22T09:51:06.151321Z"
97 ················}97 ················}
98 ············},98 ············},
99 ············"outputs":·[99 ············"outputs":·[
100 ················{100 ················{
101 ····················"ename":·"NameError",101 ····················"ename":·"NameError",
102 ····················"evalue":·"name·'ds'·is·not·defined",102 ····················"evalue":·"name·'ds'·is·not·defined",
103 ····················"output_type":·"error",103 ····················"output_type":·"error",
Offset 122, 18 lines modifiedOffset 122, 18 lines modified
122 ············]122 ············]
123 ········},123 ········},
124 ········{124 ········{
125 ············"cell_type":·"code",125 ············"cell_type":·"code",
126 ············"execution_count":·4,126 ············"execution_count":·4,
127 ············"metadata":·{127 ············"metadata":·{
128 ················"execution":·{128 ················"execution":·{
129 ····················"iopub.execute_input":·"2025-03-22T09:38:26.066629Z",129 ····················"iopub.execute_input":·"2025-03-22T09:51:06.184855Z",
130 ····················"iopub.status.busy":·"2025-03-22T09:38:26.065706Z",130 ····················"iopub.status.busy":·"2025-03-22T09:51:06.184318Z",
131 ····················"iopub.status.idle":·"2025-03-22T09:38:26.614943Z",131 ····················"iopub.status.idle":·"2025-03-22T09:51:06.679599Z",
132 ····················"shell.execute_reply":·"2025-03-22T09:38:26.612961Z"132 ····················"shell.execute_reply":·"2025-03-22T09:51:06.678223Z"
133 ················}133 ················}
134 ············},134 ············},
135 ············"outputs":·[135 ············"outputs":·[
136 ················{136 ················{
137 ····················"ename":·"NameError",137 ····················"ename":·"NameError",
138 ····················"evalue":·"name·'plt'·is·not·defined",138 ····················"evalue":·"name·'plt'·is·not·defined",
139 ····················"output_type":·"error",139 ····················"output_type":·"error",
Offset 166, 18 lines modifiedOffset 166, 18 lines modified
166 ············]166 ············]
167 ········},167 ········},
168 ········{168 ········{
169 ············"cell_type":·"code",169 ············"cell_type":·"code",
170 ············"execution_count":·5,170 ············"execution_count":·5,
171 ············"metadata":·{171 ············"metadata":·{
172 ················"execution":·{172 ················"execution":·{
173 ····················"iopub.execute_input":·"2025-03-22T09:38:26.630469Z",173 ····················"iopub.execute_input":·"2025-03-22T09:51:06.688963Z",
174 ····················"iopub.status.busy":·"2025-03-22T09:38:26.629624Z",174 ····················"iopub.status.busy":·"2025-03-22T09:51:06.688452Z",
175 ····················"iopub.status.idle":·"2025-03-22T09:38:26.688530Z",175 ····················"iopub.status.idle":·"2025-03-22T09:51:06.732537Z",
176 ····················"shell.execute_reply":·"2025-03-22T09:38:26.686640Z"176 ····················"shell.execute_reply":·"2025-03-22T09:51:06.731288Z"
177 ················}177 ················}
178 ············},178 ············},
179 ············"outputs":·[179 ············"outputs":·[
180 ················{180 ················{
181 ····················"ename":·"NameError",181 ····················"ename":·"NameError",
182 ····················"evalue":·"name·'ds'·is·not·defined",182 ····················"evalue":·"name·'ds'·is·not·defined",
183 ····················"output_type":·"error",183 ····················"output_type":·"error",
7.62 KB
./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz
7.48 KB
ROMS_ocean_model.ipynb
7.44 KB
Pretty-printed
Similarity: 0.9988051470588235% Differences: {"'cells'": "{2: {'metadata': {'execution': {'iopub.execute_input': '2025-03-22T09:51:12.584825Z', " "'iopub.status.busy': '2025-03-22T09:51:12.584295Z', 'iopub.status.idle': " "'2025-03-22T09:51:15.202530Z', 'shell.execute_reply': " "'2025-03-22T09:51:15.201320Z'}}}, 5: {'metadata': {'execution': " "{'iopub.execute_input': '2025-03-22T09:51:15.224849Z', 'iopub.status.busy': " "'2025-03-22T09:51:15.224312Z', 'iopub.status.idle': '2025-03-22T09:51:1 […]
    
Offset 17, 18 lines modifiedOffset 17, 18 lines modified
17 ············]17 ············]
18 ········},18 ········},
19 ········{19 ········{
20 ············"cell_type":·"code",20 ············"cell_type":·"code",
21 ············"execution_count":·1,21 ············"execution_count":·1,
22 ············"metadata":·{22 ············"metadata":·{
23 ················"execution":·{23 ················"execution":·{
24 ····················"iopub.execute_input":·"2025-03-22T09:38:33.734062Z",24 ····················"iopub.execute_input":·"2025-03-22T09:51:12.584825Z",
25 ····················"iopub.status.busy":·"2025-03-22T09:38:33.733322Z",25 ····················"iopub.status.busy":·"2025-03-22T09:51:12.584295Z",
26 ····················"iopub.status.idle":·"2025-03-22T09:38:37.786264Z",26 ····················"iopub.status.idle":·"2025-03-22T09:51:15.202530Z",
27 ····················"shell.execute_reply":·"2025-03-22T09:38:37.784119Z"27 ····················"shell.execute_reply":·"2025-03-22T09:51:15.201320Z"
28 ················}28 ················}
29 ············},29 ············},
30 ············"outputs":·[30 ············"outputs":·[
31 ················{31 ················{
32 ····················"ename":·"ModuleNotFoundError",32 ····················"ename":·"ModuleNotFoundError",
33 ····················"evalue":·"No·module·named·'xarray'",33 ····················"evalue":·"No·module·named·'xarray'",
34 ····················"output_type":·"error",34 ····················"output_type":·"error",
Offset 87, 18 lines modifiedOffset 87, 18 lines modified
87 ············]87 ············]
88 ········},88 ········},
89 ········{89 ········{
90 ············"cell_type":·"code",90 ············"cell_type":·"code",
91 ············"execution_count":·2,91 ············"execution_count":·2,
92 ············"metadata":·{92 ············"metadata":·{
93 ················"execution":·{93 ················"execution":·{
94 ····················"iopub.execute_input":·"2025-03-22T09:38:37.802511Z",94 ····················"iopub.execute_input":·"2025-03-22T09:51:15.224849Z",
95 ····················"iopub.status.busy":·"2025-03-22T09:38:37.801654Z",95 ····················"iopub.status.busy":·"2025-03-22T09:51:15.224312Z",
96 ····················"iopub.status.idle":·"2025-03-22T09:38:37.932128Z",96 ····················"iopub.status.idle":·"2025-03-22T09:51:15.343352Z",
97 ····················"shell.execute_reply":·"2025-03-22T09:38:37.920104Z"97 ····················"shell.execute_reply":·"2025-03-22T09:51:15.327313Z"
98 ················}98 ················}
99 ············},99 ············},
100 ············"outputs":·[100 ············"outputs":·[
101 ················{101 ················{
102 ····················"ename":·"NameError",102 ····················"ename":·"NameError",
103 ····················"evalue":·"name·'xr'·is·not·defined",103 ····················"evalue":·"name·'xr'·is·not·defined",
104 ····················"output_type":·"error",104 ····················"output_type":·"error",
Offset 137, 18 lines modifiedOffset 137, 18 lines modified
137 ············]137 ············]
138 ········},138 ········},
139 ········{139 ········{
140 ············"cell_type":·"code",140 ············"cell_type":·"code",
141 ············"execution_count":·3,141 ············"execution_count":·3,
142 ············"metadata":·{142 ············"metadata":·{
143 ················"execution":·{143 ················"execution":·{
144 ····················"iopub.execute_input":·"2025-03-22T09:38:37.954359Z",144 ····················"iopub.execute_input":·"2025-03-22T09:51:15.368977Z",
145 ····················"iopub.status.busy":·"2025-03-22T09:38:37.953568Z",145 ····················"iopub.status.busy":·"2025-03-22T09:51:15.368411Z",
146 ····················"iopub.status.idle":·"2025-03-22T09:38:38.067128Z",146 ····················"iopub.status.idle":·"2025-03-22T09:51:15.468685Z",
147 ····················"shell.execute_reply":·"2025-03-22T09:38:38.065324Z"147 ····················"shell.execute_reply":·"2025-03-22T09:51:15.467306Z"
148 ················}148 ················}
149 ············},149 ············},
150 ············"outputs":·[150 ············"outputs":·[
151 ················{151 ················{
152 ····················"ename":·"NameError",152 ····················"ename":·"NameError",
153 ····················"evalue":·"name·'ds'·is·not·defined",153 ····················"evalue":·"name·'ds'·is·not·defined",
154 ····················"output_type":·"error",154 ····················"output_type":·"error",
Offset 182, 18 lines modifiedOffset 182, 18 lines modified
182 ············]182 ············]
183 ········},183 ········},
184 ········{184 ········{
185 ············"cell_type":·"code",185 ············"cell_type":·"code",
186 ············"execution_count":·4,186 ············"execution_count":·4,
187 ············"metadata":·{187 ············"metadata":·{
188 ················"execution":·{188 ················"execution":·{
189 ····················"iopub.execute_input":·"2025-03-22T09:38:38.086393Z",189 ····················"iopub.execute_input":·"2025-03-22T09:51:15.496868Z",
190 ····················"iopub.status.busy":·"2025-03-22T09:38:38.085558Z",190 ····················"iopub.status.busy":·"2025-03-22T09:51:15.496310Z",
191 ····················"iopub.status.idle":·"2025-03-22T09:38:38.165846Z",191 ····················"iopub.status.idle":·"2025-03-22T09:51:15.560638Z",
192 ····················"shell.execute_reply":·"2025-03-22T09:38:38.164077Z"192 ····················"shell.execute_reply":·"2025-03-22T09:51:15.559301Z"
193 ················},193 ················},
194 ················"scrolled":·false194 ················"scrolled":·false
195 ············},195 ············},
196 ············"outputs":·[196 ············"outputs":·[
197 ················{197 ················{
198 ····················"ename":·"NameError",198 ····················"ename":·"NameError",
199 ····················"evalue":·"name·'ds'·is·not·defined",199 ····················"evalue":·"name·'ds'·is·not·defined",
Offset 218, 18 lines modifiedOffset 218, 18 lines modified
218 ············]218 ············]
219 ········},219 ········},
220 ········{220 ········{
221 ············"cell_type":·"code",221 ············"cell_type":·"code",
222 ············"execution_count":·5,222 ············"execution_count":·5,
223 ············"metadata":·{223 ············"metadata":·{
224 ················"execution":·{224 ················"execution":·{
225 ····················"iopub.execute_input":·"2025-03-22T09:38:38.173942Z",225 ····················"iopub.execute_input":·"2025-03-22T09:51:15.584884Z",
226 ····················"iopub.status.busy":·"2025-03-22T09:38:38.173254Z",226 ····················"iopub.status.busy":·"2025-03-22T09:51:15.584349Z",
227 ····················"iopub.status.idle":·"2025-03-22T09:38:38.254030Z",227 ····················"iopub.status.idle":·"2025-03-22T09:51:15.656690Z",
228 ····················"shell.execute_reply":·"2025-03-22T09:38:38.252107Z"228 ····················"shell.execute_reply":·"2025-03-22T09:51:15.655317Z"
229 ················}229 ················}
230 ············},230 ············},
231 ············"outputs":·[231 ············"outputs":·[
232 ················{232 ················{
233 ····················"ename":·"NameError",233 ····················"ename":·"NameError",
234 ····················"evalue":·"name·'ds'·is·not·defined",234 ····················"evalue":·"name·'ds'·is·not·defined",
235 ····················"output_type":·"error",235 ····················"output_type":·"error",
Offset 257, 18 lines modifiedOffset 257, 18 lines modified
257 ············]257 ············]
258 ········},258 ········},
259 ········{259 ········{
260 ············"cell_type":·"code",260 ············"cell_type":·"code",
261 ············"execution_count":·6,261 ············"execution_count":·6,
262 ············"metadata":·{262 ············"metadata":·{
263 ················"execution":·{263 ················"execution":·{
264 ····················"iopub.execute_input":·"2025-03-22T09:38:38.270157Z",264 ····················"iopub.execute_input":·"2025-03-22T09:51:15.679848Z",
265 ····················"iopub.status.busy":·"2025-03-22T09:38:38.269397Z",265 ····················"iopub.status.busy":·"2025-03-22T09:51:15.679290Z",
266 ····················"iopub.status.idle":·"2025-03-22T09:38:38.362010Z",266 ····················"iopub.status.idle":·"2025-03-22T09:51:15.752623Z",
267 ····················"shell.execute_reply":·"2025-03-22T09:38:38.360087Z"267 ····················"shell.execute_reply":·"2025-03-22T09:51:15.751297Z"
268 ················}268 ················}
269 ············},269 ············},
270 ············"outputs":·[270 ············"outputs":·[
271 ················{271 ················{
272 ····················"ename":·"NameError",272 ····················"ename":·"NameError",
273 ····················"evalue":·"name·'ds'·is·not·defined",273 ····················"evalue":·"name·'ds'·is·not·defined",
274 ····················"output_type":·"error",274 ····················"output_type":·"error",
Offset 292, 18 lines modifiedOffset 292, 18 lines modified
292 ············]292 ············]
293 ········},293 ········},
294 ········{294 ········{
295 ············"cell_type":·"code",295 ············"cell_type":·"code",
296 ············"execution_count":·7,296 ············"execution_count":·7,
297 ············"metadata":·{297 ············"metadata":·{
298 ················"execution":·{298 ················"execution":·{
299 ····················"iopub.execute_input":·"2025-03-22T09:38:38.378372Z",299 ····················"iopub.execute_input":·"2025-03-22T09:51:15.776831Z",
300 ····················"iopub.status.busy":·"2025-03-22T09:38:38.377537Z",300 ····················"iopub.status.busy":·"2025-03-22T09:51:15.776303Z",
301 ····················"iopub.status.idle":·"2025-03-22T09:38:38.721721Z",301 ····················"iopub.status.idle":·"2025-03-22T09:51:16.259358Z",
302 ····················"shell.execute_reply":·"2025-03-22T09:38:38.720052Z"302 ····················"shell.execute_reply":·"2025-03-22T09:51:16.243314Z"
303 ················}303 ················}
304 ············},304 ············},
Max diff block lines reached; 166/7032 bytes (2.36%) of diff not shown.
17.2 KB
./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz
17.0 KB
apply_ufunc_vectorize_1d.ipynb
16.9 KB
Pretty-printed
Similarity: 0.9994283536585367% Differences: {"'cells'": "{2: {'metadata': {'execution': {'iopub.execute_input': '2025-03-22T09:51:25.664869Z', " "'iopub.status.busy': '2025-03-22T09:51:25.664316Z', 'iopub.status.idle': " "'2025-03-22T09:51:26.156990Z', 'shell.execute_reply': " "'2025-03-22T09:51:26.155836Z'}}}, 4: {'metadata': {'execution': " "{'iopub.execute_input': '2025-03-22T09:51:26.176756Z', 'iopub.status.busy': " "'2025-03-22T09:51:26.176234Z', 'iopub.status.idle': '2025-03-22T09:51:2 […]
    
Offset 36, 18 lines modifiedOffset 36, 18 lines modified
36 ············"execution_count":·1,36 ············"execution_count":·1,
37 ············"metadata":·{37 ············"metadata":·{
38 ················"ExecuteTime":·{38 ················"ExecuteTime":·{
39 ····················"end_time":·"2020-01-15T14:45:51.659160Z",39 ····················"end_time":·"2020-01-15T14:45:51.659160Z",
40 ····················"start_time":·"2020-01-15T14:45:50.528742Z"40 ····················"start_time":·"2020-01-15T14:45:50.528742Z"
41 ················},41 ················},
42 ················"execution":·{42 ················"execution":·{
43 ····················"iopub.execute_input":·"2025-03-22T09:38:45.754296Z",43 ····················"iopub.execute_input":·"2025-03-22T09:51:25.664869Z",
44 ····················"iopub.status.busy":·"2025-03-22T09:38:45.753446Z",44 ····················"iopub.status.busy":·"2025-03-22T09:51:25.664316Z",
45 ····················"iopub.status.idle":·"2025-03-22T09:38:46.546303Z",45 ····················"iopub.status.idle":·"2025-03-22T09:51:26.156990Z",
46 ····················"shell.execute_reply":·"2025-03-22T09:38:46.544329Z"46 ····················"shell.execute_reply":·"2025-03-22T09:51:26.155836Z"
47 ················}47 ················}
48 ············},48 ············},
49 ············"outputs":·[49 ············"outputs":·[
50 ················{50 ················{
51 ····················"ename":·"ModuleNotFoundError",51 ····················"ename":·"ModuleNotFoundError",
52 ····················"evalue":·"No·module·named·'xarray'",52 ····················"evalue":·"No·module·named·'xarray'",
53 ····················"output_type":·"error",53 ····················"output_type":·"error",
Offset 85, 18 lines modifiedOffset 85, 18 lines modified
85 ············"execution_count":·2,85 ············"execution_count":·2,
86 ············"metadata":·{86 ············"metadata":·{
87 ················"ExecuteTime":·{87 ················"ExecuteTime":·{
88 ····················"end_time":·"2020-01-15T14:45:55.431708Z",88 ····················"end_time":·"2020-01-15T14:45:55.431708Z",
89 ····················"start_time":·"2020-01-15T14:45:55.104701Z"89 ····················"start_time":·"2020-01-15T14:45:55.104701Z"
90 ················},90 ················},
91 ················"execution":·{91 ················"execution":·{
92 ····················"iopub.execute_input":·"2025-03-22T09:38:46.562296Z",92 ····················"iopub.execute_input":·"2025-03-22T09:51:26.176756Z",
93 ····················"iopub.status.busy":·"2025-03-22T09:38:46.561449Z",93 ····················"iopub.status.busy":·"2025-03-22T09:51:26.176234Z",
94 ····················"iopub.status.idle":·"2025-03-22T09:38:46.650367Z",94 ····················"iopub.status.idle":·"2025-03-22T09:51:26.236599Z",
95 ····················"shell.execute_reply":·"2025-03-22T09:38:46.648098Z"95 ····················"shell.execute_reply":·"2025-03-22T09:51:26.235291Z"
96 ················}96 ················}
97 ············},97 ············},
98 ············"outputs":·[98 ············"outputs":·[
99 ················{99 ················{
100 ····················"ename":·"NameError",100 ····················"ename":·"NameError",
101 ····················"evalue":·"name·'np'·is·not·defined",101 ····················"evalue":·"name·'np'·is·not·defined",
102 ····················"output_type":·"error",102 ····················"output_type":·"error",
Offset 125, 18 lines modifiedOffset 125, 18 lines modified
125 ············"execution_count":·3,125 ············"execution_count":·3,
126 ············"metadata":·{126 ············"metadata":·{
127 ················"ExecuteTime":·{127 ················"ExecuteTime":·{
128 ····················"end_time":·"2020-01-15T14:45:57.889496Z",128 ····················"end_time":·"2020-01-15T14:45:57.889496Z",
129 ····················"start_time":·"2020-01-15T14:45:57.792269Z"129 ····················"start_time":·"2020-01-15T14:45:57.792269Z"
130 ················},130 ················},
131 ················"execution":·{131 ················"execution":·{
132 ····················"iopub.execute_input":·"2025-03-22T09:38:46.666286Z",132 ····················"iopub.execute_input":·"2025-03-22T09:51:26.256783Z",
133 ····················"iopub.status.busy":·"2025-03-22T09:38:46.665462Z",133 ····················"iopub.status.busy":·"2025-03-22T09:51:26.256264Z",
134 ····················"iopub.status.idle":·"2025-03-22T09:38:46.774413Z",134 ····················"iopub.status.idle":·"2025-03-22T09:51:26.328608Z",
135 ····················"shell.execute_reply":·"2025-03-22T09:38:46.772097Z"135 ····················"shell.execute_reply":·"2025-03-22T09:51:26.327289Z"
136 ················}136 ················}
137 ············},137 ············},
138 ············"outputs":·[138 ············"outputs":·[
139 ················{139 ················{
140 ····················"ename":·"NameError",140 ····················"ename":·"NameError",
141 ····················"evalue":·"name·'air'·is·not·defined",141 ····················"evalue":·"name·'air'·is·not·defined",
142 ····················"output_type":·"error",142 ····················"output_type":·"error",
Offset 184, 18 lines modifiedOffset 184, 18 lines modified
184 ············"execution_count":·4,184 ············"execution_count":·4,
185 ············"metadata":·{185 ············"metadata":·{
186 ················"ExecuteTime":·{186 ················"ExecuteTime":·{
187 ····················"end_time":·"2020-01-15T14:45:59.768626Z",187 ····················"end_time":·"2020-01-15T14:45:59.768626Z",
188 ····················"start_time":·"2020-01-15T14:45:59.543808Z"188 ····················"start_time":·"2020-01-15T14:45:59.543808Z"
189 ················},189 ················},
190 ················"execution":·{190 ················"execution":·{
191 ····················"iopub.execute_input":·"2025-03-22T09:38:46.798513Z",191 ····················"iopub.execute_input":·"2025-03-22T09:51:26.344782Z",
192 ····················"iopub.status.busy":·"2025-03-22T09:38:46.797617Z",192 ····················"iopub.status.busy":·"2025-03-22T09:51:26.344256Z",
193 ····················"iopub.status.idle":·"2025-03-22T09:38:46.856743Z",193 ····················"iopub.status.idle":·"2025-03-22T09:51:26.439345Z",
194 ····················"shell.execute_reply":·"2025-03-22T09:38:46.854681Z"194 ····················"shell.execute_reply":·"2025-03-22T09:51:26.423286Z"
195 ················}195 ················}
196 ············},196 ············},
197 ············"outputs":·[197 ············"outputs":·[
198 ················{198 ················{
199 ····················"ename":·"NameError",199 ····················"ename":·"NameError",
200 ····················"evalue":·"name·'xr'·is·not·defined",200 ····················"evalue":·"name·'xr'·is·not·defined",
201 ····················"output_type":·"error",201 ····················"output_type":·"error",
Offset 250, 18 lines modifiedOffset 250, 18 lines modified
250 ············"execution_count":·5,250 ············"execution_count":·5,
251 ············"metadata":·{251 ············"metadata":·{
252 ················"ExecuteTime":·{252 ················"ExecuteTime":·{
253 ····················"end_time":·"2020-01-15T14:46:02.187012Z",253 ····················"end_time":·"2020-01-15T14:46:02.187012Z",
254 ····················"start_time":·"2020-01-15T14:46:02.105563Z"254 ····················"start_time":·"2020-01-15T14:46:02.105563Z"
255 ················},255 ················},
256 ················"execution":·{256 ················"execution":·{
257 ····················"iopub.execute_input":·"2025-03-22T09:38:46.870592Z",257 ····················"iopub.execute_input":·"2025-03-22T09:51:26.456812Z",
258 ····················"iopub.status.busy":·"2025-03-22T09:38:46.869747Z",258 ····················"iopub.status.busy":·"2025-03-22T09:51:26.456274Z",
259 ····················"iopub.status.idle":·"2025-03-22T09:38:46.925169Z",259 ····················"iopub.status.idle":·"2025-03-22T09:51:26.571356Z",
260 ····················"shell.execute_reply":·"2025-03-22T09:38:46.923213Z"260 ····················"shell.execute_reply":·"2025-03-22T09:51:26.555307Z"
261 ················}261 ················}
262 ············},262 ············},
263 ············"outputs":·[263 ············"outputs":·[
264 ················{264 ················{
265 ····················"ename":·"NameError",265 ····················"ename":·"NameError",
266 ····················"evalue":·"name·'xr'·is·not·defined",266 ····················"evalue":·"name·'xr'·is·not·defined",
267 ····················"output_type":·"error",267 ····················"output_type":·"error",
Offset 328, 18 lines modifiedOffset 328, 18 lines modified
328 ············"execution_count":·6,328 ············"execution_count":·6,
329 ············"metadata":·{329 ············"metadata":·{
330 ················"ExecuteTime":·{330 ················"ExecuteTime":·{
331 ····················"end_time":·"2020-01-15T14:46:05.031672Z",331 ····················"end_time":·"2020-01-15T14:46:05.031672Z",
332 ····················"start_time":·"2020-01-15T14:46:04.947588Z"332 ····················"start_time":·"2020-01-15T14:46:04.947588Z"
333 ················},333 ················},
334 ················"execution":·{334 ················"execution":·{
335 ····················"iopub.execute_input":·"2025-03-22T09:38:46.937794Z",335 ····················"iopub.execute_input":·"2025-03-22T09:51:26.589030Z",
336 ····················"iopub.status.busy":·"2025-03-22T09:38:46.936991Z",336 ····················"iopub.status.busy":·"2025-03-22T09:51:26.588478Z",
337 ····················"iopub.status.idle":·"2025-03-22T09:38:46.993720Z",337 ····················"iopub.status.idle":·"2025-03-22T09:51:26.699380Z",
338 ····················"shell.execute_reply":·"2025-03-22T09:38:46.991893Z"338 ····················"shell.execute_reply":·"2025-03-22T09:51:26.683316Z"
339 ················}339 ················}
340 ············},340 ············},
341 ············"outputs":·[341 ············"outputs":·[
342 ················{342 ················{
343 ····················"ename":·"NameError",343 ····················"ename":·"NameError",
344 ····················"evalue":·"name·'xr'·is·not·defined",344 ····················"evalue":·"name·'xr'·is·not·defined",
345 ····················"output_type":·"error",345 ····················"output_type":·"error",
Offset 374, 18 lines modifiedOffset 374, 18 lines modified
374 ············"execution_count":·7,374 ············"execution_count":·7,
375 ············"metadata":·{375 ············"metadata":·{
376 ················"ExecuteTime":·{376 ················"ExecuteTime":·{
377 ····················"end_time":·"2020-01-15T14:46:09.325218Z",377 ····················"end_time":·"2020-01-15T14:46:09.325218Z",
378 ····················"start_time":·"2020-01-15T14:46:09.303020Z"378 ····················"start_time":·"2020-01-15T14:46:09.303020Z"
379 ················},379 ················},
380 ················"execution":·{380 ················"execution":·{
381 ····················"iopub.execute_input":·"2025-03-22T09:38:47.005511Z",381 ····················"iopub.execute_input":·"2025-03-22T09:51:26.724956Z",
382 ····················"iopub.status.busy":·"2025-03-22T09:38:47.004762Z",382 ····················"iopub.status.busy":·"2025-03-22T09:51:26.724378Z",
383 ····················"iopub.status.idle":·"2025-03-22T09:38:47.082193Z",383 ····················"iopub.status.idle":·"2025-03-22T09:51:26.839364Z",
384 ····················"shell.execute_reply":·"2025-03-22T09:38:47.080071Z"384 ····················"shell.execute_reply":·"2025-03-22T09:51:26.823323Z"
385 ················}385 ················}
386 ············},386 ············},
Max diff block lines reached; 9118/16771 bytes (54.37%) of diff not shown.
8.44 KB
./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz
8.28 KB
area_weighted_temperature.ipynb
8.22 KB
Pretty-printed
Similarity: 0.99921875% Differences: {"'cells'": "{2: {'metadata': {'execution': {'iopub.execute_input': '2025-03-22T09:51:39.776828Z', " "'iopub.status.busy': '2025-03-22T09:51:39.776302Z', 'iopub.status.idle': " "'2025-03-22T09:51:41.536644Z', 'shell.execute_reply': " "'2025-03-22T09:51:41.535505Z'}}}, 4: {'metadata': {'execution': " "{'iopub.execute_input': '2025-03-22T09:51:41.544822Z', 'iopub.status.busy': " "'2025-03-22T09:51:41.544342Z', 'iopub.status.idle': '2025-03-22T09:51:4 […]
    
Offset 28, 18 lines modifiedOffset 28, 18 lines modified
28 ············"execution_count":·1,28 ············"execution_count":·1,
29 ············"metadata":·{29 ············"metadata":·{
30 ················"ExecuteTime":·{30 ················"ExecuteTime":·{
31 ····················"end_time":·"2020-03-17T14:43:57.222351Z",31 ····················"end_time":·"2020-03-17T14:43:57.222351Z",
32 ····················"start_time":·"2020-03-17T14:43:56.147541Z"32 ····················"start_time":·"2020-03-17T14:43:56.147541Z"
33 ················},33 ················},
34 ················"execution":·{34 ················"execution":·{
35 ····················"iopub.execute_input":·"2025-03-22T09:38:59.154118Z",35 ····················"iopub.execute_input":·"2025-03-22T09:51:39.776828Z",
36 ····················"iopub.status.busy":·"2025-03-22T09:38:59.153307Z",36 ····················"iopub.status.busy":·"2025-03-22T09:51:39.776302Z",
37 ····················"iopub.status.idle":·"2025-03-22T09:39:01.764145Z",37 ····················"iopub.status.idle":·"2025-03-22T09:51:41.536644Z",
38 ····················"shell.execute_reply":·"2025-03-22T09:39:01.748087Z"38 ····················"shell.execute_reply":·"2025-03-22T09:51:41.535505Z"
39 ················}39 ················}
40 ············},40 ············},
41 ············"outputs":·[41 ············"outputs":·[
42 ················{42 ················{
43 ····················"ename":·"ModuleNotFoundError",43 ····················"ename":·"ModuleNotFoundError",
44 ····················"evalue":·"No·module·named·'xarray'",44 ····················"evalue":·"No·module·named·'xarray'",
45 ····················"output_type":·"error",45 ····················"output_type":·"error",
Offset 75, 18 lines modifiedOffset 75, 18 lines modified
75 ············"execution_count":·2,75 ············"execution_count":·2,
76 ············"metadata":·{76 ············"metadata":·{
77 ················"ExecuteTime":·{77 ················"ExecuteTime":·{
78 ····················"end_time":·"2020-03-17T14:43:57.831734Z",78 ····················"end_time":·"2020-03-17T14:43:57.831734Z",
79 ····················"start_time":·"2020-03-17T14:43:57.651845Z"79 ····················"start_time":·"2020-03-17T14:43:57.651845Z"
80 ················},80 ················},
81 ················"execution":·{81 ················"execution":·{
82 ····················"iopub.execute_input":·"2025-03-22T09:39:01.777848Z",82 ····················"iopub.execute_input":·"2025-03-22T09:51:41.544822Z",
83 ····················"iopub.status.busy":·"2025-03-22T09:39:01.777070Z",83 ····················"iopub.status.busy":·"2025-03-22T09:51:41.544342Z",
84 ····················"iopub.status.idle":·"2025-03-22T09:39:01.892149Z",84 ····················"iopub.status.idle":·"2025-03-22T09:51:41.577227Z",
85 ····················"shell.execute_reply":·"2025-03-22T09:39:01.872088Z"85 ····················"shell.execute_reply":·"2025-03-22T09:51:41.576103Z"
86 ················}86 ················}
87 ············},87 ············},
88 ············"outputs":·[88 ············"outputs":·[
89 ················{89 ················{
90 ····················"ename":·"NameError",90 ····················"ename":·"NameError",
91 ····················"evalue":·"name·'xr'·is·not·defined",91 ····················"evalue":·"name·'xr'·is·not·defined",
92 ····················"output_type":·"error",92 ····················"output_type":·"error",
Offset 122, 18 lines modifiedOffset 122, 18 lines modified
122 ············"execution_count":·3,122 ············"execution_count":·3,
123 ············"metadata":·{123 ············"metadata":·{
124 ················"ExecuteTime":·{124 ················"ExecuteTime":·{
125 ····················"end_time":·"2020-03-17T14:43:59.887120Z",125 ····················"end_time":·"2020-03-17T14:43:59.887120Z",
126 ····················"start_time":·"2020-03-17T14:43:59.582894Z"126 ····················"start_time":·"2020-03-17T14:43:59.582894Z"
127 ················},127 ················},
128 ················"execution":·{128 ················"execution":·{
129 ····················"iopub.execute_input":·"2025-03-22T09:39:01.914476Z",129 ····················"iopub.execute_input":·"2025-03-22T09:51:41.588815Z",
130 ····················"iopub.status.busy":·"2025-03-22T09:39:01.913595Z",130 ····················"iopub.status.busy":·"2025-03-22T09:51:41.588314Z",
131 ····················"iopub.status.idle":·"2025-03-22T09:39:02.392126Z",131 ····················"iopub.status.idle":·"2025-03-22T09:51:41.972759Z",
132 ····················"shell.execute_reply":·"2025-03-22T09:39:02.376074Z"132 ····················"shell.execute_reply":·"2025-03-22T09:51:41.971308Z"
133 ················}133 ················}
134 ············},134 ············},
135 ············"outputs":·[135 ············"outputs":·[
136 ················{136 ················{
137 ····················"ename":·"NameError",137 ····················"ename":·"NameError",
138 ····················"evalue":·"name·'air'·is·not·defined",138 ····················"evalue":·"name·'air'·is·not·defined",
139 ····················"output_type":·"error",139 ····················"output_type":·"error",
Offset 178, 18 lines modifiedOffset 178, 18 lines modified
178 ············"execution_count":·4,178 ············"execution_count":·4,
179 ············"metadata":·{179 ············"metadata":·{
180 ················"ExecuteTime":·{180 ················"ExecuteTime":·{
181 ····················"end_time":·"2020-03-17T14:44:18.777092Z",181 ····················"end_time":·"2020-03-17T14:44:18.777092Z",
182 ····················"start_time":·"2020-03-17T14:44:18.736587Z"182 ····················"start_time":·"2020-03-17T14:44:18.736587Z"
183 ················},183 ················},
184 ················"execution":·{184 ················"execution":·{
185 ····················"iopub.execute_input":·"2025-03-22T09:39:02.422470Z",185 ····················"iopub.execute_input":·"2025-03-22T09:51:41.992881Z",
186 ····················"iopub.status.busy":·"2025-03-22T09:39:02.421572Z",186 ····················"iopub.status.busy":·"2025-03-22T09:51:41.992350Z",
187 ····················"iopub.status.idle":·"2025-03-22T09:39:02.556106Z",187 ····················"iopub.status.idle":·"2025-03-22T09:51:42.103328Z",
188 ····················"shell.execute_reply":·"2025-03-22T09:39:02.540076Z"188 ····················"shell.execute_reply":·"2025-03-22T09:51:42.087271Z"
189 ················}189 ················}
190 ············},190 ············},
191 ············"outputs":·[191 ············"outputs":·[
192 ················{192 ················{
193 ····················"ename":·"NameError",193 ····················"ename":·"NameError",
194 ····················"evalue":·"name·'air'·is·not·defined",194 ····················"evalue":·"name·'air'·is·not·defined",
195 ····················"output_type":·"error",195 ····················"output_type":·"error",
Offset 219, 18 lines modifiedOffset 219, 18 lines modified
219 ············"execution_count":·5,219 ············"execution_count":·5,
220 ············"metadata":·{220 ············"metadata":·{
221 ················"ExecuteTime":·{221 ················"ExecuteTime":·{
222 ····················"end_time":·"2020-03-17T14:44:52.607120Z",222 ····················"end_time":·"2020-03-17T14:44:52.607120Z",
223 ····················"start_time":·"2020-03-17T14:44:52.564674Z"223 ····················"start_time":·"2020-03-17T14:44:52.564674Z"
224 ················},224 ················},
225 ················"execution":·{225 ················"execution":·{
226 ····················"iopub.execute_input":·"2025-03-22T09:39:02.582330Z",226 ····················"iopub.execute_input":·"2025-03-22T09:51:42.128933Z",
227 ····················"iopub.status.busy":·"2025-03-22T09:39:02.581534Z",227 ····················"iopub.status.busy":·"2025-03-22T09:51:42.128379Z",
228 ····················"iopub.status.idle":·"2025-03-22T09:39:02.764152Z",228 ····················"iopub.status.idle":·"2025-03-22T09:51:42.271535Z",
229 ····················"shell.execute_reply":·"2025-03-22T09:39:02.748115Z"229 ····················"shell.execute_reply":·"2025-03-22T09:51:42.255284Z"
230 ················}230 ················}
231 ············},231 ············},
232 ············"outputs":·[232 ············"outputs":·[
233 ················{233 ················{
234 ····················"ename":·"NameError",234 ····················"ename":·"NameError",
235 ····················"evalue":·"name·'air'·is·not·defined",235 ····················"evalue":·"name·'air'·is·not·defined",
236 ····················"output_type":·"error",236 ····················"output_type":·"error",
Offset 252, 18 lines modifiedOffset 252, 18 lines modified
252 ············"execution_count":·6,252 ············"execution_count":·6,
253 ············"metadata":·{253 ············"metadata":·{
254 ················"ExecuteTime":·{254 ················"ExecuteTime":·{
255 ····················"end_time":·"2020-03-17T14:44:54.334279Z",255 ····················"end_time":·"2020-03-17T14:44:54.334279Z",
256 ····················"start_time":·"2020-03-17T14:44:54.280022Z"256 ····················"start_time":·"2020-03-17T14:44:54.280022Z"
257 ················},257 ················},
258 ················"execution":·{258 ················"execution":·{
259 ····················"iopub.execute_input":·"2025-03-22T09:39:02.794486Z",259 ····················"iopub.execute_input":·"2025-03-22T09:51:42.288935Z",
260 ····················"iopub.status.busy":·"2025-03-22T09:39:02.793593Z",260 ····················"iopub.status.busy":·"2025-03-22T09:51:42.288403Z",
261 ····················"iopub.status.idle":·"2025-03-22T09:39:02.932147Z",261 ····················"iopub.status.idle":·"2025-03-22T09:51:42.367383Z",
262 ····················"shell.execute_reply":·"2025-03-22T09:39:02.916080Z"262 ····················"shell.execute_reply":·"2025-03-22T09:51:42.351273Z"
263 ················}263 ················}
264 ············},264 ············},
265 ············"outputs":·[265 ············"outputs":·[
266 ················{266 ················{
267 ····················"ename":·"NameError",267 ····················"ename":·"NameError",
268 ····················"evalue":·"name·'air_weighted'·is·not·defined",268 ····················"evalue":·"name·'air_weighted'·is·not·defined",
269 ····················"output_type":·"error",269 ····················"output_type":·"error",
Offset 294, 18 lines modifiedOffset 294, 18 lines modified
294 ············"execution_count":·7,294 ············"execution_count":·7,
295 ············"metadata":·{295 ············"metadata":·{
296 ················"ExecuteTime":·{296 ················"ExecuteTime":·{
297 ····················"end_time":·"2020-03-17T14:45:08.877307Z",297 ····················"end_time":·"2020-03-17T14:45:08.877307Z",
298 ····················"start_time":·"2020-03-17T14:45:08.673383Z"298 ····················"start_time":·"2020-03-17T14:45:08.673383Z"
299 ················},299 ················},
300 ················"execution":·{300 ················"execution":·{
301 ····················"iopub.execute_input":·"2025-03-22T09:39:02.962496Z",301 ····················"iopub.execute_input":·"2025-03-22T09:51:42.385126Z",
302 ····················"iopub.status.busy":·"2025-03-22T09:39:02.961598Z",302 ····················"iopub.status.busy":·"2025-03-22T09:51:42.384593Z",
303 ····················"iopub.status.idle":·"2025-03-22T09:39:03.084126Z",303 ····················"iopub.status.idle":·"2025-03-22T09:51:42.503618Z",
304 ····················"shell.execute_reply":·"2025-03-22T09:39:03.068101Z"304 ····················"shell.execute_reply":·"2025-03-22T09:51:42.487298Z"
305 ················}305 ················}
306 ············},306 ············},
Max diff block lines reached; 177/7842 bytes (2.26%) of diff not shown.
1.5 KB
./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb
1.37 KB
Pretty-printed
Similarity: 0.9991319444444444% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2025-03-22T09:51:47.224367Z', " "'iopub.status.busy': '2025-03-22T09:51:47.223888Z', 'iopub.status.idle': " "'2025-03-22T09:51:47.600055Z', 'shell.execute_reply': " "'2025-03-22T09:51:47.598792Z'}}}}"}
    
Offset 12, 18 lines modifiedOffset 12, 18 lines modified
12 ········},12 ········},
13 ········{13 ········{
14 ············"cell_type":·"code",14 ············"cell_type":·"code",
15 ············"execution_count":·1,15 ············"execution_count":·1,
16 ············"id":·"41b90ede",16 ············"id":·"41b90ede",
17 ············"metadata":·{17 ············"metadata":·{
18 ················"execution":·{18 ················"execution":·{
19 ····················"iopub.execute_input":·"2025-03-22T09:39:10.168502Z",19 ····················"iopub.execute_input":·"2025-03-22T09:51:47.224367Z",
20 ····················"iopub.status.busy":·"2025-03-22T09:39:10.167731Z",20 ····················"iopub.status.busy":·"2025-03-22T09:51:47.223888Z",
21 ····················"iopub.status.idle":·"2025-03-22T09:39:10.956112Z",21 ····················"iopub.status.idle":·"2025-03-22T09:51:47.600055Z",
22 ····················"shell.execute_reply":·"2025-03-22T09:39:10.940093Z"22 ····················"shell.execute_reply":·"2025-03-22T09:51:47.598792Z"
23 ················}23 ················}
24 ············},24 ············},
25 ············"outputs":·[25 ············"outputs":·[
26 ················{26 ················{
27 ····················"ename":·"ModuleNotFoundError",27 ····················"ename":·"ModuleNotFoundError",
28 ····················"evalue":·"No·module·named·'xarray'",28 ····················"evalue":·"No·module·named·'xarray'",
29 ····················"output_type":·"error",29 ····················"output_type":·"error",
9.47 KB
./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz
9.33 KB
monthly-means.ipynb
9.29 KB
Pretty-printed
Similarity: 0.998721590909091% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2025-03-22T09:51:50.371362Z', " "'iopub.status.busy': '2025-03-22T09:51:50.370857Z', 'iopub.status.idle': " "'2025-03-22T09:51:52.225601Z', 'shell.execute_reply': " "'2025-03-22T09:51:52.224186Z'}}}, 3: {'metadata': {'execution': " "{'iopub.execute_input': '2025-03-22T09:51:52.230947Z', 'iopub.status.busy': " "'2025-03-22T09:51:52.230469Z', 'iopub.status.idle': '2025-03-22T09:51:5 […]
    
Offset 19, 18 lines modifiedOffset 19, 18 lines modified
19 ············"execution_count":·1,19 ············"execution_count":·1,
20 ············"metadata":·{20 ············"metadata":·{
21 ················"ExecuteTime":·{21 ················"ExecuteTime":·{
22 ····················"end_time":·"2018-11-28T20:51:35.958210Z",22 ····················"end_time":·"2018-11-28T20:51:35.958210Z",
23 ····················"start_time":·"2018-11-28T20:51:35.936966Z"23 ····················"start_time":·"2018-11-28T20:51:35.936966Z"
24 ················},24 ················},
25 ················"execution":·{25 ················"execution":·{
26 ····················"iopub.execute_input":·"2025-03-22T09:39:16.330356Z",26 ····················"iopub.execute_input":·"2025-03-22T09:51:50.371362Z",
27 ····················"iopub.status.busy":·"2025-03-22T09:39:16.329464Z",27 ····················"iopub.status.busy":·"2025-03-22T09:51:50.370857Z",
28 ····················"iopub.status.idle":·"2025-03-22T09:39:19.960145Z",28 ····················"iopub.status.idle":·"2025-03-22T09:51:52.225601Z",
29 ····················"shell.execute_reply":·"2025-03-22T09:39:19.944083Z"29 ····················"shell.execute_reply":·"2025-03-22T09:51:52.224186Z"
30 ················}30 ················}
31 ············},31 ············},
32 ············"outputs":·[32 ············"outputs":·[
33 ················{33 ················{
34 ····················"ename":·"ModuleNotFoundError",34 ····················"ename":·"ModuleNotFoundError",
35 ····················"evalue":·"No·module·named·'xarray'",35 ····················"evalue":·"No·module·named·'xarray'",
36 ····················"output_type":·"error",36 ····················"output_type":·"error",
Offset 62, 18 lines modifiedOffset 62, 18 lines modified
62 ············"execution_count":·2,62 ············"execution_count":·2,
63 ············"metadata":·{63 ············"metadata":·{
64 ················"ExecuteTime":·{64 ················"ExecuteTime":·{
65 ····················"end_time":·"2018-11-28T20:51:36.072316Z",65 ····················"end_time":·"2018-11-28T20:51:36.072316Z",
66 ····················"start_time":·"2018-11-28T20:51:36.016594Z"66 ····················"start_time":·"2018-11-28T20:51:36.016594Z"
67 ················},67 ················},
68 ················"execution":·{68 ················"execution":·{
69 ····················"iopub.execute_input":·"2025-03-22T09:39:19.990249Z",69 ····················"iopub.execute_input":·"2025-03-22T09:51:52.230947Z",
70 ····················"iopub.status.busy":·"2025-03-22T09:39:19.989461Z",70 ····················"iopub.status.busy":·"2025-03-22T09:51:52.230469Z",
71 ····················"iopub.status.idle":·"2025-03-22T09:39:20.108119Z",71 ····················"iopub.status.idle":·"2025-03-22T09:51:52.263829Z",
72 ····················"shell.execute_reply":·"2025-03-22T09:39:20.092084Z"72 ····················"shell.execute_reply":·"2025-03-22T09:51:52.262390Z"
73 ················}73 ················}
74 ············},74 ············},
75 ············"outputs":·[75 ············"outputs":·[
76 ················{76 ················{
77 ····················"ename":·"NameError",77 ····················"ename":·"NameError",
78 ····················"evalue":·"name·'xr'·is·not·defined",78 ····················"evalue":·"name·'xr'·is·not·defined",
79 ····················"output_type":·"error",79 ····················"output_type":·"error",
Offset 103, 18 lines modifiedOffset 103, 18 lines modified
103 ············]103 ············]
104 ········},104 ········},
105 ········{105 ········{
106 ············"cell_type":·"code",106 ············"cell_type":·"code",
107 ············"execution_count":·3,107 ············"execution_count":·3,
108 ············"metadata":·{108 ············"metadata":·{
109 ················"execution":·{109 ················"execution":·{
110 ····················"iopub.execute_input":·"2025-03-22T09:39:20.138145Z",110 ····················"iopub.execute_input":·"2025-03-22T09:51:52.268898Z",
111 ····················"iopub.status.busy":·"2025-03-22T09:39:20.137389Z",111 ····················"iopub.status.busy":·"2025-03-22T09:51:52.268433Z",
112 ····················"iopub.status.idle":·"2025-03-22T09:39:20.256103Z",112 ····················"iopub.status.idle":·"2025-03-22T09:51:52.300940Z",
113 ····················"shell.execute_reply":·"2025-03-22T09:39:20.242192Z"113 ····················"shell.execute_reply":·"2025-03-22T09:51:52.299585Z"
114 ················}114 ················}
115 ············},115 ············},
116 ············"outputs":·[116 ············"outputs":·[
117 ················{117 ················{
118 ····················"ename":·"NameError",118 ····················"ename":·"NameError",
119 ····················"evalue":·"name·'ds'·is·not·defined",119 ····················"evalue":·"name·'ds'·is·not·defined",
120 ····················"output_type":·"error",120 ····················"output_type":·"error",
Offset 136, 18 lines modifiedOffset 136, 18 lines modified
136 ············"execution_count":·4,136 ············"execution_count":·4,
137 ············"metadata":·{137 ············"metadata":·{
138 ················"ExecuteTime":·{138 ················"ExecuteTime":·{
139 ····················"end_time":·"2018-11-28T20:51:36.132413Z",139 ····················"end_time":·"2018-11-28T20:51:36.132413Z",
140 ····················"start_time":·"2018-11-28T20:51:36.073708Z"140 ····················"start_time":·"2018-11-28T20:51:36.073708Z"
141 ················},141 ················},
142 ················"execution":·{142 ················"execution":·{
143 ····················"iopub.execute_input":·"2025-03-22T09:39:20.273990Z",143 ····················"iopub.execute_input":·"2025-03-22T09:51:52.306168Z",
144 ····················"iopub.status.busy":·"2025-03-22T09:39:20.273297Z",144 ····················"iopub.status.busy":·"2025-03-22T09:51:52.305666Z",
145 ····················"iopub.status.idle":·"2025-03-22T09:39:20.382123Z",145 ····················"iopub.status.idle":·"2025-03-22T09:51:52.342968Z",
146 ····················"shell.execute_reply":·"2025-03-22T09:39:20.380071Z"146 ····················"shell.execute_reply":·"2025-03-22T09:51:52.341501Z"
147 ················}147 ················}
148 ············},148 ············},
149 ············"outputs":·[149 ············"outputs":·[
150 ················{150 ················{
151 ····················"ename":·"NameError",151 ····················"ename":·"NameError",
152 ····················"evalue":·"name·'month_length'·is·not·defined",152 ····················"evalue":·"name·'month_length'·is·not·defined",
153 ····················"output_type":·"error",153 ····················"output_type":·"error",
Offset 177, 18 lines modifiedOffset 177, 18 lines modified
177 ············"execution_count":·5,177 ············"execution_count":·5,
178 ············"metadata":·{178 ············"metadata":·{
179 ················"ExecuteTime":·{179 ················"ExecuteTime":·{
180 ····················"end_time":·"2018-11-28T20:51:36.152913Z",180 ····················"end_time":·"2018-11-28T20:51:36.152913Z",
181 ····················"start_time":·"2018-11-28T20:51:36.133997Z"181 ····················"start_time":·"2018-11-28T20:51:36.133997Z"
182 ················},182 ················},
183 ················"execution":·{183 ················"execution":·{
184 ····················"iopub.execute_input":·"2025-03-22T09:39:20.406565Z",184 ····················"iopub.execute_input":·"2025-03-22T09:51:52.348391Z",
185 ····················"iopub.status.busy":·"2025-03-22T09:39:20.405666Z",185 ····················"iopub.status.busy":·"2025-03-22T09:51:52.347924Z",
186 ····················"iopub.status.idle":·"2025-03-22T09:39:20.532147Z",186 ····················"iopub.status.idle":·"2025-03-22T09:51:52.379796Z",
187 ····················"shell.execute_reply":·"2025-03-22T09:39:20.516101Z"187 ····················"shell.execute_reply":·"2025-03-22T09:51:52.378332Z"
188 ················}188 ················}
189 ············},189 ············},
190 ············"outputs":·[190 ············"outputs":·[
191 ················{191 ················{
192 ····················"ename":·"NameError",192 ····················"ename":·"NameError",
193 ····················"evalue":·"name·'ds_weighted'·is·not·defined",193 ····················"evalue":·"name·'ds_weighted'·is·not·defined",
194 ····················"output_type":·"error",194 ····················"output_type":·"error",
Offset 209, 18 lines modifiedOffset 209, 18 lines modified
209 ············"execution_count":·6,209 ············"execution_count":·6,
210 ············"metadata":·{210 ············"metadata":·{
211 ················"ExecuteTime":·{211 ················"ExecuteTime":·{
212 ····················"end_time":·"2018-11-28T20:51:36.190765Z",212 ····················"end_time":·"2018-11-28T20:51:36.190765Z",
213 ····················"start_time":·"2018-11-28T20:51:36.154416Z"213 ····················"start_time":·"2018-11-28T20:51:36.154416Z"
214 ················},214 ················},
215 ················"execution":·{215 ················"execution":·{
216 ····················"iopub.execute_input":·"2025-03-22T09:39:20.566236Z",216 ····················"iopub.execute_input":·"2025-03-22T09:51:52.384866Z",
217 ····················"iopub.status.busy":·"2025-03-22T09:39:20.565454Z",217 ····················"iopub.status.busy":·"2025-03-22T09:51:52.384401Z",
218 ····················"iopub.status.idle":·"2025-03-22T09:39:20.684102Z",218 ····················"iopub.status.idle":·"2025-03-22T09:51:52.417266Z",
219 ····················"shell.execute_reply":·"2025-03-22T09:39:20.676612Z"219 ····················"shell.execute_reply":·"2025-03-22T09:51:52.415887Z"
220 ················}220 ················}
221 ············},221 ············},
222 ············"outputs":·[222 ············"outputs":·[
223 ················{223 ················{
224 ····················"ename":·"NameError",224 ····················"ename":·"NameError",
225 ····················"evalue":·"name·'ds'·is·not·defined",225 ····················"evalue":·"name·'ds'·is·not·defined",
226 ····················"output_type":·"error",226 ····················"output_type":·"error",
Offset 243, 18 lines modifiedOffset 243, 18 lines modified
243 ············"execution_count":·7,243 ············"execution_count":·7,
244 ············"metadata":·{244 ············"metadata":·{
245 ················"ExecuteTime":·{245 ················"ExecuteTime":·{
246 ····················"end_time":·"2018-11-28T20:51:40.264871Z",246 ····················"end_time":·"2018-11-28T20:51:40.264871Z",
247 ····················"start_time":·"2018-11-28T20:51:36.192467Z"247 ····················"start_time":·"2018-11-28T20:51:36.192467Z"
248 ················},248 ················},
249 ················"execution":·{249 ················"execution":·{
250 ····················"iopub.execute_input":·"2025-03-22T09:39:20.702417Z",250 ····················"iopub.execute_input":·"2025-03-22T09:51:52.422481Z",
251 ····················"iopub.status.busy":·"2025-03-22T09:39:20.701578Z",251 ····················"iopub.status.busy":·"2025-03-22T09:51:52.421967Z",
252 ····················"iopub.status.idle":·"2025-03-22T09:39:20.904120Z",252 ····················"iopub.status.idle":·"2025-03-22T09:51:52.481459Z",
253 ····················"shell.execute_reply":·"2025-03-22T09:39:20.884062Z"253 ····················"shell.execute_reply":·"2025-03-22T09:51:52.480026Z"
254 ················}254 ················}
255 ············},255 ············},
Max diff block lines reached; 1376/8936 bytes (15.40%) of diff not shown.
8.42 KB
./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz
8.26 KB
multidimensional-coords.ipynb
8.21 KB
Pretty-printed
Similarity: 0.9992708333333333% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2025-03-22T09:51:55.805013Z', " "'iopub.status.busy': '2025-03-22T09:51:55.804544Z', 'iopub.status.idle': " "'2025-03-22T09:51:57.620892Z', 'shell.execute_reply': " "'2025-03-22T09:51:57.619485Z'}}}, 3: {'metadata': {'execution': " "{'iopub.execute_input': '2025-03-22T09:51:57.625727Z', 'iopub.status.busy': " "'2025-03-22T09:51:57.625222Z', 'iopub.status.idle': '2025-03-22T09:51:5 […]
    
Offset 16, 18 lines modifiedOffset 16, 18 lines modified
16 ············"execution_count":·1,16 ············"execution_count":·1,
17 ············"metadata":·{17 ············"metadata":·{
18 ················"ExecuteTime":·{18 ················"ExecuteTime":·{
19 ····················"end_time":·"2018-11-28T20:49:56.068395Z",19 ····················"end_time":·"2018-11-28T20:49:56.068395Z",
20 ····················"start_time":·"2018-11-28T20:49:56.035349Z"20 ····················"start_time":·"2018-11-28T20:49:56.035349Z"
21 ················},21 ················},
22 ················"execution":·{22 ················"execution":·{
23 ····················"iopub.execute_input":·"2025-03-22T09:39:27.054850Z",23 ····················"iopub.execute_input":·"2025-03-22T09:51:55.805013Z",
24 ····················"iopub.status.busy":·"2025-03-22T09:39:27.054103Z",24 ····················"iopub.status.busy":·"2025-03-22T09:51:55.804544Z",
25 ····················"iopub.status.idle":·"2025-03-22T09:39:30.380125Z",25 ····················"iopub.status.idle":·"2025-03-22T09:51:57.620892Z",
26 ····················"shell.execute_reply":·"2025-03-22T09:39:30.364080Z"26 ····················"shell.execute_reply":·"2025-03-22T09:51:57.619485Z"
27 ················}27 ················}
28 ············},28 ············},
29 ············"outputs":·[29 ············"outputs":·[
30 ················{30 ················{
31 ····················"ename":·"ModuleNotFoundError",31 ····················"ename":·"ModuleNotFoundError",
32 ····················"evalue":·"No·module·named·'xarray'",32 ····················"evalue":·"No·module·named·'xarray'",
33 ····················"output_type":·"error",33 ····················"output_type":·"error",
Offset 60, 18 lines modifiedOffset 60, 18 lines modified
60 ············"execution_count":·2,60 ············"execution_count":·2,
61 ············"metadata":·{61 ············"metadata":·{
62 ················"ExecuteTime":·{62 ················"ExecuteTime":·{
63 ····················"end_time":·"2018-11-28T20:50:13.629720Z",63 ····················"end_time":·"2018-11-28T20:50:13.629720Z",
64 ····················"start_time":·"2018-11-28T20:50:13.484542Z"64 ····················"start_time":·"2018-11-28T20:50:13.484542Z"
65 ················},65 ················},
66 ················"execution":·{66 ················"execution":·{
67 ····················"iopub.execute_input":·"2025-03-22T09:39:30.394381Z",67 ····················"iopub.execute_input":·"2025-03-22T09:51:57.625727Z",
68 ····················"iopub.status.busy":·"2025-03-22T09:39:30.393507Z",68 ····················"iopub.status.busy":·"2025-03-22T09:51:57.625222Z",
69 ····················"iopub.status.idle":·"2025-03-22T09:39:30.500098Z",69 ····················"iopub.status.idle":·"2025-03-22T09:51:57.657845Z",
70 ····················"shell.execute_reply":·"2025-03-22T09:39:30.484065Z"70 ····················"shell.execute_reply":·"2025-03-22T09:51:57.656465Z"
71 ················}71 ················}
72 ············},72 ············},
73 ············"outputs":·[73 ············"outputs":·[
74 ················{74 ················{
75 ····················"ename":·"NameError",75 ····················"ename":·"NameError",
76 ····················"evalue":·"name·'xr'·is·not·defined",76 ····················"evalue":·"name·'xr'·is·not·defined",
77 ····················"output_type":·"error",77 ····················"output_type":·"error",
Offset 100, 18 lines modifiedOffset 100, 18 lines modified
100 ············"execution_count":·3,100 ············"execution_count":·3,
101 ············"metadata":·{101 ············"metadata":·{
102 ················"ExecuteTime":·{102 ················"ExecuteTime":·{
103 ····················"end_time":·"2018-11-28T20:50:15.836061Z",103 ····················"end_time":·"2018-11-28T20:50:15.836061Z",
104 ····················"start_time":·"2018-11-28T20:50:15.768376Z"104 ····················"start_time":·"2018-11-28T20:50:15.768376Z"
105 ················},105 ················},
106 ················"execution":·{106 ················"execution":·{
107 ····················"iopub.execute_input":·"2025-03-22T09:39:30.514188Z",107 ····················"iopub.execute_input":·"2025-03-22T09:51:57.662459Z",
108 ····················"iopub.status.busy":·"2025-03-22T09:39:30.513354Z",108 ····················"iopub.status.busy":·"2025-03-22T09:51:57.661915Z",
109 ····················"iopub.status.idle":·"2025-03-22T09:39:30.640104Z",109 ····················"iopub.status.idle":·"2025-03-22T09:51:57.694054Z",
110 ····················"shell.execute_reply":·"2025-03-22T09:39:30.624067Z"110 ····················"shell.execute_reply":·"2025-03-22T09:51:57.692641Z"
111 ················}111 ················}
112 ············},112 ············},
113 ············"outputs":·[113 ············"outputs":·[
114 ················{114 ················{
115 ····················"ename":·"NameError",115 ····················"ename":·"NameError",
116 ····················"evalue":·"name·'ds'·is·not·defined",116 ····················"evalue":·"name·'ds'·is·not·defined",
117 ····················"output_type":·"error",117 ····················"output_type":·"error",
Offset 142, 18 lines modifiedOffset 142, 18 lines modified
142 ············"execution_count":·4,142 ············"execution_count":·4,
143 ············"metadata":·{143 ············"metadata":·{
144 ················"ExecuteTime":·{144 ················"ExecuteTime":·{
145 ····················"end_time":·"2018-11-28T20:50:17.928556Z",145 ····················"end_time":·"2018-11-28T20:50:17.928556Z",
146 ····················"start_time":·"2018-11-28T20:50:17.031211Z"146 ····················"start_time":·"2018-11-28T20:50:17.031211Z"
147 ················},147 ················},
148 ················"execution":·{148 ················"execution":·{
149 ····················"iopub.execute_input":·"2025-03-22T09:39:30.654451Z",149 ····················"iopub.execute_input":·"2025-03-22T09:51:57.698664Z",
150 ····················"iopub.status.busy":·"2025-03-22T09:39:30.653555Z",150 ····················"iopub.status.busy":·"2025-03-22T09:51:57.698171Z",
151 ····················"iopub.status.idle":·"2025-03-22T09:39:30.765541Z",151 ····················"iopub.status.idle":·"2025-03-22T09:51:57.731827Z",
152 ····················"shell.execute_reply":·"2025-03-22T09:39:30.763125Z"152 ····················"shell.execute_reply":·"2025-03-22T09:51:57.730367Z"
153 ················}153 ················}
154 ············},154 ············},
155 ············"outputs":·[155 ············"outputs":·[
156 ················{156 ················{
157 ····················"ename":·"NameError",157 ····················"ename":·"NameError",
158 ····················"evalue":·"name·'plt'·is·not·defined",158 ····················"evalue":·"name·'plt'·is·not·defined",
159 ····················"output_type":·"error",159 ····················"output_type":·"error",
Offset 185, 18 lines modifiedOffset 185, 18 lines modified
185 ············"execution_count":·5,185 ············"execution_count":·5,
186 ············"metadata":·{186 ············"metadata":·{
187 ················"ExecuteTime":·{187 ················"ExecuteTime":·{
188 ····················"end_time":·"2018-11-28T20:50:20.567749Z",188 ····················"end_time":·"2018-11-28T20:50:20.567749Z",
189 ····················"start_time":·"2018-11-28T20:50:19.999393Z"189 ····················"start_time":·"2018-11-28T20:50:19.999393Z"
190 ················},190 ················},
191 ················"execution":·{191 ················"execution":·{
192 ····················"iopub.execute_input":·"2025-03-22T09:39:30.777962Z",192 ····················"iopub.execute_input":·"2025-03-22T09:51:57.736224Z",
193 ····················"iopub.status.busy":·"2025-03-22T09:39:30.777185Z",193 ····················"iopub.status.busy":·"2025-03-22T09:51:57.735734Z",
194 ····················"iopub.status.idle":·"2025-03-22T09:39:30.832895Z",194 ····················"iopub.status.idle":·"2025-03-22T09:51:57.767302Z",
195 ····················"shell.execute_reply":·"2025-03-22T09:39:30.830966Z"195 ····················"shell.execute_reply":·"2025-03-22T09:51:57.765852Z"
196 ················}196 ················}
197 ············},197 ············},
198 ············"outputs":·[198 ············"outputs":·[
199 ················{199 ················{
200 ····················"ename":·"NameError",200 ····················"ename":·"NameError",
201 ····················"evalue":·"name·'ds'·is·not·defined",201 ····················"evalue":·"name·'ds'·is·not·defined",
202 ····················"output_type":·"error",202 ····················"output_type":·"error",
Offset 224, 18 lines modifiedOffset 224, 18 lines modified
224 ············"execution_count":·6,224 ············"execution_count":·6,
225 ············"metadata":·{225 ············"metadata":·{
226 ················"ExecuteTime":·{226 ················"ExecuteTime":·{
227 ····················"end_time":·"2018-11-28T20:50:31.131708Z",227 ····················"end_time":·"2018-11-28T20:50:31.131708Z",
228 ····················"start_time":·"2018-11-28T20:50:30.444697Z"228 ····················"start_time":·"2018-11-28T20:50:30.444697Z"
229 ················},229 ················},
230 ················"execution":·{230 ················"execution":·{
231 ····················"iopub.execute_input":·"2025-03-22T09:39:30.846002Z",231 ····················"iopub.execute_input":·"2025-03-22T09:51:57.771744Z",
232 ····················"iopub.status.busy":·"2025-03-22T09:39:30.845250Z",232 ····················"iopub.status.busy":·"2025-03-22T09:51:57.771245Z",
233 ····················"iopub.status.idle":·"2025-03-22T09:39:30.912208Z",233 ····················"iopub.status.idle":·"2025-03-22T09:51:57.807954Z",
234 ····················"shell.execute_reply":·"2025-03-22T09:39:30.910208Z"234 ····················"shell.execute_reply":·"2025-03-22T09:51:57.806526Z"
235 ················}235 ················}
236 ············},236 ············},
237 ············"outputs":·[237 ············"outputs":·[
238 ················{238 ················{
239 ····················"ename":·"NameError",239 ····················"ename":·"NameError",
240 ····················"evalue":·"name·'plt'·is·not·defined",240 ····················"evalue":·"name·'plt'·is·not·defined",
241 ····················"output_type":·"error",241 ····················"output_type":·"error",
Offset 272, 18 lines modifiedOffset 272, 18 lines modified
272 ············"execution_count":·7,272 ············"execution_count":·7,
273 ············"metadata":·{273 ············"metadata":·{
274 ················"ExecuteTime":·{274 ················"ExecuteTime":·{
275 ····················"end_time":·"2018-11-28T20:50:43.670463Z",275 ····················"end_time":·"2018-11-28T20:50:43.670463Z",
276 ····················"start_time":·"2018-11-28T20:50:43.245501Z"276 ····················"start_time":·"2018-11-28T20:50:43.245501Z"
277 ················},277 ················},
278 ················"execution":·{278 ················"execution":·{
279 ····················"iopub.execute_input":·"2025-03-22T09:39:30.919376Z",279 ····················"iopub.execute_input":·"2025-03-22T09:51:57.812325Z",
280 ····················"iopub.status.busy":·"2025-03-22T09:39:30.918646Z",280 ····················"iopub.status.busy":·"2025-03-22T09:51:57.811850Z",
281 ····················"iopub.status.idle":·"2025-03-22T09:39:30.980219Z",281 ····················"iopub.status.idle":·"2025-03-22T09:51:57.846874Z",
282 ····················"shell.execute_reply":·"2025-03-22T09:39:30.978261Z"282 ····················"shell.execute_reply":·"2025-03-22T09:51:57.845481Z"
283 ················}283 ················}
284 ············},284 ············},
Max diff block lines reached; 166/7820 bytes (2.12%) of diff not shown.
6.66 KB
./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz
6.51 KB
visualization_gallery.ipynb
6.45 KB
Pretty-printed
Similarity: 0.9984375% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2025-03-22T09:52:02.421250Z', " "'iopub.status.busy': '2025-03-22T09:52:02.420736Z', 'iopub.status.idle': " "'2025-03-22T09:52:04.293257Z', 'shell.execute_reply': " "'2025-03-22T09:52:04.292115Z'}}}, 3: {'metadata': {'execution': " "{'iopub.execute_input': '2025-03-22T09:52:04.308761Z', 'iopub.status.busy': " "'2025-03-22T09:52:04.308251Z', 'iopub.status.idle': '2025-03-22T09:52:0 […]
    
Offset 10, 18 lines modifiedOffset 10, 18 lines modified
10 ············]10 ············]
11 ········},11 ········},
12 ········{12 ········{
13 ············"cell_type":·"code",13 ············"cell_type":·"code",
14 ············"execution_count":·1,14 ············"execution_count":·1,
15 ············"metadata":·{15 ············"metadata":·{
16 ················"execution":·{16 ················"execution":·{
17 ····················"iopub.execute_input":·"2025-03-22T09:39:38.066148Z",17 ····················"iopub.execute_input":·"2025-03-22T09:52:02.421250Z",
18 ····················"iopub.status.busy":·"2025-03-22T09:39:38.065348Z",18 ····················"iopub.status.busy":·"2025-03-22T09:52:02.420736Z",
19 ····················"iopub.status.idle":·"2025-03-22T09:39:40.390569Z",19 ····················"iopub.status.idle":·"2025-03-22T09:52:04.293257Z",
20 ····················"shell.execute_reply":·"2025-03-22T09:39:40.388892Z"20 ····················"shell.execute_reply":·"2025-03-22T09:52:04.292115Z"
21 ················}21 ················}
22 ············},22 ············},
23 ············"outputs":·[23 ············"outputs":·[
24 ················{24 ················{
25 ····················"ename":·"ModuleNotFoundError",25 ····················"ename":·"ModuleNotFoundError",
26 ····················"evalue":·"No·module·named·'xarray'",26 ····················"evalue":·"No·module·named·'xarray'",
27 ····················"output_type":·"error",27 ····················"output_type":·"error",
Offset 49, 18 lines modifiedOffset 49, 18 lines modified
49 ············]49 ············]
50 ········},50 ········},
51 ········{51 ········{
52 ············"cell_type":·"code",52 ············"cell_type":·"code",
53 ············"execution_count":·2,53 ············"execution_count":·2,
54 ············"metadata":·{54 ············"metadata":·{
55 ················"execution":·{55 ················"execution":·{
56 ····················"iopub.execute_input":·"2025-03-22T09:39:40.406133Z",56 ····················"iopub.execute_input":·"2025-03-22T09:52:04.308761Z",
57 ····················"iopub.status.busy":·"2025-03-22T09:39:40.405411Z",57 ····················"iopub.status.busy":·"2025-03-22T09:52:04.308251Z",
58 ····················"iopub.status.idle":·"2025-03-22T09:39:40.452904Z",58 ····················"iopub.status.idle":·"2025-03-22T09:52:04.411349Z",
59 ····················"shell.execute_reply":·"2025-03-22T09:39:40.451011Z"59 ····················"shell.execute_reply":·"2025-03-22T09:52:04.395352Z"
60 ················}60 ················}
61 ············},61 ············},
62 ············"outputs":·[62 ············"outputs":·[
63 ················{63 ················{
64 ····················"ename":·"NameError",64 ····················"ename":·"NameError",
65 ····················"evalue":·"name·'xr'·is·not·defined",65 ····················"evalue":·"name·'xr'·is·not·defined",
66 ····················"output_type":·"error",66 ····················"output_type":·"error",
Offset 91, 18 lines modifiedOffset 91, 18 lines modified
91 ············]91 ············]
92 ········},92 ········},
93 ········{93 ········{
94 ············"cell_type":·"code",94 ············"cell_type":·"code",
95 ············"execution_count":·3,95 ············"execution_count":·3,
96 ············"metadata":·{96 ············"metadata":·{
97 ················"execution":·{97 ················"execution":·{
98 ····················"iopub.execute_input":·"2025-03-22T09:39:40.462551Z",98 ····················"iopub.execute_input":·"2025-03-22T09:52:04.429125Z",
99 ····················"iopub.status.busy":·"2025-03-22T09:39:40.461730Z",99 ····················"iopub.status.busy":·"2025-03-22T09:52:04.428506Z",
100 ····················"iopub.status.idle":·"2025-03-22T09:39:40.522796Z",100 ····················"iopub.status.idle":·"2025-03-22T09:52:04.555315Z",
101 ····················"shell.execute_reply":·"2025-03-22T09:39:40.521108Z"101 ····················"shell.execute_reply":·"2025-03-22T09:52:04.539289Z"
102 ················}102 ················}
103 ············},103 ············},
104 ············"outputs":·[104 ············"outputs":·[
105 ················{105 ················{
106 ····················"ename":·"NameError",106 ····················"ename":·"NameError",
107 ····················"evalue":·"name·'ds'·is·not·defined",107 ····················"evalue":·"name·'ds'·is·not·defined",
108 ····················"output_type":·"error",108 ····················"output_type":·"error",
Offset 144, 18 lines modifiedOffset 144, 18 lines modified
144 ············]144 ············]
145 ········},145 ········},
146 ········{146 ········{
147 ············"cell_type":·"code",147 ············"cell_type":·"code",
148 ············"execution_count":·4,148 ············"execution_count":·4,
149 ············"metadata":·{149 ············"metadata":·{
150 ················"execution":·{150 ················"execution":·{
151 ····················"iopub.execute_input":·"2025-03-22T09:39:40.529995Z",151 ····················"iopub.execute_input":·"2025-03-22T09:52:04.572824Z",
152 ····················"iopub.status.busy":·"2025-03-22T09:39:40.529345Z",152 ····················"iopub.status.busy":·"2025-03-22T09:52:04.572296Z",
153 ····················"iopub.status.idle":·"2025-03-22T09:39:40.596032Z",153 ····················"iopub.status.idle":·"2025-03-22T09:52:04.707359Z",
154 ····················"shell.execute_reply":·"2025-03-22T09:39:40.594408Z"154 ····················"shell.execute_reply":·"2025-03-22T09:52:04.691308Z"
155 ················}155 ················}
156 ············},156 ············},
157 ············"outputs":·[157 ············"outputs":·[
158 ················{158 ················{
159 ····················"ename":·"NameError",159 ····················"ename":·"NameError",
160 ····················"evalue":·"name·'ds'·is·not·defined",160 ····················"evalue":·"name·'ds'·is·not·defined",
161 ····················"output_type":·"error",161 ····················"output_type":·"error",
Offset 208, 18 lines modifiedOffset 208, 18 lines modified
208 ············]208 ············]
209 ········},209 ········},
210 ········{210 ········{
211 ············"cell_type":·"code",211 ············"cell_type":·"code",
212 ············"execution_count":·5,212 ············"execution_count":·5,
213 ············"metadata":·{213 ············"metadata":·{
214 ················"execution":·{214 ················"execution":·{
215 ····················"iopub.execute_input":·"2025-03-22T09:39:40.603371Z",215 ····················"iopub.execute_input":·"2025-03-22T09:52:04.724822Z",
216 ····················"iopub.status.busy":·"2025-03-22T09:39:40.602716Z",216 ····················"iopub.status.busy":·"2025-03-22T09:52:04.724292Z",
217 ····················"iopub.status.idle":·"2025-03-22T09:39:40.663593Z",217 ····················"iopub.status.idle":·"2025-03-22T09:52:04.843338Z",
218 ····················"shell.execute_reply":·"2025-03-22T09:39:40.661937Z"218 ····················"shell.execute_reply":·"2025-03-22T09:52:04.827961Z"
219 ················}219 ················}
220 ············},220 ············},
221 ············"outputs":·[221 ············"outputs":·[
222 ················{222 ················{
223 ····················"ename":·"NameError",223 ····················"ename":·"NameError",
224 ····················"evalue":·"name·'ds'·is·not·defined",224 ····················"evalue":·"name·'ds'·is·not·defined",
225 ····················"output_type":·"error",225 ····················"output_type":·"error",
Offset 264, 18 lines modifiedOffset 264, 18 lines modified
264 ············]264 ············]
265 ········},265 ········},
266 ········{266 ········{
267 ············"cell_type":·"code",267 ············"cell_type":·"code",
268 ············"execution_count":·6,268 ············"execution_count":·6,
269 ············"metadata":·{269 ············"metadata":·{
270 ················"execution":·{270 ················"execution":·{
271 ····················"iopub.execute_input":·"2025-03-22T09:39:40.671035Z",271 ····················"iopub.execute_input":·"2025-03-22T09:52:04.860824Z",
272 ····················"iopub.status.busy":·"2025-03-22T09:39:40.670397Z",272 ····················"iopub.status.busy":·"2025-03-22T09:52:04.860301Z",
273 ····················"iopub.status.idle":·"2025-03-22T09:39:40.729534Z",273 ····················"iopub.status.idle":·"2025-03-22T09:52:04.987339Z",
274 ····················"shell.execute_reply":·"2025-03-22T09:39:40.727893Z"274 ····················"shell.execute_reply":·"2025-03-22T09:52:04.971298Z"
275 ················}275 ················}
276 ············},276 ············},
277 ············"outputs":·[277 ············"outputs":·[
278 ················{278 ················{
279 ····················"ename":·"NameError",279 ····················"ename":·"NameError",
280 ····················"evalue":·"name·'ds'·is·not·defined",280 ····················"evalue":·"name·'ds'·is·not·defined",
281 ····················"output_type":·"error",281 ····················"output_type":·"error",
14.9 KB
./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz
14.8 KB
weather-data.ipynb
14.8 KB
Pretty-printed
Similarity: 0.9992476851851853% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2025-03-22T09:52:10.824843Z', " "'iopub.status.busy': '2025-03-22T09:52:10.824308Z', 'iopub.status.idle': " "'2025-03-22T09:52:14.403354Z', 'shell.execute_reply': " "'2025-03-22T09:52:14.387314Z'}}}, 4: {'metadata': {'execution': " "{'iopub.execute_input': '2025-03-22T09:52:14.421005Z', 'iopub.status.busy': " "'2025-03-22T09:52:14.420448Z', 'iopub.status.idle': '2025-03-22T09:52:1 […]
    
Offset 15, 18 lines modifiedOffset 15, 18 lines modified
15 ············"execution_count":·1,15 ············"execution_count":·1,
16 ············"metadata":·{16 ············"metadata":·{
17 ················"ExecuteTime":·{17 ················"ExecuteTime":·{
18 ····················"end_time":·"2020-01-27T15:43:36.127628Z",18 ····················"end_time":·"2020-01-27T15:43:36.127628Z",
19 ····················"start_time":·"2020-01-27T15:43:36.081733Z"19 ····················"start_time":·"2020-01-27T15:43:36.081733Z"
20 ················},20 ················},
21 ················"execution":·{21 ················"execution":·{
22 ····················"iopub.execute_input":·"2025-03-22T09:39:47.541988Z",22 ····················"iopub.execute_input":·"2025-03-22T09:52:10.824843Z",
23 ····················"iopub.status.busy":·"2025-03-22T09:39:47.541289Z",23 ····················"iopub.status.busy":·"2025-03-22T09:52:10.824308Z",
24 ····················"iopub.status.idle":·"2025-03-22T09:39:52.624195Z",24 ····················"iopub.status.idle":·"2025-03-22T09:52:14.403354Z",
25 ····················"shell.execute_reply":·"2025-03-22T09:39:52.608103Z"25 ····················"shell.execute_reply":·"2025-03-22T09:52:14.387314Z"
26 ················}26 ················}
27 ············},27 ············},
28 ············"outputs":·[28 ············"outputs":·[
29 ················{29 ················{
30 ····················"ename":·"ModuleNotFoundError",30 ····················"ename":·"ModuleNotFoundError",
31 ····················"evalue":·"No·module·named·'xarray'",31 ····················"evalue":·"No·module·named·'xarray'",
32 ····················"output_type":·"error",32 ····················"output_type":·"error",
Offset 86, 18 lines modifiedOffset 86, 18 lines modified
86 ············"execution_count":·2,86 ············"execution_count":·2,
87 ············"metadata":·{87 ············"metadata":·{
88 ················"ExecuteTime":·{88 ················"ExecuteTime":·{
89 ····················"end_time":·"2020-01-27T15:47:14.160297Z",89 ····················"end_time":·"2020-01-27T15:47:14.160297Z",
90 ····················"start_time":·"2020-01-27T15:47:14.126738Z"90 ····················"start_time":·"2020-01-27T15:47:14.126738Z"
91 ················},91 ················},
92 ················"execution":·{92 ················"execution":·{
93 ····················"iopub.execute_input":·"2025-03-22T09:39:52.650229Z",93 ····················"iopub.execute_input":·"2025-03-22T09:52:14.421005Z",
94 ····················"iopub.status.busy":·"2025-03-22T09:39:52.649445Z",94 ····················"iopub.status.busy":·"2025-03-22T09:52:14.420448Z",
95 ····················"iopub.status.idle":·"2025-03-22T09:39:52.788131Z",95 ····················"iopub.status.idle":·"2025-03-22T09:52:14.535344Z",
96 ····················"shell.execute_reply":·"2025-03-22T09:39:52.772112Z"96 ····················"shell.execute_reply":·"2025-03-22T09:52:14.519318Z"
97 ················}97 ················}
98 ············},98 ············},
99 ············"outputs":·[99 ············"outputs":·[
100 ················{100 ················{
101 ····················"ename":·"NameError",101 ····················"ename":·"NameError",
102 ····················"evalue":·"name·'ds'·is·not·defined",102 ····················"evalue":·"name·'ds'·is·not·defined",
103 ····················"output_type":·"error",103 ····················"output_type":·"error",
Offset 119, 18 lines modifiedOffset 119, 18 lines modified
119 ············"execution_count":·3,119 ············"execution_count":·3,
120 ············"metadata":·{120 ············"metadata":·{
121 ················"ExecuteTime":·{121 ················"ExecuteTime":·{
122 ····················"end_time":·"2020-01-27T15:47:32.682065Z",122 ····················"end_time":·"2020-01-27T15:47:32.682065Z",
123 ····················"start_time":·"2020-01-27T15:47:32.652629Z"123 ····················"start_time":·"2020-01-27T15:47:32.652629Z"
124 ················},124 ················},
125 ················"execution":·{125 ················"execution":·{
126 ····················"iopub.execute_input":·"2025-03-22T09:39:52.814404Z",126 ····················"iopub.execute_input":·"2025-03-22T09:52:14.552879Z",
127 ····················"iopub.status.busy":·"2025-03-22T09:39:52.813551Z",127 ····················"iopub.status.busy":·"2025-03-22T09:52:14.552350Z",
128 ····················"iopub.status.idle":·"2025-03-22T09:39:52.944143Z",128 ····················"iopub.status.idle":·"2025-03-22T09:52:14.667349Z",
129 ····················"shell.execute_reply":·"2025-03-22T09:39:52.928119Z"129 ····················"shell.execute_reply":·"2025-03-22T09:52:14.647304Z"
130 ················}130 ················}
131 ············},131 ············},
132 ············"outputs":·[132 ············"outputs":·[
133 ················{133 ················{
134 ····················"ename":·"NameError",134 ····················"ename":·"NameError",
135 ····················"evalue":·"name·'df'·is·not·defined",135 ····················"evalue":·"name·'df'·is·not·defined",
136 ····················"output_type":·"error",136 ····················"output_type":·"error",
Offset 158, 18 lines modifiedOffset 158, 18 lines modified
158 ············"execution_count":·4,158 ············"execution_count":·4,
159 ············"metadata":·{159 ············"metadata":·{
160 ················"ExecuteTime":·{160 ················"ExecuteTime":·{
161 ····················"end_time":·"2020-01-27T15:47:34.617042Z",161 ····················"end_time":·"2020-01-27T15:47:34.617042Z",
162 ····················"start_time":·"2020-01-27T15:47:34.282605Z"162 ····················"start_time":·"2020-01-27T15:47:34.282605Z"
163 ················},163 ················},
164 ················"execution":·{164 ················"execution":·{
165 ····················"iopub.execute_input":·"2025-03-22T09:39:52.970240Z",165 ····················"iopub.execute_input":·"2025-03-22T09:52:14.684847Z",
166 ····················"iopub.status.busy":·"2025-03-22T09:39:52.969468Z",166 ····················"iopub.status.busy":·"2025-03-22T09:52:14.684308Z",
167 ····················"iopub.status.idle":·"2025-03-22T09:39:53.088178Z",167 ····················"iopub.status.idle":·"2025-03-22T09:52:14.803374Z",
168 ····················"shell.execute_reply":·"2025-03-22T09:39:53.072269Z"168 ····················"shell.execute_reply":·"2025-03-22T09:52:14.787313Z"
169 ················}169 ················}
170 ············},170 ············},
171 ············"outputs":·[171 ············"outputs":·[
172 ················{172 ················{
173 ····················"ename":·"NameError",173 ····················"ename":·"NameError",
174 ····················"evalue":·"name·'ds'·is·not·defined",174 ····················"evalue":·"name·'ds'·is·not·defined",
175 ····················"output_type":·"error",175 ····················"output_type":·"error",
Offset 197, 18 lines modifiedOffset 197, 18 lines modified
197 ············"execution_count":·5,197 ············"execution_count":·5,
198 ············"metadata":·{198 ············"metadata":·{
199 ················"ExecuteTime":·{199 ················"ExecuteTime":·{
200 ····················"end_time":·"2020-01-27T15:47:37.643175Z",200 ····················"end_time":·"2020-01-27T15:47:37.643175Z",
201 ····················"start_time":·"2020-01-27T15:47:37.202479Z"201 ····················"start_time":·"2020-01-27T15:47:37.202479Z"
202 ················},202 ················},
203 ················"execution":·{203 ················"execution":·{
204 ····················"iopub.execute_input":·"2025-03-22T09:39:53.114478Z",204 ····················"iopub.execute_input":·"2025-03-22T09:52:14.820853Z",
205 ····················"iopub.status.busy":·"2025-03-22T09:39:53.113566Z",205 ····················"iopub.status.busy":·"2025-03-22T09:52:14.820306Z",
206 ····················"iopub.status.idle":·"2025-03-22T09:39:53.244120Z",206 ····················"iopub.status.idle":·"2025-03-22T09:52:14.919335Z",
207 ····················"shell.execute_reply":·"2025-03-22T09:39:53.228071Z"207 ····················"shell.execute_reply":·"2025-03-22T09:52:14.903302Z"
208 ················}208 ················}
209 ············},209 ············},
210 ············"outputs":·[210 ············"outputs":·[
211 ················{211 ················{
212 ····················"ename":·"NameError",212 ····················"ename":·"NameError",
213 ····················"evalue":·"name·'df'·is·not·defined",213 ····················"evalue":·"name·'df'·is·not·defined",
214 ····················"output_type":·"error",214 ····················"output_type":·"error",
Offset 236, 18 lines modifiedOffset 236, 18 lines modified
236 ············"execution_count":·6,236 ············"execution_count":·6,
237 ············"metadata":·{237 ············"metadata":·{
238 ················"ExecuteTime":·{238 ················"ExecuteTime":·{
239 ····················"end_time":·"2020-01-27T15:48:11.241224Z",239 ····················"end_time":·"2020-01-27T15:48:11.241224Z",
240 ····················"start_time":·"2020-01-27T15:48:11.211156Z"240 ····················"start_time":·"2020-01-27T15:48:11.211156Z"
241 ················},241 ················},
242 ················"execution":·{242 ················"execution":·{
243 ····················"iopub.execute_input":·"2025-03-22T09:39:53.274377Z",243 ····················"iopub.execute_input":·"2025-03-22T09:52:14.936845Z",
244 ····················"iopub.status.busy":·"2025-03-22T09:39:53.273532Z",244 ····················"iopub.status.busy":·"2025-03-22T09:52:14.936317Z",
245 ····················"iopub.status.idle":·"2025-03-22T09:39:53.420143Z",245 ····················"iopub.status.idle":·"2025-03-22T09:52:15.051375Z",
246 ····················"shell.execute_reply":·"2025-03-22T09:39:53.404061Z"246 ····················"shell.execute_reply":·"2025-03-22T09:52:15.035329Z"
247 ················}247 ················}
248 ············},248 ············},
249 ············"outputs":·[249 ············"outputs":·[
250 ················{250 ················{
251 ····················"ename":·"NameError",251 ····················"ename":·"NameError",
252 ····················"evalue":·"name·'ds'·is·not·defined",252 ····················"evalue":·"name·'ds'·is·not·defined",
253 ····················"output_type":·"error",253 ····················"output_type":·"error",
Offset 269, 18 lines modifiedOffset 269, 18 lines modified
269 ············"execution_count":·7,269 ············"execution_count":·7,
270 ············"metadata":·{270 ············"metadata":·{
271 ················"ExecuteTime":·{271 ················"ExecuteTime":·{
272 ····················"end_time":·"2020-01-27T15:48:13.131247Z",272 ····················"end_time":·"2020-01-27T15:48:13.131247Z",
273 ····················"start_time":·"2020-01-27T15:48:12.924985Z"273 ····················"start_time":·"2020-01-27T15:48:12.924985Z"
274 ················},274 ················},
275 ················"execution":·{275 ················"execution":·{
276 ····················"iopub.execute_input":·"2025-03-22T09:39:53.446429Z",276 ····················"iopub.execute_input":·"2025-03-22T09:52:15.080880Z",
277 ····················"iopub.status.busy":·"2025-03-22T09:39:53.445542Z",277 ····················"iopub.status.busy":·"2025-03-22T09:52:15.080345Z",
278 ····················"iopub.status.idle":·"2025-03-22T09:39:53.560915Z",278 ····················"iopub.status.idle":·"2025-03-22T09:52:15.191388Z",
279 ····················"shell.execute_reply":·"2025-03-22T09:39:53.555880Z"279 ····················"shell.execute_reply":·"2025-03-22T09:52:15.175315Z"
280 ················}280 ················}
281 ············},281 ············},
Max diff block lines reached; 6872/14524 bytes (47.31%) of diff not shown.
2.21 KB
./usr/share/doc/python-xarray-doc/html/getting-started-guide/quick-overview.html
    
Offset 324, 15 lines modifiedOffset 324, 15 lines modified
324 </pre></div>324 </pre></div>
325 </div>325 </div>
326 </section>326 </section>
327 <section·id="plotting">327 <section·id="plotting">
328 <h2>Plotting<a·class="headerlink"·href="#plotting"·title="Link·to·this·heading">¶</a></h2>328 <h2>Plotting<a·class="headerlink"·href="#plotting"·title="Link·to·this·heading">¶</a></h2>
329 <p>Visualizing·your·datasets·is·quick·and·convenient:</p>329 <p>Visualizing·your·datasets·is·quick·and·convenient:</p>
330 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[37]:·</span><span·class="n">data</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span>330 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[37]:·</span><span·class="n">data</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span>
331 <span·class="gh">Out[37]:·</span><span·class="go">&lt;matplotlib.collections.QuadMesh·at·0xab247af8&gt;</span>331 <span·class="gh">Out[37]:·</span><span·class="go">&lt;matplotlib.collections.QuadMesh·at·0xec2c6af8&gt;</span>
332 </pre></div>332 </pre></div>
333 </div>333 </div>
334 <img·alt="_build/html/_static/plotting_quick_overview.png"·src="_build/html/_static/plotting_quick_overview.png"·/>334 <img·alt="_build/html/_static/plotting_quick_overview.png"·src="_build/html/_static/plotting_quick_overview.png"·/>
335 <p>Note·the·automatic·labeling·with·names·and·units.·Our·effort·in·adding·metadata·attributes·has·paid·off!·Many·aspects·of·these·figures·are·customizable:·see·<a·class="reference·internal"·href="../user-guide/plotting.html#plotting"><span·class="std·std-ref">Plotting</span></a>.</p>335 <p>Note·the·automatic·labeling·with·names·and·units.·Our·effort·in·adding·metadata·attributes·has·paid·off!·Many·aspects·of·these·figures·are·customizable:·see·<a·class="reference·internal"·href="../user-guide/plotting.html#plotting"><span·class="std·std-ref">Plotting</span></a>.</p>
336 </section>336 </section>
337 <section·id="pandas">337 <section·id="pandas">
338 <h2>pandas<a·class="headerlink"·href="#pandas"·title="Link·to·this·heading">¶</a></h2>338 <h2>pandas<a·class="headerlink"·href="#pandas"·title="Link·to·this·heading">¶</a></h2>
875 B
html2text {}
    
Offset 253, 15 lines modifiedOffset 253, 15 lines modified
253 ·······[0.37342613,·1.49497537,·1.33584385]])253 ·······[0.37342613,·1.49497537,·1.33584385]])
254 Coordinates:254 Coordinates:
255 ··*·x········(x)·int32·8B·10·20255 ··*·x········(x)·int32·8B·10·20
256 Dimensions·without·coordinates:·y256 Dimensions·without·coordinates:·y
257 *\x8**\x8**\x8**\x8**\x8*·P\x8Pl\x8lo\x8ot\x8tt\x8ti\x8in\x8ng\x8g_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*257 *\x8**\x8**\x8**\x8**\x8*·P\x8Pl\x8lo\x8ot\x8tt\x8ti\x8in\x8ng\x8g_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
258 Visualizing·your·datasets·is·quick·and·convenient:258 Visualizing·your·datasets·is·quick·and·convenient:
259 In·[37]:·data.plot()259 In·[37]:·data.plot()
260 Out[37]:·<matplotlib.collections.QuadMesh·at·0xab247af8>260 Out[37]:·<matplotlib.collections.QuadMesh·at·0xec2c6af8>
261 [_build/html/_static/plotting_quick_overview.png]261 [_build/html/_static/plotting_quick_overview.png]
262 Note·the·automatic·labeling·with·names·and·units.·Our·effort·in·adding·metadata262 Note·the·automatic·labeling·with·names·and·units.·Our·effort·in·adding·metadata
263 attributes·has·paid·off!·Many·aspects·of·these·figures·are·customizable:·see263 attributes·has·paid·off!·Many·aspects·of·these·figures·are·customizable:·see
264 _\x8P_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g.264 _\x8P_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g.
265 *\x8**\x8**\x8**\x8**\x8*·p\x8pa\x8an\x8nd\x8da\x8as\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*265 *\x8**\x8**\x8**\x8**\x8*·p\x8pa\x8an\x8nd\x8da\x8as\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
266 Xarray·objects·can·be·easily·converted·to·and·from·pandas·objects·using·the266 Xarray·objects·can·be·easily·converted·to·and·from·pandas·objects·using·the
267 to_series(),·to_dataframe()·and·_\x8t_\x8o_\x8__\x8x_\x8a_\x8r_\x8r_\x8a_\x8y_\x8(_\x8)·methods:267 to_series(),·to_dataframe()·and·_\x8t_\x8o_\x8__\x8x_\x8a_\x8r_\x8r_\x8a_\x8y_\x8(_\x8)·methods:
6.73 KB
./usr/share/doc/python-xarray-doc/html/internals/internal-design.html
    
Offset 210, 15 lines modifiedOffset 210, 15 lines modified
210 <span·class="nn">File·/usr/lib/python3/dist-packages/pooch/utils.py:276,</span>·in·<span·class="ni">make_local_storage</span><span·class="nt">(path,·env)</span>210 <span·class="nn">File·/usr/lib/python3/dist-packages/pooch/utils.py:276,</span>·in·<span·class="ni">make_local_storage</span><span·class="nt">(path,·env)</span>
211 <span·class="g·g-Whitespace">····</span><span·class="mi">272</span>·<span·class="k">if</span>·<span·class="n">env</span>·<span·class="ow">is</span>·<span·class="ow">not</span>·<span·class="kc">None</span><span·class="p">:</span>211 <span·class="g·g-Whitespace">····</span><span·class="mi">272</span>·<span·class="k">if</span>·<span·class="n">env</span>·<span·class="ow">is</span>·<span·class="ow">not</span>·<span·class="kc">None</span><span·class="p">:</span>
212 <span·class="g·g-Whitespace">····</span><span·class="mi">273</span>·····<span·class="n">message</span><span·class="o">.</span><span·class="n">append</span><span·class="p">(</span>212 <span·class="g·g-Whitespace">····</span><span·class="mi">273</span>·····<span·class="n">message</span><span·class="o">.</span><span·class="n">append</span><span·class="p">(</span>
213 <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">&quot;Use·environment·variable·&#39;</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">&#39;·to·specify·a·different·location.&quot;</span>213 <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">&quot;Use·environment·variable·&#39;</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">&#39;·to·specify·a·different·location.&quot;</span>
214 <span·class="g·g-Whitespace">····</span><span·class="mi">275</span>·····<span·class="p">)</span>214 <span·class="g·g-Whitespace">····</span><span·class="mi">275</span>·····<span·class="p">)</span>
215 <span·class="ne">--&gt;·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">&quot;·&quot;</span><span·class="o">.</span><span·class="n">join</span><span·class="p">(</span><span·class="n">message</span><span·class="p">))</span>·<span·class="kn">from</span>·<span·class="nn">error</span>215 <span·class="ne">--&gt;·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">&quot;·&quot;</span><span·class="o">.</span><span·class="n">join</span><span·class="p">(</span><span·class="n">message</span><span·class="p">))</span>·<span·class="kn">from</span>·<span·class="nn">error</span>
  
216 <span·class="ne">PermissionError</span>:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.216 <span·class="ne">PermissionError</span>:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.
  
217 <span·class="gp">In·[2]:·</span><span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>217 <span·class="gp">In·[2]:·</span><span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>
218 <span·class="gt">---------------------------------------------------------------------------</span>218 <span·class="gt">---------------------------------------------------------------------------</span>
219 <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last)219 <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last)
220 <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">2</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span>220 <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">2</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span>
221 <span·class="ne">----&gt;·</span><span·class="mi">1</span>·<span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>221 <span·class="ne">----&gt;·</span><span·class="mi">1</span>·<span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>
  
Offset 312, 15 lines modifiedOffset 312, 15 lines modified
312 <span·class="nn">File·/usr/lib/python3/dist-packages/pooch/utils.py:276,</span>·in·<span·class="ni">make_local_storage</span><span·class="nt">(path,·env)</span>312 <span·class="nn">File·/usr/lib/python3/dist-packages/pooch/utils.py:276,</span>·in·<span·class="ni">make_local_storage</span><span·class="nt">(path,·env)</span>
313 <span·class="g·g-Whitespace">····</span><span·class="mi">272</span>·<span·class="k">if</span>·<span·class="n">env</span>·<span·class="ow">is</span>·<span·class="ow">not</span>·<span·class="kc">None</span><span·class="p">:</span>313 <span·class="g·g-Whitespace">····</span><span·class="mi">272</span>·<span·class="k">if</span>·<span·class="n">env</span>·<span·class="ow">is</span>·<span·class="ow">not</span>·<span·class="kc">None</span><span·class="p">:</span>
314 <span·class="g·g-Whitespace">····</span><span·class="mi">273</span>·····<span·class="n">message</span><span·class="o">.</span><span·class="n">append</span><span·class="p">(</span>314 <span·class="g·g-Whitespace">····</span><span·class="mi">273</span>·····<span·class="n">message</span><span·class="o">.</span><span·class="n">append</span><span·class="p">(</span>
315 <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">&quot;Use·environment·variable·&#39;</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">&#39;·to·specify·a·different·location.&quot;</span>315 <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">&quot;Use·environment·variable·&#39;</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">&#39;·to·specify·a·different·location.&quot;</span>
316 <span·class="g·g-Whitespace">····</span><span·class="mi">275</span>·····<span·class="p">)</span>316 <span·class="g·g-Whitespace">····</span><span·class="mi">275</span>·····<span·class="p">)</span>
317 <span·class="ne">--&gt;·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">&quot;·&quot;</span><span·class="o">.</span><span·class="n">join</span><span·class="p">(</span><span·class="n">message</span><span·class="p">))</span>·<span·class="kn">from</span>·<span·class="nn">error</span>317 <span·class="ne">--&gt;·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">&quot;·&quot;</span><span·class="o">.</span><span·class="n">join</span><span·class="p">(</span><span·class="n">message</span><span·class="p">))</span>·<span·class="kn">from</span>·<span·class="nn">error</span>
  
318 <span·class="ne">PermissionError</span>:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.318 <span·class="ne">PermissionError</span>:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.
  
319 <span·class="gp">In·[8]:·</span><span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>319 <span·class="gp">In·[8]:·</span><span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>
320 <span·class="gt">---------------------------------------------------------------------------</span>320 <span·class="gt">---------------------------------------------------------------------------</span>
321 <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last)321 <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last)
322 <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">8</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span>322 <span·class="n">Cell</span>·<span·class="n">In</span><span·class="p">[</span><span·class="mi">8</span><span·class="p">],</span>·<span·class="n">line</span>·<span·class="mi">1</span>
323 <span·class="ne">----&gt;·</span><span·class="mi">1</span>·<span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>323 <span·class="ne">----&gt;·</span><span·class="mi">1</span>·<span·class="n">var</span>·<span·class="o">=</span>·<span·class="n">da</span><span·class="o">.</span><span·class="n">variable</span>
  
1.42 KB
html2text {}
    
Offset 159, 15 lines modifiedOffset 159, 15 lines modified
159 ····273·····message.append(159 ····273·····message.append(
160 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different160 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different
161 location."161 location."
162 ····275·····)162 ····275·····)
163 -->·276·raise·PermissionError("·".join(message))·from·error163 -->·276·raise·PermissionError("·".join(message))·from·error
  
164 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not164 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
165 create·data·cache·folder·'/nonexistent/first-build/.cache/165 create·data·cache·folder·'/nonexistent/second-build/.cache/
166 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.166 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
167 In·[2]:·var·=·da.variable167 In·[2]:·var·=·da.variable
168 ---------------------------------------------------------------------------168 ---------------------------------------------------------------------------
169 AttributeError····························Traceback·(most·recent·call·last)169 AttributeError····························Traceback·(most·recent·call·last)
170 Cell·In[2],·line·1170 Cell·In[2],·line·1
171 ---->·1·var·=·da.variable171 ---->·1·var·=·da.variable
Offset 260, 15 lines modifiedOffset 260, 15 lines modified
260 ····273·····message.append(260 ····273·····message.append(
261 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different261 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different
262 location."262 location."
263 ····275·····)263 ····275·····)
264 -->·276·raise·PermissionError("·".join(message))·from·error264 -->·276·raise·PermissionError("·".join(message))·from·error
  
265 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not265 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
266 create·data·cache·folder·'/nonexistent/first-build/.cache/266 create·data·cache·folder·'/nonexistent/second-build/.cache/
267 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.267 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
268 In·[8]:·var·=·da.variable268 In·[8]:·var·=·da.variable
269 ---------------------------------------------------------------------------269 ---------------------------------------------------------------------------
270 AttributeError····························Traceback·(most·recent·call·last)270 AttributeError····························Traceback·(most·recent·call·last)
271 Cell·In[8],·line·1271 Cell·In[8],·line·1
272 ---->·1·var·=·da.variable272 ---->·1·var·=·da.variable
5.45 KB
./usr/share/doc/python-xarray-doc/html/internals/zarr-encoding-spec.html
    
Offset 163, 23 lines modifiedOffset 163, 23 lines modified
163 <span·class="nn">File·/usr/lib/python3/dist-packages/pooch/utils.py:276,</span>·in·<span·class="ni">make_local_storage</span><span·class="nt">(path,·env)</span>163 <span·class="nn">File·/usr/lib/python3/dist-packages/pooch/utils.py:276,</span>·in·<span·class="ni">make_local_storage</span><span·class="nt">(path,·env)</span>
164 <span·class="g·g-Whitespace">····</span><span·class="mi">272</span>·<span·class="k">if</span>·<span·class="n">env</span>·<span·class="ow">is</span>·<span·class="ow">not</span>·<span·class="kc">None</span><span·class="p">:</span>164 <span·class="g·g-Whitespace">····</span><span·class="mi">272</span>·<span·class="k">if</span>·<span·class="n">env</span>·<span·class="ow">is</span>·<span·class="ow">not</span>·<span·class="kc">None</span><span·class="p">:</span>
165 <span·class="g·g-Whitespace">····</span><span·class="mi">273</span>·····<span·class="n">message</span><span·class="o">.</span><span·class="n">append</span><span·class="p">(</span>165 <span·class="g·g-Whitespace">····</span><span·class="mi">273</span>·····<span·class="n">message</span><span·class="o">.</span><span·class="n">append</span><span·class="p">(</span>
166 <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">&quot;Use·environment·variable·&#39;</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">&#39;·to·specify·a·different·location.&quot;</span>166 <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">&quot;Use·environment·variable·&#39;</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">&#39;·to·specify·a·different·location.&quot;</span>
167 <span·class="g·g-Whitespace">····</span><span·class="mi">275</span>·····<span·class="p">)</span>167 <span·class="g·g-Whitespace">····</span><span·class="mi">275</span>·····<span·class="p">)</span>
168 <span·class="ne">--&gt;·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">&quot;·&quot;</span><span·class="o">.</span><span·class="n">join</span><span·class="p">(</span><span·class="n">message</span><span·class="p">))</span>·<span·class="kn">from</span>·<span·class="nn">error</span>168 <span·class="ne">--&gt;·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">&quot;·&quot;</span><span·class="o">.</span><span·class="n">join</span><span·class="p">(</span><span·class="n">message</span><span·class="p">))</span>·<span·class="kn">from</span>·<span·class="nn">error</span>
  
169 <span·class="ne">PermissionError</span>:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.169 <span·class="ne">PermissionError</span>:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.
  
170 <span·class="gp">In·[5]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;rasm.zarr&quot;</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>170 <span·class="gp">In·[5]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;rasm.zarr&quot;</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>
171 <span·class="gh">Out[5]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa427d808&gt;</span>171 <span·class="gh">Out[5]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe4d4d850&gt;</span>
  
172 <span·class="gp">In·[6]:·</span><span·class="n">zgroup</span>·<span·class="o">=</span>·<span·class="n">zarr</span><span·class="o">.</span><span·class="n">open</span><span·class="p">(</span><span·class="s2">&quot;rasm.zarr&quot;</span><span·class="p">)</span>172 <span·class="gp">In·[6]:·</span><span·class="n">zgroup</span>·<span·class="o">=</span>·<span·class="n">zarr</span><span·class="o">.</span><span·class="n">open</span><span·class="p">(</span><span·class="s2">&quot;rasm.zarr&quot;</span><span·class="p">)</span>
  
173 <span·class="gp">In·[7]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">os</span><span·class="o">.</span><span·class="n">listdir</span><span·class="p">(</span><span·class="s2">&quot;rasm.zarr&quot;</span><span·class="p">))</span>173 <span·class="gp">In·[7]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">os</span><span·class="o">.</span><span·class="n">listdir</span><span·class="p">(</span><span·class="s2">&quot;rasm.zarr&quot;</span><span·class="p">))</span>
174 <span·class="go">[&#39;zarr.json&#39;,·&#39;latitude&#39;,·&#39;longitude&#39;]</span>174 <span·class="go">[&#39;latitude&#39;,·&#39;zarr.json&#39;,·&#39;longitude&#39;]</span>
  
175 <span·class="gp">In·[8]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">zgroup</span><span·class="o">.</span><span·class="n">tree</span><span·class="p">())</span>175 <span·class="gp">In·[8]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">zgroup</span><span·class="o">.</span><span·class="n">tree</span><span·class="p">())</span>
176 <span·class="gt">---------------------------------------------------------------------------</span>176 <span·class="gt">---------------------------------------------------------------------------</span>
177 <span·class="ne">ModuleNotFoundError</span><span·class="g·g-Whitespace">·······················</span>Traceback·(most·recent·call·last)177 <span·class="ne">ModuleNotFoundError</span><span·class="g·g-Whitespace">·······················</span>Traceback·(most·recent·call·last)
178 <span·class="n">File</span>·<span·class="o">/</span><span·class="n">usr</span><span·class="o">/</span><span·class="n">lib</span><span·class="o">/</span><span·class="n">python3</span><span·class="o">/</span><span·class="n">dist</span><span·class="o">-</span><span·class="n">packages</span><span·class="o">/</span><span·class="n">zarr</span><span·class="o">/</span><span·class="n">core</span><span·class="o">/</span><span·class="n">_tree</span><span·class="o">.</span><span·class="n">py</span><span·class="p">:</span><span·class="mi">9</span>178 <span·class="n">File</span>·<span·class="o">/</span><span·class="n">usr</span><span·class="o">/</span><span·class="n">lib</span><span·class="o">/</span><span·class="n">python3</span><span·class="o">/</span><span·class="n">dist</span><span·class="o">-</span><span·class="n">packages</span><span·class="o">/</span><span·class="n">zarr</span><span·class="o">/</span><span·class="n">core</span><span·class="o">/</span><span·class="n">_tree</span><span·class="o">.</span><span·class="n">py</span><span·class="p">:</span><span·class="mi">9</span>
179 <span·class="g·g-Whitespace">······</span><span·class="mi">8</span>·<span·class="k">try</span><span·class="p">:</span>179 <span·class="g·g-Whitespace">······</span><span·class="mi">8</span>·<span·class="k">try</span><span·class="p">:</span>
180 <span·class="ne">----&gt;·</span><span·class="mi">9</span>·····<span·class="kn">import</span>·<span·class="nn">rich</span>180 <span·class="ne">----&gt;·</span><span·class="mi">9</span>·····<span·class="kn">import</span>·<span·class="nn">rich</span>
1.09 KB
html2text {}
    
Offset 111, 24 lines modifiedOffset 111, 24 lines modified
111 ····273·····message.append(111 ····273·····message.append(
112 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different112 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different
113 location."113 location."
114 ····275·····)114 ····275·····)
115 -->·276·raise·PermissionError("·".join(message))·from·error115 -->·276·raise·PermissionError("·".join(message))·from·error
  
116 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not116 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
117 create·data·cache·folder·'/nonexistent/first-build/.cache/117 create·data·cache·folder·'/nonexistent/second-build/.cache/
118 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.118 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
119 In·[5]:·ds.to_zarr("rasm.zarr",·mode="w")119 In·[5]:·ds.to_zarr("rasm.zarr",·mode="w")
120 Out[5]:·<xarray.backends.zarr.ZarrStore·at·0xa427d808>120 Out[5]:·<xarray.backends.zarr.ZarrStore·at·0xe4d4d850>
  
121 In·[6]:·zgroup·=·zarr.open("rasm.zarr")121 In·[6]:·zgroup·=·zarr.open("rasm.zarr")
  
122 In·[7]:·print(os.listdir("rasm.zarr"))122 In·[7]:·print(os.listdir("rasm.zarr"))
123 ['zarr.json',·'latitude',·'longitude']123 ['latitude',·'zarr.json',·'longitude']
  
124 In·[8]:·print(zgroup.tree())124 In·[8]:·print(zgroup.tree())
125 ---------------------------------------------------------------------------125 ---------------------------------------------------------------------------
126 ModuleNotFoundError·······················Traceback·(most·recent·call·last)126 ModuleNotFoundError·······················Traceback·(most·recent·call·last)
127 File·/usr/lib/python3/dist-packages/zarr/core/_tree.py:9127 File·/usr/lib/python3/dist-packages/zarr/core/_tree.py:9
128 ······8·try:128 ······8·try:
129 ---->·9·····import·rich129 ---->·9·····import·rich
50.3 KB
./usr/share/doc/python-xarray-doc/html/searchindex.js
50.2 KB
js-beautify {}
    
Offset 2353, 49 lines modifiedOffset 2353, 57 lines modified
2353 ········"4":·"py:attribute",2353 ········"4":·"py:attribute",
2354 ········"5":·"py:function"2354 ········"5":·"py:function"
2355 ····},2355 ····},
2356 ····"terms":·{2356 ····"terms":·{
2357 ········"":·[1,·3,·5,·6,·7,·8,·12,·14,·15,·16,·17,·19,·20,·21,·23,·24,·25,·26,·27,·28,·30,·31,·32,·33,·34,·35,·36,·37,·38,·39,·40,·41,·43,·44,·45,·47,·48,·49,·50,·51,·52],2357 ········"":·[1,·3,·5,·6,·7,·8,·12,·14,·15,·16,·17,·19,·20,·21,·23,·24,·25,·26,·27,·28,·30,·31,·32,·33,·34,·35,·36,·37,·38,·39,·40,·41,·43,·44,·45,·47,·48,·49,·50,·51,·52],
2358 ········"0":·[3,·6,·7,·8,·9,·11,·12,·13,·14,·16,·18,·19,·20,·22,·24,·25,·26,·27,·28,·30,·33,·35,·36,·37,·38,·40,·41,·43,·44,·45,·47,·48,·49,·50,·51,·52,·53],2358 ········"0":·[3,·6,·7,·8,·9,·11,·12,·13,·14,·16,·18,·19,·20,·22,·24,·25,·26,·27,·28,·30,·33,·35,·36,·37,·38,·40,·41,·43,·44,·45,·47,·48,·49,·50,·51,·52,·53],
2359 ········"00":·[36,·37,·38,·45,·47,·51,·52,·53,·54],2359 ········"00":·[36,·37,·38,·45,·47,·51,·52,·53,·54],
 2360 ········"000":·51,
2360 ········"000000":·16,2361 ········"000000":·16,
2361 ········"000000000":·[37,·38,·52],2362 ········"000000000":·[37,·38,·52],
2362 ········"0001":·[53,·54],2363 ········"0001":·[53,·54],
2363 ········"00010101":·53,2364 ········"00010101":·53,
2364 ········"00010201":·53,2365 ········"00010201":·53,
2365 ········"00010301":·53,2366 ········"00010301":·53,
2366 ········"0002":·53,2367 ········"0002":·53,
2367 ········"00021001":·53,2368 ········"00021001":·53,
2368 ········"00021101":·53,2369 ········"00021101":·53,
2369 ········"00021201":·53,2370 ········"00021201":·53,
2370 ········"000e":·48,2371 ········"000e":·[48,·51],
 2372 ········"000j":·51,
 2373 ········"001":·51,
2371 ········"001e":·37,2374 ········"001e":·37,
 2375 ········"001j":·51,
 2376 ········"005":·51,
2372 ········"005036":·40,2377 ········"005036":·40,
2373 ········"005e":·37,2378 ········"005e":·37,
 2379 ········"005j":·51,
2374 ········"00688889":·36,2380 ········"00688889":·36,
2375 ········"006e":·37,2381 ········"006e":·37,
2376 ········"007j":·51,2382 ········"007e":·51,
2377 ········"008":·51,2383 ········"008":·51,
2378 ········"008j":·51, 
2379 ········"00914929":·36,2384 ········"00914929":·36,
2380 ········"00941742":·36,2385 ········"00941742":·36,
2381 ········"00968205":·36,2386 ········"00968205":·36,
2382 ········"00973567":·36,2387 ········"00973567":·36,
2383 ········"01":·[14,·16,·20,·26,·30,·32,·37,·38,·41,·43,·44,·45,·47,·48,·52,·53],2388 ········"01":·[14,·16,·20,·26,·30,·32,·37,·38,·41,·43,·44,·45,·47,·48,·51,·52,·53],
2384 ········"01082401":·36,2389 ········"01082401":·36,
2385 ········"01183847":·36,2390 ········"01183847":·36,
 2391 ········"015j":·51,
 2392 ········"016":·51,
2386 ········"01636376":·36,2393 ········"01636376":·36,
2387 ········"01652688":·36,2394 ········"01652688":·36,
2388 ········"01652764":·36,2395 ········"01652764":·36,
2389 ········"0165891":·36,2396 ········"0165891":·36,
2390 ········"01670071":·36,2397 ········"01670071":·36,
2391 ········"01670121":·36,2398 ········"01670121":·36,
2392 ········"01671269":·36,2399 ········"01671269":·36,
2393 ········"01671847":·36,2400 ········"01671847":·36,
2394 ········"01672":·36,2401 ········"01672":·36,
 2402 ········"016j":·51,
2395 ········"017":·43,2403 ········"017":·43,
2396 ········"01806694":·36,2404 ········"01806694":·36,
2397 ········"01814439":·36,2405 ········"01814439":·36,
2398 ········"0182217":·36,2406 ········"0182217":·36,
2399 ········"018e":·37,2407 ········"018e":·37,
2400 ········"019":·40,2408 ········"019":·40,
2401 ········"01906":·48,2409 ········"01906":·48,
Offset 2423, 44 lines modifiedOffset 2431, 42 lines modified
2423 ········"035e":·37,2431 ········"035e":·37,
2424 ········"03611368":·36,2432 ········"03611368":·36,
2425 ········"03626848":·36,2433 ········"03626848":·36,
2426 ········"03642301":·36,2434 ········"03642301":·36,
2427 ········"036e":·48,2435 ········"036e":·48,
2428 ········"0379266750948":·45,2436 ········"0379266750948":·45,
2429 ········"037e":·37,2437 ········"037e":·37,
2430 ········"038":·[43,·51],2438 ········"038":·43,
2431 ········"03835":·41,2439 ········"03835":·41,
 2440 ········"038j":·51,
2432 ········"03957499":·19,2441 ········"03957499":·19,
2433 ········"03j":·51, 
2434 ········"03t00":·[37,·38],2442 ········"03t00":·[37,·38],
2435 ········"04":·[19,·36,·37,·38,·41,·43,·47,·52],2443 ········"04":·[19,·36,·37,·38,·41,·43,·47,·52],
2436 ········"04096206":·36,2444 ········"04096206":·36,
2437 ········"04097352":·36,2445 ········"04097352":·36,
2438 ········"040e":·48,2446 ········"040e":·48,
2439 ········"0417827":·45,2447 ········"0417827":·45,
2440 ········"042e":·37,2448 ········"042e":·37,
2441 ········"044":·[35,·47],2449 ········"044":·[35,·47],
2442 ········"04423597":·19,2450 ········"04423597":·19,
2443 ········"044236":·47,2451 ········"044236":·47,
2444 ········"04569531":·36,2452 ········"04569531":·36,
2445 ········"047":·51, 
2446 ········"04703446":·36,2453 ········"04703446":·36,
2447 ········"047e":·[37,·48],2454 ········"047e":·[37,·48],
2448 ········"04835611":·36,2455 ········"04835611":·36,
2449 ········"04862391":·36,2456 ········"04862391":·36,
2450 ········"048e":·37,2457 ········"048e":·37,
2451 ········"04t00":·[37,·38],2458 ········"04t00":·[37,·38],
2452 ········"05":·[36,·38,·45,·48,·52,·53],2459 ········"05":·[36,·38,·45,·48,·51,·52,·53],
2453 ········"05405954":·36,2460 ········"05405954":·36,
2454 ········"05556":·44,2461 ········"05556":·44,
2455 ········"056":·44,2462 ········"056":·44,
2456 ········"057e":·37,2463 ········"057e":·37,
2457 ········"058e":·37,2464 ········"058e":·37,
2458 ········"05912615":·36,2465 ········"05912615":·36,
2459 ········"05j":·51, 
2460 ········"05t00":·37,2466 ········"05t00":·37,
2461 ········"06":·[28,·36,·38,·45,·52],2467 ········"06":·[28,·36,·38,·45,·52],
2462 ········"061":·43,2468 ········"061":·43,
2463 ········"06141":·41,2469 ········"06141":·41,
2464 ········"062":·41,2470 ········"062":·41,
2465 ········"063":·38,2471 ········"063":·38,
2466 ········"06683875":·36,2472 ········"06683875":·36,
Offset 2476, 17 lines modifiedOffset 2482, 18 lines modified
2476 ········"07":·[38,·52,·53],2482 ········"07":·[38,·52,·53],
2477 ········"070e":·37,2483 ········"070e":·37,
2478 ········"07180381":·19,2484 ········"07180381":·19,
2479 ········"071804":·47,2485 ········"071804":·47,
2480 ········"072":·47,2486 ········"072":·47,
2481 ········"072e":·48,2487 ········"072e":·48,
2482 ········"074e":·37,2488 ········"074e":·37,
 2489 ········"075j":·51,
2483 ········"078":·41,2490 ········"078":·41,
2484 ········"07t00":·37,2491 ········"07t00":·37,
2485 ········"08":·[38,·52],2492 ········"08":·[38,·51,·52],
2486 ········"08002":·40,2493 ········"08002":·40,
2487 ········"08172729":·36,2494 ········"08172729":·36,
2488 ········"08203696":·36,2495 ········"08203696":·36,
2489 ········"08285275":·36,2496 ········"08285275":·36,
2490 ········"08299933":·36,2497 ········"08299933":·36,
2491 ········"08305695":·36,2498 ········"08305695":·36,
2492 ········"08341016":·36,2499 ········"08341016":·36,
Offset 2506, 130 lines modifiedOffset 2513, 135 lines modified
2506 ········"09":·[36,·38,·52],2513 ········"09":·[36,·38,·52],
2507 ········"09179":·36,2514 ········"09179":·36,
2508 ········"091e":·37,2515 ········"091e":·37,
Max diff block lines reached; 47684/51345 bytes (92.87%) of diff not shown.
4.95 KB
./usr/share/doc/python-xarray-doc/html/user-guide/data-structures.html
    
Offset 731, 18 lines modifiedOffset 731, 18 lines modified
731 a·method·call·with·an·external·function·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">ds.pipe(func)</span></code>)·instead·of731 a·method·call·with·an·external·function·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">ds.pipe(func)</span></code>)·instead·of
732 simply·calling·it·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">func(ds)</span></code>).·This·allows·you·to·write·pipelines·for732 simply·calling·it·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">func(ds)</span></code>).·This·allows·you·to·write·pipelines·for
733 transforming·your·data·(using·“method·chaining”)·instead·of·writing·hard·to733 transforming·your·data·(using·“method·chaining”)·instead·of·writing·hard·to
734 follow·nested·function·calls:</p>734 follow·nested·function·calls:</p>
735 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow</span>735 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow</span>
736 <span·class="go">#·entirely·from·left·to·right</span>736 <span·class="go">#·entirely·from·left·to·right</span>
737 <span·class="gp">In·[64]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">((</span><span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">temperature</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">loc</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">))</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;instrument&quot;</span><span·class="p">))</span>737 <span·class="gp">In·[64]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">((</span><span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">temperature</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">loc</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">))</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;instrument&quot;</span><span·class="p">))</span>
738 <span·class="gh">Out[64]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xab6d9190&gt;]</span>738 <span·class="gh">Out[64]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xec366660&gt;]</span>
  
739 <span·class="gp">In·[65]:·</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">temperature</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">loc</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span><span·class="o">.</span><span·class="n">pipe</span><span·class="p">(</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">x</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;instrument&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">pipe</span><span·class="p">(</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">))</span>739 <span·class="gp">In·[65]:·</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">temperature</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">loc</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span><span·class="o">.</span><span·class="n">pipe</span><span·class="p">(</span><span·class="k">lambda</span>·<span·class="n">x</span><span·class="p">:</span>·<span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">x</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;instrument&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">pipe</span><span·class="p">(</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">))</span>
740 <span·class="gh">Out[65]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xa344f660&gt;]</span>740 <span·class="gh">Out[65]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xe3f1f660&gt;]</span>
741 </pre></div>741 </pre></div>
742 </div>742 </div>
743 <p>Both·<code·class="docutils·literal·notranslate"><span·class="pre">pipe</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">assign</span></code>·replicate·the·pandas·methods·of·the·same·names743 <p>Both·<code·class="docutils·literal·notranslate"><span·class="pre">pipe</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">assign</span></code>·replicate·the·pandas·methods·of·the·same·names
744 (<a·class="reference·external"·href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.pipe.html#pandas.DataFrame.pipe"·title="(in·pandas·v2.2.3)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.pipe</span></code></a>·and744 (<a·class="reference·external"·href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.pipe.html#pandas.DataFrame.pipe"·title="(in·pandas·v2.2.3)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.pipe</span></code></a>·and
745 <a·class="reference·external"·href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.assign.html#pandas.DataFrame.assign"·title="(in·pandas·v2.2.3)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.assign</span></code></a>).</p>745 <a·class="reference·external"·href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.assign.html#pandas.DataFrame.assign"·title="(in·pandas·v2.2.3)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.assign</span></code></a>).</p>
746 <p>With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if746 <p>With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if
747 variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead747 variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead
1.33 KB
html2text {}
    
Offset 585, 19 lines modifiedOffset 585, 19 lines modified
585 There·is·also·the·pipe()·method·that·allows·you·to·use·a·method·call·with·an585 There·is·also·the·pipe()·method·that·allows·you·to·use·a·method·call·with·an
586 external·function·(e.g.,·ds.pipe(func))·instead·of·simply·calling·it·(e.g.,586 external·function·(e.g.,·ds.pipe(func))·instead·of·simply·calling·it·(e.g.,
587 func(ds)).·This·allows·you·to·write·pipelines·for·transforming·your·data·(using587 func(ds)).·This·allows·you·to·write·pipelines·for·transforming·your·data·(using
588 “method·chaining”)·instead·of·writing·hard·to·follow·nested·function·calls:588 “method·chaining”)·instead·of·writing·hard·to·follow·nested·function·calls:
589 #·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow589 #·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow
590 #·entirely·from·left·to·right590 #·entirely·from·left·to·right
591 In·[64]:·plt.plot((2·*·ds.temperature.sel(loc=0)).mean("instrument"))591 In·[64]:·plt.plot((2·*·ds.temperature.sel(loc=0)).mean("instrument"))
592 Out[64]:·[<matplotlib.lines.Line2D·at·0xab6d9190>]592 Out[64]:·[<matplotlib.lines.Line2D·at·0xec366660>]
  
593 In·[65]:·(ds.temperature.sel(loc=0).pipe(lambda·x:·2·*·x).mean593 In·[65]:·(ds.temperature.sel(loc=0).pipe(lambda·x:·2·*·x).mean
594 ("instrument").pipe(plt.plot))594 ("instrument").pipe(plt.plot))
595 Out[65]:·[<matplotlib.lines.Line2D·at·0xa344f660>]595 Out[65]:·[<matplotlib.lines.Line2D·at·0xe3f1f660>]
596 Both·pipe·and·assign·replicate·the·pandas·methods·of·the·same·names596 Both·pipe·and·assign·replicate·the·pandas·methods·of·the·same·names
597 (_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8p_\x8i_\x8p_\x8e·and·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8a_\x8s_\x8s_\x8i_\x8g_\x8n).597 (_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8p_\x8i_\x8p_\x8e·and·_\x8D_\x8a_\x8t_\x8a_\x8F_\x8r_\x8a_\x8m_\x8e_\x8._\x8a_\x8s_\x8s_\x8i_\x8g_\x8n).
598 With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if598 With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if
599 variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead599 variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead
600 of·mutating·existing·objects·often·results·in·easier·to·understand·code,·so·we600 of·mutating·existing·objects·often·results·in·easier·to·understand·code,·so·we
601 encourage·using·this·approach.601 encourage·using·this·approach.
602 *\x8**\x8**\x8**\x8*·R\x8Re\x8en\x8na\x8am\x8mi\x8in\x8ng\x8g·v\x8va\x8ar\x8ri\x8ia\x8ab\x8bl\x8le\x8es\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*602 *\x8**\x8**\x8**\x8*·R\x8Re\x8en\x8na\x8am\x8mi\x8in\x8ng\x8g·v\x8va\x8ar\x8ri\x8ia\x8ab\x8bl\x8le\x8es\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*
8.88 KB
./usr/share/doc/python-xarray-doc/html/user-guide/hierarchical-data.html
    
Offset 982, 15 lines modifiedOffset 982, 15 lines modified
982 <p>If·you·were·a·previous·user·of·the·prototype·<a·class="reference·external"·href="https://github.com/xarray-contrib/datatree">xarray-contrib/datatree</a>·package,·this·is·different·from·what·you’re·used·to!982 <p>If·you·were·a·previous·user·of·the·prototype·<a·class="reference·external"·href="https://github.com/xarray-contrib/datatree">xarray-contrib/datatree</a>·package,·this·is·different·from·what·you’re·used·to!
983 In·that·package·the·data·model·was·that·the·data·stored·in·each·node·actually·was·completely·unrelated.·The·data·model·is·now·slightly·stricter.983 In·that·package·the·data·model·was·that·the·data·stored·in·each·node·actually·was·completely·unrelated.·The·data·model·is·now·slightly·stricter.
984 This·allows·us·to·provide·features·like·<a·class="reference·internal"·href="#coordinate-inheritance"><span·class="std·std-ref">Coordinate·Inheritance</span></a>.</p>984 This·allows·us·to·provide·features·like·<a·class="reference·internal"·href="#coordinate-inheritance"><span·class="std·std-ref">Coordinate·Inheritance</span></a>.</p>
985 </div>985 </div>
986 <p>To·demonstrate,·let’s·first·generate·some·example·datasets·which·are·not·aligned·with·one·another:</p>986 <p>To·demonstrate,·let’s·first·generate·some·example·datasets·which·are·not·aligned·with·one·another:</p>
987 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·(drop·the·attributes·just·to·make·the·printed·representation·shorter)</span>987 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·(drop·the·attributes·just·to·make·the·printed·representation·shorter)</span>
988 <span·class="gp">In·[89]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">drop_attrs</span><span·class="p">()</span>988 <span·class="gp">In·[89]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">drop_attrs</span><span·class="p">()</span>
989 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>989 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
990 <span·class="gp">In·[90]:·</span><span·class="n">ds_daily</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="s2">&quot;D&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;time&quot;</span><span·class="p">)</span>990 <span·class="gp">In·[90]:·</span><span·class="n">ds_daily</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="s2">&quot;D&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;time&quot;</span><span·class="p">)</span>
991 <span·class="go">KeyError:·&quot;No·variable·named·&#39;time&#39;.·Variables·on·the·dataset·include·[&#39;foo&#39;,·&#39;x&#39;,·&#39;letters&#39;]&quot;</span>991 <span·class="go">KeyError:·&quot;No·variable·named·&#39;time&#39;.·Variables·on·the·dataset·include·[&#39;foo&#39;,·&#39;x&#39;,·&#39;letters&#39;]&quot;</span>
  
  
992 <span·class="gp">In·[91]:·</span><span·class="n">ds_weekly</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="s2">&quot;W&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;time&quot;</span><span·class="p">)</span>992 <span·class="gp">In·[91]:·</span><span·class="n">ds_weekly</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">resample</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="s2">&quot;W&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;time&quot;</span><span·class="p">)</span>
Offset 1054, 15 lines modifiedOffset 1054, 15 lines modified
1054 <span·class="go">····└──·Group:·/b/B</span>1054 <span·class="go">····└──·Group:·/b/B</span>
1055 </pre></div>1055 </pre></div>
1056 </div>1056 </div>
1057 <p>Now·we·have·a·valid·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">DataTree</span></code>·structure·which·contains·all·the·data·at·each·different·time·frequency,·stored·in·a·separate·group.</p>1057 <p>Now·we·have·a·valid·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">DataTree</span></code>·structure·which·contains·all·the·data·at·each·different·time·frequency,·stored·in·a·separate·group.</p>
1058 <p>This·is·a·useful·way·to·organise·our·data·because·we·can·still·operate·on·all·the·groups·at·once.1058 <p>This·is·a·useful·way·to·organise·our·data·because·we·can·still·operate·on·all·the·groups·at·once.
1059 For·example·we·can·extract·all·three·timeseries·at·a·specific·lat-lon·location:</p>1059 For·example·we·can·extract·all·three·timeseries·at·a·specific·lat-lon·location:</p>
1060 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[100]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">lat</span><span·class="o">=</span><span·class="mi">75</span><span·class="p">,</span>·<span·class="n">lon</span><span·class="o">=</span><span·class="mi">300</span><span·class="p">)</span>1060 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[100]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">lat</span><span·class="o">=</span><span·class="mi">75</span><span·class="p">,</span>·<span·class="n">lon</span><span·class="o">=</span><span·class="mi">300</span><span·class="p">)</span>
1061 <span·class="go">ValueError:·Dimensions·{&#39;lat&#39;,·&#39;lon&#39;}·do·not·exist.·Expected·one·or·more·of·set()</span>1061 <span·class="go">ValueError:·Dimensions·{&#39;lon&#39;,·&#39;lat&#39;}·do·not·exist.·Expected·one·or·more·of·set()</span>
1062 </pre></div>1062 </pre></div>
1063 </div>1063 </div>
1064 <p>or·compute·the·standard·deviation·of·each·timeseries·to·find·out·how·it·varies·with·sampling·frequency:</p>1064 <p>or·compute·the·standard·deviation·of·each·timeseries·to·find·out·how·it·varies·with·sampling·frequency:</p>
1065 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[101]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">std</span><span·class="p">(</span><span·class="n">dim</span><span·class="o">=</span><span·class="s2">&quot;time&quot;</span><span·class="p">)</span>1065 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[101]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">std</span><span·class="p">(</span><span·class="n">dim</span><span·class="o">=</span><span·class="s2">&quot;time&quot;</span><span·class="p">)</span>
1066 <span·class="go">ValueError:·Dimension(s)·&#39;time&#39;·do·not·exist.·Expected·one·or·more·of·set()</span>1066 <span·class="go">ValueError:·Dimension(s)·&#39;time&#39;·do·not·exist.·Expected·one·or·more·of·set()</span>
1067 </pre></div>1067 </pre></div>
1068 </div>1068 </div>
Offset 1128, 15 lines modifiedOffset 1128, 15 lines modified
1128 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[107]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">dt</span><span·class="p">[</span><span·class="s2">&quot;/daily&quot;</span><span·class="p">])</span>1128 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[107]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">dt</span><span·class="p">[</span><span·class="s2">&quot;/daily&quot;</span><span·class="p">])</span>
1129 <span·class="go">KeyError:·&#39;Could·not·find·node·at·/daily&#39;</span>1129 <span·class="go">KeyError:·&#39;Could·not·find·node·at·/daily&#39;</span>
1130 </pre></div>1130 </pre></div>
1131 </div>1131 </div>
1132 <p>This·helps·to·differentiate·which·variables·are·defined·on·the·datatree·node·that·you·are·currently·looking·at,·and·which·were·defined·somewhere·above·it.</p>1132 <p>This·helps·to·differentiate·which·variables·are·defined·on·the·datatree·node·that·you·are·currently·looking·at,·and·which·were·defined·somewhere·above·it.</p>
1133 <p>We·can·also·still·perform·all·the·same·operations·on·the·whole·tree:</p>1133 <p>We·can·also·still·perform·all·the·same·operations·on·the·whole·tree:</p>
1134 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[108]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">lat</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">75</span><span·class="p">],</span>·<span·class="n">lon</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">300</span><span·class="p">])</span>1134 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[108]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">lat</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">75</span><span·class="p">],</span>·<span·class="n">lon</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">300</span><span·class="p">])</span>
1135 <span·class="go">ValueError:·Dimensions·{&#39;lat&#39;,·&#39;lon&#39;}·do·not·exist.·Expected·one·or·more·of·set()</span>1135 <span·class="go">ValueError:·Dimensions·{&#39;lon&#39;,·&#39;lat&#39;}·do·not·exist.·Expected·one·or·more·of·set()</span>
  
  
1136 <span·class="gp">In·[109]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">std</span><span·class="p">(</span><span·class="n">dim</span><span·class="o">=</span><span·class="s2">&quot;time&quot;</span><span·class="p">)</span>1136 <span·class="gp">In·[109]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">std</span><span·class="p">(</span><span·class="n">dim</span><span·class="o">=</span><span·class="s2">&quot;time&quot;</span><span·class="p">)</span>
1137 <span·class="go">ValueError:·Dimension(s)·&#39;time&#39;·do·not·exist.·Expected·one·or·more·of·set()</span>1137 <span·class="go">ValueError:·Dimension(s)·&#39;time&#39;·do·not·exist.·Expected·one·or·more·of·set()</span>
1138 </pre></div>1138 </pre></div>
1139 </div>1139 </div>
1140 </section>1140 </section>
2.55 KB
html2text {}
    
Offset 868, 15 lines modifiedOffset 868, 15 lines modified
868 model·is·now·slightly·stricter.·This·allows·us·to·provide·features·like868 model·is·now·slightly·stricter.·This·allows·us·to·provide·features·like
869 _\x8C_\x8o_\x8o_\x8r_\x8d_\x8i_\x8n_\x8a_\x8t_\x8e_\x8·_\x8I_\x8n_\x8h_\x8e_\x8r_\x8i_\x8t_\x8a_\x8n_\x8c_\x8e.869 _\x8C_\x8o_\x8o_\x8r_\x8d_\x8i_\x8n_\x8a_\x8t_\x8e_\x8·_\x8I_\x8n_\x8h_\x8e_\x8r_\x8i_\x8t_\x8a_\x8n_\x8c_\x8e.
870 To·demonstrate,·let’s·first·generate·some·example·datasets·which·are·not870 To·demonstrate,·let’s·first·generate·some·example·datasets·which·are·not
871 aligned·with·one·another:871 aligned·with·one·another:
872 #·(drop·the·attributes·just·to·make·the·printed·representation·shorter)872 #·(drop·the·attributes·just·to·make·the·printed·representation·shorter)
873 In·[89]:·ds·=·xr.tutorial.open_dataset("air_temperature").drop_attrs()873 In·[89]:·ds·=·xr.tutorial.open_dataset("air_temperature").drop_attrs()
874 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not874 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
875 create·data·cache·folder·'/nonexistent/first-build/.cache/875 create·data·cache·folder·'/nonexistent/second-build/.cache/
876 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.876 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
877 In·[90]:·ds_daily·=·ds.resample(time="D").mean("time")877 In·[90]:·ds_daily·=·ds.resample(time="D").mean("time")
878 KeyError:·"No·variable·named·'time'.·Variables·on·the·dataset·include·['foo',878 KeyError:·"No·variable·named·'time'.·Variables·on·the·dataset·include·['foo',
879 'x',·'letters']"879 'x',·'letters']"
  
Offset 944, 15 lines modifiedOffset 944, 15 lines modified
944 ····└──·Group:·/b/B944 ····└──·Group:·/b/B
945 Now·we·have·a·valid·DataTree·structure·which·contains·all·the·data·at·each945 Now·we·have·a·valid·DataTree·structure·which·contains·all·the·data·at·each
946 different·time·frequency,·stored·in·a·separate·group.946 different·time·frequency,·stored·in·a·separate·group.
947 This·is·a·useful·way·to·organise·our·data·because·we·can·still·operate·on·all947 This·is·a·useful·way·to·organise·our·data·because·we·can·still·operate·on·all
948 the·groups·at·once.·For·example·we·can·extract·all·three·timeseries·at·a948 the·groups·at·once.·For·example·we·can·extract·all·three·timeseries·at·a
949 specific·lat-lon·location:949 specific·lat-lon·location:
950 In·[100]:·dt.sel(lat=75,·lon=300)950 In·[100]:·dt.sel(lat=75,·lon=300)
951 ValueError:·Dimensions·{'lat',·'lon'}·do·not·exist.·Expected·one·or·more·of·set951 ValueError:·Dimensions·{'lon',·'lat'}·do·not·exist.·Expected·one·or·more·of·set
952 ()952 ()
953 or·compute·the·standard·deviation·of·each·timeseries·to·find·out·how·it·varies953 or·compute·the·standard·deviation·of·each·timeseries·to·find·out·how·it·varies
954 with·sampling·frequency:954 with·sampling·frequency:
955 In·[101]:·dt.std(dim="time")955 In·[101]:·dt.std(dim="time")
956 ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set()956 ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set()
957 *\x8**\x8**\x8**\x8*·C\x8Co\x8oo\x8or\x8rd\x8di\x8in\x8na\x8at\x8te\x8e·I\x8In\x8nh\x8he\x8er\x8ri\x8it\x8ta\x8an\x8nc\x8ce\x8e_\x8?\x8·*\x8**\x8**\x8**\x8*957 *\x8**\x8**\x8**\x8*·C\x8Co\x8oo\x8or\x8rd\x8di\x8in\x8na\x8at\x8te\x8e·I\x8In\x8nh\x8he\x8er\x8ri\x8it\x8ta\x8an\x8nc\x8ce\x8e_\x8?\x8·*\x8**\x8**\x8**\x8*
958 Notice·that·in·the·trees·we·constructed·above·there·is·some·redundancy·-·the958 Notice·that·in·the·trees·we·constructed·above·there·is·some·redundancy·-·the
Offset 1016, 15 lines modifiedOffset 1016, 15 lines modified
1016 coordinates,·but·explicitly·mark·them·as·such:1016 coordinates,·but·explicitly·mark·them·as·such:
1017 In·[107]:·print(dt["/daily"])1017 In·[107]:·print(dt["/daily"])
1018 KeyError:·'Could·not·find·node·at·/daily'1018 KeyError:·'Could·not·find·node·at·/daily'
1019 This·helps·to·differentiate·which·variables·are·defined·on·the·datatree·node1019 This·helps·to·differentiate·which·variables·are·defined·on·the·datatree·node
1020 that·you·are·currently·looking·at,·and·which·were·defined·somewhere·above·it.1020 that·you·are·currently·looking·at,·and·which·were·defined·somewhere·above·it.
1021 We·can·also·still·perform·all·the·same·operations·on·the·whole·tree:1021 We·can·also·still·perform·all·the·same·operations·on·the·whole·tree:
1022 In·[108]:·dt.sel(lat=[75],·lon=[300])1022 In·[108]:·dt.sel(lat=[75],·lon=[300])
1023 ValueError:·Dimensions·{'lat',·'lon'}·do·not·exist.·Expected·one·or·more·of·set1023 ValueError:·Dimensions·{'lon',·'lat'}·do·not·exist.·Expected·one·or·more·of·set
1024 ()1024 ()
  
  
1025 In·[109]:·dt.std(dim="time")1025 In·[109]:·dt.std(dim="time")
1026 ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set()1026 ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set()
1027 _\x8[_\x8L_\x8o_\x8g_\x8o_\x8·_\x8o_\x8f_\x8·_\x8x_\x8a_\x8r_\x8r_\x8a_\x8y_\x8]1027 _\x8[_\x8L_\x8o_\x8g_\x8o_\x8·_\x8o_\x8f_\x8·_\x8x_\x8a_\x8r_\x8r_\x8a_\x8y_\x8]
1028 *\x8**\x8**\x8**\x8**\x8**\x8*·_\x8x\x8x_\x8a\x8a_\x8r\x8r_\x8r\x8r_\x8a\x8a_\x8y\x8y·*\x8**\x8**\x8**\x8**\x8**\x8*1028 *\x8**\x8**\x8**\x8**\x8**\x8*·_\x8x\x8x_\x8a\x8a_\x8r\x8r_\x8r\x8r_\x8a\x8a_\x8y\x8y·*\x8**\x8**\x8**\x8**\x8**\x8*
9.12 KB
./usr/share/doc/python-xarray-doc/html/user-guide/indexing.html
    
Offset 653, 15 lines modifiedOffset 653, 15 lines modified
653 to·a·collection·specified·weather·station·latitudes·and·longitudes.653 to·a·collection·specified·weather·station·latitudes·and·longitudes.
654 To·trigger·vectorized·indexing·behavior654 To·trigger·vectorized·indexing·behavior
655 you·will·need·to·provide·the·selection·dimensions·with·a·new655 you·will·need·to·provide·the·selection·dimensions·with·a·new
656 shared·output·dimension·name.·In·the·example·below,·the·selections656 shared·output·dimension·name.·In·the·example·below,·the·selections
657 of·the·closest·latitude·and·longitude·are·renamed·to·an·output657 of·the·closest·latitude·and·longitude·are·renamed·to·an·output
658 dimension·named·“points”:</p>658 dimension·named·“points”:</p>
659 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[52]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span>659 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[52]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span>
660 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>660 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
661 <span·class="go">#·Define·target·latitude·and·longitude·(where·weather·stations·might·be)</span>661 <span·class="go">#·Define·target·latitude·and·longitude·(where·weather·stations·might·be)</span>
662 <span·class="gp">In·[53]:·</span><span·class="n">target_lon</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">DataArray</span><span·class="p">([</span><span·class="mi">200</span><span·class="p">,</span>·<span·class="mi">201</span><span·class="p">,</span>·<span·class="mi">202</span><span·class="p">,</span>·<span·class="mi">205</span><span·class="p">],</span>·<span·class="n">dims</span><span·class="o">=</span><span·class="s2">&quot;points&quot;</span><span·class="p">)</span>662 <span·class="gp">In·[53]:·</span><span·class="n">target_lon</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">DataArray</span><span·class="p">([</span><span·class="mi">200</span><span·class="p">,</span>·<span·class="mi">201</span><span·class="p">,</span>·<span·class="mi">202</span><span·class="p">,</span>·<span·class="mi">205</span><span·class="p">],</span>·<span·class="n">dims</span><span·class="o">=</span><span·class="s2">&quot;points&quot;</span><span·class="p">)</span>
  
663 <span·class="gp">In·[54]:·</span><span·class="n">target_lat</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">DataArray</span><span·class="p">([</span><span·class="mi">31</span><span·class="p">,</span>·<span·class="mi">41</span><span·class="p">,</span>·<span·class="mi">42</span><span·class="p">,</span>·<span·class="mi">42</span><span·class="p">],</span>·<span·class="n">dims</span><span·class="o">=</span><span·class="s2">&quot;points&quot;</span><span·class="p">)</span>663 <span·class="gp">In·[54]:·</span><span·class="n">target_lat</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">DataArray</span><span·class="p">([</span><span·class="mi">31</span><span·class="p">,</span>·<span·class="mi">41</span><span·class="p">,</span>·<span·class="mi">42</span><span·class="p">,</span>·<span·class="mi">42</span><span·class="p">],</span>·<span·class="n">dims</span><span·class="o">=</span><span·class="s2">&quot;points&quot;</span><span·class="p">)</span>
  
Offset 697, 15 lines modifiedOffset 697, 15 lines modified
697 </div>697 </div>
698 </section>698 </section>
699 <section·id="assigning-values-with-indexing">699 <section·id="assigning-values-with-indexing">
700 <span·id="assigning-values"></span><h2>Assigning·values·with·indexing<a·class="headerlink"·href="#assigning-values-with-indexing"·title="Link·to·this·heading">¶</a></h2>700 <span·id="assigning-values"></span><h2>Assigning·values·with·indexing<a·class="headerlink"·href="#assigning-values-with-indexing"·title="Link·to·this·heading">¶</a></h2>
701 <p>To·select·and·assign·values·to·a·portion·of·a·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataArray()</span></code>·you701 <p>To·select·and·assign·values·to·a·portion·of·a·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataArray()</span></code>·you
702 can·use·indexing·with·<code·class="docutils·literal·notranslate"><span·class="pre">.loc</span></code>·:</p>702 can·use·indexing·with·<code·class="docutils·literal·notranslate"><span·class="pre">.loc</span></code>·:</p>
703 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[57]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span>703 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[57]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span>
704 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>704 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
705 <span·class="go">#·add·an·empty·2D·dataarray</span>705 <span·class="go">#·add·an·empty·2D·dataarray</span>
706 <span·class="gp">In·[58]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;empty&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">full_like</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;time&quot;</span><span·class="p">),</span>·<span·class="n">fill_value</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span>706 <span·class="gp">In·[58]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;empty&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">full_like</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">&quot;time&quot;</span><span·class="p">),</span>·<span·class="n">fill_value</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span>
707 <span·class="go">AttributeError:·&#39;Dataset&#39;·object·has·no·attribute·&#39;air&#39;</span>707 <span·class="go">AttributeError:·&#39;Dataset&#39;·object·has·no·attribute·&#39;air&#39;</span>
  
  
Offset 869, 15 lines modifiedOffset 869, 15 lines modified
869 </div>869 </div>
870 </div>870 </div>
871 <p>You·can·also·assign·values·to·all·variables·of·a·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Dataset</span></code>·at·once:</p>871 <p>You·can·also·assign·values·to·all·variables·of·a·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Dataset</span></code>·at·once:</p>
872 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[83]:·</span><span·class="n">ds_org</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;eraint_uvz&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span>872 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[83]:·</span><span·class="n">ds_org</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;eraint_uvz&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span>
873 <span·class="gp">···....:·</span>····<span·class="n">latitude</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">56</span><span·class="p">,</span>·<span·class="mi">59</span><span·class="p">),</span>·<span·class="n">longitude</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">255</span><span·class="p">,</span>·<span·class="mi">258</span><span·class="p">),</span>·<span·class="n">level</span><span·class="o">=</span><span·class="mi">0</span>873 <span·class="gp">···....:·</span>····<span·class="n">latitude</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">56</span><span·class="p">,</span>·<span·class="mi">59</span><span·class="p">),</span>·<span·class="n">longitude</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">255</span><span·class="p">,</span>·<span·class="mi">258</span><span·class="p">),</span>·<span·class="n">level</span><span·class="o">=</span><span·class="mi">0</span>
874 <span·class="gp">···....:·</span><span·class="p">)</span>874 <span·class="gp">···....:·</span><span·class="p">)</span>
875 <span·class="gp">···....:·</span>875 <span·class="gp">···....:·</span>
876 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>876 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
877 <span·class="go">#·set·all·values·to·0</span>877 <span·class="go">#·set·all·values·to·0</span>
878 <span·class="gp">In·[84]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">zeros_like</span><span·class="p">(</span><span·class="n">ds_org</span><span·class="p">)</span>878 <span·class="gp">In·[84]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">zeros_like</span><span·class="p">(</span><span·class="n">ds_org</span><span·class="p">)</span>
879 <span·class="go">NameError:·name·&#39;ds_org&#39;·is·not·defined</span>879 <span·class="go">NameError:·name·&#39;ds_org&#39;·is·not·defined</span>
  
  
2.39 KB
html2text {}
    
Offset 474, 15 lines modifiedOffset 474, 15 lines modified
474 collection·specified·weather·station·latitudes·and·longitudes.·To·trigger474 collection·specified·weather·station·latitudes·and·longitudes.·To·trigger
475 vectorized·indexing·behavior·you·will·need·to·provide·the·selection·dimensions475 vectorized·indexing·behavior·you·will·need·to·provide·the·selection·dimensions
476 with·a·new·shared·output·dimension·name.·In·the·example·below,·the·selections476 with·a·new·shared·output·dimension·name.·In·the·example·below,·the·selections
477 of·the·closest·latitude·and·longitude·are·renamed·to·an·output·dimension·named477 of·the·closest·latitude·and·longitude·are·renamed·to·an·output·dimension·named
478 “points”:478 “points”:
479 In·[52]:·ds·=·xr.tutorial.open_dataset("air_temperature")479 In·[52]:·ds·=·xr.tutorial.open_dataset("air_temperature")
480 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not480 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
481 create·data·cache·folder·'/nonexistent/first-build/.cache/481 create·data·cache·folder·'/nonexistent/second-build/.cache/
482 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.482 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
483 #·Define·target·latitude·and·longitude·(where·weather·stations·might·be)483 #·Define·target·latitude·and·longitude·(where·weather·stations·might·be)
484 In·[53]:·target_lon·=·xr.DataArray([200,·201,·202,·205],·dims="points")484 In·[53]:·target_lon·=·xr.DataArray([200,·201,·202,·205],·dims="points")
  
485 In·[54]:·target_lat·=·xr.DataArray([31,·41,·42,·42],·dims="points")485 In·[54]:·target_lat·=·xr.DataArray([31,·41,·42,·42],·dims="points")
Offset 513, 15 lines modifiedOffset 513, 15 lines modified
513 selected·subpart·of·the·target·array·(except·for·the·explicitly·indexed513 selected·subpart·of·the·target·array·(except·for·the·explicitly·indexed
514 dimensions·with·.loc/.sel).·Otherwise,·IndexError·will·be·raised.514 dimensions·with·.loc/.sel).·Otherwise,·IndexError·will·be·raised.
515 *\x8**\x8**\x8**\x8**\x8*·A\x8As\x8ss\x8si\x8ig\x8gn\x8ni\x8in\x8ng\x8g·v\x8va\x8al\x8lu\x8ue\x8es\x8s·w\x8wi\x8it\x8th\x8h·i\x8in\x8nd\x8de\x8ex\x8xi\x8in\x8ng\x8g_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*515 *\x8**\x8**\x8**\x8**\x8*·A\x8As\x8ss\x8si\x8ig\x8gn\x8ni\x8in\x8ng\x8g·v\x8va\x8al\x8lu\x8ue\x8es\x8s·w\x8wi\x8it\x8th\x8h·i\x8in\x8nd\x8de\x8ex\x8xi\x8in\x8ng\x8g_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
516 To·select·and·assign·values·to·a·portion·of·a·DataArray()·you·can·use·indexing516 To·select·and·assign·values·to·a·portion·of·a·DataArray()·you·can·use·indexing
517 with·.loc·:517 with·.loc·:
518 In·[57]:·ds·=·xr.tutorial.open_dataset("air_temperature")518 In·[57]:·ds·=·xr.tutorial.open_dataset("air_temperature")
519 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not519 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
520 create·data·cache·folder·'/nonexistent/first-build/.cache/520 create·data·cache·folder·'/nonexistent/second-build/.cache/
521 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.521 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
522 #·add·an·empty·2D·dataarray522 #·add·an·empty·2D·dataarray
523 In·[58]:·ds["empty"]·=·xr.full_like(ds.air.mean("time"),·fill_value=0)523 In·[58]:·ds["empty"]·=·xr.full_like(ds.air.mean("time"),·fill_value=0)
524 AttributeError:·'Dataset'·object·has·no·attribute·'air'524 AttributeError:·'Dataset'·object·has·no·attribute·'air'
  
Offset 673, 15 lines modifiedOffset 673, 15 lines modified
673 Dimensions·without·coordinates:·x673 Dimensions·without·coordinates:·x
674 You·can·also·assign·values·to·all·variables·of·a·Dataset·at·once:674 You·can·also·assign·values·to·all·variables·of·a·Dataset·at·once:
675 In·[83]:·ds_org·=·xr.tutorial.open_dataset("eraint_uvz").isel(675 In·[83]:·ds_org·=·xr.tutorial.open_dataset("eraint_uvz").isel(
676 ···....:·····latitude=slice(56,·59),·longitude=slice(255,·258),·level=0676 ···....:·····latitude=slice(56,·59),·longitude=slice(255,·258),·level=0
677 ···....:·)677 ···....:·)
678 ···....:678 ···....:
679 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not679 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
680 create·data·cache·folder·'/nonexistent/first-build/.cache/680 create·data·cache·folder·'/nonexistent/second-build/.cache/
681 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.681 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
682 #·set·all·values·to·0682 #·set·all·values·to·0
683 In·[84]:·ds·=·xr.zeros_like(ds_org)683 In·[84]:·ds·=·xr.zeros_like(ds_org)
684 NameError:·name·'ds_org'·is·not·defined684 NameError:·name·'ds_org'·is·not·defined
  
12.8 KB
./usr/share/doc/python-xarray-doc/html/user-guide/interpolation.html
    
Offset 237, 24 lines modifiedOffset 237, 24 lines modified
237 <span·class="gp">···....:·</span>····<span·class="n">np</span><span·class="o">.</span><span·class="n">sin</span><span·class="p">(</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">pi</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">)),</span>237 <span·class="gp">···....:·</span>····<span·class="n">np</span><span·class="o">.</span><span·class="n">sin</span><span·class="p">(</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">2</span>·<span·class="o">*</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">pi</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">)),</span>
238 <span·class="gp">···....:·</span>····<span·class="n">dims</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>238 <span·class="gp">···....:·</span>····<span·class="n">dims</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>
239 <span·class="gp">···....:·</span>····<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">)},</span>239 <span·class="gp">···....:·</span>····<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">)},</span>
240 <span·class="gp">···....:·</span><span·class="p">)</span>240 <span·class="gp">···....:·</span><span·class="p">)</span>
241 <span·class="gp">···....:·</span>241 <span·class="gp">···....:·</span>
  
242 <span·class="gp">In·[17]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="s2">&quot;o&quot;</span><span·class="p">,</span>·<span·class="n">label</span><span·class="o">=</span><span·class="s2">&quot;original&quot;</span><span·class="p">)</span>242 <span·class="gp">In·[17]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="s2">&quot;o&quot;</span><span·class="p">,</span>·<span·class="n">label</span><span·class="o">=</span><span·class="s2">&quot;original&quot;</span><span·class="p">)</span>
243 <span·class="gh">Out[17]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xab246c90&gt;]</span>243 <span·class="gh">Out[17]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xec2c5c90&gt;]</span>
  
244 <span·class="gp">In·[18]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">100</span><span·class="p">))</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="n">label</span><span·class="o">=</span><span·class="s2">&quot;linear·(default)&quot;</span><span·class="p">)</span>244 <span·class="gp">In·[18]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">100</span><span·class="p">))</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="n">label</span><span·class="o">=</span><span·class="s2">&quot;linear·(default)&quot;</span><span·class="p">)</span>
245 <span·class="gh">Out[18]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xab246be0&gt;]</span>245 <span·class="gh">Out[18]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xec2c5be0&gt;]</span>
  
246 <span·class="gp">In·[19]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">100</span><span·class="p">),</span>·<span·class="n">method</span><span·class="o">=</span><span·class="s2">&quot;cubic&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="n">label</span><span·class="o">=</span><span·class="s2">&quot;cubic&quot;</span><span·class="p">)</span>246 <span·class="gp">In·[19]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">100</span><span·class="p">),</span>·<span·class="n">method</span><span·class="o">=</span><span·class="s2">&quot;cubic&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="n">label</span><span·class="o">=</span><span·class="s2">&quot;cubic&quot;</span><span·class="p">)</span>
247 <span·class="gh">Out[19]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xab246b30&gt;]</span>247 <span·class="gh">Out[19]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xec2c5b30&gt;]</span>
  
248 <span·class="gp">In·[20]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">legend</span><span·class="p">()</span>248 <span·class="gp">In·[20]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">legend</span><span·class="p">()</span>
249 <span·class="gh">Out[20]:·</span><span·class="go">&lt;matplotlib.legend.Legend·at·0xab27f480&gt;</span>249 <span·class="gh">Out[20]:·</span><span·class="go">&lt;matplotlib.legend.Legend·at·0xec2fd480&gt;</span>
250 </pre></div>250 </pre></div>
251 </div>251 </div>
252 <a·class="reference·internal·image-reference"·href="_build/html/_static/interpolation_sample1.png"><img·alt="_build/html/_static/interpolation_sample1.png"·src="_build/html/_static/interpolation_sample1.png"·style="width:·4in;"·/>252 <a·class="reference·internal·image-reference"·href="_build/html/_static/interpolation_sample1.png"><img·alt="_build/html/_static/interpolation_sample1.png"·src="_build/html/_static/interpolation_sample1.png"·style="width:·4in;"·/>
253 </a>253 </a>
254 <p>Additional·keyword·arguments·can·be·passed·to·scipy’s·functions.</p>254 <p>Additional·keyword·arguments·can·be·passed·to·scipy’s·functions.</p>
255 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·fill·0·for·the·outside·of·the·original·coordinates.</span>255 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·fill·0·for·the·outside·of·the·original·coordinates.</span>
256 <span·class="gp">In·[21]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="o">-</span><span·class="mf">0.5</span><span·class="p">,</span>·<span·class="mf">1.5</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">),</span>·<span·class="n">kwargs</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;fill_value&quot;</span><span·class="p">:</span>·<span·class="mf">0.0</span><span·class="p">})</span>256 <span·class="gp">In·[21]:·</span><span·class="n">da</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="n">np</span><span·class="o">.</span><span·class="n">linspace</span><span·class="p">(</span><span·class="o">-</span><span·class="mf">0.5</span><span·class="p">,</span>·<span·class="mf">1.5</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">),</span>·<span·class="n">kwargs</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;fill_value&quot;</span><span·class="p">:</span>·<span·class="mf">0.0</span><span·class="p">})</span>
Offset 439, 15 lines modifiedOffset 439, 15 lines modified
439 see·<a·class="reference·internal"·href="computation.html#missing-values"><span·class="std·std-ref">Missing·values</span></a>.</p>439 see·<a·class="reference·internal"·href="computation.html#missing-values"><span·class="std·std-ref">Missing·values</span></a>.</p>
440 </section>440 </section>
441 <section·id="example">441 <section·id="example">
442 <h2>Example<a·class="headerlink"·href="#example"·title="Link·to·this·heading">¶</a></h2>442 <h2>Example<a·class="headerlink"·href="#example"·title="Link·to·this·heading">¶</a></h2>
443 <p>Let’s·see·how·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">interp()</span></code>·works·on·real·data.</p>443 <p>Let’s·see·how·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">interp()</span></code>·works·on·real·data.</p>
444 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Raw·data</span>444 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Raw·data</span>
445 <span·class="gp">In·[44]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span>445 <span·class="gp">In·[44]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span>
446 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>446 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
447 <span·class="gp">In·[45]:·</span><span·class="n">fig</span><span·class="p">,</span>·<span·class="n">axes</span>·<span·class="o">=</span>·<span·class="n">plt</span><span·class="o">.</span><span·class="n">subplots</span><span·class="p">(</span><span·class="n">ncols</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">,</span>·<span·class="n">figsize</span><span·class="o">=</span><span·class="p">(</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">))</span>447 <span·class="gp">In·[45]:·</span><span·class="n">fig</span><span·class="p">,</span>·<span·class="n">axes</span>·<span·class="o">=</span>·<span·class="n">plt</span><span·class="o">.</span><span·class="n">subplots</span><span·class="p">(</span><span·class="n">ncols</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">,</span>·<span·class="n">figsize</span><span·class="o">=</span><span·class="p">(</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">))</span>
  
448 <span·class="gp">In·[46]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">ax</span><span·class="o">=</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">])</span>448 <span·class="gp">In·[46]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">ax</span><span·class="o">=</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">])</span>
449 <span·class="go">AttributeError:·&#39;Dataset&#39;·object·has·no·attribute·&#39;air&#39;</span>449 <span·class="go">AttributeError:·&#39;Dataset&#39;·object·has·no·attribute·&#39;air&#39;</span>
  
Offset 511, 15 lines modifiedOffset 511, 15 lines modified
511 <span·class="gp">···....:·</span>····<span·class="n">axes</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">]</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="o">*</span><span·class="n">xr</span><span·class="o">.</span><span·class="n">broadcast</span><span·class="p">(</span><span·class="n">lon</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">z</span><span·class="o">=</span><span·class="n">idx</span><span·class="p">),</span>·<span·class="n">lat</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">z</span><span·class="o">=</span><span·class="n">idx</span><span·class="p">)),</span>·<span·class="s2">&quot;--k&quot;</span><span·class="p">)</span>511 <span·class="gp">···....:·</span>····<span·class="n">axes</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">]</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="o">*</span><span·class="n">xr</span><span·class="o">.</span><span·class="n">broadcast</span><span·class="p">(</span><span·class="n">lon</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">z</span><span·class="o">=</span><span·class="n">idx</span><span·class="p">),</span>·<span·class="n">lat</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">z</span><span·class="o">=</span><span·class="n">idx</span><span·class="p">)),</span>·<span·class="s2">&quot;--k&quot;</span><span·class="p">)</span>
512 <span·class="gp">···....:·</span>512 <span·class="gp">···....:·</span>
  
513 <span·class="gp">In·[61]:·</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">]</span><span·class="o">.</span><span·class="n">set_title</span><span·class="p">(</span><span·class="s2">&quot;Raw·data&quot;</span><span·class="p">)</span>513 <span·class="gp">In·[61]:·</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">]</span><span·class="o">.</span><span·class="n">set_title</span><span·class="p">(</span><span·class="s2">&quot;Raw·data&quot;</span><span·class="p">)</span>
514 <span·class="gh">Out[61]:·</span><span·class="go">Text(0.5,·1.0,·&#39;Raw·data&#39;)</span>514 <span·class="gh">Out[61]:·</span><span·class="go">Text(0.5,·1.0,·&#39;Raw·data&#39;)</span>
  
515 <span·class="gp">In·[62]:·</span><span·class="n">dsi</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">lon</span><span·class="o">=</span><span·class="n">lon</span><span·class="p">,</span>·<span·class="n">lat</span><span·class="o">=</span><span·class="n">lat</span><span·class="p">)</span>515 <span·class="gp">In·[62]:·</span><span·class="n">dsi</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">lon</span><span·class="o">=</span><span·class="n">lon</span><span·class="p">,</span>·<span·class="n">lat</span><span·class="o">=</span><span·class="n">lat</span><span·class="p">)</span>
516 <span·class="go">ValueError:·Dimensions·{&#39;lat&#39;,·&#39;lon&#39;}·do·not·exist.·Expected·one·or·more·of·FrozenMappingWarningOnValuesAccess({&#39;x&#39;:·3,·&#39;y&#39;:·4})</span>516 <span·class="go">ValueError:·Dimensions·{&#39;lon&#39;,·&#39;lat&#39;}·do·not·exist.·Expected·one·or·more·of·FrozenMappingWarningOnValuesAccess({&#39;x&#39;:·3,·&#39;y&#39;:·4})</span>
  
  
517 <span·class="gp">In·[63]:·</span><span·class="n">dsi</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">ax</span><span·class="o">=</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">])</span>517 <span·class="gp">In·[63]:·</span><span·class="n">dsi</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">ax</span><span·class="o">=</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">])</span>
518 <span·class="go">NameError:·name·&#39;dsi&#39;·is·not·defined</span>518 <span·class="go">NameError:·name·&#39;dsi&#39;·is·not·defined</span>
  
  
519 <span·class="gp">In·[64]:·</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">]</span><span·class="o">.</span><span·class="n">set_title</span><span·class="p">(</span><span·class="s2">&quot;Remapped·data&quot;</span><span·class="p">)</span>519 <span·class="gp">In·[64]:·</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">]</span><span·class="o">.</span><span·class="n">set_title</span><span·class="p">(</span><span·class="s2">&quot;Remapped·data&quot;</span><span·class="p">)</span>
2.48 KB
html2text {}
    
Offset 154, 26 lines modifiedOffset 154, 26 lines modified
154 ···....:·····np.sin(np.linspace(0,·2·*·np.pi,·10)),154 ···....:·····np.sin(np.linspace(0,·2·*·np.pi,·10)),
155 ···....:·····dims="x",155 ···....:·····dims="x",
156 ···....:·····coords={"x":·np.linspace(0,·1,·10)},156 ···....:·····coords={"x":·np.linspace(0,·1,·10)},
157 ···....:·)157 ···....:·)
158 ···....:158 ···....:
  
159 In·[17]:·da.plot.line("o",·label="original")159 In·[17]:·da.plot.line("o",·label="original")
160 Out[17]:·[<matplotlib.lines.Line2D·at·0xab246c90>]160 Out[17]:·[<matplotlib.lines.Line2D·at·0xec2c5c90>]
  
161 In·[18]:·da.interp(x=np.linspace(0,·1,·100)).plot.line(label="linear161 In·[18]:·da.interp(x=np.linspace(0,·1,·100)).plot.line(label="linear
162 (default)")162 (default)")
163 Out[18]:·[<matplotlib.lines.Line2D·at·0xab246be0>]163 Out[18]:·[<matplotlib.lines.Line2D·at·0xec2c5be0>]
  
164 In·[19]:·da.interp(x=np.linspace(0,·1,·100),·method="cubic").plot.line164 In·[19]:·da.interp(x=np.linspace(0,·1,·100),·method="cubic").plot.line
165 (label="cubic")165 (label="cubic")
166 Out[19]:·[<matplotlib.lines.Line2D·at·0xab246b30>]166 Out[19]:·[<matplotlib.lines.Line2D·at·0xec2c5b30>]
  
167 In·[20]:·plt.legend()167 In·[20]:·plt.legend()
168 Out[20]:·<matplotlib.legend.Legend·at·0xab27f480>168 Out[20]:·<matplotlib.legend.Legend·at·0xec2fd480>
169 _\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8i_\x8n_\x8t_\x8e_\x8r_\x8p_\x8o_\x8l_\x8a_\x8t_\x8i_\x8o_\x8n_\x8__\x8s_\x8a_\x8m_\x8p_\x8l_\x8e_\x81_\x8._\x8p_\x8n_\x8g_\x8]169 _\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8i_\x8n_\x8t_\x8e_\x8r_\x8p_\x8o_\x8l_\x8a_\x8t_\x8i_\x8o_\x8n_\x8__\x8s_\x8a_\x8m_\x8p_\x8l_\x8e_\x81_\x8._\x8p_\x8n_\x8g_\x8]
170 Additional·keyword·arguments·can·be·passed·to·scipy’s·functions.170 Additional·keyword·arguments·can·be·passed·to·scipy’s·functions.
171 #·fill·0·for·the·outside·of·the·original·coordinates.171 #·fill·0·for·the·outside·of·the·original·coordinates.
172 In·[21]:·da.interp(x=np.linspace(-0.5,·1.5,·10),·kwargs={"fill_value":·0.0})172 In·[21]:·da.interp(x=np.linspace(-0.5,·1.5,·10),·kwargs={"fill_value":·0.0})
173 Out[21]:173 Out[21]:
174 <xarray.DataArray·(x:·10)>·Size:·80B174 <xarray.DataArray·(x:·10)>·Size:·80B
175 array([·0.···,··0.···,··0.···,··0.814,··0.604,·-0.604,·-0.814,··0.···,··0.···,175 array([·0.···,··0.···,··0.···,··0.814,··0.604,·-0.604,·-0.814,··0.···,··0.···,
Offset 337, 15 lines modifiedOffset 337, 15 lines modified
337 ··*·x········(x)·float64·24B·0.5·1.5·2.5337 ··*·x········(x)·float64·24B·0.5·1.5·2.5
338 For·the·details·of·interpolate_na(),·see·_\x8M_\x8i_\x8s_\x8s_\x8i_\x8n_\x8g_\x8·_\x8v_\x8a_\x8l_\x8u_\x8e_\x8s.338 For·the·details·of·interpolate_na(),·see·_\x8M_\x8i_\x8s_\x8s_\x8i_\x8n_\x8g_\x8·_\x8v_\x8a_\x8l_\x8u_\x8e_\x8s.
339 *\x8**\x8**\x8**\x8**\x8*·E\x8Ex\x8xa\x8am\x8mp\x8pl\x8le\x8e_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*339 *\x8**\x8**\x8**\x8**\x8*·E\x8Ex\x8xa\x8am\x8mp\x8pl\x8le\x8e_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
340 Let’s·see·how·interp()·works·on·real·data.340 Let’s·see·how·interp()·works·on·real·data.
341 #·Raw·data341 #·Raw·data
342 In·[44]:·ds·=·xr.tutorial.open_dataset("air_temperature").isel(time=0)342 In·[44]:·ds·=·xr.tutorial.open_dataset("air_temperature").isel(time=0)
343 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not343 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
344 create·data·cache·folder·'/nonexistent/first-build/.cache/344 create·data·cache·folder·'/nonexistent/second-build/.cache/
345 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.345 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
346 In·[45]:·fig,·axes·=·plt.subplots(ncols=2,·figsize=(10,·4))346 In·[45]:·fig,·axes·=·plt.subplots(ncols=2,·figsize=(10,·4))
  
347 In·[46]:·ds.air.plot(ax=axes[0])347 In·[46]:·ds.air.plot(ax=axes[0])
348 AttributeError:·'Dataset'·object·has·no·attribute·'air'348 AttributeError:·'Dataset'·object·has·no·attribute·'air'
Offset 410, 15 lines modifiedOffset 410, 15 lines modified
410 k")410 k")
411 ···....:411 ···....:
  
412 In·[61]:·axes[0].set_title("Raw·data")412 In·[61]:·axes[0].set_title("Raw·data")
413 Out[61]:·Text(0.5,·1.0,·'Raw·data')413 Out[61]:·Text(0.5,·1.0,·'Raw·data')
  
414 In·[62]:·dsi·=·ds.interp(lon=lon,·lat=lat)414 In·[62]:·dsi·=·ds.interp(lon=lon,·lat=lat)
415 ValueError:·Dimensions·{'lat',·'lon'}·do·not·exist.·Expected·one·or·more·of415 ValueError:·Dimensions·{'lon',·'lat'}·do·not·exist.·Expected·one·or·more·of
416 FrozenMappingWarningOnValuesAccess({'x':·3,·'y':·4})416 FrozenMappingWarningOnValuesAccess({'x':·3,·'y':·4})
  
  
417 In·[63]:·dsi.air.plot(ax=axes[1])417 In·[63]:·dsi.air.plot(ax=axes[1])
418 NameError:·name·'dsi'·is·not·defined418 NameError:·name·'dsi'·is·not·defined
  
  
25.3 KB
./usr/share/doc/python-xarray-doc/html/user-guide/io.html
    
Offset 630, 15 lines modifiedOffset 630, 15 lines modified
630 <span·class="gp">···....:·</span>········<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">&quot;2000-01-01&quot;</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">5</span><span·class="p">),</span>630 <span·class="gp">···....:·</span>········<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">&quot;2000-01-01&quot;</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">5</span><span·class="p">),</span>
631 <span·class="gp">···....:·</span>········<span·class="s2">&quot;z&quot;</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="nb">list</span><span·class="p">(</span><span·class="s2">&quot;abcd&quot;</span><span·class="p">)),</span>631 <span·class="gp">···....:·</span>········<span·class="s2">&quot;z&quot;</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="nb">list</span><span·class="p">(</span><span·class="s2">&quot;abcd&quot;</span><span·class="p">)),</span>
632 <span·class="gp">···....:·</span>····<span·class="p">},</span>632 <span·class="gp">···....:·</span>····<span·class="p">},</span>
633 <span·class="gp">···....:·</span><span·class="p">)</span>633 <span·class="gp">···....:·</span><span·class="p">)</span>
634 <span·class="gp">···....:·</span>634 <span·class="gp">···....:·</span>
  
635 <span·class="gp">In·[13]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">)</span>635 <span·class="gp">In·[13]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">)</span>
636 <span·class="gh">Out[13]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa22b29b8&gt;</span>636 <span·class="gh">Out[13]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe31384f0&gt;</span>
637 </pre></div>637 </pre></div>
638 </div>638 </div>
639 <p>(The·suffix·<code·class="docutils·literal·notranslate"><span·class="pre">.zarr</span></code>·is·optional–just·a·reminder·that·a·zarr·store·lives639 <p>(The·suffix·<code·class="docutils·literal·notranslate"><span·class="pre">.zarr</span></code>·is·optional–just·a·reminder·that·a·zarr·store·lives
640 there.)·If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr640 there.)·If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr
641 store·is·already·present·at·that·path,·an·error·will·be·raised,·preventing·it641 store·is·already·present·at·that·path,·an·error·will·be·raised,·preventing·it
642 from·being·overwritten.·To·override·this·behavior·and·overwrite·an·existing642 from·being·overwritten.·To·override·this·behavior·and·overwrite·an·existing
643 store,·add·<code·class="docutils·literal·notranslate"><span·class="pre">mode='w'</span></code>·when·invoking·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">to_zarr()</span></code>.</p>643 store,·add·<code·class="docutils·literal·notranslate"><span·class="pre">mode='w'</span></code>·when·invoking·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">to_zarr()</span></code>.</p>
Offset 724, 36 lines modifiedOffset 724, 36 lines modified
  
724 <span·class="gp">In·[18]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">({</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">dummies</span><span·class="p">)},</span>·<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">)})</span>724 <span·class="gp">In·[18]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">({</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">dummies</span><span·class="p">)},</span>·<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">)})</span>
  
725 <span·class="gp">In·[19]:·</span><span·class="n">path</span>·<span·class="o">=</span>·<span·class="s2">&quot;path/to/directory.zarr&quot;</span>725 <span·class="gp">In·[19]:·</span><span·class="n">path</span>·<span·class="o">=</span>·<span·class="s2">&quot;path/to/directory.zarr&quot;</span>
  
726 <span·class="go">#·Now·we·write·the·metadata·without·computing·any·array·values</span>726 <span·class="go">#·Now·we·write·the·metadata·without·computing·any·array·values</span>
727 <span·class="gp">In·[20]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">compute</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span>727 <span·class="gp">In·[20]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">compute</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span>
728 <span·class="gh">Out[20]:·</span><span·class="go">Delayed(&#39;_finalize_store-79faeb4f-cb04-4282-8fdc-78ec9eb7c5f5&#39;)</span>728 <span·class="gh">Out[20]:·</span><span·class="go">Delayed(&#39;_finalize_store-3fb519b5-4166-4e5a-98ba-fba59cba6080&#39;)</span>
729 </pre></div>729 </pre></div>
730 </div>730 </div>
731 <p>Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that731 <p>Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that
732 can·be·filled·out·by·subsequent·calls·to·<code·class="docutils·literal·notranslate"><span·class="pre">to_zarr</span></code>.732 can·be·filled·out·by·subsequent·calls·to·<code·class="docutils·literal·notranslate"><span·class="pre">to_zarr</span></code>.
733 Setting·<code·class="docutils·literal·notranslate"><span·class="pre">region=&quot;auto&quot;</span></code>·will·open·the·existing·store·and·determine·the733 Setting·<code·class="docutils·literal·notranslate"><span·class="pre">region=&quot;auto&quot;</span></code>·will·open·the·existing·store·and·determine·the
734 correct·alignment·of·the·new·data·with·the·existing·dimensions,·or·as·an734 correct·alignment·of·the·new·data·with·the·existing·dimensions,·or·as·an
735 explicit·mapping·from·dimension·names·to·Python·<code·class="docutils·literal·notranslate"><span·class="pre">slice</span></code>·objects·indicating735 explicit·mapping·from·dimension·names·to·Python·<code·class="docutils·literal·notranslate"><span·class="pre">slice</span></code>·objects·indicating
736 where·the·data·should·be·written·(in·index·space,·not·label·space),·e.g.,</p>736 where·the·data·should·be·written·(in·index·space,·not·label·space),·e.g.,</p>
737 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·For·convenience,·we&#39;ll·slice·a·single·dataset,·but·in·the·real·use-case</span>737 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·For·convenience,·we&#39;ll·slice·a·single·dataset,·but·in·the·real·use-case</span>
738 <span·class="go">#·we·would·create·them·separately·possibly·even·from·separate·processes.</span>738 <span·class="go">#·we·would·create·them·separately·possibly·even·from·separate·processes.</span>
739 <span·class="gp">In·[21]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">({</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">))},</span>·<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">)})</span>739 <span·class="gp">In·[21]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">({</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">))},</span>·<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">arange</span><span·class="p">(</span><span·class="mi">30</span><span·class="p">)})</span>
  
740 <span·class="go">#·Any·of·the·following·region·specifications·are·valid</span>740 <span·class="go">#·Any·of·the·following·region·specifications·are·valid</span>
741 <span·class="gp">In·[22]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="s2">&quot;auto&quot;</span><span·class="p">)</span>741 <span·class="gp">In·[22]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="s2">&quot;auto&quot;</span><span·class="p">)</span>
742 <span·class="gh">Out[22]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa25efa48&gt;</span>742 <span·class="gh">Out[22]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe3181c88&gt;</span>
  
743 <span·class="gp">In·[23]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">20</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="s2">&quot;auto&quot;</span><span·class="p">})</span>743 <span·class="gp">In·[23]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">20</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="s2">&quot;auto&quot;</span><span·class="p">})</span>
744 <span·class="gh">Out[23]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa25ef730&gt;</span>744 <span·class="gh">Out[23]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe30befa0&gt;</span>
  
745 <span·class="gp">In·[24]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="nb">slice</span><span·class="p">(</span><span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">)})</span>745 <span·class="gp">In·[24]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="nb">slice</span><span·class="p">(</span><span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">))</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="n">path</span><span·class="p">,</span>·<span·class="n">region</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="nb">slice</span><span·class="p">(</span><span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">)})</span>
746 <span·class="gh">Out[24]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa2b26220&gt;</span>746 <span·class="gh">Out[24]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe30d76a0&gt;</span>
747 </pre></div>747 </pre></div>
748 </div>748 </div>
749 <p>Concurrent·writes·with·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·are·safe·as·long·as·they·modify·distinct749 <p>Concurrent·writes·with·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·are·safe·as·long·as·they·modify·distinct
750 chunks·in·the·underlying·Zarr·arrays·(or·use·an·appropriate·<code·class="docutils·literal·notranslate"><span·class="pre">lock</span></code>).</p>750 chunks·in·the·underlying·Zarr·arrays·(or·use·an·appropriate·<code·class="docutils·literal·notranslate"><span·class="pre">lock</span></code>).</p>
751 <p>As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values,751 <p>As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values,
752 if·you·set·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·then·<em>all</em>·variables·included·in·a·Dataset·must·have752 if·you·set·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·then·<em>all</em>·variables·included·in·a·Dataset·must·have
753 dimensions·included·in·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>.·Other·variables·(typically·coordinates)753 dimensions·included·in·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>.·Other·variables·(typically·coordinates)
Offset 816, 28 lines modifiedOffset 816, 28 lines modified
816 <span·class="gp">···....:·</span>········<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">],</span>816 <span·class="gp">···....:·</span>········<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">],</span>
817 <span·class="gp">···....:·</span>········<span·class="s2">&quot;t&quot;</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">&quot;2001-01-01&quot;</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">),</span>817 <span·class="gp">···....:·</span>········<span·class="s2">&quot;t&quot;</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">&quot;2001-01-01&quot;</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">),</span>
818 <span·class="gp">···....:·</span>····<span·class="p">},</span>818 <span·class="gp">···....:·</span>····<span·class="p">},</span>
819 <span·class="gp">···....:·</span><span·class="p">)</span>819 <span·class="gp">···....:·</span><span·class="p">)</span>
820 <span·class="gp">···....:·</span>820 <span·class="gp">···....:·</span>
  
821 <span·class="gp">In·[30]:·</span><span·class="n">ds1</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">)</span>821 <span·class="gp">In·[30]:·</span><span·class="n">ds1</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">)</span>
822 <span·class="gh">Out[30]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa2580d18&gt;</span>822 <span·class="gh">Out[30]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe3051c88&gt;</span>
  
823 <span·class="gp">In·[31]:·</span><span·class="n">ds2</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">(</span>823 <span·class="gp">In·[31]:·</span><span·class="n">ds2</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">(</span>
824 <span·class="gp">···....:·</span>····<span·class="p">{</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">((</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="s2">&quot;t&quot;</span><span·class="p">),</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">random</span><span·class="o">.</span><span·class="n">rand</span><span·class="p">(</span><span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">))},</span>824 <span·class="gp">···....:·</span>····<span·class="p">{</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">((</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="s2">&quot;t&quot;</span><span·class="p">),</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">random</span><span·class="o">.</span><span·class="n">rand</span><span·class="p">(</span><span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">))},</span>
825 <span·class="gp">···....:·</span>····<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span>825 <span·class="gp">···....:·</span>····<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span>
826 <span·class="gp">···....:·</span>········<span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">,</span>·<span·class="mi">40</span><span·class="p">],</span>826 <span·class="gp">···....:·</span>········<span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">20</span><span·class="p">,</span>·<span·class="mi">30</span><span·class="p">,</span>·<span·class="mi">40</span><span·class="p">],</span>
827 <span·class="gp">···....:·</span>········<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">],</span>827 <span·class="gp">···....:·</span>········<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="mi">3</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">,</span>·<span·class="mi">5</span><span·class="p">],</span>
828 <span·class="gp">···....:·</span>········<span·class="s2">&quot;t&quot;</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">&quot;2001-01-03&quot;</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">),</span>828 <span·class="gp">···....:·</span>········<span·class="s2">&quot;t&quot;</span><span·class="p">:</span>·<span·class="n">pd</span><span·class="o">.</span><span·class="n">date_range</span><span·class="p">(</span><span·class="s2">&quot;2001-01-03&quot;</span><span·class="p">,</span>·<span·class="n">periods</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">),</span>
829 <span·class="gp">···....:·</span>····<span·class="p">},</span>829 <span·class="gp">···....:·</span>····<span·class="p">},</span>
830 <span·class="gp">···....:·</span><span·class="p">)</span>830 <span·class="gp">···....:·</span><span·class="p">)</span>
831 <span·class="gp">···....:·</span>831 <span·class="gp">···....:·</span>
  
832 <span·class="gp">In·[32]:·</span><span·class="n">ds2</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">,</span>·<span·class="n">append_dim</span><span·class="o">=</span><span·class="s2">&quot;t&quot;</span><span·class="p">)</span>832 <span·class="gp">In·[32]:·</span><span·class="n">ds2</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">,</span>·<span·class="n">append_dim</span><span·class="o">=</span><span·class="s2">&quot;t&quot;</span><span·class="p">)</span>
833 <span·class="gh">Out[32]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa25ef190&gt;</span>833 <span·class="gh">Out[32]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe3051148&gt;</span>
834 </pre></div>834 </pre></div>
835 </div>835 </div>
836 </section>836 </section>
837 <section·id="specifying-chunks-in-a-zarr-store">837 <section·id="specifying-chunks-in-a-zarr-store">
838 <span·id="io-zarr-writing-chunks"></span><h3>Specifying·chunks·in·a·zarr·store<a·class="headerlink"·href="#specifying-chunks-in-a-zarr-store"·title="Link·to·this·heading">¶</a></h3>838 <span·id="io-zarr-writing-chunks"></span><h3>Specifying·chunks·in·a·zarr·store<a·class="headerlink"·href="#specifying-chunks-in-a-zarr-store"·title="Link·to·this·heading">¶</a></h3>
839 <p>Chunk·sizes·may·be·specified·in·one·of·three·ways·when·writing·to·a·zarr·store:</p>839 <p>Chunk·sizes·may·be·specified·in·one·of·three·ways·when·writing·to·a·zarr·store:</p>
840 <ol·class="arabic·simple">840 <ol·class="arabic·simple">
Offset 861, 15 lines modifiedOffset 861, 15 lines modified
861 positional·ordering·of·the·dimensions·in·each·array.·Watch·out·for·arrays·with861 positional·ordering·of·the·dimensions·in·each·array.·Watch·out·for·arrays·with
862 differently-ordered·dimensions·within·a·single·Dataset.</p>862 differently-ordered·dimensions·within·a·single·Dataset.</p>
863 </div>863 </div>
864 <p>For·example,·let’s·say·we’re·working·with·a·dataset·with·dimensions864 <p>For·example,·let’s·say·we’re·working·with·a·dataset·with·dimensions
865 <code·class="docutils·literal·notranslate"><span·class="pre">('time',</span>·<span·class="pre">'x',</span>·<span·class="pre">'y')</span></code>,·a·variable·<code·class="docutils·literal·notranslate"><span·class="pre">Tair</span></code>·which·is·chunked·in·<code·class="docutils·literal·notranslate"><span·class="pre">x</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">y</span></code>,865 <code·class="docutils·literal·notranslate"><span·class="pre">('time',</span>·<span·class="pre">'x',</span>·<span·class="pre">'y')</span></code>,·a·variable·<code·class="docutils·literal·notranslate"><span·class="pre">Tair</span></code>·which·is·chunked·in·<code·class="docutils·literal·notranslate"><span·class="pre">x</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">y</span></code>,
866 and·two·multi-dimensional·coordinates·<code·class="docutils·literal·notranslate"><span·class="pre">xc</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">yc</span></code>:</p>866 and·two·multi-dimensional·coordinates·<code·class="docutils·literal·notranslate"><span·class="pre">xc</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">yc</span></code>:</p>
867 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[33]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;rasm&quot;</span><span·class="p">)</span>867 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[33]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;rasm&quot;</span><span·class="p">)</span>
868 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>868 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
869 <span·class="gp">In·[34]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;Tair&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;Tair&quot;</span><span·class="p">]</span><span·class="o">.</span><span·class="n">chunk</span><span·class="p">({</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">})</span>869 <span·class="gp">In·[34]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;Tair&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;Tair&quot;</span><span·class="p">]</span><span·class="o">.</span><span·class="n">chunk</span><span·class="p">({</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">})</span>
870 <span·class="go">KeyError:·&quot;No·variable·named·&#39;Tair&#39;.·Variables·on·the·dataset·include·[&#39;foo&#39;,·&#39;x&#39;]&quot;</span>870 <span·class="go">KeyError:·&quot;No·variable·named·&#39;Tair&#39;.·Variables·on·the·dataset·include·[&#39;foo&#39;,·&#39;x&#39;]&quot;</span>
  
  
871 <span·class="gp">In·[35]:·</span><span·class="n">ds</span>871 <span·class="gp">In·[35]:·</span><span·class="n">ds</span>
Offset 882, 15 lines modifiedOffset 882, 15 lines modified
882 <span·class="go">····foo······(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29</span>882 <span·class="go">····foo······(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29</span>
883 </pre></div>883 </pre></div>
884 </div>884 </div>
885 <p>These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very·little885 <p>These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very·little
886 space·on·disk·or·in·memory,·yet·when·writing·to·disk·the·default·zarr·behavior·is·to886 space·on·disk·or·in·memory,·yet·when·writing·to·disk·the·default·zarr·behavior·is·to
887 split·them·into·chunks:</p>887 split·them·into·chunks:</p>
888 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[36]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>888 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[36]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;path/to/directory.zarr&quot;</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>
889 <span·class="gh">Out[36]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xa25a41d8&gt;</span>889 <span·class="gh">Out[36]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0xe3075ec8&gt;</span>
  
890 <span·class="gp">In·[37]:·</span><span·class="o">!</span><span·class="w">·</span>ls<span·class="w">·</span>-R<span·class="w">·</span>path/to/directory.zarr890 <span·class="gp">In·[37]:·</span><span·class="o">!</span><span·class="w">·</span>ls<span·class="w">·</span>-R<span·class="w">·</span>path/to/directory.zarr
891 <span·class="go">path/to/directory.zarr:</span>891 <span·class="go">path/to/directory.zarr:</span>
892 <span·class="go">foo··x»   zarr.json</span>892 <span·class="go">foo··x»   zarr.json</span>
  
893 <span·class="go">path/to/directory.zarr/foo:</span>893 <span·class="go">path/to/directory.zarr/foo:</span>
894 <span·class="go">c··zarr.json</span>894 <span·class="go">c··zarr.json</span>
Offset 1069, 15 lines modifiedOffset 1069, 15 lines modified
1069 <h3>Ncdata<a·class="headerlink"·href="#ncdata"·title="Link·to·this·heading">¶</a></h3>1069 <h3>Ncdata<a·class="headerlink"·href="#ncdata"·title="Link·to·this·heading">¶</a></h3>
1070 <p><a·class="reference·external"·href="https://ncdata.readthedocs.io/en/latest/index.html">Ncdata</a>·provides·more·sophisticated·means·of·transferring·data,·including·entire1070 <p><a·class="reference·external"·href="https://ncdata.readthedocs.io/en/latest/index.html">Ncdata</a>·provides·more·sophisticated·means·of·transferring·data,·including·entire
1071 datasets.··It·uses·the·file·saving·and·loading·functions·in·both·projects·to·provide·a1071 datasets.··It·uses·the·file·saving·and·loading·functions·in·both·projects·to·provide·a
1072 more·“correct”·translation·between·them,·but·still·with·very·low·overhead·and·not1072 more·“correct”·translation·between·them,·but·still·with·very·low·overhead·and·not
1073 using·actual·disk·files.</p>1073 using·actual·disk·files.</p>
1074 <p>For·example:</p>1074 <p>For·example:</p>
1075 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[48]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature_gradient&quot;</span><span·class="p">)</span>1075 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[48]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature_gradient&quot;</span><span·class="p">)</span>
1076 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>1076 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
1077 <span·class="gp">In·[49]:·</span><span·class="n">cubes</span>·<span·class="o">=</span>·<span·class="n">ncdata</span><span·class="o">.</span><span·class="n">iris_xarray</span><span·class="o">.</span><span·class="n">cubes_from_xarray</span><span·class="p">(</span><span·class="n">ds</span><span·class="p">)</span>1077 <span·class="gp">In·[49]:·</span><span·class="n">cubes</span>·<span·class="o">=</span>·<span·class="n">ncdata</span><span·class="o">.</span><span·class="n">iris_xarray</span><span·class="o">.</span><span·class="n">cubes_from_xarray</span><span·class="p">(</span><span·class="n">ds</span><span·class="p">)</span>
1078 <span·class="go">NameError:·name·&#39;ncdata&#39;·is·not·defined</span>1078 <span·class="go">NameError:·name·&#39;ncdata&#39;·is·not·defined</span>
  
Max diff block lines reached; 140/19055 bytes (0.73%) of diff not shown.
6.54 KB
html2text {}
    
Offset 481, 15 lines modifiedOffset 481, 15 lines modified
481 ···....:·········"y":·pd.date_range("2000-01-01",·periods=5),481 ···....:·········"y":·pd.date_range("2000-01-01",·periods=5),
482 ···....:·········"z":·("x",·list("abcd")),482 ···....:·········"z":·("x",·list("abcd")),
483 ···....:·····},483 ···....:·····},
484 ···....:·)484 ···....:·)
485 ···....:485 ···....:
  
486 In·[13]:·ds.to_zarr("path/to/directory.zarr")486 In·[13]:·ds.to_zarr("path/to/directory.zarr")
487 Out[13]:·<xarray.backends.zarr.ZarrStore·at·0xa22b29b8>487 Out[13]:·<xarray.backends.zarr.ZarrStore·at·0xe31384f0>
488 (The·suffix·.zarr·is·optional–just·a·reminder·that·a·zarr·store·lives·there.)488 (The·suffix·.zarr·is·optional–just·a·reminder·that·a·zarr·store·lives·there.)
489 If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr·store·is·already489 If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr·store·is·already
490 present·at·that·path,·an·error·will·be·raised,·preventing·it·from·being490 present·at·that·path,·an·error·will·be·raised,·preventing·it·from·being
491 overwritten.·To·override·this·behavior·and·overwrite·an·existing·store,·add491 overwritten.·To·override·this·behavior·and·overwrite·an·existing·store,·add
492 mode='w'·when·invoking·to_zarr().492 mode='w'·when·invoking·to_zarr().
493 DataArrays·can·also·be·saved·to·disk·using·the·DataArray.to_zarr()·method,·and493 DataArrays·can·also·be·saved·to·disk·using·the·DataArray.to_zarr()·method,·and
494 loaded·from·disk·using·the·open_dataarray()·function·with·engine='zarr'.494 loaded·from·disk·using·the·open_dataarray()·function·with·engine='zarr'.
Offset 562, 35 lines modifiedOffset 562, 35 lines modified
  
562 In·[18]:·ds·=·xr.Dataset({"foo":·("x",·dummies)},·coords={"x":·np.arange(30)})562 In·[18]:·ds·=·xr.Dataset({"foo":·("x",·dummies)},·coords={"x":·np.arange(30)})
  
563 In·[19]:·path·=·"path/to/directory.zarr"563 In·[19]:·path·=·"path/to/directory.zarr"
  
564 #·Now·we·write·the·metadata·without·computing·any·array·values564 #·Now·we·write·the·metadata·without·computing·any·array·values
565 In·[20]:·ds.to_zarr(path,·compute=False)565 In·[20]:·ds.to_zarr(path,·compute=False)
566 Out[20]:·Delayed('_finalize_store-79faeb4f-cb04-4282-8fdc-78ec9eb7c5f5')566 Out[20]:·Delayed('_finalize_store-3fb519b5-4166-4e5a-98ba-fba59cba6080')
567 Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that567 Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that
568 can·be·filled·out·by·subsequent·calls·to·to_zarr.·Setting·region="auto"·will568 can·be·filled·out·by·subsequent·calls·to·to_zarr.·Setting·region="auto"·will
569 open·the·existing·store·and·determine·the·correct·alignment·of·the·new·data569 open·the·existing·store·and·determine·the·correct·alignment·of·the·new·data
570 with·the·existing·dimensions,·or·as·an·explicit·mapping·from·dimension·names·to570 with·the·existing·dimensions,·or·as·an·explicit·mapping·from·dimension·names·to
571 Python·slice·objects·indicating·where·the·data·should·be·written·(in·index571 Python·slice·objects·indicating·where·the·data·should·be·written·(in·index
572 space,·not·label·space),·e.g.,572 space,·not·label·space),·e.g.,
573 #·For·convenience,·we'll·slice·a·single·dataset,·but·in·the·real·use-case573 #·For·convenience,·we'll·slice·a·single·dataset,·but·in·the·real·use-case
574 #·we·would·create·them·separately·possibly·even·from·separate·processes.574 #·we·would·create·them·separately·possibly·even·from·separate·processes.
575 In·[21]:·ds·=·xr.Dataset({"foo":·("x",·np.arange(30))},·coords={"x":·np.arange575 In·[21]:·ds·=·xr.Dataset({"foo":·("x",·np.arange(30))},·coords={"x":·np.arange
576 (30)})576 (30)})
  
577 #·Any·of·the·following·region·specifications·are·valid577 #·Any·of·the·following·region·specifications·are·valid
578 In·[22]:·ds.isel(x=slice(0,·10)).to_zarr(path,·region="auto")578 In·[22]:·ds.isel(x=slice(0,·10)).to_zarr(path,·region="auto")
579 Out[22]:·<xarray.backends.zarr.ZarrStore·at·0xa25efa48>579 Out[22]:·<xarray.backends.zarr.ZarrStore·at·0xe3181c88>
  
580 In·[23]:·ds.isel(x=slice(10,·20)).to_zarr(path,·region={"x":·"auto"})580 In·[23]:·ds.isel(x=slice(10,·20)).to_zarr(path,·region={"x":·"auto"})
581 Out[23]:·<xarray.backends.zarr.ZarrStore·at·0xa25ef730>581 Out[23]:·<xarray.backends.zarr.ZarrStore·at·0xe30befa0>
  
582 In·[24]:·ds.isel(x=slice(20,·30)).to_zarr(path,·region={"x":·slice(20,·30)})582 In·[24]:·ds.isel(x=slice(20,·30)).to_zarr(path,·region={"x":·slice(20,·30)})
583 Out[24]:·<xarray.backends.zarr.ZarrStore·at·0xa2b26220>583 Out[24]:·<xarray.backends.zarr.ZarrStore·at·0xe30d76a0>
584 Concurrent·writes·with·region·are·safe·as·long·as·they·modify·distinct·chunks584 Concurrent·writes·with·region·are·safe·as·long·as·they·modify·distinct·chunks
585 in·the·underlying·Zarr·arrays·(or·use·an·appropriate·lock).585 in·the·underlying·Zarr·arrays·(or·use·an·appropriate·lock).
586 As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values,586 As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values,
587 if·you·set·region·then·a\x8al\x8ll\x8l·variables·included·in·a·Dataset·must·have·dimensions587 if·you·set·region·then·a\x8al\x8ll\x8l·variables·included·in·a·Dataset·must·have·dimensions
588 included·in·region.·Other·variables·(typically·coordinates)·need·to·be588 included·in·region.·Other·variables·(typically·coordinates)·need·to·be
589 explicitly·dropped·and/or·written·in·a·separate·calls·to·to_zarr·with·mode='a'.589 explicitly·dropped·and/or·written·in·a·separate·calls·to·to_zarr·with·mode='a'.
590 *\x8**\x8**\x8**\x8*·Z\x8Za\x8ar\x8rr\x8r·C\x8Co\x8om\x8mp\x8pr\x8re\x8es\x8ss\x8so\x8or\x8rs\x8s·a\x8an\x8nd\x8d·F\x8Fi\x8il\x8lt\x8te\x8er\x8rs\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*590 *\x8**\x8**\x8**\x8*·Z\x8Za\x8ar\x8rr\x8r·C\x8Co\x8om\x8mp\x8pr\x8re\x8es\x8ss\x8so\x8or\x8rs\x8s·a\x8an\x8nd\x8d·F\x8Fi\x8il\x8lt\x8te\x8er\x8rs\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*
Offset 636, 28 lines modifiedOffset 636, 28 lines modified
636 ···....:·········"y":·[1,·2,·3,·4,·5],636 ···....:·········"y":·[1,·2,·3,·4,·5],
637 ···....:·········"t":·pd.date_range("2001-01-01",·periods=2),637 ···....:·········"t":·pd.date_range("2001-01-01",·periods=2),
638 ···....:·····},638 ···....:·····},
639 ···....:·)639 ···....:·)
640 ···....:640 ···....:
  
641 In·[30]:·ds1.to_zarr("path/to/directory.zarr")641 In·[30]:·ds1.to_zarr("path/to/directory.zarr")
642 Out[30]:·<xarray.backends.zarr.ZarrStore·at·0xa2580d18>642 Out[30]:·<xarray.backends.zarr.ZarrStore·at·0xe3051c88>
  
643 In·[31]:·ds2·=·xr.Dataset(643 In·[31]:·ds2·=·xr.Dataset(
644 ···....:·····{"foo":·(("x",·"y",·"t"),·np.random.rand(4,·5,·2))},644 ···....:·····{"foo":·(("x",·"y",·"t"),·np.random.rand(4,·5,·2))},
645 ···....:·····coords={645 ···....:·····coords={
646 ···....:·········"x":·[10,·20,·30,·40],646 ···....:·········"x":·[10,·20,·30,·40],
647 ···....:·········"y":·[1,·2,·3,·4,·5],647 ···....:·········"y":·[1,·2,·3,·4,·5],
648 ···....:·········"t":·pd.date_range("2001-01-03",·periods=2),648 ···....:·········"t":·pd.date_range("2001-01-03",·periods=2),
649 ···....:·····},649 ···....:·····},
650 ···....:·)650 ···....:·)
651 ···....:651 ···....:
  
652 In·[32]:·ds2.to_zarr("path/to/directory.zarr",·append_dim="t")652 In·[32]:·ds2.to_zarr("path/to/directory.zarr",·append_dim="t")
653 Out[32]:·<xarray.backends.zarr.ZarrStore·at·0xa25ef190>653 Out[32]:·<xarray.backends.zarr.ZarrStore·at·0xe3051148>
654 *\x8**\x8**\x8**\x8*·S\x8Sp\x8pe\x8ec\x8ci\x8if\x8fy\x8yi\x8in\x8ng\x8g·c\x8ch\x8hu\x8un\x8nk\x8ks\x8s·i\x8in\x8n·a\x8a·z\x8za\x8ar\x8rr\x8r·s\x8st\x8to\x8or\x8re\x8e_\x8?\x8·*\x8**\x8**\x8**\x8*654 *\x8**\x8**\x8**\x8*·S\x8Sp\x8pe\x8ec\x8ci\x8if\x8fy\x8yi\x8in\x8ng\x8g·c\x8ch\x8hu\x8un\x8nk\x8ks\x8s·i\x8in\x8n·a\x8a·z\x8za\x8ar\x8rr\x8r·s\x8st\x8to\x8or\x8re\x8e_\x8?\x8·*\x8**\x8**\x8**\x8*
655 Chunk·sizes·may·be·specified·in·one·of·three·ways·when·writing·to·a·zarr·store:655 Chunk·sizes·may·be·specified·in·one·of·three·ways·when·writing·to·a·zarr·store:
656 ···1.·Manual·chunk·sizing·through·the·use·of·the·encoding·argument·in656 ···1.·Manual·chunk·sizing·through·the·use·of·the·encoding·argument·in
657 ······Dataset.to_zarr():657 ······Dataset.to_zarr():
658 ···2.·Automatic·chunking·based·on·chunks·in·dask·arrays658 ···2.·Automatic·chunking·based·on·chunks·in·dask·arrays
659 ···3.·Default·chunk·behavior·determined·by·the·zarr·library659 ···3.·Default·chunk·behavior·determined·by·the·zarr·library
660 The·resulting·chunks·will·be·determined·based·on·the·order·of·the·above·list;660 The·resulting·chunks·will·be·determined·based·on·the·order·of·the·above·list;
Offset 676, 15 lines modifiedOffset 676, 15 lines modified
676 positional·ordering·of·the·dimensions·in·each·array.·Watch·out·for·arrays·with676 positional·ordering·of·the·dimensions·in·each·array.·Watch·out·for·arrays·with
677 differently-ordered·dimensions·within·a·single·Dataset.677 differently-ordered·dimensions·within·a·single·Dataset.
678 For·example,·let’s·say·we’re·working·with·a·dataset·with·dimensions·('time',678 For·example,·let’s·say·we’re·working·with·a·dataset·with·dimensions·('time',
679 'x',·'y'),·a·variable·Tair·which·is·chunked·in·x·and·y,·and·two·multi-679 'x',·'y'),·a·variable·Tair·which·is·chunked·in·x·and·y,·and·two·multi-
680 dimensional·coordinates·xc·and·yc:680 dimensional·coordinates·xc·and·yc:
681 In·[33]:·ds·=·xr.tutorial.open_dataset("rasm")681 In·[33]:·ds·=·xr.tutorial.open_dataset("rasm")
682 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not682 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
683 create·data·cache·folder·'/nonexistent/first-build/.cache/683 create·data·cache·folder·'/nonexistent/second-build/.cache/
684 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.684 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
685 In·[34]:·ds["Tair"]·=·ds["Tair"].chunk({"x":·100,·"y":·100})685 In·[34]:·ds["Tair"]·=·ds["Tair"].chunk({"x":·100,·"y":·100})
686 KeyError:·"No·variable·named·'Tair'.·Variables·on·the·dataset·include·['foo',686 KeyError:·"No·variable·named·'Tair'.·Variables·on·the·dataset·include·['foo',
687 'x']"687 'x']"
  
Offset 697, 15 lines modifiedOffset 697, 15 lines modified
697 ··*·x········(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29697 ··*·x········(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29
698 Data·variables:698 Data·variables:
699 ····foo······(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29699 ····foo······(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29
700 These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very700 These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very
701 little·space·on·disk·or·in·memory,·yet·when·writing·to·disk·the·default·zarr701 little·space·on·disk·or·in·memory,·yet·when·writing·to·disk·the·default·zarr
702 behavior·is·to·split·them·into·chunks:702 behavior·is·to·split·them·into·chunks:
703 In·[36]:·ds.to_zarr("path/to/directory.zarr",·mode="w")703 In·[36]:·ds.to_zarr("path/to/directory.zarr",·mode="w")
704 Out[36]:·<xarray.backends.zarr.ZarrStore·at·0xa25a41d8>704 Out[36]:·<xarray.backends.zarr.ZarrStore·at·0xe3075ec8>
  
705 In·[37]:·!·ls·-R·path/to/directory.zarr705 In·[37]:·!·ls·-R·path/to/directory.zarr
706 path/to/directory.zarr:706 path/to/directory.zarr:
707 foo··x»   zarr.json707 foo··x»   zarr.json
  
708 path/to/directory.zarr/foo:708 path/to/directory.zarr/foo:
709 c··zarr.json709 c··zarr.json
Offset 858, 15 lines modifiedOffset 858, 15 lines modified
858 _\x8N_\x8c_\x8d_\x8a_\x8t_\x8a·provides·more·sophisticated·means·of·transferring·data,·including·entire858 _\x8N_\x8c_\x8d_\x8a_\x8t_\x8a·provides·more·sophisticated·means·of·transferring·data,·including·entire
859 datasets.·It·uses·the·file·saving·and·loading·functions·in·both·projects·to859 datasets.·It·uses·the·file·saving·and·loading·functions·in·both·projects·to
860 provide·a·more·“correct”·translation·between·them,·but·still·with·very·low860 provide·a·more·“correct”·translation·between·them,·but·still·with·very·low
861 overhead·and·not·using·actual·disk·files.861 overhead·and·not·using·actual·disk·files.
862 For·example:862 For·example:
863 In·[48]:·ds·=·xr.tutorial.open_dataset("air_temperature_gradient")863 In·[48]:·ds·=·xr.tutorial.open_dataset("air_temperature_gradient")
864 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not864 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
865 create·data·cache·folder·'/nonexistent/first-build/.cache/865 create·data·cache·folder·'/nonexistent/second-build/.cache/
866 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.866 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
867 In·[49]:·cubes·=·ncdata.iris_xarray.cubes_from_xarray(ds)867 In·[49]:·cubes·=·ncdata.iris_xarray.cubes_from_xarray(ds)
868 NameError:·name·'ncdata'·is·not·defined868 NameError:·name·'ncdata'·is·not·defined
  
Max diff block lines reached; 0/6669 bytes (0.00%) of diff not shown.
55.3 KB
./usr/share/doc/python-xarray-doc/html/user-guide/plotting.html
    
Offset 100, 15 lines modifiedOffset 100, 15 lines modified
100 <span·class="gp">In·[3]:·</span><span·class="kn">import</span>·<span·class="nn">matplotlib.pyplot</span>·<span·class="k">as</span>·<span·class="nn">plt</span>100 <span·class="gp">In·[3]:·</span><span·class="kn">import</span>·<span·class="nn">matplotlib.pyplot</span>·<span·class="k">as</span>·<span·class="nn">plt</span>
  
101 <span·class="gp">In·[4]:·</span><span·class="kn">import</span>·<span·class="nn">xarray</span>·<span·class="k">as</span>·<span·class="nn">xr</span>101 <span·class="gp">In·[4]:·</span><span·class="kn">import</span>·<span·class="nn">xarray</span>·<span·class="k">as</span>·<span·class="nn">xr</span>
102 </pre></div>102 </pre></div>
103 </div>103 </div>
104 <p>For·these·examples·we’ll·use·the·North·American·air·temperature·dataset.</p>104 <p>For·these·examples·we’ll·use·the·North·American·air·temperature·dataset.</p>
105 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[5]:·</span><span·class="n">airtemps</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span>105 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[5]:·</span><span·class="n">airtemps</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)</span>
106 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>106 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
107 <span·class="gp">In·[6]:·</span><span·class="n">airtemps</span>107 <span·class="gp">In·[6]:·</span><span·class="n">airtemps</span>
108 <span·class="go">NameError:·name·&#39;airtemps&#39;·is·not·defined</span>108 <span·class="go">NameError:·name·&#39;airtemps&#39;·is·not·defined</span>
  
  
109 <span·class="go">#·Convert·to·celsius</span>109 <span·class="go">#·Convert·to·celsius</span>
Offset 445, 15 lines modifiedOffset 445, 15 lines modified
  
445 <span·class="go">#·Apply·a·nonlinear·transformation·to·one·of·the·coords</span>445 <span·class="go">#·Apply·a·nonlinear·transformation·to·one·of·the·coords</span>
446 <span·class="gp">In·[50]:·</span><span·class="n">b</span><span·class="o">.</span><span·class="n">coords</span><span·class="p">[</span><span·class="s2">&quot;lat&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">log</span><span·class="p">(</span><span·class="n">b</span><span·class="o">.</span><span·class="n">coords</span><span·class="p">[</span><span·class="s2">&quot;lat&quot;</span><span·class="p">])</span>446 <span·class="gp">In·[50]:·</span><span·class="n">b</span><span·class="o">.</span><span·class="n">coords</span><span·class="p">[</span><span·class="s2">&quot;lat&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">log</span><span·class="p">(</span><span·class="n">b</span><span·class="o">.</span><span·class="n">coords</span><span·class="p">[</span><span·class="s2">&quot;lat&quot;</span><span·class="p">])</span>
447 <span·class="go">KeyError:·&#39;lat&#39;</span>447 <span·class="go">KeyError:·&#39;lat&#39;</span>
  
  
448 <span·class="gp">In·[51]:·</span><span·class="n">b</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span>448 <span·class="gp">In·[51]:·</span><span·class="n">b</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span>
449 <span·class="gh">Out[51]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xa08bb3a0&gt;]</span>449 <span·class="gh">Out[51]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0xe1664710&gt;]</span>
450 </pre></div>450 </pre></div>
451 </div>451 </div>
452 <a·class="reference·internal·image-reference"·href="_build/html/_static/plotting_nonuniform_coords.png"><img·alt="_build/html/_static/plotting_nonuniform_coords.png"·src="_build/html/_static/plotting_nonuniform_coords.png"·style="width:·4in;"·/>452 <a·class="reference·internal·image-reference"·href="_build/html/_static/plotting_nonuniform_coords.png"><img·alt="_build/html/_static/plotting_nonuniform_coords.png"·src="_build/html/_static/plotting_nonuniform_coords.png"·style="width:·4in;"·/>
453 </a>453 </a>
454 </section>454 </section>
455 <section·id="other-types-of-plot">455 <section·id="other-types-of-plot">
456 <h4>Other·types·of·plot<a·class="headerlink"·href="#other-types-of-plot"·title="Link·to·this·heading">¶</a></h4>456 <h4>Other·types·of·plot<a·class="headerlink"·href="#other-types-of-plot"·title="Link·to·this·heading">¶</a></h4>
Offset 857, 117 lines modifiedOffset 857, 117 lines modified
857 <span·class="go">··*·y········(y)·float64·88B·0.0·0.1·0.2·0.3·0.4·0.5·0.6·0.7·0.8·0.9·1.0</span>857 <span·class="go">··*·y········(y)·float64·88B·0.0·0.1·0.2·0.3·0.4·0.5·0.6·0.7·0.8·0.9·1.0</span>
858 <span·class="go">··*·z········(z)·int32·16B·0·1·2·3</span>858 <span·class="go">··*·z········(z)·int32·16B·0·1·2·3</span>
859 <span·class="go">··*·w········(w)·&lt;U5·80B·&#39;one&#39;·&#39;two&#39;·&#39;three&#39;·&#39;five&#39;</span>859 <span·class="go">··*·w········(w)·&lt;U5·80B·&#39;one&#39;·&#39;two&#39;·&#39;three&#39;·&#39;five&#39;</span>
860 <span·class="go">Attributes:</span>860 <span·class="go">Attributes:</span>
861 <span·class="go">····units:····Aunits</span>861 <span·class="go">····units:····Aunits</span>
  
862 <span·class="gp">In·[99]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">A</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">)</span>862 <span·class="gp">In·[99]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">A</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">)</span>
863 <span·class="gh">Out[99]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa2bdfe90&gt;</span>863 <span·class="gh">Out[99]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xe36b1e90&gt;</span>
864 </pre></div>864 </pre></div>
865 </div>865 </div>
866 <img·alt="_build/html/_static/da_A_y.png"·src="_build/html/_static/da_A_y.png"·/>866 <img·alt="_build/html/_static/da_A_y.png"·src="_build/html/_static/da_A_y.png"·/>
867 <p>Same·plot·can·be·displayed·using·the·dataset:</p>867 <p>Same·plot·can·be·displayed·using·the·dataset:</p>
868 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[100]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">)</span>868 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[100]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">)</span>
869 <span·class="gh">Out[100]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa084ef50&gt;</span>869 <span·class="gh">Out[100]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xe132d0e0&gt;</span>
870 </pre></div>870 </pre></div>
871 </div>871 </div>
872 <img·alt="_build/html/_static/ds_A_y.png"·src="_build/html/_static/ds_A_y.png"·/>872 <img·alt="_build/html/_static/ds_A_y.png"·src="_build/html/_static/ds_A_y.png"·/>
873 <p>Now·suppose·we·want·to·scatter·the·<code·class="docutils·literal·notranslate"><span·class="pre">A</span></code>·DataArray·against·the·<code·class="docutils·literal·notranslate"><span·class="pre">B</span></code>·DataArray</p>873 <p>Now·suppose·we·want·to·scatter·the·<code·class="docutils·literal·notranslate"><span·class="pre">A</span></code>·DataArray·against·the·<code·class="docutils·literal·notranslate"><span·class="pre">B</span></code>·DataArray</p>
874 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[101]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">)</span>874 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[101]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">)</span>
875 <span·class="gh">Out[101]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa06bbea0&gt;</span>875 <span·class="gh">Out[101]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xe11a8030&gt;</span>
876 </pre></div>876 </pre></div>
877 </div>877 </div>
878 <img·alt="_build/html/_static/ds_simple_scatter.png"·src="_build/html/_static/ds_simple_scatter.png"·/>878 <img·alt="_build/html/_static/ds_simple_scatter.png"·src="_build/html/_static/ds_simple_scatter.png"·/>
879 <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">hue</span></code>·kwarg·lets·you·vary·the·color·by·variable·value</p>879 <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">hue</span></code>·kwarg·lets·you·vary·the·color·by·variable·value</p>
880 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[102]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>880 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[102]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>
881 <span·class="gh">Out[102]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa0860030&gt;</span>881 <span·class="gh">Out[102]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xe131e920&gt;</span>
882 </pre></div>882 </pre></div>
883 </div>883 </div>
884 <img·alt="_build/html/_static/ds_hue_scatter.png"·src="_build/html/_static/ds_hue_scatter.png"·/>884 <img·alt="_build/html/_static/ds_hue_scatter.png"·src="_build/html/_static/ds_hue_scatter.png"·/>
885 <p>You·can·force·a·legend·instead·of·a·colorbar·by·setting·<code·class="docutils·literal·notranslate"><span·class="pre">add_legend=True,</span>·<span·class="pre">add_colorbar=False</span></code>.</p>885 <p>You·can·force·a·legend·instead·of·a·colorbar·by·setting·<code·class="docutils·literal·notranslate"><span·class="pre">add_legend=True,</span>·<span·class="pre">add_colorbar=False</span></code>.</p>
886 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[103]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">,</span>·<span·class="n">add_legend</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">,</span>·<span·class="n">add_colorbar</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span>886 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[103]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">,</span>·<span·class="n">add_legend</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">,</span>·<span·class="n">add_colorbar</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span>
887 <span·class="gh">Out[103]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa06d1c90&gt;</span>887 <span·class="gh">Out[103]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xe114b450&gt;</span>
888 </pre></div>888 </pre></div>
889 </div>889 </div>
890 <img·alt="_build/html/_static/ds_discrete_legend_hue_scatter.png"·src="_build/html/_static/ds_discrete_legend_hue_scatter.png"·/>890 <img·alt="_build/html/_static/ds_discrete_legend_hue_scatter.png"·src="_build/html/_static/ds_discrete_legend_hue_scatter.png"·/>
891 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[104]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">,</span>·<span·class="n">add_legend</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">,</span>·<span·class="n">add_colorbar</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)</span>891 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[104]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">,</span>·<span·class="n">add_legend</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">,</span>·<span·class="n">add_colorbar</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)</span>
892 <span·class="gh">Out[104]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa08e1710&gt;</span>892 <span·class="gh">Out[104]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xe1158920&gt;</span>
893 </pre></div>893 </pre></div>
894 </div>894 </div>
895 <img·alt="_build/html/_static/ds_discrete_colorbar_hue_scatter.png"·src="_build/html/_static/ds_discrete_colorbar_hue_scatter.png"·/>895 <img·alt="_build/html/_static/ds_discrete_colorbar_hue_scatter.png"·src="_build/html/_static/ds_discrete_colorbar_hue_scatter.png"·/>
896 <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">markersize</span></code>·kwarg·lets·you·vary·the·point’s·size·by·variable·value.896 <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">markersize</span></code>·kwarg·lets·you·vary·the·point’s·size·by·variable·value.
897 You·can·additionally·pass·<code·class="docutils·literal·notranslate"><span·class="pre">size_norm</span></code>·to·control·how·the·variable’s·values·are·mapped·to·point·sizes.</p>897 You·can·additionally·pass·<code·class="docutils·literal·notranslate"><span·class="pre">size_norm</span></code>·to·control·how·the·variable’s·values·are·mapped·to·point·sizes.</p>
898 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[105]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">)</span>898 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[105]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">)</span>
899 <span·class="gh">Out[105]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xa06a6a80&gt;</span>899 <span·class="gh">Out[105]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0xe11823a0&gt;</span>
900 </pre></div>900 </pre></div>
901 </div>901 </div>
902 <img·alt="_build/html/_static/ds_hue_size_scatter.png"·src="_build/html/_static/ds_hue_size_scatter.png"·/>902 <img·alt="_build/html/_static/ds_hue_size_scatter.png"·src="_build/html/_static/ds_hue_size_scatter.png"·/>
903 <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">z</span></code>·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well.</p>903 <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">z</span></code>·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well.</p>
904 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[106]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">)</span>904 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[106]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">)</span>
905 <span·class="gh">Out[106]:·</span><span·class="go">&lt;mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xa05fd870&gt;</span>905 <span·class="gh">Out[106]:·</span><span·class="go">&lt;mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xec2e4a80&gt;</span>
906 </pre></div>906 </pre></div>
907 </div>907 </div>
908 <img·alt="_build/html/_static/ds_hue_size_scatter_z.png"·src="_build/html/_static/ds_hue_size_scatter_z.png"·/>908 <img·alt="_build/html/_static/ds_hue_size_scatter_z.png"·src="_build/html/_static/ds_hue_size_scatter_z.png"·/>
909 <p>Faceting·is·also·possible</p>909 <p>Faceting·is·also·possible</p>
910 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[107]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>910 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[107]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>
911 <span·class="gh">Out[107]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xa06d6f48&gt;</span>911 <span·class="gh">Out[107]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xec2fd310&gt;</span>
912 </pre></div>912 </pre></div>
913 </div>913 </div>
914 <img·alt="_build/html/_static/ds_facet_scatter.png"·src="_build/html/_static/ds_facet_scatter.png"·/>914 <img·alt="_build/html/_static/ds_facet_scatter.png"·src="_build/html/_static/ds_facet_scatter.png"·/>
915 <p>And·adding·the·z-axis</p>915 <p>And·adding·the·z-axis</p>
916 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[108]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>916 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[108]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">scatter</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">)</span>
917 <span·class="gh">Out[108]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xa0006240&gt;</span>917 <span·class="gh">Out[108]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xe0b239d0&gt;</span>
918 </pre></div>918 </pre></div>
919 </div>919 </div>
920 <img·alt="_build/html/_static/ds_facet_scatter_z.png"·src="_build/html/_static/ds_facet_scatter_z.png"·/>920 <img·alt="_build/html/_static/ds_facet_scatter_z.png"·src="_build/html/_static/ds_facet_scatter_z.png"·/>
921 <p>For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data·variables921 <p>For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data·variables
922 to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities·of·<code·class="docutils·literal·notranslate"><span·class="pre">seaborn</span></code>.</p>922 to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities·of·<code·class="docutils·literal·notranslate"><span·class="pre">seaborn</span></code>.</p>
923 </section>923 </section>
924 <section·id="quiver">924 <section·id="quiver">
925 <h3>Quiver<a·class="headerlink"·href="#quiver"·title="Link·to·this·heading">¶</a></h3>925 <h3>Quiver<a·class="headerlink"·href="#quiver"·title="Link·to·this·heading">¶</a></h3>
926 <p>Visualizing·vector·fields·is·supported·with·quiver·plots:</p>926 <p>Visualizing·vector·fields·is·supported·with·quiver·plots:</p>
927 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[109]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">w</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">quiver</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">)</span>927 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[109]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">w</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">quiver</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">)</span>
928 <span·class="gh">Out[109]:·</span><span·class="go">&lt;matplotlib.quiver.Quiver·at·0xab27f480&gt;</span>928 <span·class="gh">Out[109]:·</span><span·class="go">&lt;matplotlib.quiver.Quiver·at·0xe30aca40&gt;</span>
929 </pre></div>929 </pre></div>
930 </div>930 </div>
931 <img·alt="_build/html/_static/ds_simple_quiver.png"·src="_build/html/_static/ds_simple_quiver.png"·/>931 <img·alt="_build/html/_static/ds_simple_quiver.png"·src="_build/html/_static/ds_simple_quiver.png"·/>
932 <p>where·<code·class="docutils·literal·notranslate"><span·class="pre">u</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">v</span></code>·denote·the·x·and·y·direction·components·of·the·arrow·vectors.·Again,·faceting·is·also·possible:</p>932 <p>where·<code·class="docutils·literal·notranslate"><span·class="pre">u</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">v</span></code>·denote·the·x·and·y·direction·components·of·the·arrow·vectors.·Again,·faceting·is·also·possible:</p>
933 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[110]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">quiver</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">,</span>·<span·class="n">scale</span><span·class="o">=</span><span·class="mi">4</span><span·class="p">)</span>933 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[110]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">quiver</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">&quot;w&quot;</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">&quot;z&quot;</span><span·class="p">,</span>·<span·class="n">scale</span><span·class="o">=</span><span·class="mi">4</span><span·class="p">)</span>
934 <span·class="gh">Out[110]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xa2586ca8&gt;</span>934 <span·class="gh">Out[110]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0xe3eca810&gt;</span>
935 </pre></div>935 </pre></div>
936 </div>936 </div>
937 <img·alt="_build/html/_static/ds_facet_quiver.png"·src="_build/html/_static/ds_facet_quiver.png"·/>937 <img·alt="_build/html/_static/ds_facet_quiver.png"·src="_build/html/_static/ds_facet_quiver.png"·/>
938 <p><code·class="docutils·literal·notranslate"><span·class="pre">scale</span></code>·is·required·for·faceted·quiver·plots.938 <p><code·class="docutils·literal·notranslate"><span·class="pre">scale</span></code>·is·required·for·faceted·quiver·plots.
939 The·scale·determines·the·number·of·data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the·arrow·longer.</p>939 The·scale·determines·the·number·of·data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the·arrow·longer.</p>
940 </section>940 </section>
941 <section·id="streamplot">941 <section·id="streamplot">
942 <h3>Streamplot<a·class="headerlink"·href="#streamplot"·title="Link·to·this·heading">¶</a></h3>942 <h3>Streamplot<a·class="headerlink"·href="#streamplot"·title="Link·to·this·heading">¶</a></h3>
943 <p>Visualizing·vector·fields·is·also·supported·with·streamline·plots:</p>943 <p>Visualizing·vector·fields·is·also·supported·with·streamline·plots:</p>
944 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[111]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">w</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">streamplot</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">)</span>944 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[111]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">w</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="o">.</span><span·class="n">streamplot</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;y&quot;</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">&quot;A&quot;</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">&quot;B&quot;</span><span·class="p">)</span>
945 <span·class="gh">Out[111]:·</span><span·class="go">&lt;matplotlib.collections.LineCollection·at·0xa051c660&gt;</span>945 <span·class="gh">Out[111]:·</span><span·class="go">&lt;matplotlib.collections.LineCollection·at·0xe0488660&gt;</span>
946 </pre></div>946 </pre></div>
947 </div>947 </div>
948 <img·alt="_build/html/_static/ds_simple_streamplot.png"·src="_build/html/_static/ds_simple_streamplot.png"·/>948 <img·alt="_build/html/_static/ds_simple_streamplot.png"·src="_build/html/_static/ds_simple_streamplot.png"·/>
949 <p>where·<code·class="docutils·literal·notranslate"><span·class="pre">u</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">v</span></code>·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to·the·streamlines.949 <p>where·<code·class="docutils·literal·notranslate"><span·class="pre">u</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">v</span></code>·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to·the·streamlines.
950 Again,·faceting·is·also·possible:</p>950 Again,·faceting·is·also·possible:</p>
Max diff block lines reached; 20932/42704 bytes (49.02%) of diff not shown.
13.5 KB
html2text {}
    
Offset 30, 15 lines modifiedOffset 30, 15 lines modified
  
30 In·[3]:·import·matplotlib.pyplot·as·plt30 In·[3]:·import·matplotlib.pyplot·as·plt
  
31 In·[4]:·import·xarray·as·xr31 In·[4]:·import·xarray·as·xr
32 For·these·examples·we’ll·use·the·North·American·air·temperature·dataset.32 For·these·examples·we’ll·use·the·North·American·air·temperature·dataset.
33 In·[5]:·airtemps·=·xr.tutorial.open_dataset("air_temperature")33 In·[5]:·airtemps·=·xr.tutorial.open_dataset("air_temperature")
34 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not34 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
35 create·data·cache·folder·'/nonexistent/first-build/.cache/35 create·data·cache·folder·'/nonexistent/second-build/.cache/
36 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.36 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
37 In·[6]:·airtemps37 In·[6]:·airtemps
38 NameError:·name·'airtemps'·is·not·defined38 NameError:·name·'airtemps'·is·not·defined
  
  
Offset 292, 15 lines modifiedOffset 292, 15 lines modified
  
292 #·Apply·a·nonlinear·transformation·to·one·of·the·coords292 #·Apply·a·nonlinear·transformation·to·one·of·the·coords
293 In·[50]:·b.coords["lat"]·=·np.log(b.coords["lat"])293 In·[50]:·b.coords["lat"]·=·np.log(b.coords["lat"])
294 KeyError:·'lat'294 KeyError:·'lat'
  
  
295 In·[51]:·b.plot()295 In·[51]:·b.plot()
296 Out[51]:·[<matplotlib.lines.Line2D·at·0xa08bb3a0>]296 Out[51]:·[<matplotlib.lines.Line2D·at·0xe1664710>]
297 _\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8p_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g_\x8__\x8n_\x8o_\x8n_\x8u_\x8n_\x8i_\x8f_\x8o_\x8r_\x8m_\x8__\x8c_\x8o_\x8o_\x8r_\x8d_\x8s_\x8._\x8p_\x8n_\x8g_\x8]297 _\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8p_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g_\x8__\x8n_\x8o_\x8n_\x8u_\x8n_\x8i_\x8f_\x8o_\x8r_\x8m_\x8__\x8c_\x8o_\x8o_\x8r_\x8d_\x8s_\x8._\x8p_\x8n_\x8g_\x8]
298 *\x8**\x8**\x8*·O\x8Ot\x8th\x8he\x8er\x8r·t\x8ty\x8yp\x8pe\x8es\x8s·o\x8of\x8f·p\x8pl\x8lo\x8ot\x8t_\x8?\x8·*\x8**\x8**\x8*298 *\x8**\x8**\x8*·O\x8Ot\x8th\x8he\x8er\x8r·t\x8ty\x8yp\x8pe\x8es\x8s·o\x8of\x8f·p\x8pl\x8lo\x8ot\x8t_\x8?\x8·*\x8**\x8**\x8*
299 There·are·several·other·options·for·plotting·2D·data.299 There·are·several·other·options·for·plotting·2D·data.
300 Contour·plot·using·DataArray.plot.contour()300 Contour·plot·using·DataArray.plot.contour()
301 In·[52]:·air2d.plot.contour()301 In·[52]:·air2d.plot.contour()
302 NameError:·name·'air2d'·is·not·defined302 NameError:·name·'air2d'·is·not·defined
303 _\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8p_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g_\x8__\x8c_\x8o_\x8n_\x8t_\x8o_\x8u_\x8r_\x8._\x8p_\x8n_\x8g_\x8]303 _\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8p_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g_\x8__\x8c_\x8o_\x8n_\x8t_\x8o_\x8u_\x8r_\x8._\x8p_\x8n_\x8g_\x8]
Offset 613, 92 lines modifiedOffset 613, 92 lines modified
613 ··*·y········(y)·float64·88B·0.0·0.1·0.2·0.3·0.4·0.5·0.6·0.7·0.8·0.9·1.0613 ··*·y········(y)·float64·88B·0.0·0.1·0.2·0.3·0.4·0.5·0.6·0.7·0.8·0.9·1.0
614 ··*·z········(z)·int32·16B·0·1·2·3614 ··*·z········(z)·int32·16B·0·1·2·3
615 ··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five'615 ··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five'
616 Attributes:616 Attributes:
617 ····units:····Aunits617 ····units:····Aunits
  
618 In·[99]:·ds.A.plot.scatter(x="y")618 In·[99]:·ds.A.plot.scatter(x="y")
619 Out[99]:·<matplotlib.collections.PathCollection·at·0xa2bdfe90>619 Out[99]:·<matplotlib.collections.PathCollection·at·0xe36b1e90>
620 [_build/html/_static/da_A_y.png]620 [_build/html/_static/da_A_y.png]
621 Same·plot·can·be·displayed·using·the·dataset:621 Same·plot·can·be·displayed·using·the·dataset:
622 In·[100]:·ds.plot.scatter(x="y",·y="A")622 In·[100]:·ds.plot.scatter(x="y",·y="A")
623 Out[100]:·<matplotlib.collections.PathCollection·at·0xa084ef50>623 Out[100]:·<matplotlib.collections.PathCollection·at·0xe132d0e0>
624 [_build/html/_static/ds_A_y.png]624 [_build/html/_static/ds_A_y.png]
625 Now·suppose·we·want·to·scatter·the·A·DataArray·against·the·B·DataArray625 Now·suppose·we·want·to·scatter·the·A·DataArray·against·the·B·DataArray
626 In·[101]:·ds.plot.scatter(x="A",·y="B")626 In·[101]:·ds.plot.scatter(x="A",·y="B")
627 Out[101]:·<matplotlib.collections.PathCollection·at·0xa06bbea0>627 Out[101]:·<matplotlib.collections.PathCollection·at·0xe11a8030>
628 [_build/html/_static/ds_simple_scatter.png]628 [_build/html/_static/ds_simple_scatter.png]
629 The·hue·kwarg·lets·you·vary·the·color·by·variable·value629 The·hue·kwarg·lets·you·vary·the·color·by·variable·value
630 In·[102]:·ds.plot.scatter(x="A",·y="B",·hue="w")630 In·[102]:·ds.plot.scatter(x="A",·y="B",·hue="w")
631 Out[102]:·<matplotlib.collections.PathCollection·at·0xa0860030>631 Out[102]:·<matplotlib.collections.PathCollection·at·0xe131e920>
632 [_build/html/_static/ds_hue_scatter.png]632 [_build/html/_static/ds_hue_scatter.png]
633 You·can·force·a·legend·instead·of·a·colorbar·by·setting·add_legend=True,633 You·can·force·a·legend·instead·of·a·colorbar·by·setting·add_legend=True,
634 add_colorbar=False.634 add_colorbar=False.
635 In·[103]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=True,635 In·[103]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=True,
636 add_colorbar=False)636 add_colorbar=False)
637 Out[103]:·<matplotlib.collections.PathCollection·at·0xa06d1c90>637 Out[103]:·<matplotlib.collections.PathCollection·at·0xe114b450>
638 [_build/html/_static/ds_discrete_legend_hue_scatter.png]638 [_build/html/_static/ds_discrete_legend_hue_scatter.png]
639 In·[104]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=False,639 In·[104]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=False,
640 add_colorbar=True)640 add_colorbar=True)
641 Out[104]:·<matplotlib.collections.PathCollection·at·0xa08e1710>641 Out[104]:·<matplotlib.collections.PathCollection·at·0xe1158920>
642 [_build/html/_static/ds_discrete_colorbar_hue_scatter.png]642 [_build/html/_static/ds_discrete_colorbar_hue_scatter.png]
643 The·markersize·kwarg·lets·you·vary·the·point’s·size·by·variable·value.·You·can643 The·markersize·kwarg·lets·you·vary·the·point’s·size·by·variable·value.·You·can
644 additionally·pass·size_norm·to·control·how·the·variable’s·values·are·mapped·to644 additionally·pass·size_norm·to·control·how·the·variable’s·values·are·mapped·to
645 point·sizes.645 point·sizes.
646 In·[105]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="z")646 In·[105]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="z")
647 Out[105]:·<matplotlib.collections.PathCollection·at·0xa06a6a80>647 Out[105]:·<matplotlib.collections.PathCollection·at·0xe11823a0>
648 [_build/html/_static/ds_hue_size_scatter.png]648 [_build/html/_static/ds_hue_size_scatter.png]
649 The·z·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well.649 The·z·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well.
650 In·[106]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x")650 In·[106]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x")
651 Out[106]:·<mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xa05fd870>651 Out[106]:·<mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xec2e4a80>
652 [_build/html/_static/ds_hue_size_scatter_z.png]652 [_build/html/_static/ds_hue_size_scatter_z.png]
653 Faceting·is·also·possible653 Faceting·is·also·possible
654 In·[107]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="x",·row="x",654 In·[107]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="x",·row="x",
655 col="w")655 col="w")
656 Out[107]:·<xarray.plot.facetgrid.FacetGrid·at·0xa06d6f48>656 Out[107]:·<xarray.plot.facetgrid.FacetGrid·at·0xec2fd310>
657 [_build/html/_static/ds_facet_scatter.png]657 [_build/html/_static/ds_facet_scatter.png]
658 And·adding·the·z-axis658 And·adding·the·z-axis
659 In·[108]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x",659 In·[108]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x",
660 row="x",·col="w")660 row="x",·col="w")
661 Out[108]:·<xarray.plot.facetgrid.FacetGrid·at·0xa0006240>661 Out[108]:·<xarray.plot.facetgrid.FacetGrid·at·0xe0b239d0>
662 [_build/html/_static/ds_facet_scatter_z.png]662 [_build/html/_static/ds_facet_scatter_z.png]
663 For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data663 For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data
664 variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities664 variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities
665 of·seaborn.665 of·seaborn.
666 *\x8**\x8**\x8**\x8*·Q\x8Qu\x8ui\x8iv\x8ve\x8er\x8r_\x8?\x8·*\x8**\x8**\x8**\x8*666 *\x8**\x8**\x8**\x8*·Q\x8Qu\x8ui\x8iv\x8ve\x8er\x8r_\x8?\x8·*\x8**\x8**\x8**\x8*
667 Visualizing·vector·fields·is·supported·with·quiver·plots:667 Visualizing·vector·fields·is·supported·with·quiver·plots:
668 In·[109]:·ds.isel(w=1,·z=1).plot.quiver(x="x",·y="y",·u="A",·v="B")668 In·[109]:·ds.isel(w=1,·z=1).plot.quiver(x="x",·y="y",·u="A",·v="B")
669 Out[109]:·<matplotlib.quiver.Quiver·at·0xab27f480>669 Out[109]:·<matplotlib.quiver.Quiver·at·0xe30aca40>
670 [_build/html/_static/ds_simple_quiver.png]670 [_build/html/_static/ds_simple_quiver.png]
671 where·u·and·v·denote·the·x·and·y·direction·components·of·the·arrow·vectors.671 where·u·and·v·denote·the·x·and·y·direction·components·of·the·arrow·vectors.
672 Again,·faceting·is·also·possible:672 Again,·faceting·is·also·possible:
673 In·[110]:·ds.plot.quiver(x="x",·y="y",·u="A",·v="B",·col="w",·row="z",·scale=4)673 In·[110]:·ds.plot.quiver(x="x",·y="y",·u="A",·v="B",·col="w",·row="z",·scale=4)
674 Out[110]:·<xarray.plot.facetgrid.FacetGrid·at·0xa2586ca8>674 Out[110]:·<xarray.plot.facetgrid.FacetGrid·at·0xe3eca810>
675 [_build/html/_static/ds_facet_quiver.png]675 [_build/html/_static/ds_facet_quiver.png]
676 scale·is·required·for·faceted·quiver·plots.·The·scale·determines·the·number·of676 scale·is·required·for·faceted·quiver·plots.·The·scale·determines·the·number·of
677 data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the677 data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the
678 arrow·longer.678 arrow·longer.
679 *\x8**\x8**\x8**\x8*·S\x8St\x8tr\x8re\x8ea\x8am\x8mp\x8pl\x8lo\x8ot\x8t_\x8?\x8·*\x8**\x8**\x8**\x8*679 *\x8**\x8**\x8**\x8*·S\x8St\x8tr\x8re\x8ea\x8am\x8mp\x8pl\x8lo\x8ot\x8t_\x8?\x8·*\x8**\x8**\x8**\x8*
680 Visualizing·vector·fields·is·also·supported·with·streamline·plots:680 Visualizing·vector·fields·is·also·supported·with·streamline·plots:
681 In·[111]:·ds.isel(w=1,·z=1).plot.streamplot(x="x",·y="y",·u="A",·v="B")681 In·[111]:·ds.isel(w=1,·z=1).plot.streamplot(x="x",·y="y",·u="A",·v="B")
682 Out[111]:·<matplotlib.collections.LineCollection·at·0xa051c660>682 Out[111]:·<matplotlib.collections.LineCollection·at·0xe0488660>
683 [_build/html/_static/ds_simple_streamplot.png]683 [_build/html/_static/ds_simple_streamplot.png]
684 where·u·and·v·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to684 where·u·and·v·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to
685 the·streamlines.·Again,·faceting·is·also·possible:685 the·streamlines.·Again,·faceting·is·also·possible:
686 In·[112]:·ds.plot.streamplot(x="x",·y="y",·u="A",·v="B",·col="w",·row="z")686 In·[112]:·ds.plot.streamplot(x="x",·y="y",·u="A",·v="B",·col="w",·row="z")
687 Out[112]:·<xarray.plot.facetgrid.FacetGrid·at·0xa0ca4768>687 Out[112]:·<xarray.plot.facetgrid.FacetGrid·at·0xe4021180>
688 [_build/html/_static/ds_facet_streamplot.png]688 [_build/html/_static/ds_facet_streamplot.png]
689 *\x8**\x8**\x8**\x8**\x8*·M\x8Ma\x8ap\x8ps\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*689 *\x8**\x8**\x8**\x8**\x8*·M\x8Ma\x8ap\x8ps\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
690 To·follow·this·section·you’ll·need·to·have·Cartopy·installed·and·working.690 To·follow·this·section·you’ll·need·to·have·Cartopy·installed·and·working.
691 This·script·will·plot·the·air·temperature·on·a·map.691 This·script·will·plot·the·air·temperature·on·a·map.
692 In·[113]:·import·cartopy.crs·as·ccrs692 In·[113]:·import·cartopy.crs·as·ccrs
  
693 In·[114]:·air·=·xr.tutorial.open_dataset("air_temperature").air693 In·[114]:·air·=·xr.tutorial.open_dataset("air_temperature").air
694 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not694 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
695 create·data·cache·folder·'/nonexistent/first-build/.cache/695 create·data·cache·folder·'/nonexistent/second-build/.cache/
696 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.696 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
697 In·[115]:·p·=·air.isel(time=0).plot(697 In·[115]:·p·=·air.isel(time=0).plot(
698 ···.....:·····subplot_kws=dict(projection=ccrs.Orthographic(-80,·35),698 ···.....:·····subplot_kws=dict(projection=ccrs.Orthographic(-80,·35),
699 facecolor="gray"),699 facecolor="gray"),
700 ···.....:·····transform=ccrs.PlateCarree(),700 ···.....:·····transform=ccrs.PlateCarree(),
Offset 745, 24 lines modifiedOffset 745, 24 lines modified
745 In·[121]:·import·xarray.plot·as·xplt745 In·[121]:·import·xarray.plot·as·xplt
  
Max diff block lines reached; 6635/13804 bytes (48.07%) of diff not shown.
3.58 KB
./usr/share/doc/python-xarray-doc/html/user-guide/reshaping.html
    
Offset 554, 15 lines modifiedOffset 554, 15 lines modified
554 <section·id="reshaping-via-coarsen">554 <section·id="reshaping-via-coarsen">
555 <span·id="reshape-coarsen"></span><h2>Reshaping·via·coarsen<a·class="headerlink"·href="#reshaping-via-coarsen"·title="Link·to·this·heading">¶</a></h2>555 <span·id="reshape-coarsen"></span><h2>Reshaping·via·coarsen<a·class="headerlink"·href="#reshaping-via-coarsen"·title="Link·to·this·heading">¶</a></h2>
556 <p>Whilst·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">coarsen</span></code>·is·normally·used·for·reducing·your·data’s·resolution·by·applying·a·reduction·function556 <p>Whilst·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">coarsen</span></code>·is·normally·used·for·reducing·your·data’s·resolution·by·applying·a·reduction·function
557 (see·the·<a·class="reference·internal"·href="computation.html#compute-coarsen"><span·class="std·std-ref">page·on·computation</span></a>),557 (see·the·<a·class="reference·internal"·href="computation.html#compute-coarsen"><span·class="std·std-ref">page·on·computation</span></a>),
558 it·can·also·be·used·to·reorganise·your·data·without·applying·a·computation·via·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">construct()</span></code>.</p>558 it·can·also·be·used·to·reorganise·your·data·without·applying·a·computation·via·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">construct()</span></code>.</p>
559 <p>Taking·our·example·tutorial·air·temperature·dataset·over·the·Northern·US</p>559 <p>Taking·our·example·tutorial·air·temperature·dataset·over·the·Northern·US</p>
560 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[56]:·</span><span·class="n">air</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)[</span><span·class="s2">&quot;air&quot;</span><span·class="p">]</span>560 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[56]:·</span><span·class="n">air</span>·<span·class="o">=</span>·<span·class="n">xr</span><span·class="o">.</span><span·class="n">tutorial</span><span·class="o">.</span><span·class="n">open_dataset</span><span·class="p">(</span><span·class="s2">&quot;air_temperature&quot;</span><span·class="p">)[</span><span·class="s2">&quot;air&quot;</span><span·class="p">]</span>
561 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/first-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>561 <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·&#39;/nonexistent&#39;·|·Pooch·could·not·create·data·cache·folder·&#39;/nonexistent/second-build/.cache/xarray_tutorial_data&#39;.·Will·not·be·able·to·download·data·files.</span>
  
  
562 <span·class="gp">In·[57]:·</span><span·class="n">air</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;lon&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;lat&quot;</span><span·class="p">)</span>562 <span·class="gp">In·[57]:·</span><span·class="n">air</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="mi">0</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">x</span><span·class="o">=</span><span·class="s2">&quot;lon&quot;</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">&quot;lat&quot;</span><span·class="p">)</span>
563 <span·class="go">NameError:·name·&#39;air&#39;·is·not·defined</span>563 <span·class="go">NameError:·name·&#39;air&#39;·is·not·defined</span>
564 </pre></div>564 </pre></div>
565 </div>565 </div>
566 <img·alt="_build/html/_static/pre_coarsening.png"·src="_build/html/_static/pre_coarsening.png"·/>566 <img·alt="_build/html/_static/pre_coarsening.png"·src="_build/html/_static/pre_coarsening.png"·/>
1.01 KB
html2text {}
    
Offset 440, 15 lines modifiedOffset 440, 15 lines modified
440 *\x8**\x8**\x8**\x8**\x8*·R\x8Re\x8es\x8sh\x8ha\x8ap\x8pi\x8in\x8ng\x8g·v\x8vi\x8ia\x8a·c\x8co\x8oa\x8ar\x8rs\x8se\x8en\x8n_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*440 *\x8**\x8**\x8**\x8**\x8*·R\x8Re\x8es\x8sh\x8ha\x8ap\x8pi\x8in\x8ng\x8g·v\x8vi\x8ia\x8a·c\x8co\x8oa\x8ar\x8rs\x8se\x8en\x8n_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
441 Whilst·coarsen·is·normally·used·for·reducing·your·data’s·resolution·by·applying441 Whilst·coarsen·is·normally·used·for·reducing·your·data’s·resolution·by·applying
442 a·reduction·function·(see·the·_\x8p_\x8a_\x8g_\x8e_\x8·_\x8o_\x8n_\x8·_\x8c_\x8o_\x8m_\x8p_\x8u_\x8t_\x8a_\x8t_\x8i_\x8o_\x8n),·it·can·also·be·used·to442 a·reduction·function·(see·the·_\x8p_\x8a_\x8g_\x8e_\x8·_\x8o_\x8n_\x8·_\x8c_\x8o_\x8m_\x8p_\x8u_\x8t_\x8a_\x8t_\x8i_\x8o_\x8n),·it·can·also·be·used·to
443 reorganise·your·data·without·applying·a·computation·via·construct().443 reorganise·your·data·without·applying·a·computation·via·construct().
444 Taking·our·example·tutorial·air·temperature·dataset·over·the·Northern·US444 Taking·our·example·tutorial·air·temperature·dataset·over·the·Northern·US
445 In·[56]:·air·=·xr.tutorial.open_dataset("air_temperature")["air"]445 In·[56]:·air·=·xr.tutorial.open_dataset("air_temperature")["air"]
446 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not446 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
447 create·data·cache·folder·'/nonexistent/first-build/.cache/447 create·data·cache·folder·'/nonexistent/second-build/.cache/
448 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.448 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
449 In·[57]:·air.isel(time=0).plot(x="lon",·y="lat")449 In·[57]:·air.isel(time=0).plot(x="lon",·y="lat")
450 NameError:·name·'air'·is·not·defined450 NameError:·name·'air'·is·not·defined
451 [_build/html/_static/pre_coarsening.png]451 [_build/html/_static/pre_coarsening.png]
452 we·can·split·this·up·into·sub-regions·of·size·(9,·18)·points·using·construct():452 we·can·split·this·up·into·sub-regions·of·size·(9,·18)·points·using·construct():
38.4 KB
./usr/share/doc/python-xarray-doc/html/user-guide/testing.html
    
Offset 84, 57 lines modifiedOffset 84, 52 lines modified
84 <h3>Generating·Examples<a·class="headerlink"·href="#generating-examples"·title="Link·to·this·heading">¶</a></h3>84 <h3>Generating·Examples<a·class="headerlink"·href="#generating-examples"·title="Link·to·this·heading">¶</a></h3>
85 <p>To·see·an·example·of·what·each·of·these·strategies·might·produce,·you·can·call·one·followed·by·the·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·method,85 <p>To·see·an·example·of·what·each·of·these·strategies·might·produce,·you·can·call·one·followed·by·the·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·method,
86 which·is·a·general·hypothesis·method·valid·for·all·strategies.</p>86 which·is·a·general·hypothesis·method·valid·for·all·strategies.</p>
87 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[2]:·</span><span·class="kn">import</span>·<span·class="nn">xarray.testing.strategies</span>·<span·class="k">as</span>·<span·class="nn">xrst</span>87 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[2]:·</span><span·class="kn">import</span>·<span·class="nn">xarray.testing.strategies</span>·<span·class="k">as</span>·<span·class="nn">xrst</span>
  
88 <span·class="gp">In·[3]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>88 <span·class="gp">In·[3]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>
89 <span·class="gh">Out[3]:·</span>89 <span·class="gh">Out[3]:·</span>
90 <span·class="go">&lt;xarray.Variable·(Ż:·1)&gt;·Size:·8B</span>90 <span·class="go">&lt;xarray.Variable·(0:·1)&gt;·Size:·1B</span>
91 <span·class="go">array([-9223372036854711561],·dtype=int64)</span>91 <span·class="go">array([0],·dtype=uint8)</span>
92 <span·class="go">Attributes:</span> 
93 <span·class="go">····7ŬļŻ:·····{&#39;7ėÅťŢ&#39;:·&#39;ŲŽÈ&#39;,·&#39;&#39;:·None,·&#39;ſÖ&#39;:·None,·&#39;ŖªĺĕŨ&#39;:·None,·&#39;1Ŏ&#39;:·Non...</span> 
  
94 <span·class="gp">In·[4]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>92 <span·class="gp">In·[4]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>
95 <span·class="gh">Out[4]:·</span>93 <span·class="gh">Out[4]:·</span>
96 <span·class="go">&lt;xarray.Variable·(ksœi:·3,·ſ:·5,·žĨûýý:·1)&gt;·Size:·60B</span>94 <span·class="go">&lt;xarray.Variable·(šı:·5,·ČļŻBì:·5)&gt;·Size:·50B</span>
 95 <span·class="go">array([[·32549,··-2652,·-20094,·-15762,·-32768],</span>
 96 <span·class="go">·······[-11418,·-23658,·-24871,··-8043,··23893],</span>
 97 <span·class="go">·······[·-6803,··-2219,·-23321,·-32768,·-32768],</span>
 98 <span·class="go">·······[-32768,·-16703,·-32768,··32767,··31246],</span>
 99 <span·class="go">·······[··4150,·-20152,·-29268,·-32768,·-32768]],·shape=(5,·5),·dtype=int16)</span>
97 <span·class="go">array([[[-2147483604],</span> 
98 <span·class="go">········[-2147483604],</span> 
99 <span·class="go">········[-2147424547],</span> 
100 <span·class="go">········[-2147483604],</span> 
101 <span·class="go">········[-2147442702]],</span> 
  
102 <span·class="go">·······[[-2147483604],</span> 
103 <span·class="go">········[·-820323759],</span> 
104 <span·class="go">········[-2147451191],</span> 
105 <span·class="go">········[-2147483604],</span> 
106 <span·class="go">········[-2147433967]],</span> 
  
107 <span·class="go">·······[[-2147483413],</span> 
108 <span·class="go">········[-2147483604],</span> 
109 <span·class="go">········[-1594616920],</span> 
110 <span·class="go">········[-2147483604],</span> 
111 <span·class="go">········[-2147483604]]],·shape=(3,·5,·1))</span> 
112 <span·class="go">Attributes:</span>100 <span·class="go">Attributes:·(12/19)</span>
113 <span·class="go">····3:········{&#39;şŶ&#39;:·{&#39;żjžÉ&#39;:·array([[-9223372036854775649,·-9223372036854753...</span>101 <span·class="go">····:·········False</span>
 102 <span·class="go">····RŪżßŻ:····None</span>
 103 <span·class="go">····òŨGŻ:·····[[&#39;Ø&#39;·&#39;\U000fbaf2zäa\x16&#39;]]</span>
 104 <span·class="go">····Å:········</span>
 105 <span·class="go">····łŐ:·······None</span>
 106 <span·class="go">····ŧ:········True</span>
 107 <span·class="go">····...·······...</span>
 108 <span·class="go">····¹īşťő:····[[b&#39;&#39;·b&#39;\x13\xaa&#39;]]</span>
 109 <span·class="go">····łĒŮ:······[&#39;NaT&#39;]</span>
 110 <span·class="go">····Ű:········ĦĤžĝŭ</span>
 111 <span·class="go">····öĬHŽe:····True</span>
 112 <span·class="go">····ż:········False</span>
 113 <span·class="go">····M³ĨĿ2:····True</span>
  
114 <span·class="gp">In·[5]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>114 <span·class="gp">In·[5]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>
115 <span·class="gh">Out[5]:·</span>115 <span·class="gh">Out[5]:·</span>
116 <span·class="go">&lt;xarray.Variable·(I:·3,·ì5ś:·1)&gt;·Size:·48B</span>116 <span·class="go">&lt;xarray.Variable·(g0Xőþ:·2,·ŽwĖſŞ:·3,·mſ:·1)&gt;·Size:·48B</span>
117 <span·class="go">array([[·2.225e-308+5.960e-008j],</span>117 <span·class="go">array([[[··················60],</span>
118 <span·class="go">·······[········inf-4.941e-324j],</span>118 <span·class="go">········[················2475],</span>
119 <span·class="go">·······[-9.861e-047+1.192e-007j]])</span>119 <span·class="go">········[················2475]],</span>
  
 120 <span·class="go">·······[[················2475],</span>
 121 <span·class="go">········[10484247427700828736],</span>
 122 <span·class="go">········[···············19313]]],·dtype=uint64)</span>
120 <span·class="go">Attributes:</span>123 <span·class="go">Attributes:</span>
 124 <span·class="go">····Ĉ:········{&#39;žŦżħ&#39;:·&#39;ìĉżiĺ&#39;,·&#39;µŒŴïĞ&#39;:·False}</span>
121 <span·class="go">····:·········Ž</span> 
122 <span·class="go">····ſž:·······[&#39;b\x95è\U0001fe34Hì\x18è&#39;·&#39;\U000fcf56I\U000b0b7a&#39;]</span> 
123 <span·class="go">····ż:········True</span> 
124 <span·class="go">····ÜžĒŸä:····żÃ</span> 
125 <span·class="go">····Eſģ:······False</span> 
126 <span·class="go">····ß:········[-1.798e+308··7.258e-293]</span> 
127 <span·class="go">····ZRíŧĜ:····</span> 
128 <span·class="go">····ĩÕÀŃâ:····[[b&#39;&#39;]\n·[b&#39;&lt;&#39;]]</span> 
129 </pre></div>125 </pre></div>
130 </div>126 </div>
131 <p>You·can·see·that·calling·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·multiple·times·will·generate·different·examples,·giving·you·an·idea·of·the·wide127 <p>You·can·see·that·calling·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·multiple·times·will·generate·different·examples,·giving·you·an·idea·of·the·wide
132 range·of·data·that·the·xarray·strategies·can·generate.</p>128 range·of·data·that·the·xarray·strategies·can·generate.</p>
133 <p>In·your·tests·however·you·should·not·use·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·-·instead·you·should·parameterize·your·tests·with·the129 <p>In·your·tests·however·you·should·not·use·<code·class="docutils·literal·notranslate"><span·class="pre">.example()</span></code>·-·instead·you·should·parameterize·your·tests·with·the
134 <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.given()</span></code>·decorator:</p>130 <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.given()</span></code>·decorator:</p>
135 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[6]:·</span><span·class="kn">from</span>·<span·class="nn">hypothesis</span>·<span·class="kn">import</span>·<span·class="n">given</span>131 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[6]:·</span><span·class="kn">from</span>·<span·class="nn">hypothesis</span>·<span·class="kn">import</span>·<span·class="n">given</span>
Offset 152, 99 lines modifiedOffset 147, 96 lines modified
152 <p>Xarray’s·strategies·can·accept·other·strategies·as·arguments,·allowing·you·to·customise·the·contents·of·the·generated147 <p>Xarray’s·strategies·can·accept·other·strategies·as·arguments,·allowing·you·to·customise·the·contents·of·the·generated
153 examples.</p>148 examples.</p>
154 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all·other·details·still·arbitrary</span>149 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all·other·details·still·arbitrary</span>
155 <span·class="gp">In·[8]:·</span><span·class="kn">from</span>·<span·class="nn">hypothesis.extra.numpy</span>·<span·class="kn">import</span>·<span·class="n">complex_number_dtypes</span>150 <span·class="gp">In·[8]:·</span><span·class="kn">from</span>·<span·class="nn">hypothesis.extra.numpy</span>·<span·class="kn">import</span>·<span·class="n">complex_number_dtypes</span>
  
156 <span·class="gp">In·[9]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dtype</span><span·class="o">=</span><span·class="n">complex_number_dtypes</span><span·class="p">())</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>151 <span·class="gp">In·[9]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dtype</span><span·class="o">=</span><span·class="n">complex_number_dtypes</span><span·class="p">())</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>
157 <span·class="gh">Out[9]:·</span>152 <span·class="gh">Out[9]:·</span>
158 <span·class="go">&lt;xarray.Variable·(Á:·5)&gt;·Size:·40B</span>153 <span·class="go">&lt;xarray.Variable·(Ū:·6,·Ž:·1)&gt;·Size:·48B</span>
159 <span·class="go">array([-2.0e+00-0.j·,·-0.0e+00+nanj,·-1.4e-45+nanj,·-0.0e+00-0.5j,··1.9e+00-infj],·dtype=complex64)</span>154 <span·class="go">array([[-0.000e+00+nanj],</span>
 155 <span·class="go">·······[······-inf-infj],</span>
 156 <span·class="go">·······[-6.104e-05+nanj],</span>
 157 <span·class="go">·······[·5.960e-08+nanj],</span>
 158 <span·class="go">·······[·6.104e-05-infj],</span>
 159 <span·class="go">·······[·2.220e-16-1.9j]],·dtype=&#39;&gt;c8&#39;)</span>
160 <span·class="go">Attributes:</span>160 <span·class="go">Attributes:</span>
161 <span·class="go">····ŪĽ8ž:·····{}</span> 
162 <span·class="go">····:·········{&#39;µō&#39;:·{&#39;ċŭłĖõ&#39;:·array([[-inf-1.175e-38j]],·dtype=complex64),·&#39;...</span> 
163 <span·class="go">····ŧçSŏŬ:····{&#39;zÈ&#39;:·{&#39;ŶŽ&#39;:·False,·&#39;a&#39;:·True}}</span> 
164 <span·class="go">····Ê:········{}</span>161 <span·class="go">····ŖĎ2:······{}</span>
 162 <span·class="go">····:·········{&#39;sGÜř&#39;:·None,·&#39;É&#39;:·&#39;ŔŽŘűř&#39;,·&#39;bšŌak&#39;:·True,·&#39;&#39;:·&#39;&#39;,·&#39;Žżhuſ&#39;:·&#39;Š...</span>
165 </pre></div>163 </pre></div>
166 </div>164 </div>
167 <p>This·also·works·with·custom·strategies,·or·strategies·defined·in·other·packages.165 <p>This·also·works·with·custom·strategies,·or·strategies·defined·in·other·packages.
168 For·example·you·could·imagine·creating·a·<code·class="docutils·literal·notranslate"><span·class="pre">chunks</span></code>·strategy·to·specify·particular·chunking·patterns·for·a·dask-backed·array.</p>166 For·example·you·could·imagine·creating·a·<code·class="docutils·literal·notranslate"><span·class="pre">chunks</span></code>·strategy·to·specify·particular·chunking·patterns·for·a·dask-backed·array.</p>
169 </section>167 </section>
170 <section·id="fixing-arguments">168 <section·id="fixing-arguments">
171 <h3>Fixing·Arguments<a·class="headerlink"·href="#fixing-arguments"·title="Link·to·this·heading">¶</a></h3>169 <h3>Fixing·Arguments<a·class="headerlink"·href="#fixing-arguments"·title="Link·to·this·heading">¶</a></h3>
172 <p>If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation·in·the·generated·examples170 <p>If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation·in·the·generated·examples
173 over·all·other·aspects,·then·use·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>.</p>171 over·all·other·aspects,·then·use·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>.</p>
174 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[10]:·</span><span·class="kn">import</span>·<span·class="nn">hypothesis.strategies</span>·<span·class="k">as</span>·<span·class="nn">st</span>172 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[10]:·</span><span·class="kn">import</span>·<span·class="nn">hypothesis.strategies</span>·<span·class="k">as</span>·<span·class="nn">st</span>
  
175 <span·class="go">#·Generates·only·variable·objects·with·dimensions·[&quot;x&quot;,·&quot;y&quot;]</span>173 <span·class="go">#·Generates·only·variable·objects·with·dimensions·[&quot;x&quot;,·&quot;y&quot;]</span>
176 <span·class="gp">In·[11]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dims</span><span·class="o">=</span><span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">([</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">]))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>174 <span·class="gp">In·[11]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dims</span><span·class="o">=</span><span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">([</span><span·class="s2">&quot;x&quot;</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">]))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>
177 <span·class="gh">Out[11]:·</span>175 <span·class="gh">Out[11]:·</span>
178 <span·class="go">&lt;xarray.Variable·(x:·6,·y:·1)&gt;·Size:·12B</span>176 <span·class="go">&lt;xarray.Variable·(x:·3,·y:·3)&gt;·Size:·36B</span>
179 <span·class="go">array([[-0.333],</span> 
180 <span·class="go">·······[-0.333],</span> 
181 <span·class="go">·······[-0.333],</span>177 <span·class="go">array([[·······nan,··5.960e-08,········inf],</span>
 178 <span·class="go">·······[·······inf,·-3.333e-01,·······-inf],</span>
 179 <span·class="go">·······[-9.007e+15,········inf,········inf]],·dtype=float32)</span>
 180 <span·class="go">Attributes:</span>
182 <span·class="go">·······[···inf],</span>181 <span·class="go">····ŻÈ:·······{}</span>
183 <span·class="go">·······[-0.333],</span> 
184 <span·class="go">·······[-0.···]],·dtype=float16)</span> 
185 </pre></div>182 </pre></div>
186 </div>183 </div>
187 <p>(This·is·technically·another·example·of·chaining·strategies·-·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>·is·simply·a184 <p>(This·is·technically·another·example·of·chaining·strategies·-·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>·is·simply·a
Max diff block lines reached; 16075/26919 bytes (59.72%) of diff not shown.
12.0 KB
html2text {}
    
Offset 28, 59 lines modifiedOffset 28, 52 lines modified
28 To·see·an·example·of·what·each·of·these·strategies·might·produce,·you·can·call28 To·see·an·example·of·what·each·of·these·strategies·might·produce,·you·can·call
29 one·followed·by·the·.example()·method,·which·is·a·general·hypothesis·method29 one·followed·by·the·.example()·method,·which·is·a·general·hypothesis·method
30 valid·for·all·strategies.30 valid·for·all·strategies.
31 In·[2]:·import·xarray.testing.strategies·as·xrst31 In·[2]:·import·xarray.testing.strategies·as·xrst
  
32 In·[3]:·xrst.variables().example()32 In·[3]:·xrst.variables().example()
33 Out[3]:33 Out[3]:
34 <xarray.Variable·(Ż:·1)>·Size:·8B34 <xarray.Variable·(0:·1)>·Size:·1B
 35 array([0],·dtype=uint8)
35 array([-9223372036854711561],·dtype=int64) 
36 Attributes: 
37 ····7ŬļŻ:·····{'7ėÅťŢ':·'ŲŽÈ',·'':·None,·'ſÖ':·None,·'ŖªĺĕŨ':·None,·'1Ŏ': 
38 Non... 
  
39 In·[4]:·xrst.variables().example()36 In·[4]:·xrst.variables().example()
40 Out[4]:37 Out[4]:
 38 <xarray.Variable·(šı:·5,·ČļŻBì:·5)>·Size:·50B
 39 array([[·32549,··-2652,·-20094,·-15762,·-32768],
 40 ·······[-11418,·-23658,·-24871,··-8043,··23893],
 41 ·······[·-6803,··-2219,·-23321,·-32768,·-32768],
 42 ·······[-32768,·-16703,·-32768,··32767,··31246],
 43 ·······[··4150,·-20152,·-29268,·-32768,·-32768]],·shape=(5,·5),·dtype=int16)
 44 Attributes:·(12/19)
 45 ····:·········False
 46 ····RŪżßŻ:····None
 47 ····òŨGŻ:·····[['Ø'·'\U000fbaf2zäa\x16']]
 48 ····Å:
 49 ····łŐ:·······None
 50 ····ŧ:········True
 51 ····...·······...
 52 ····¹īşťő:····[[b''·b'\x13\xaa']]
 53 ····łĒŮ:······['NaT']
 54 ····Ű:········ĦĤžĝŭ
 55 ····öĬHŽe:····True
 56 ····ż:········False
 57 ····M³ĨĿ2:····True
41 <xarray.Variable·(ksœi:·3,·ſ:·5,·žĨûýý:·1)>·Size:·60B 
42 array([[[-2147483604], 
43 ········[-2147483604], 
44 ········[-2147424547], 
45 ········[-2147483604], 
46 ········[-2147442702]], 
  
47 ·······[[-2147483604], 
48 ········[·-820323759], 
49 ········[-2147451191], 
50 ········[-2147483604], 
51 ········[-2147433967]], 
  
52 ·······[[-2147483413], 
53 ········[-2147483604], 
54 ········[-1594616920], 
55 ········[-2147483604], 
56 ········[-2147483604]]],·shape=(3,·5,·1)) 
57 Attributes: 
58 ····3:········{'şŶ':·{'żjžÉ':·array([[-9223372036854775649,·- 
59 9223372036854753... 
  
60 In·[5]:·xrst.variables().example()58 In·[5]:·xrst.variables().example()
61 Out[5]:59 Out[5]:
62 <xarray.Variable·(I:·3,·ì5ś:·1)>·Size:·48B60 <xarray.Variable·(g0Xőþ:·2,·ŽwĖſŞ:·3,·mſ:·1)>·Size:·48B
63 array([[·2.225e-308+5.960e-008j], 
64 ·······[········inf-4.941e-324j], 
65 ·······[-9.861e-047+1.192e-007j]])61 array([[[··················60],
 62 ········[················2475],
 63 ········[················2475]],
  
 64 ·······[[················2475],
 65 ········[10484247427700828736],
 66 ········[···············19313]]],·dtype=uint64)
66 Attributes:67 Attributes:
 68 ····Ĉ:········{'žŦżħ':·'ìĉżiĺ',·'µŒŴïĞ':·False}
67 ····:·········Ž 
68 ····ſž:·······['b\x95è\U0001fe34Hì\x18è'·'\U000fcf56I\U000b0b7a'] 
69 ····ż:········True 
70 ····ÜžĒŸä:····żÃ 
71 ····Eſģ:······False 
72 ····ß:········[-1.798e+308··7.258e-293] 
73 ····ZRíŧĜ: 
74 ····ĩÕÀŃâ:····[[b'']\n·[b'<']] 
75 You·can·see·that·calling·.example()·multiple·times·will·generate·different69 You·can·see·that·calling·.example()·multiple·times·will·generate·different
76 examples,·giving·you·an·idea·of·the·wide·range·of·data·that·the·xarray70 examples,·giving·you·an·idea·of·the·wide·range·of·data·that·the·xarray
77 strategies·can·generate.71 strategies·can·generate.
78 In·your·tests·however·you·should·not·use·.example()·-·instead·you·should72 In·your·tests·however·you·should·not·use·.example()·-·instead·you·should
79 parameterize·your·tests·with·the·hypothesis.given()·decorator:73 parameterize·your·tests·with·the·hypothesis.given()·decorator:
80 In·[6]:·from·hypothesis·import·given74 In·[6]:·from·hypothesis·import·given
81 In·[7]:·@given(xrst.variables())75 In·[7]:·@given(xrst.variables())
Offset 92, 102 lines modifiedOffset 85, 95 lines modified
92 customise·the·contents·of·the·generated·examples.85 customise·the·contents·of·the·generated·examples.
93 #·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all86 #·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all
94 other·details·still·arbitrary87 other·details·still·arbitrary
95 In·[8]:·from·hypothesis.extra.numpy·import·complex_number_dtypes88 In·[8]:·from·hypothesis.extra.numpy·import·complex_number_dtypes
  
96 In·[9]:·xrst.variables(dtype=complex_number_dtypes()).example()89 In·[9]:·xrst.variables(dtype=complex_number_dtypes()).example()
97 Out[9]:90 Out[9]:
98 <xarray.Variable·(Á:·5)>·Size:·40B91 <xarray.Variable·(Ū:·6,·Ž:·1)>·Size:·48B
99 array([-2.0e+00-0.j·,·-0.0e+00+nanj,·-1.4e-45+nanj,·-0.0e+00-0.5j,··1.9e+00- 
100 infj],·dtype=complex64)92 array([[-0.000e+00+nanj],
 93 ·······[······-inf-infj],
 94 ·······[-6.104e-05+nanj],
 95 ·······[·5.960e-08+nanj],
 96 ·······[·6.104e-05-infj],
 97 ·······[·2.220e-16-1.9j]],·dtype='>c8')
101 Attributes:98 Attributes:
102 ····ŪĽ8ž:·····{}99 ····ŖĎ2:······{}
103 ····:·········{'µō':·{'ċŭłĖõ':·array([[-inf-1.175e-38j]],·dtype=complex64),100 ····:·········{'sGÜř':·None,·':·'ŔŽŘűř',·'bšŌak':·True,·'':·'',·'Žżhuſ':
104 '...101 'Š...
105 ····ŧçSŏŬ:····{'zÈ':·{'ŶŽ':·False,·'a':·True}} 
106 ····Ê:········{} 
107 This·also·works·with·custom·strategies,·or·strategies·defined·in·other102 This·also·works·with·custom·strategies,·or·strategies·defined·in·other
108 packages.·For·example·you·could·imagine·creating·a·chunks·strategy·to·specify103 packages.·For·example·you·could·imagine·creating·a·chunks·strategy·to·specify
109 particular·chunking·patterns·for·a·dask-backed·array.104 particular·chunking·patterns·for·a·dask-backed·array.
110 *\x8**\x8**\x8**\x8*·F\x8Fi\x8ix\x8xi\x8in\x8ng\x8g·A\x8Ar\x8rg\x8gu\x8um\x8me\x8en\x8nt\x8ts\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*105 *\x8**\x8**\x8**\x8*·F\x8Fi\x8ix\x8xi\x8in\x8ng\x8g·A\x8Ar\x8rg\x8gu\x8um\x8me\x8en\x8nt\x8ts\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*
111 If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation106 If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation
112 in·the·generated·examples·over·all·other·aspects,·then·use107 in·the·generated·examples·over·all·other·aspects,·then·use
113 hypothesis.strategies.just().108 hypothesis.strategies.just().
114 In·[10]:·import·hypothesis.strategies·as·st109 In·[10]:·import·hypothesis.strategies·as·st
  
115 #·Generates·only·variable·objects·with·dimensions·["x",·"y"]110 #·Generates·only·variable·objects·with·dimensions·["x",·"y"]
116 In·[11]:·xrst.variables(dims=st.just(["x",·"y"])).example()111 In·[11]:·xrst.variables(dims=st.just(["x",·"y"])).example()
117 Out[11]:112 Out[11]:
118 <xarray.Variable·(x:·6,·y:·1)>·Size:·12B113 <xarray.Variable·(x:·3,·y:·3)>·Size:·36B
 114 array([[·······nan,··5.960e-08,········inf],
 115 ·······[·······inf,·-3.333e-01,·······-inf],
 116 ·······[-9.007e+15,········inf,········inf]],·dtype=float32)
 117 Attributes:
 118 ····ŻÈ:·······{}
Max diff block lines reached; 7274/12231 bytes (59.47%) of diff not shown.
3.69 KB
./usr/share/doc/python-xarray-doc/html/whats-new.html
    
Offset 7936, 15 lines modifiedOffset 7936, 15 lines modified
7936 <li><p>New·<code·class="docutils·literal·notranslate"><span·class="pre">xray.Dataset.where</span></code>·method·for·masking·xray·objects·according7936 <li><p>New·<code·class="docutils·literal·notranslate"><span·class="pre">xray.Dataset.where</span></code>·method·for·masking·xray·objects·according
7937 to·some·criteria.·This·works·particularly·well·with·multi-dimensional·data:</p>7937 to·some·criteria.·This·works·particularly·well·with·multi-dimensional·data:</p>
7938 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[44]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xray</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">(</span><span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">100</span><span·class="p">),</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">100</span><span·class="p">)})</span>7938 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[44]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">xray</span><span·class="o">.</span><span·class="n">Dataset</span><span·class="p">(</span><span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">100</span><span·class="p">),</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">100</span><span·class="p">)})</span>
  
7939 <span·class="gp">In·[45]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;distance&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">sqrt</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">x</span><span·class="o">**</span><span·class="mi">2</span>·<span·class="o">+</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">y</span><span·class="o">**</span><span·class="mi">2</span><span·class="p">)</span>7939 <span·class="gp">In·[45]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">&quot;distance&quot;</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">np</span><span·class="o">.</span><span·class="n">sqrt</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">x</span><span·class="o">**</span><span·class="mi">2</span>·<span·class="o">+</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">y</span><span·class="o">**</span><span·class="mi">2</span><span·class="p">)</span>
  
7940 <span·class="gp">In·[46]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">distance</span><span·class="o">.</span><span·class="n">where</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">distance</span>·<span·class="o">&lt;</span>·<span·class="mi">100</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span>7940 <span·class="gp">In·[46]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">distance</span><span·class="o">.</span><span·class="n">where</span><span·class="p">(</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">distance</span>·<span·class="o">&lt;</span>·<span·class="mi">100</span><span·class="p">)</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span>
7941 <span·class="gh">Out[46]:·</span><span·class="go">&lt;matplotlib.collections.QuadMesh·at·0xa26993a0&gt;</span>7941 <span·class="gh">Out[46]:·</span><span·class="go">&lt;matplotlib.collections.QuadMesh·at·0xe16ebbe0&gt;</span>
7942 </pre></div>7942 </pre></div>
7943 </div>7943 </div>
7944 <a·class="reference·internal·image-reference"·href="_build/html/_static/where_example.png"><img·alt="_build/html/_static/where_example.png"·src="_build/html/_static/where_example.png"·style="width:·4in;·height:·4in;"·/>7944 <a·class="reference·internal·image-reference"·href="_build/html/_static/where_example.png"><img·alt="_build/html/_static/where_example.png"·src="_build/html/_static/where_example.png"·style="width:·4in;·height:·4in;"·/>
7945 </a>7945 </a>
7946 </li>7946 </li>
7947 <li><p>Added·new·methods·<code·class="docutils·literal·notranslate"><span·class="pre">xray.DataArray.diff</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">xray.Dataset.diff</span></code>7947 <li><p>Added·new·methods·<code·class="docutils·literal·notranslate"><span·class="pre">xray.DataArray.diff</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">xray.Dataset.diff</span></code>
7948 for·finite·difference·calculations·along·a·given·axis.</p></li>7948 for·finite·difference·calculations·along·a·given·axis.</p></li>
968 B
html2text {}
    
Offset 5100, 15 lines modifiedOffset 5100, 15 lines modified
5100 ····*·New·xray.Dataset.where·method·for·masking·xray·objects·according·to·some5100 ····*·New·xray.Dataset.where·method·for·masking·xray·objects·according·to·some
5101 ······criteria.·This·works·particularly·well·with·multi-dimensional·data:5101 ······criteria.·This·works·particularly·well·with·multi-dimensional·data:
5102 ······In·[44]:·ds·=·xray.Dataset(coords={"x":·range(100),·"y":·range(100)})5102 ······In·[44]:·ds·=·xray.Dataset(coords={"x":·range(100),·"y":·range(100)})
  
5103 ······In·[45]:·ds["distance"]·=·np.sqrt(ds.x**2·+·ds.y**2)5103 ······In·[45]:·ds["distance"]·=·np.sqrt(ds.x**2·+·ds.y**2)
  
5104 ······In·[46]:·ds.distance.where(ds.distance·<·100).plot()5104 ······In·[46]:·ds.distance.where(ds.distance·<·100).plot()
5105 ······Out[46]:·<matplotlib.collections.QuadMesh·at·0xa26993a0>5105 ······Out[46]:·<matplotlib.collections.QuadMesh·at·0xe16ebbe0>
5106 ······_\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8w_\x8h_\x8e_\x8r_\x8e_\x8__\x8e_\x8x_\x8a_\x8m_\x8p_\x8l_\x8e_\x8._\x8p_\x8n_\x8g_\x8]5106 ······_\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8w_\x8h_\x8e_\x8r_\x8e_\x8__\x8e_\x8x_\x8a_\x8m_\x8p_\x8l_\x8e_\x8._\x8p_\x8n_\x8g_\x8]
5107 ····*·Added·new·methods·xray.DataArray.diff·and·xray.Dataset.diff·for·finite5107 ····*·Added·new·methods·xray.DataArray.diff·and·xray.Dataset.diff·for·finite
5108 ······difference·calculations·along·a·given·axis.5108 ······difference·calculations·along·a·given·axis.
5109 ····*·New·xray.DataArray.to_masked_array·convenience·method·for·returning·a5109 ····*·New·xray.DataArray.to_masked_array·convenience·method·for·returning·a
5110 ······numpy.ma.MaskedArray.5110 ······numpy.ma.MaskedArray.
5111 ······In·[47]:·da·=·xray.DataArray(np.random.random_sample(size=(5,·4)))5111 ······In·[47]:·da·=·xray.DataArray(np.random.random_sample(size=(5,·4)))