596 KB
/srv/reproducible-results/rbuild-debian/r-b-build.bm7zQuf3/b1/python-xarray_2025.01.2-1_amd64.changes vs.
/srv/reproducible-results/rbuild-debian/r-b-build.bm7zQuf3/b2/python-xarray_2025.01.2-1_amd64.changes
309 B
Files
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
  
1 ·96a8ea90e0baa3abae44aeba89819125·2751828·doc·optional·python-xarray-doc_2025.01.2-1_all.deb1 ·aea27386fd21c27b40d4f50665b323e8·2751252·doc·optional·python-xarray-doc_2025.01.2-1_all.deb
2 ·65b17ea58f6b0a83ea67cd4000a96d9f·799856·python·optional·python3-xarray_2025.01.2-1_all.deb2 ·65b17ea58f6b0a83ea67cd4000a96d9f·799856·python·optional·python3-xarray_2025.01.2-1_all.deb
595 KB
python-xarray-doc_2025.01.2-1_all.deb
452 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·····6368·2025-02-02·11:36:57.000000·control.tar.xz2 -rw-r--r--···0········0········0·····6364·2025-02-02·11:36:57.000000·control.tar.xz
3 -rw-r--r--···0········0········0··2745268·2025-02-02·11:36:57.000000·data.tar.xz3 -rw-r--r--···0········0········0··2744696·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:·89906 Installed-Size:·8989
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-4)8 Built-Using:·alabaster·(=·0.7.16-0.1),·sphinx·(=·8.1.3-4)
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
594 KB
data.tar.xz
594 KB
data.tar
16.2 KB
file list
    
Offset 160, 32 lines modifiedOffset 160, 32 lines modified
160 -rw-r--r--···0·root·········(0)·root·········(0)···101581·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/contributing.html160 -rw-r--r--···0·root·········(0)·root·········(0)···101581·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/contributing.html
161 -rw-r--r--···0·root·········(0)·root·········(0)······461·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/dask.html161 -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
162 -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.html162 -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
163 -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.html163 -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
164 -rw-r--r--···0·root·········(0)·root·········(0)······479·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/duckarrays.html164 -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
165 -rw-r--r--···0·root·········(0)·root·········(0)····22666·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/ecosystem.html165 -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
166 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/166 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/
167 -rw-r--r--···0·root·········(0)·root·········(0)···151084·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html167 -rw-r--r--···0·root·········(0)·root·········(0)···151036·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html
168 -rw-r--r--···0·root·········(0)·root·········(0)····10321·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz168 -rw-r--r--···0·root·········(0)·root·········(0)····10290·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz
169 -rw-r--r--···0·root·········(0)·root·········(0)····51050·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html169 -rw-r--r--···0·root·········(0)·root·········(0)····51051·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html
170 -rw-r--r--···0·root·········(0)·root·········(0)····24987·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz170 -rw-r--r--···0·root·········(0)·root·········(0)····24982·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz
171 -rw-r--r--···0·root·········(0)·root·········(0)···134137·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html171 -rw-r--r--···0·root·········(0)·root·········(0)···134138·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html
172 -rw-r--r--···0·root·········(0)·root·········(0)····10526·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz172 -rw-r--r--···0·root·········(0)·root·········(0)····10517·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz
173 -rw-r--r--···0·root·········(0)·root·········(0)····42089·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html173 -rw-r--r--···0·root·········(0)·root·········(0)····42090·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html
174 -rw-r--r--···0·root·········(0)·root·········(0)····22682·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz174 -rw-r--r--···0·root·········(0)·root·········(0)····22668·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz
175 -rw-r--r--···0·root·········(0)·root·········(0)····27905·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.html175 -rw-r--r--···0·root·········(0)·root·········(0)····27906·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.html
176 -rw-r--r--···0·root·········(0)·root·········(0)·····2569·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb.gz176 -rw-r--r--···0·root·········(0)·root·········(0)·····2568·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb.gz
177 -rw-r--r--···0·root·········(0)·root·········(0)····50959·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html177 -rw-r--r--···0·root·········(0)·root·········(0)····50960·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html
178 -rw-r--r--···0·root·········(0)·root·········(0)·····4567·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz178 -rw-r--r--···0·root·········(0)·root·········(0)·····4557·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz
179 -rw-r--r--···0·root·········(0)·root·········(0)····43740·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html179 -rw-r--r--···0·root·········(0)·root·········(0)····43741·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html
180 -rw-r--r--···0·root·········(0)·root·········(0)····12242·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz180 -rw-r--r--···0·root·········(0)·root·········(0)····12237·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz
181 -rw-r--r--···0·root·········(0)·root·········(0)····50844·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html181 -rw-r--r--···0·root·········(0)·root·········(0)····50845·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html
182 -rw-r--r--···0·root·········(0)·root·········(0)·····4404·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz182 -rw-r--r--···0·root·········(0)·root·········(0)·····4389·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz
183 -rw-r--r--···0·root·········(0)·root·········(0)····87852·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.html183 -rw-r--r--···0·root·········(0)·root·········(0)····87852·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.html
184 -rw-r--r--···0·root·········(0)·root·········(0)···367997·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz184 -rw-r--r--···0·root·········(0)·root·········(0)···367994·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz
185 -rw-r--r--···0·root·········(0)·root·········(0)······491·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/faq.html185 -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
186 -rw-r--r--···0·root·········(0)·root·········(0)····15073·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/gallery.html186 -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
187 -rw-r--r--···0·root·········(0)·root·········(0)····16306·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/genindex.html187 -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
188 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/188 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/
189 -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.html189 -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
190 -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.html190 -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
191 -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.html191 -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 200, 50 lines modifiedOffset 200, 50 lines modified
200 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/200 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/
201 -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.html201 -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
202 -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.html202 -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
203 -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.html203 -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
204 -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.html204 -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
205 -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.html205 -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
206 -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.html206 -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
207 -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.html207 -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
208 -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.html208 -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
209 -rw-r--r--···0·root·········(0)·root·········(0)····27075·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/zarr-encoding-spec.html209 -rw-r--r--···0·root·········(0)·root·········(0)····27076·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/zarr-encoding-spec.html
210 -rw-r--r--···0·root·········(0)·root·········(0)······488·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/interpolation.html210 -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
211 -rw-r--r--···0·root·········(0)·root·········(0)······455·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/io.html211 -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
212 -rw-r--r--···0·root·········(0)·root·········(0)····22249·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/objects.inv212 -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
213 -rw-r--r--···0·root·········(0)·root·········(0)······467·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/pandas.html213 -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
214 -rw-r--r--···0·root·········(0)·root·········(0)······473·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/plotting.html214 -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
215 -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.html215 -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
216 -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.html216 -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
217 -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.html217 -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
218 -rw-r--r--···0·root·········(0)·root·········(0)······476·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/reshaping.html218 -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
219 -rw-r--r--···0·root·········(0)·root·········(0)····24474·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/roadmap.html219 -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
220 -rw-r--r--···0·root·········(0)·root·········(0)·····6341·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/search.html220 -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
221 -rw-r--r--···0·root·········(0)·root·········(0)···250328·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/searchindex.js221 -rw-r--r--···0·root·········(0)·root·········(0)···249606·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/searchindex.js
222 -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/terminology.html222 -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
223 -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.html223 -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
224 -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.html224 -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
225 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/225 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/
226 -rw-r--r--···0·root·········(0)·root·········(0)····58676·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/combining.html226 -rw-r--r--···0·root·········(0)·root·········(0)····58676·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/combining.html
227 -rw-r--r--···0·root·········(0)·root·········(0)···140195·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/computation.html227 -rw-r--r--···0·root·········(0)·root·········(0)···140195·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/computation.html
228 -rw-r--r--···0·root·········(0)·root·········(0)····71343·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/dask.html228 -rw-r--r--···0·root·········(0)·root·········(0)····71343·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/dask.html
229 -rw-r--r--···0·root·········(0)·root·········(0)···150022·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/data-structures.html229 -rw-r--r--···0·root·········(0)·root·········(0)···150022·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/data-structures.html
230 -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.html230 -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
231 -rw-r--r--···0·root·········(0)·root·········(0)····50886·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/groupby.html231 -rw-r--r--···0·root·········(0)·root·········(0)····50886·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/groupby.html
232 -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.html232 -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
233 -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.html233 -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
234 -rw-r--r--···0·root·········(0)·root·········(0)···139994·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/indexing.html234 -rw-r--r--···0·root·········(0)·root·········(0)···139997·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/indexing.html
235 -rw-r--r--···0·root·········(0)·root·········(0)····68719·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/interpolation.html235 -rw-r--r--···0·root·········(0)·root·········(0)····68720·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/interpolation.html
236 -rw-r--r--···0·root·········(0)·root·········(0)···144483·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/io.html236 -rw-r--r--···0·root·········(0)·root·········(0)···144485·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/io.html
237 -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.html237 -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
238 -rw-r--r--···0·root·········(0)·root·········(0)····42224·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/pandas.html238 -rw-r--r--···0·root·········(0)·root·········(0)····42224·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/pandas.html
239 -rw-r--r--···0·root·········(0)·root·········(0)···136246·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/plotting.html239 -rw-r--r--···0·root·········(0)·root·········(0)···136248·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/plotting.html
240 -rw-r--r--···0·root·········(0)·root·········(0)····62916·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/reshaping.html240 -rw-r--r--···0·root·········(0)·root·········(0)····62917·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/reshaping.html
241 -rw-r--r--···0·root·········(0)·root·········(0)····46801·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/terminology.html241 -rw-r--r--···0·root·········(0)·root·········(0)····46801·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/terminology.html
242 -rw-r--r--···0·root·········(0)·root·········(0)····47031·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/testing.html242 -rw-r--r--···0·root·········(0)·root·········(0)····46886·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/testing.html
243 -rw-r--r--···0·root·········(0)·root·········(0)····45637·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/time-series.html243 -rw-r--r--···0·root·········(0)·root·········(0)····45637·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/time-series.html
244 -rw-r--r--···0·root·········(0)·root·········(0)····45153·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/weather-climate.html244 -rw-r--r--···0·root·········(0)·root·········(0)····45153·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/weather-climate.html
245 -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.html245 -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
246 -rw-r--r--···0·root·········(0)·root·········(0)··1017509·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/whats-new.html246 -rw-r--r--···0·root·········(0)·root·········(0)··1017509·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/whats-new.html
247 -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.html247 -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
248 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc-base/248 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc-base/
249 -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-doc249 -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
35.5 KB
./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html
    
Offset 70, 15 lines modifiedOffset 70, 14 lines modified
70 </div>70 </div>
71 <div·class="nboutput·nblast·docutils·container">71 <div·class="nboutput·nblast·docutils·container">
72 <div·class="prompt·empty·docutils·container">72 <div·class="prompt·empty·docutils·container">
73 </div>73 </div>
74 <div·class="output_area·stderr·docutils·container">74 <div·class="output_area·stderr·docutils·container">
75 <div·class="highlight"><pre>75 <div·class="highlight"><pre>
76 Fontconfig·error:·No·writable·cache·directories76 Fontconfig·error:·No·writable·cache·directories
77 Matplotlib·is·building·the·font·cache;·this·may·take·a·moment. 
78 </pre></div></div>77 </pre></div></div>
79 </div>78 </div>
80 <p>To·read·GRIB·data,·you·can·use·<code·class="docutils·literal·notranslate"><span·class="pre">xarray.load_dataset</span></code>.·The·only·extra·code·you·need·is·to·specify·the·engine·as·<code·class="docutils·literal·notranslate"><span·class="pre">cfgrib</span></code>.</p>79 <p>To·read·GRIB·data,·you·can·use·<code·class="docutils·literal·notranslate"><span·class="pre">xarray.load_dataset</span></code>.·The·only·extra·code·you·need·is·to·specify·the·engine·as·<code·class="docutils·literal·notranslate"><span·class="pre">cfgrib</span></code>.</p>
81 <div·class="nbinput·docutils·container">80 <div·class="nbinput·docutils·container">
82 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[2]:81 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[2]:
83 </pre></div>82 </pre></div>
84 </div>83 </div>
Offset 171, 15 lines modifiedOffset 170, 15 lines modified
171 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>170 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>
172 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:171 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:
173 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(172 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(
174 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>173 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>
175 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)174 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)
176 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>175 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>
  
177 <span·class="ansi-red-fg">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.176 <span·class="ansi-red-fg">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.
178 </pre></div></div>177 </pre></div></div>
179 </div>178 </div>
180 <p>Let’s·create·a·simple·plot·of·2-m·air·temperature·in·degrees·Celsius:</p>179 <p>Let’s·create·a·simple·plot·of·2-m·air·temperature·in·degrees·Celsius:</p>
181 <div·class="nbinput·docutils·container">180 <div·class="nbinput·docutils·container">
182 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[3]:181 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[3]:
183 </pre></div>182 </pre></div>
184 </div>183 </div>
Offset 239, 90 lines modifiedOffset 238, 90 lines modified
239 </pre></div></div>238 </pre></div></div>
240 </div>239 </div>
241 <div·class="nboutput·docutils·container">240 <div·class="nboutput·docutils·container">
242 <div·class="prompt·empty·docutils·container">241 <div·class="prompt·empty·docutils·container">
243 </div>242 </div>
244 <div·class="output_area·docutils·container">243 <div·class="output_area·docutils·container">
245 <div·class="highlight"><pre>244 <div·class="highlight"><pre>
246 Error·in·callback·&lt;function·_draw_all_if_interactive·at·0x7f70eb9525c0&gt;·(for·post_execute),·with·arguments·args·(),kwargs·{}:245 Error·in·callback·&lt;function·_draw_all_if_interactive·at·0x7f2ccaf6e480&gt;·(for·post_execute),·with·arguments·args·(),kwargs·{}:
247 </pre></div></div>246 </pre></div></div>
248 </div>247 </div>
249 <div·class="nboutput·docutils·container">248 <div·class="nboutput·docutils·container">
250 <div·class="prompt·empty·docutils·container">249 <div·class="prompt·empty·docutils·container">
251 </div>250 </div>
252 <div·class="output_area·docutils·container">251 <div·class="output_area·docutils·container">
253 <div·class="highlight"><pre>252 <div·class="highlight"><pre>
254 <span·class="ansi-red-fg">---------------------------------------------------------------------------</span>253 <span·class="ansi-red-fg">---------------------------------------------------------------------------</span>
255 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)254 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)
256 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>255 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>
257 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:256 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:
258 <span·class="ansi-green-fg">--&gt;·724</span>·····<span·class="ansi-yellow-bg">os</span><span·class="ansi-yellow-bg"·style="color:·rgb(98,98,98)">.</span><span·class="ansi-yellow-bg">mkdir</span><span·class="ansi-yellow-bg">(</span><span·class="ansi-yellow-bg"·style="color:·rgb(0,135,0)">self</span><span·class="ansi-yellow-bg">,</span><span·class="ansi-yellow-bg">·</span><span·class="ansi-yellow-bg">mode</span><span·class="ansi-yellow-bg">)</span>257 <span·class="ansi-green-fg">--&gt;·724</span>·····<span·class="ansi-yellow-bg">os</span><span·class="ansi-yellow-bg"·style="color:·rgb(98,98,98)">.</span><span·class="ansi-yellow-bg">mkdir</span><span·class="ansi-yellow-bg">(</span><span·class="ansi-yellow-bg"·style="color:·rgb(0,135,0)">self</span><span·class="ansi-yellow-bg">,</span><span·class="ansi-yellow-bg">·</span><span·class="ansi-yellow-bg">mode</span><span·class="ansi-yellow-bg">)</span>
259 <span·class="ansi-green-intense-fg·ansi-bold">····725</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">except</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">FileNotFoundError</span>:258 <span·class="ansi-green-intense-fg·ansi-bold">····725</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">except</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">FileNotFoundError</span>:
  
260 <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·&#39;/nonexistent/first-build/.local/share/cartopy/shapefiles/natural_earth/physical&#39;259 <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·&#39;/nonexistent/second-build/.local/share/cartopy/shapefiles/natural_earth/physical&#39;
  
261 During·handling·of·the·above·exception,·another·exception·occurred:260 During·handling·of·the·above·exception,·another·exception·occurred:
  
262 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)261 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)
263 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>262 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>
264 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:263 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:
265 <span·class="ansi-green-fg">--&gt;·724</span>·····<span·class="ansi-yellow-bg">os</span><span·class="ansi-yellow-bg"·style="color:·rgb(98,98,98)">.</span><span·class="ansi-yellow-bg">mkdir</span><span·class="ansi-yellow-bg">(</span><span·class="ansi-yellow-bg"·style="color:·rgb(0,135,0)">self</span><span·class="ansi-yellow-bg">,</span><span·class="ansi-yellow-bg">·</span><span·class="ansi-yellow-bg">mode</span><span·class="ansi-yellow-bg">)</span>264 <span·class="ansi-green-fg">--&gt;·724</span>·····<span·class="ansi-yellow-bg">os</span><span·class="ansi-yellow-bg"·style="color:·rgb(98,98,98)">.</span><span·class="ansi-yellow-bg">mkdir</span><span·class="ansi-yellow-bg">(</span><span·class="ansi-yellow-bg"·style="color:·rgb(0,135,0)">self</span><span·class="ansi-yellow-bg">,</span><span·class="ansi-yellow-bg">·</span><span·class="ansi-yellow-bg">mode</span><span·class="ansi-yellow-bg">)</span>
266 <span·class="ansi-green-intense-fg·ansi-bold">····725</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">except</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">FileNotFoundError</span>:265 <span·class="ansi-green-intense-fg·ansi-bold">····725</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">except</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">FileNotFoundError</span>:
  
267 <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·&#39;/nonexistent/first-build/.local/share/cartopy/shapefiles/natural_earth&#39;266 <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·&#39;/nonexistent/second-build/.local/share/cartopy/shapefiles/natural_earth&#39;
  
268 During·handling·of·the·above·exception,·another·exception·occurred:267 During·handling·of·the·above·exception,·another·exception·occurred:
  
269 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)268 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)
270 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>269 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>
271 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:270 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:
272 <span·class="ansi-green-fg">--&gt;·724</span>·····<span·class="ansi-yellow-bg">os</span><span·class="ansi-yellow-bg"·style="color:·rgb(98,98,98)">.</span><span·class="ansi-yellow-bg">mkdir</span><span·class="ansi-yellow-bg">(</span><span·class="ansi-yellow-bg"·style="color:·rgb(0,135,0)">self</span><span·class="ansi-yellow-bg">,</span><span·class="ansi-yellow-bg">·</span><span·class="ansi-yellow-bg">mode</span><span·class="ansi-yellow-bg">)</span>271 <span·class="ansi-green-fg">--&gt;·724</span>·····<span·class="ansi-yellow-bg">os</span><span·class="ansi-yellow-bg"·style="color:·rgb(98,98,98)">.</span><span·class="ansi-yellow-bg">mkdir</span><span·class="ansi-yellow-bg">(</span><span·class="ansi-yellow-bg"·style="color:·rgb(0,135,0)">self</span><span·class="ansi-yellow-bg">,</span><span·class="ansi-yellow-bg">·</span><span·class="ansi-yellow-bg">mode</span><span·class="ansi-yellow-bg">)</span>
273 <span·class="ansi-green-intense-fg·ansi-bold">····725</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">except</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">FileNotFoundError</span>:272 <span·class="ansi-green-intense-fg·ansi-bold">····725</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">except</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">FileNotFoundError</span>:
  
274 <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·&#39;/nonexistent/first-build/.local/share/cartopy/shapefiles&#39;273 <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·&#39;/nonexistent/second-build/.local/share/cartopy/shapefiles&#39;
  
275 During·handling·of·the·above·exception,·another·exception·occurred:274 During·handling·of·the·above·exception,·another·exception·occurred:
  
276 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)275 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)
277 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>276 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>
278 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:277 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:
279 <span·class="ansi-green-fg">--&gt;·724</span>·····<span·class="ansi-yellow-bg">os</span><span·class="ansi-yellow-bg"·style="color:·rgb(98,98,98)">.</span><span·class="ansi-yellow-bg">mkdir</span><span·class="ansi-yellow-bg">(</span><span·class="ansi-yellow-bg"·style="color:·rgb(0,135,0)">self</span><span·class="ansi-yellow-bg">,</span><span·class="ansi-yellow-bg">·</span><span·class="ansi-yellow-bg">mode</span><span·class="ansi-yellow-bg">)</span>278 <span·class="ansi-green-fg">--&gt;·724</span>·····<span·class="ansi-yellow-bg">os</span><span·class="ansi-yellow-bg"·style="color:·rgb(98,98,98)">.</span><span·class="ansi-yellow-bg">mkdir</span><span·class="ansi-yellow-bg">(</span><span·class="ansi-yellow-bg"·style="color:·rgb(0,135,0)">self</span><span·class="ansi-yellow-bg">,</span><span·class="ansi-yellow-bg">·</span><span·class="ansi-yellow-bg">mode</span><span·class="ansi-yellow-bg">)</span>
280 <span·class="ansi-green-intense-fg·ansi-bold">····725</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">except</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">FileNotFoundError</span>:279 <span·class="ansi-green-intense-fg·ansi-bold">····725</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">except</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">FileNotFoundError</span>:
  
281 <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·&#39;/nonexistent/first-build/.local/share/cartopy&#39;280 <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·&#39;/nonexistent/second-build/.local/share/cartopy&#39;
  
282 During·handling·of·the·above·exception,·another·exception·occurred:281 During·handling·of·the·above·exception,·another·exception·occurred:
  
283 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)282 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)
284 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>283 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>
285 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:284 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:
286 <span·class="ansi-green-fg">--&gt;·724</span>·····<span·class="ansi-yellow-bg">os</span><span·class="ansi-yellow-bg"·style="color:·rgb(98,98,98)">.</span><span·class="ansi-yellow-bg">mkdir</span><span·class="ansi-yellow-bg">(</span><span·class="ansi-yellow-bg"·style="color:·rgb(0,135,0)">self</span><span·class="ansi-yellow-bg">,</span><span·class="ansi-yellow-bg">·</span><span·class="ansi-yellow-bg">mode</span><span·class="ansi-yellow-bg">)</span>285 <span·class="ansi-green-fg">--&gt;·724</span>·····<span·class="ansi-yellow-bg">os</span><span·class="ansi-yellow-bg"·style="color:·rgb(98,98,98)">.</span><span·class="ansi-yellow-bg">mkdir</span><span·class="ansi-yellow-bg">(</span><span·class="ansi-yellow-bg"·style="color:·rgb(0,135,0)">self</span><span·class="ansi-yellow-bg">,</span><span·class="ansi-yellow-bg">·</span><span·class="ansi-yellow-bg">mode</span><span·class="ansi-yellow-bg">)</span>
287 <span·class="ansi-green-intense-fg·ansi-bold">····725</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">except</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">FileNotFoundError</span>:286 <span·class="ansi-green-intense-fg·ansi-bold">····725</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">except</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">FileNotFoundError</span>:
  
288 <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·&#39;/nonexistent/first-build/.local/share&#39;287 <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·&#39;/nonexistent/second-build/.local/share&#39;
  
289 During·handling·of·the·above·exception,·another·exception·occurred:288 During·handling·of·the·above·exception,·another·exception·occurred:
  
290 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)289 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)
291 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>290 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>
292 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:291 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:
293 <span·class="ansi-green-fg">--&gt;·724</span>·····<span·class="ansi-yellow-bg">os</span><span·class="ansi-yellow-bg"·style="color:·rgb(98,98,98)">.</span><span·class="ansi-yellow-bg">mkdir</span><span·class="ansi-yellow-bg">(</span><span·class="ansi-yellow-bg"·style="color:·rgb(0,135,0)">self</span><span·class="ansi-yellow-bg">,</span><span·class="ansi-yellow-bg">·</span><span·class="ansi-yellow-bg">mode</span><span·class="ansi-yellow-bg">)</span>292 <span·class="ansi-green-fg">--&gt;·724</span>·····<span·class="ansi-yellow-bg">os</span><span·class="ansi-yellow-bg"·style="color:·rgb(98,98,98)">.</span><span·class="ansi-yellow-bg">mkdir</span><span·class="ansi-yellow-bg">(</span><span·class="ansi-yellow-bg"·style="color:·rgb(0,135,0)">self</span><span·class="ansi-yellow-bg">,</span><span·class="ansi-yellow-bg">·</span><span·class="ansi-yellow-bg">mode</span><span·class="ansi-yellow-bg">)</span>
294 <span·class="ansi-green-intense-fg·ansi-bold">····725</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">except</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">FileNotFoundError</span>:293 <span·class="ansi-green-intense-fg·ansi-bold">····725</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">except</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">FileNotFoundError</span>:
  
295 <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·&#39;/nonexistent/first-build/.local&#39;294 <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·&#39;/nonexistent/second-build/.local&#39;
  
296 During·handling·of·the·above·exception,·another·exception·occurred:295 During·handling·of·the·above·exception,·another·exception·occurred:
  
297 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)296 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)
298 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>297 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>
299 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:298 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:
300 <span·class="ansi-green-fg">--&gt;·724</span>·····<span·class="ansi-yellow-bg">os</span><span·class="ansi-yellow-bg"·style="color:·rgb(98,98,98)">.</span><span·class="ansi-yellow-bg">mkdir</span><span·class="ansi-yellow-bg">(</span><span·class="ansi-yellow-bg"·style="color:·rgb(0,135,0)">self</span><span·class="ansi-yellow-bg">,</span><span·class="ansi-yellow-bg">·</span><span·class="ansi-yellow-bg">mode</span><span·class="ansi-yellow-bg">)</span>299 <span·class="ansi-green-fg">--&gt;·724</span>·····<span·class="ansi-yellow-bg">os</span><span·class="ansi-yellow-bg"·style="color:·rgb(98,98,98)">.</span><span·class="ansi-yellow-bg">mkdir</span><span·class="ansi-yellow-bg">(</span><span·class="ansi-yellow-bg"·style="color:·rgb(0,135,0)">self</span><span·class="ansi-yellow-bg">,</span><span·class="ansi-yellow-bg">·</span><span·class="ansi-yellow-bg">mode</span><span·class="ansi-yellow-bg">)</span>
301 <span·class="ansi-green-intense-fg·ansi-bold">····725</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">except</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">FileNotFoundError</span>:300 <span·class="ansi-green-intense-fg·ansi-bold">····725</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">except</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">FileNotFoundError</span>:
  
302 <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·&#39;/nonexistent/first-build&#39;301 <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·&#39;/nonexistent/second-build&#39;
  
303 During·handling·of·the·above·exception,·another·exception·occurred:302 During·handling·of·the·above·exception,·another·exception·occurred:
  
304 <span·class="ansi-red-fg">PermissionError</span>···························Traceback·(most·recent·call·last)303 <span·class="ansi-red-fg">PermissionError</span>···························Traceback·(most·recent·call·last)
305 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/matplotlib/pyplot.py:197</span>,·in·<span·class="ansi-cyan-fg">_draw_all_if_interactive</span><span·class="ansi-blue-fg">()</span>304 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/matplotlib/pyplot.py:197</span>,·in·<span·class="ansi-cyan-fg">_draw_all_if_interactive</span><span·class="ansi-blue-fg">()</span>
306 <span·class="ansi-green-intense-fg·ansi-bold">····195</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">def</span>·<span·style="color:·rgb(0,0,255)">_draw_all_if_interactive</span>()·<span·style="color:·rgb(98,98,98)">-</span><span·style="color:·rgb(98,98,98)">&gt;</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:305 <span·class="ansi-green-intense-fg·ansi-bold">····195</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">def</span>·<span·style="color:·rgb(0,0,255)">_draw_all_if_interactive</span>()·<span·style="color:·rgb(98,98,98)">-</span><span·style="color:·rgb(98,98,98)">&gt;</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:
307 <span·class="ansi-green-intense-fg·ansi-bold">····196</span>·····<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·matplotlib<span·style="color:·rgb(98,98,98)">.</span>is_interactive():306 <span·class="ansi-green-intense-fg·ansi-bold">····196</span>·····<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·matplotlib<span·style="color:·rgb(98,98,98)">.</span>is_interactive():
Offset 531, 75 lines modifiedOffset 530, 75 lines modified
531 <span·class="ansi-red-fg">---------------------------------------------------------------------------</span>530 <span·class="ansi-red-fg">---------------------------------------------------------------------------</span>
532 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)531 <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last)
533 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>532 File·<span·class="ansi-green-fg">/usr/lib/python3.13/pathlib/_local.py:724</span>,·in·<span·class="ansi-cyan-fg">Path.mkdir</span><span·class="ansi-blue-fg">(self,·mode,·parents,·exist_ok)</span>
534 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:533 <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>:
Max diff block lines reached; 9978/26305 bytes (37.93%) of diff not shown.
9.64 KB
html2text {}
    
Offset 2, 15 lines modifiedOffset 2, 14 lines modified
2 *\x8**\x8**\x8**\x8**\x8**\x8*·G\x8GR\x8RI\x8IB\x8B·D\x8Da\x8at\x8ta\x8a·E\x8Ex\x8xa\x8am\x8mp\x8pl\x8le\x8e_\x8?\x8·*\x8**\x8**\x8**\x8**\x8**\x8*2 *\x8**\x8**\x8**\x8**\x8**\x8*·G\x8GR\x8RI\x8IB\x8B·D\x8Da\x8at\x8ta\x8a·E\x8Ex\x8xa\x8am\x8mp\x8pl\x8le\x8e_\x8?\x8·*\x8**\x8**\x8**\x8**\x8**\x8*
3 GRIB·format·is·commonly·used·to·disseminate·atmospheric·model·data.·With·xarray3 GRIB·format·is·commonly·used·to·disseminate·atmospheric·model·data.·With·xarray
4 and·the·cfgrib·engine,·GRIB·data·can·easily·be·analyzed·and·visualized.4 and·the·cfgrib·engine,·GRIB·data·can·easily·be·analyzed·and·visualized.
5 [1]:5 [1]:
6 import·xarray·as·xr6 import·xarray·as·xr
7 import·matplotlib.pyplot·as·plt7 import·matplotlib.pyplot·as·plt
8 Fontconfig·error:·No·writable·cache·directories8 Fontconfig·error:·No·writable·cache·directories
9 Matplotlib·is·building·the·font·cache;·this·may·take·a·moment. 
10 To·read·GRIB·data,·you·can·use·xarray.load_dataset.·The·only·extra·code·you9 To·read·GRIB·data,·you·can·use·xarray.load_dataset.·The·only·extra·code·you
11 need·is·to·specify·the·engine·as·cfgrib.10 need·is·to·specify·the·engine·as·cfgrib.
12 [2]:11 [2]:
13 ds·=·xr.tutorial.load_dataset("era5-2mt-2019-03-uk.grib",·engine="cfgrib")12 ds·=·xr.tutorial.load_dataset("era5-2mt-2019-03-uk.grib",·engine="cfgrib")
14 ---------------------------------------------------------------------------13 ---------------------------------------------------------------------------
15 PermissionError···························Traceback·(most·recent·call·last)14 PermissionError···························Traceback·(most·recent·call·last)
16 File·/usr/lib/python3/dist-packages/pooch/utils.py:262,·in·make_local_storage15 File·/usr/lib/python3/dist-packages/pooch/utils.py:262,·in·make_local_storage
Offset 100, 15 lines modifiedOffset 99, 15 lines modified
100 ····273·····message.append(99 ····273·····message.append(
101 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different100 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different
102 location."101 location."
103 ····275·····)102 ····275·····)
104 -->·276·raise·PermissionError("·".join(message))·from·error103 -->·276·raise·PermissionError("·".join(message))·from·error
  
105 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not104 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
106 create·data·cache·folder·'/nonexistent/first-build/.cache/105 create·data·cache·folder·'/nonexistent/second-build/.cache/
107 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.106 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
108 Let’s·create·a·simple·plot·of·2-m·air·temperature·in·degrees·Celsius:107 Let’s·create·a·simple·plot·of·2-m·air·temperature·in·degrees·Celsius:
109 [3]:108 [3]:
110 ds·=·ds·-·273.15109 ds·=·ds·-·273.15
111 ds.t2m[0].plot(cmap=plt.cm.coolwarm)110 ds.t2m[0].plot(cmap=plt.cm.coolwarm)
112 ---------------------------------------------------------------------------111 ---------------------------------------------------------------------------
113 NameError·································Traceback·(most·recent·call·last)112 NameError·································Traceback·(most·recent·call·last)
Offset 139, 97 lines modifiedOffset 138, 97 lines modified
139 ---->·7·plot·=·ds.t2m[0].plot(138 ---->·7·plot·=·ds.t2m[0].plot(
140 ······8·····cmap=plt.cm.coolwarm,·transform=ccrs.PlateCarree(),·cbar_kwargs=139 ······8·····cmap=plt.cm.coolwarm,·transform=ccrs.PlateCarree(),·cbar_kwargs=
141 {"shrink":·0.6}140 {"shrink":·0.6}
142 ······9·)141 ······9·)
143 ·····10·plt.title("ERA5·-·2m·temperature·British·Isles·March·2019")142 ·····10·plt.title("ERA5·-·2m·temperature·British·Isles·March·2019")
  
144 NameError:·name·'ds'·is·not·defined143 NameError:·name·'ds'·is·not·defined
145 Error·in·callback·<function·_draw_all_if_interactive·at·0x7f70eb9525c0>·(for144 Error·in·callback·<function·_draw_all_if_interactive·at·0x7f2ccaf6e480>·(for
146 post_execute),·with·arguments·args·(),kwargs·{}:145 post_execute),·with·arguments·args·(),kwargs·{}:
147 ---------------------------------------------------------------------------146 ---------------------------------------------------------------------------
148 FileNotFoundError·························Traceback·(most·recent·call·last)147 FileNotFoundError·························Traceback·(most·recent·call·last)
149 File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode,148 File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode,
150 parents,·exist_ok)149 parents,·exist_ok)
151 ····723·try:150 ····723·try:
152 -->·724·····os.mkdir(self,·mode)151 -->·724·····os.mkdir(self,·mode)
153 ····725·except·FileNotFoundError:152 ····725·except·FileNotFoundError:
  
154 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/first-153 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-
155 build/.local/share/cartopy/shapefiles/natural_earth/physical'154 build/.local/share/cartopy/shapefiles/natural_earth/physical'
  
156 During·handling·of·the·above·exception,·another·exception·occurred:155 During·handling·of·the·above·exception,·another·exception·occurred:
  
157 FileNotFoundError·························Traceback·(most·recent·call·last)156 FileNotFoundError·························Traceback·(most·recent·call·last)
158 File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode,157 File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode,
159 parents,·exist_ok)158 parents,·exist_ok)
160 ····723·try:159 ····723·try:
161 -->·724·····os.mkdir(self,·mode)160 -->·724·····os.mkdir(self,·mode)
162 ····725·except·FileNotFoundError:161 ····725·except·FileNotFoundError:
  
163 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/first-162 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-
164 build/.local/share/cartopy/shapefiles/natural_earth'163 build/.local/share/cartopy/shapefiles/natural_earth'
  
165 During·handling·of·the·above·exception,·another·exception·occurred:164 During·handling·of·the·above·exception,·another·exception·occurred:
  
166 FileNotFoundError·························Traceback·(most·recent·call·last)165 FileNotFoundError·························Traceback·(most·recent·call·last)
167 File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode,166 File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode,
168 parents,·exist_ok)167 parents,·exist_ok)
169 ····723·try:168 ····723·try:
170 -->·724·····os.mkdir(self,·mode)169 -->·724·····os.mkdir(self,·mode)
171 ····725·except·FileNotFoundError:170 ····725·except·FileNotFoundError:
  
172 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/first-171 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-
173 build/.local/share/cartopy/shapefiles'172 build/.local/share/cartopy/shapefiles'
  
174 During·handling·of·the·above·exception,·another·exception·occurred:173 During·handling·of·the·above·exception,·another·exception·occurred:
  
175 FileNotFoundError·························Traceback·(most·recent·call·last)174 FileNotFoundError·························Traceback·(most·recent·call·last)
176 File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode,175 File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode,
177 parents,·exist_ok)176 parents,·exist_ok)
178 ····723·try:177 ····723·try:
179 -->·724·····os.mkdir(self,·mode)178 -->·724·····os.mkdir(self,·mode)
180 ····725·except·FileNotFoundError:179 ····725·except·FileNotFoundError:
  
181 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/first-180 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-
182 build/.local/share/cartopy'181 build/.local/share/cartopy'
  
183 During·handling·of·the·above·exception,·another·exception·occurred:182 During·handling·of·the·above·exception,·another·exception·occurred:
  
184 FileNotFoundError·························Traceback·(most·recent·call·last)183 FileNotFoundError·························Traceback·(most·recent·call·last)
185 File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode,184 File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode,
186 parents,·exist_ok)185 parents,·exist_ok)
187 ····723·try:186 ····723·try:
188 -->·724·····os.mkdir(self,·mode)187 -->·724·····os.mkdir(self,·mode)
189 ····725·except·FileNotFoundError:188 ····725·except·FileNotFoundError:
  
190 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/first-189 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-
191 build/.local/share'190 build/.local/share'
  
192 During·handling·of·the·above·exception,·another·exception·occurred:191 During·handling·of·the·above·exception,·another·exception·occurred:
  
193 FileNotFoundError·························Traceback·(most·recent·call·last)192 FileNotFoundError·························Traceback·(most·recent·call·last)
194 File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode,193 File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode,
195 parents,·exist_ok)194 parents,·exist_ok)
196 ····723·try:195 ····723·try:
197 -->·724·····os.mkdir(self,·mode)196 -->·724·····os.mkdir(self,·mode)
198 ····725·except·FileNotFoundError:197 ····725·except·FileNotFoundError:
  
199 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/first-198 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-
200 build/.local'199 build/.local'
  
201 During·handling·of·the·above·exception,·another·exception·occurred:200 During·handling·of·the·above·exception,·another·exception·occurred:
  
202 FileNotFoundError·························Traceback·(most·recent·call·last)201 FileNotFoundError·························Traceback·(most·recent·call·last)
203 File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode,202 File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode,
204 parents,·exist_ok)203 parents,·exist_ok)
205 ····723·try:204 ····723·try:
206 -->·724·····os.mkdir(self,·mode)205 -->·724·····os.mkdir(self,·mode)
207 ····725·except·FileNotFoundError:206 ····725·except·FileNotFoundError:
  
208 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/first-207 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-
209 build'208 build'
  
210 During·handling·of·the·above·exception,·another·exception·occurred:209 During·handling·of·the·above·exception,·another·exception·occurred:
  
211 PermissionError···························Traceback·(most·recent·call·last)210 PermissionError···························Traceback·(most·recent·call·last)
Max diff block lines reached; 3873/9846 bytes (39.34%) of diff not shown.
44.1 KB
./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz
44.0 KB
ERA5-GRIB-example.ipynb
43.9 KB
Pretty-printed
Similarity: 0.9978022005440433% Differences: {"'cells'": "{2: {'metadata': {'execution': {'iopub.execute_input': '2026-03-15T16:11:07.609201Z', " "'iopub.status.busy': '2026-03-15T16:11:07.608793Z', 'iopub.status.idle': " "'2026-03-15T16:11:13.658860Z', 'shell.execute_reply': " "'2026-03-15T16:11:13.654731Z'}}, 'outputs': {delete: [1]}}, 4: {'metadata': " "{'execution': {'iopub.execute_input': '2026-03-15T16:11:13.678743Z', " "'iopub.status.busy': '2026-03-15T16:11:13.677219Z', 'iopub.status. […]
    
Offset 15, 34 lines modifiedOffset 15, 27 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-02-10T07:23:18.692270Z",22 ····················"iopub.execute_input":·"2026-03-15T16:11:07.609201Z",
23 ····················"iopub.status.busy":·"2025-02-10T07:23:18.691725Z",23 ····················"iopub.status.busy":·"2026-03-15T16:11:07.608793Z",
24 ····················"iopub.status.idle":·"2025-02-10T07:23:34.702581Z",24 ····················"iopub.status.idle":·"2026-03-15T16:11:13.658860Z",
25 ····················"shell.execute_reply":·"2025-02-10T07:23:34.686511Z"25 ····················"shell.execute_reply":·"2026-03-15T16:11:13.654731Z"
26 ················}26 ················}
27 ············},27 ············},
28 ············"outputs":·[28 ············"outputs":·[
29 ················{29 ················{
30 ····················"name":·"stderr",30 ····················"name":·"stderr",
31 ····················"output_type":·"stream",31 ····················"output_type":·"stream",
32 ····················"text":·[32 ····················"text":·[
33 ························"Fontconfig·error:·No·writable·cache·directories\n"33 ························"Fontconfig·error:·No·writable·cache·directories\n"
34 ····················]34 ····················]
35 ················}, 
36 ················{ 
37 ····················"name":·"stderr", 
38 ····················"output_type":·"stream", 
39 ····················"text":·[ 
40 ························"Matplotlib·is·building·the·font·cache;·this·may·take·a·moment.\n" 
41 ····················] 
42 ················}35 ················}
43 ············],36 ············],
44 ············"source":·[37 ············"source":·[
45 ················"import·xarray·as·xr\n",38 ················"import·xarray·as·xr\n",
46 ················"import·matplotlib.pyplot·as·plt"39 ················"import·matplotlib.pyplot·as·plt"
47 ············]40 ············]
48 ········},41 ········},
Offset 54, 24 lines modifiedOffset 47, 24 lines modified
54 ············]47 ············]
55 ········},48 ········},
56 ········{49 ········{
57 ············"cell_type":·"code",50 ············"cell_type":·"code",
58 ············"execution_count":·2,51 ············"execution_count":·2,
59 ············"metadata":·{52 ············"metadata":·{
60 ················"execution":·{53 ················"execution":·{
61 ····················"iopub.execute_input":·"2025-02-10T07:23:34.720979Z",54 ····················"iopub.execute_input":·"2026-03-15T16:11:13.678743Z",
62 ····················"iopub.status.busy":·"2025-02-10T07:23:34.720060Z",55 ····················"iopub.status.busy":·"2026-03-15T16:11:13.677219Z",
63 ····················"iopub.status.idle":·"2025-02-10T07:23:38.658620Z",56 ····················"iopub.status.idle":·"2026-03-15T16:11:17.062879Z",
64 ····················"shell.execute_reply":·"2025-02-10T07:23:38.642551Z"57 ····················"shell.execute_reply":·"2026-03-15T16:11:17.053614Z"
65 ················}58 ················}
66 ············},59 ············},
67 ············"outputs":·[60 ············"outputs":·[
68 ················{61 ················{
69 ····················"ename":·"PermissionError",62 ····················"ename":·"PermissionError",
70 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",63 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",
71 ····················"output_type":·"error",64 ····················"output_type":·"error",
72 ····················"traceback":·[65 ····················"traceback":·[
73 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",66 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
74 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",67 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
75 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",68 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",
76 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",69 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
77 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",70 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
Offset 81, 15 lines modifiedOffset 74, 15 lines modified
81 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",74 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",
82 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",75 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
83 ························"Cell·\u001b[0;32mIn[2],·line·1\u001b[0m\n\u001b[0;32m---->·1\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mera5-2mt-2019-03-uk.grib\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mengine\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mcfgrib\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n",76 ························"Cell·\u001b[0;32mIn[2],·line·1\u001b[0m\n\u001b[0;32m---->·1\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mera5-2mt-2019-03-uk.grib\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mengine\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mcfgrib\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n",
84 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:213\u001b[0m,·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····176\u001b[0m·\u001b[38;5;28;01mdef\u001b[39;00m·\u001b[38;5;21mload_dataset\u001b[39m(\u001b[38;5;241m*\u001b[39margs,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)·\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m·Dataset:\n\u001b[1;32m····177\u001b[0m·\u001b[38;5;250m····\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m····178\u001b[0m·\u001b[38;5;124;03m····Open,·load·into·memory,·and·close·a·dataset·from·the·online·repository\u001b[39;00m\n\u001b[1;32m····179\u001b[0m·\u001b[38;5;124;03m····(requires·internet).\u001b[39;00m\n\u001b[0;32m···(...)\u001b[0m\n\u001b[1;32m····211\u001b[0m·\u001b[38;5;124;03m····load_dataset\u001b[39;00m\n\u001b[1;32m····212\u001b[0m·\u001b[38;5;124;03m····\"\"\"\u001b[39;00m\n\u001b[0;32m-->·213\u001b[0m·····\u001b[38;5;28;01mwith\u001b[39;00m·\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m·\u001b[38;5;28;01mas\u001b[39;00m·ds:\n\u001b[1;32m····214\u001b[0m·········\u001b[38;5;28;01mreturn\u001b[39;00m·ds\u001b[38;5;241m.\u001b[39mload()\n",77 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:213\u001b[0m,·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····176\u001b[0m·\u001b[38;5;28;01mdef\u001b[39;00m·\u001b[38;5;21mload_dataset\u001b[39m(\u001b[38;5;241m*\u001b[39margs,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)·\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m·Dataset:\n\u001b[1;32m····177\u001b[0m·\u001b[38;5;250m····\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m····178\u001b[0m·\u001b[38;5;124;03m····Open,·load·into·memory,·and·close·a·dataset·from·the·online·repository\u001b[39;00m\n\u001b[1;32m····179\u001b[0m·\u001b[38;5;124;03m····(requires·internet).\u001b[39;00m\n\u001b[0;32m···(...)\u001b[0m\n\u001b[1;32m····211\u001b[0m·\u001b[38;5;124;03m····load_dataset\u001b[39;00m\n\u001b[1;32m····212\u001b[0m·\u001b[38;5;124;03m····\"\"\"\u001b[39;00m\n\u001b[0;32m-->·213\u001b[0m·····\u001b[38;5;28;01mwith\u001b[39;00m·\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m·\u001b[38;5;28;01mas\u001b[39;00m·ds:\n\u001b[1;32m····214\u001b[0m·········\u001b[38;5;28;01mreturn\u001b[39;00m·ds\u001b[38;5;241m.\u001b[39mload()\n",
85 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",78 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",
86 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",79 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",
87 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",80 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",
88 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."81 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."
89 ····················]82 ····················]
90 ················}83 ················}
91 ············],84 ············],
92 ············"source":·[85 ············"source":·[
93 ················"ds·=·xr.tutorial.load_dataset(\"era5-2mt-2019-03-uk.grib\",·engine=\"cfgrib\")"86 ················"ds·=·xr.tutorial.load_dataset(\"era5-2mt-2019-03-uk.grib\",·engine=\"cfgrib\")"
94 ············]87 ············]
95 ········},88 ········},
Offset 101, 18 lines modifiedOffset 94, 18 lines modified
101 ············]94 ············]
102 ········},95 ········},
103 ········{96 ········{
104 ············"cell_type":·"code",97 ············"cell_type":·"code",
105 ············"execution_count":·3,98 ············"execution_count":·3,
106 ············"metadata":·{99 ············"metadata":·{
107 ················"execution":·{100 ················"execution":·{
108 ····················"iopub.execute_input":·"2025-02-10T07:23:38.676426Z",101 ····················"iopub.execute_input":·"2026-03-15T16:11:17.076178Z",
109 ····················"iopub.status.busy":·"2025-02-10T07:23:38.675866Z",102 ····················"iopub.status.busy":·"2026-03-15T16:11:17.075431Z",
110 ····················"iopub.status.idle":·"2025-02-10T07:23:38.830613Z",103 ····················"iopub.status.idle":·"2026-03-15T16:11:17.158085Z",
111 ····················"shell.execute_reply":·"2025-02-10T07:23:38.814531Z"104 ····················"shell.execute_reply":·"2026-03-15T16:11:17.157198Z"
112 ················}105 ················}
113 ············},106 ············},
114 ············"outputs":·[107 ············"outputs":·[
115 ················{108 ················{
116 ····················"ename":·"NameError",109 ····················"ename":·"NameError",
117 ····················"evalue":·"name·'ds'·is·not·defined",110 ····················"evalue":·"name·'ds'·is·not·defined",
118 ····················"output_type":·"error",111 ····················"output_type":·"error",
Offset 137, 18 lines modifiedOffset 130, 18 lines modified
137 ············]130 ············]
138 ········},131 ········},
139 ········{132 ········{
140 ············"cell_type":·"code",133 ············"cell_type":·"code",
141 ············"execution_count":·4,134 ············"execution_count":·4,
142 ············"metadata":·{135 ············"metadata":·{
143 ················"execution":·{136 ················"execution":·{
144 ····················"iopub.execute_input":·"2025-02-10T07:23:38.848489Z",137 ····················"iopub.execute_input":·"2026-03-15T16:11:17.175872Z",
145 ····················"iopub.status.busy":·"2025-02-10T07:23:38.847872Z",138 ····················"iopub.status.busy":·"2026-03-15T16:11:17.175394Z",
146 ····················"iopub.status.idle":·"2025-02-10T07:23:55.554455Z",139 ····················"iopub.status.idle":·"2026-03-15T16:11:25.611153Z",
147 ····················"shell.execute_reply":·"2025-02-10T07:23:55.542488Z"140 ····················"shell.execute_reply":·"2026-03-15T16:11:25.609356Z"
148 ················}141 ················}
149 ············},142 ············},
150 ············"outputs":·[143 ············"outputs":·[
151 ················{144 ················{
152 ····················"ename":·"NameError",145 ····················"ename":·"NameError",
153 ····················"evalue":·"name·'ds'·is·not·defined",146 ····················"evalue":·"name·'ds'·is·not·defined",
154 ····················"output_type":·"error",147 ····················"output_type":·"error",
Offset 159, 50 lines modifiedOffset 152, 50 lines modified
159 ························"\u001b[0;31mNameError\u001b[0m:·name·'ds'·is·not·defined"152 ························"\u001b[0;31mNameError\u001b[0m:·name·'ds'·is·not·defined"
160 ····················]153 ····················]
161 ················},154 ················},
162 ················{155 ················{
163 ····················"name":·"stdout",156 ····················"name":·"stdout",
164 ····················"output_type":·"stream",157 ····················"output_type":·"stream",
165 ····················"text":·[158 ····················"text":·[
166 ························"Error·in·callback·<function·_draw_all_if_interactive·at·0x7f70eb9525c0>·(for·post_execute),·with·arguments·args·(),kwargs·{}:\n"159 ························"Error·in·callback·<function·_draw_all_if_interactive·at·0x7f2ccaf6e480>·(for·post_execute),·with·arguments·args·(),kwargs·{}:\n"
167 ····················]160 ····················]
168 ················},161 ················},
169 ················{162 ················{
170 ····················"ename":·"PermissionError",163 ····················"ename":·"PermissionError",
171 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'",164 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'",
Max diff block lines reached; 28315/44405 bytes (63.77%) of diff not shown.
4.13 KB
./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html
    
Offset 191, 15 lines modifiedOffset 191, 15 lines modified
191 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>191 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>
192 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:192 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:
193 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(193 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(
194 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>194 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>
195 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)195 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)
196 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>196 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>
  
197 <span·class="ansi-red-fg">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.197 <span·class="ansi-red-fg">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.
198 </pre></div></div>198 </pre></div></div>
199 </div>199 </div>
200 </section>200 </section>
201 <section·id="Add-a-lazilly-calculated-vertical-coordinates">201 <section·id="Add-a-lazilly-calculated-vertical-coordinates">
202 <h2>Add·a·lazilly·calculated·vertical·coordinates<a·class="headerlink"·href="#Add-a-lazilly-calculated-vertical-coordinates"·title="Link·to·this·heading">¶</a></h2>202 <h2>Add·a·lazilly·calculated·vertical·coordinates<a·class="headerlink"·href="#Add-a-lazilly-calculated-vertical-coordinates"·title="Link·to·this·heading">¶</a></h2>
203 <p>Write·equations·to·calculate·the·vertical·coordinate.·These·will·be·only·evaluated·when·data·is·requested.·Information·about·the·ROMS·vertical·coordinate·can·be·found·(here)[<a·class="reference·external"·href="https://www.myroms.org/wiki/Vertical_S-coordinate">https://www.myroms.org/wiki/Vertical_S-coordinate</a>]</p>203 <p>Write·equations·to·calculate·the·vertical·coordinate.·These·will·be·only·evaluated·when·data·is·requested.·Information·about·the·ROMS·vertical·coordinate·can·be·found·(here)[<a·class="reference·external"·href="https://www.myroms.org/wiki/Vertical_S-coordinate">https://www.myroms.org/wiki/Vertical_S-coordinate</a>]</p>
204 <p>In·short,·for·<code·class="docutils·literal·notranslate"><span·class="pre">Vtransform==2</span></code>·as·used·in·this·example,</p>204 <p>In·short,·for·<code·class="docutils·literal·notranslate"><span·class="pre">Vtransform==2</span></code>·as·used·in·this·example,</p>
1.03 KB
html2text {}
    
Offset 131, 15 lines modifiedOffset 131, 15 lines modified
131 ····273·····message.append(131 ····273·····message.append(
132 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different132 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different
133 location."133 location."
134 ····275·····)134 ····275·····)
135 -->·276·raise·PermissionError("·".join(message))·from·error135 -->·276·raise·PermissionError("·".join(message))·from·error
  
136 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not136 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
137 create·data·cache·folder·'/nonexistent/first-build/.cache/137 create·data·cache·folder·'/nonexistent/second-build/.cache/
138 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.138 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
139 *\x8**\x8**\x8**\x8**\x8*·A\x8Ad\x8dd\x8d·a\x8a·l\x8la\x8az\x8zi\x8il\x8ll\x8ly\x8y·c\x8ca\x8al\x8lc\x8cu\x8ul\x8la\x8at\x8te\x8ed\x8d·v\x8ve\x8er\x8rt\x8ti\x8ic\x8ca\x8al\x8l·c\x8co\x8oo\x8or\x8rd\x8di\x8in\x8na\x8at\x8te\x8es\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*139 *\x8**\x8**\x8**\x8**\x8*·A\x8Ad\x8dd\x8d·a\x8a·l\x8la\x8az\x8zi\x8il\x8ll\x8ly\x8y·c\x8ca\x8al\x8lc\x8cu\x8ul\x8la\x8at\x8te\x8ed\x8d·v\x8ve\x8er\x8rt\x8ti\x8ic\x8ca\x8al\x8l·c\x8co\x8oo\x8or\x8rd\x8di\x8in\x8na\x8at\x8te\x8es\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
140 Write·equations·to·calculate·the·vertical·coordinate.·These·will·be·only140 Write·equations·to·calculate·the·vertical·coordinate.·These·will·be·only
141 evaluated·when·data·is·requested.·Information·about·the·ROMS·vertical141 evaluated·when·data·is·requested.·Information·about·the·ROMS·vertical
142 coordinate·can·be·found·(here)[_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8w_\x8w_\x8w_\x8._\x8m_\x8y_\x8r_\x8o_\x8m_\x8s_\x8._\x8o_\x8r_\x8g_\x8/_\x8w_\x8i_\x8k_\x8i_\x8/_\x8V_\x8e_\x8r_\x8t_\x8i_\x8c_\x8a_\x8l_\x8__\x8S_\x8-142 coordinate·can·be·found·(here)[_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8w_\x8w_\x8w_\x8._\x8m_\x8y_\x8r_\x8o_\x8m_\x8s_\x8._\x8o_\x8r_\x8g_\x8/_\x8w_\x8i_\x8k_\x8i_\x8/_\x8V_\x8e_\x8r_\x8t_\x8i_\x8c_\x8a_\x8l_\x8__\x8S_\x8-
143 _\x8c_\x8o_\x8o_\x8r_\x8d_\x8i_\x8n_\x8a_\x8t_\x8e]143 _\x8c_\x8o_\x8o_\x8r_\x8d_\x8i_\x8n_\x8a_\x8t_\x8e]
144 In·short,·for·Vtransform==2·as·used·in·this·example,144 In·short,·for·Vtransform==2·as·used·in·this·example,
17.3 KB
./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz
17.2 KB
ROMS_ocean_model.ipynb
17.1 KB
Pretty-printed
Similarity: 0.9987017463235294% Differences: {"'cells'": "{2: {'metadata': {'execution': {'iopub.execute_input': '2026-03-15T16:11:39.343796Z', " "'iopub.status.busy': '2026-03-15T16:11:39.343372Z', 'iopub.status.idle': " "'2026-03-15T16:11:46.205258Z', 'shell.execute_reply': " "'2026-03-15T16:11:46.204015Z'}}}, 5: {'metadata': {'execution': " "{'iopub.execute_input': '2026-03-15T16:11:46.224462Z', 'iopub.status.busy': " "'2026-03-15T16:11:46.223565Z', 'iopub.status.idle': '2026-03-15T16:11:4 […]
    
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-02-10T07:24:10.476830Z",24 ····················"iopub.execute_input":·"2026-03-15T16:11:39.343796Z",
25 ····················"iopub.status.busy":·"2025-02-10T07:24:10.476252Z",25 ····················"iopub.status.busy":·"2026-03-15T16:11:39.343372Z",
26 ····················"iopub.status.idle":·"2025-02-10T07:24:17.178680Z",26 ····················"iopub.status.idle":·"2026-03-15T16:11:46.205258Z",
27 ····················"shell.execute_reply":·"2025-02-10T07:24:17.166601Z"27 ····················"shell.execute_reply":·"2026-03-15T16:11:46.204015Z"
28 ················}28 ················}
29 ············},29 ············},
30 ············"outputs":·[],30 ············"outputs":·[],
31 ············"source":·[31 ············"source":·[
32 ················"import·numpy·as·np\n",32 ················"import·numpy·as·np\n",
33 ················"import·cartopy.crs·as·ccrs\n",33 ················"import·cartopy.crs·as·ccrs\n",
34 ················"import·cartopy.feature·as·cfeature\n",34 ················"import·cartopy.feature·as·cfeature\n",
Offset 75, 24 lines modifiedOffset 75, 24 lines modified
75 ············]75 ············]
76 ········},76 ········},
77 ········{77 ········{
78 ············"cell_type":·"code",78 ············"cell_type":·"code",
79 ············"execution_count":·2,79 ············"execution_count":·2,
80 ············"metadata":·{80 ············"metadata":·{
81 ················"execution":·{81 ················"execution":·{
82 ····················"iopub.execute_input":·"2025-02-10T07:24:17.199337Z",82 ····················"iopub.execute_input":·"2026-03-15T16:11:46.224462Z",
83 ····················"iopub.status.busy":·"2025-02-10T07:24:17.198223Z",83 ····················"iopub.status.busy":·"2026-03-15T16:11:46.223565Z",
84 ····················"iopub.status.idle":·"2025-02-10T07:24:20.070682Z",84 ····················"iopub.status.idle":·"2026-03-15T16:11:47.973362Z",
85 ····················"shell.execute_reply":·"2025-02-10T07:24:20.057335Z"85 ····················"shell.execute_reply":·"2026-03-15T16:11:47.971699Z"
86 ················}86 ················}
87 ············},87 ············},
88 ············"outputs":·[88 ············"outputs":·[
89 ················{89 ················{
90 ····················"ename":·"PermissionError",90 ····················"ename":·"PermissionError",
91 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",91 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",
92 ····················"output_type":·"error",92 ····················"output_type":·"error",
93 ····················"traceback":·[93 ····················"traceback":·[
94 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",94 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
95 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",95 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
96 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",96 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",
97 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",97 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
98 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",98 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
Offset 101, 15 lines modifiedOffset 101, 15 lines modified
101 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'",101 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'",
102 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",102 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",
103 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",103 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
104 ························"Cell·\u001b[0;32mIn[2],·line·2\u001b[0m\n\u001b[1;32m······1\u001b[0m·\u001b[38;5;66;03m#·load·in·the·file\u001b[39;00m\n\u001b[0;32m---->·2\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mROMS_example.nc\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mchunks\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m{\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mocean_time\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m·\u001b[49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[43m}\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m······4\u001b[0m·\u001b[38;5;66;03m#·This·is·a·way·to·turn·on·chunking·and·lazy·evaluation.·Opening·with·mfdataset,·or\u001b[39;00m\n\u001b[1;32m······5\u001b[0m·\u001b[38;5;66;03m#·setting·the·chunking·in·the·open_dataset·would·also·achieve·this.\u001b[39;00m\n\u001b[1;32m······6\u001b[0m·ds\n",104 ························"Cell·\u001b[0;32mIn[2],·line·2\u001b[0m\n\u001b[1;32m······1\u001b[0m·\u001b[38;5;66;03m#·load·in·the·file\u001b[39;00m\n\u001b[0;32m---->·2\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mROMS_example.nc\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mchunks\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m{\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mocean_time\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m·\u001b[49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[43m}\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m······4\u001b[0m·\u001b[38;5;66;03m#·This·is·a·way·to·turn·on·chunking·and·lazy·evaluation.·Opening·with·mfdataset,·or\u001b[39;00m\n\u001b[1;32m······5\u001b[0m·\u001b[38;5;66;03m#·setting·the·chunking·in·the·open_dataset·would·also·achieve·this.\u001b[39;00m\n\u001b[1;32m······6\u001b[0m·ds\n",
105 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",105 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",
106 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",106 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",
107 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",107 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",
108 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."108 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."
109 ····················]109 ····················]
110 ················}110 ················}
111 ············],111 ············],
112 ············"source":·[112 ············"source":·[
113 ················"#·load·in·the·file\n",113 ················"#·load·in·the·file\n",
114 ················"ds·=·xr.tutorial.open_dataset(\"ROMS_example.nc\",·chunks={\"ocean_time\":·1})\n",114 ················"ds·=·xr.tutorial.open_dataset(\"ROMS_example.nc\",·chunks={\"ocean_time\":·1})\n",
115 ················"\n",115 ················"\n",
Offset 136, 18 lines modifiedOffset 136, 18 lines modified
136 ············]136 ············]
137 ········},137 ········},
138 ········{138 ········{
139 ············"cell_type":·"code",139 ············"cell_type":·"code",
140 ············"execution_count":·3,140 ············"execution_count":·3,
141 ············"metadata":·{141 ············"metadata":·{
142 ················"execution":·{142 ················"execution":·{
143 ····················"iopub.execute_input":·"2025-02-10T07:24:20.097183Z",143 ····················"iopub.execute_input":·"2026-03-15T16:11:47.986760Z",
144 ····················"iopub.status.busy":·"2025-02-10T07:24:20.096596Z",144 ····················"iopub.status.busy":·"2026-03-15T16:11:47.986238Z",
145 ····················"iopub.status.idle":·"2025-02-10T07:24:20.235920Z",145 ····················"iopub.status.idle":·"2026-03-15T16:11:48.070771Z",
146 ····················"shell.execute_reply":·"2025-02-10T07:24:20.222506Z"146 ····················"shell.execute_reply":·"2026-03-15T16:11:48.069521Z"
147 ················}147 ················}
148 ············},148 ············},
149 ············"outputs":·[149 ············"outputs":·[
150 ················{150 ················{
151 ····················"ename":·"NameError",151 ····················"ename":·"NameError",
152 ····················"evalue":·"name·'ds'·is·not·defined",152 ····················"evalue":·"name·'ds'·is·not·defined",
153 ····················"output_type":·"error",153 ····················"output_type":·"error",
Offset 181, 18 lines modifiedOffset 181, 18 lines modified
181 ············]181 ············]
182 ········},182 ········},
183 ········{183 ········{
184 ············"cell_type":·"code",184 ············"cell_type":·"code",
185 ············"execution_count":·4,185 ············"execution_count":·4,
186 ············"metadata":·{186 ············"metadata":·{
187 ················"execution":·{187 ················"execution":·{
188 ····················"iopub.execute_input":·"2025-02-10T07:24:20.248773Z",188 ····················"iopub.execute_input":·"2026-03-15T16:11:48.075514Z",
189 ····················"iopub.status.busy":·"2025-02-10T07:24:20.248230Z",189 ····················"iopub.status.busy":·"2026-03-15T16:11:48.075042Z",
190 ····················"iopub.status.idle":·"2025-02-10T07:24:20.374555Z",190 ····················"iopub.status.idle":·"2026-03-15T16:11:48.143203Z",
191 ····················"shell.execute_reply":·"2025-02-10T07:24:20.358470Z"191 ····················"shell.execute_reply":·"2026-03-15T16:11:48.133407Z"
192 ················},192 ················},
193 ················"scrolled":·false193 ················"scrolled":·false
194 ············},194 ············},
195 ············"outputs":·[195 ············"outputs":·[
196 ················{196 ················{
197 ····················"ename":·"NameError",197 ····················"ename":·"NameError",
198 ····················"evalue":·"name·'ds'·is·not·defined",198 ····················"evalue":·"name·'ds'·is·not·defined",
Offset 217, 18 lines modifiedOffset 217, 18 lines modified
217 ············]217 ············]
218 ········},218 ········},
219 ········{219 ········{
220 ············"cell_type":·"code",220 ············"cell_type":·"code",
221 ············"execution_count":·5,221 ············"execution_count":·5,
222 ············"metadata":·{222 ············"metadata":·{
223 ················"execution":·{223 ················"execution":·{
224 ····················"iopub.execute_input":·"2025-02-10T07:24:20.388249Z",224 ····················"iopub.execute_input":·"2026-03-15T16:11:48.150688Z",
225 ····················"iopub.status.busy":·"2025-02-10T07:24:20.387627Z",225 ····················"iopub.status.busy":·"2026-03-15T16:11:48.150104Z",
226 ····················"iopub.status.idle":·"2025-02-10T07:24:20.530685Z",226 ····················"iopub.status.idle":·"2026-03-15T16:11:48.215941Z",
227 ····················"shell.execute_reply":·"2025-02-10T07:24:20.514463Z"227 ····················"shell.execute_reply":·"2026-03-15T16:11:48.214481Z"
228 ················}228 ················}
229 ············},229 ············},
230 ············"outputs":·[230 ············"outputs":·[
231 ················{231 ················{
232 ····················"ename":·"NameError",232 ····················"ename":·"NameError",
233 ····················"evalue":·"name·'ds'·is·not·defined",233 ····················"evalue":·"name·'ds'·is·not·defined",
234 ····················"output_type":·"error",234 ····················"output_type":·"error",
Offset 256, 18 lines modifiedOffset 256, 18 lines modified
256 ············]256 ············]
257 ········},257 ········},
258 ········{258 ········{
259 ············"cell_type":·"code",259 ············"cell_type":·"code",
260 ············"execution_count":·6,260 ············"execution_count":·6,
261 ············"metadata":·{261 ············"metadata":·{
262 ················"execution":·{262 ················"execution":·{
263 ····················"iopub.execute_input":·"2025-02-10T07:24:20.551636Z",263 ····················"iopub.execute_input":·"2026-03-15T16:11:48.230849Z",
264 ····················"iopub.status.busy":·"2025-02-10T07:24:20.551086Z",264 ····················"iopub.status.busy":·"2026-03-15T16:11:48.225356Z",
265 ····················"iopub.status.idle":·"2025-02-10T07:24:20.670497Z",265 ····················"iopub.status.idle":·"2026-03-15T16:11:48.291241Z",
Max diff block lines reached; 1213/16978 bytes (7.14%) of diff not shown.
3.6 KB
./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html
    
Offset 185, 15 lines modifiedOffset 185, 15 lines modified
185 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>185 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>
186 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:186 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:
187 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(187 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(
188 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>188 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>
189 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)189 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)
190 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>190 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>
  
191 <span·class="ansi-red-fg">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.191 <span·class="ansi-red-fg">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.
192 </pre></div></div>192 </pre></div></div>
193 </div>193 </div>
194 <p>The·function·we·will·apply·is·<code·class="docutils·literal·notranslate"><span·class="pre">np.interp</span></code>·which·expects·1D·numpy·arrays.·This·functionality·is·already·implemented·in·xarray·so·we·use·that·capability·to·make·sure·we·are·not·making·mistakes.</p>194 <p>The·function·we·will·apply·is·<code·class="docutils·literal·notranslate"><span·class="pre">np.interp</span></code>·which·expects·1D·numpy·arrays.·This·functionality·is·already·implemented·in·xarray·so·we·use·that·capability·to·make·sure·we·are·not·making·mistakes.</p>
195 <div·class="nbinput·docutils·container">195 <div·class="nbinput·docutils·container">
196 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[2]:196 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[2]:
197 </pre></div>197 </pre></div>
198 </div>198 </div>
765 B
html2text {}
    
Offset 123, 15 lines modifiedOffset 123, 15 lines modified
123 ····273·····message.append(123 ····273·····message.append(
124 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different124 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different
125 location."125 location."
126 ····275·····)126 ····275·····)
127 -->·276·raise·PermissionError("·".join(message))·from·error127 -->·276·raise·PermissionError("·".join(message))·from·error
  
128 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not128 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
129 create·data·cache·folder·'/nonexistent/first-build/.cache/129 create·data·cache·folder·'/nonexistent/second-build/.cache/
130 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.130 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
131 The·function·we·will·apply·is·np.interp·which·expects·1D·numpy·arrays.·This131 The·function·we·will·apply·is·np.interp·which·expects·1D·numpy·arrays.·This
132 functionality·is·already·implemented·in·xarray·so·we·use·that·capability·to132 functionality·is·already·implemented·in·xarray·so·we·use·that·capability·to
133 make·sure·we·are·not·making·mistakes.133 make·sure·we·are·not·making·mistakes.
134 [2]:134 [2]:
135 newlat·=·np.linspace(15,·75,·100)135 newlat·=·np.linspace(15,·75,·100)
136 air.interp(lat=newlat)136 air.interp(lat=newlat)
28.5 KB
./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz
28.4 KB
apply_ufunc_vectorize_1d.ipynb
28.3 KB
Pretty-printed
Similarity: 0.9993857604017217% Differences: {"'cells'": "{2: {'metadata': {'execution': {'iopub.execute_input': '2026-03-15T16:12:02.239879Z', " "'iopub.status.busy': '2026-03-15T16:12:02.239416Z', 'iopub.status.idle': " "'2026-03-15T16:12:06.601746Z', 'shell.execute_reply': " '\'2026-03-15T16:12:06.600585Z\'}}, \'outputs\': {0: {\'evalue\': "[Errno 13] ' "Permission denied: '/nonexistent' | Pooch could not create data cache folder " "'/nonexistent/second-build/.cache/xarray_tutorial_data'. […]
    
Offset 36, 24 lines modifiedOffset 36, 24 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-02-10T07:24:37.335905Z",43 ····················"iopub.execute_input":·"2026-03-15T16:12:02.239879Z",
44 ····················"iopub.status.busy":·"2025-02-10T07:24:37.335330Z",44 ····················"iopub.status.busy":·"2026-03-15T16:12:02.239416Z",
45 ····················"iopub.status.idle":·"2025-02-10T07:24:44.402608Z",45 ····················"iopub.status.idle":·"2026-03-15T16:12:06.601746Z",
46 ····················"shell.execute_reply":·"2025-02-10T07:24:44.386548Z"46 ····················"shell.execute_reply":·"2026-03-15T16:12:06.600585Z"
47 ················}47 ················}
48 ············},48 ············},
49 ············"outputs":·[49 ············"outputs":·[
50 ················{50 ················{
51 ····················"ename":·"PermissionError",51 ····················"ename":·"PermissionError",
52 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",52 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",
53 ····················"output_type":·"error",53 ····················"output_type":·"error",
54 ····················"traceback":·[54 ····················"traceback":·[
55 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",55 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
56 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",56 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
57 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",57 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",
58 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",58 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
59 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",59 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
Offset 63, 15 lines modifiedOffset 63, 15 lines modified
63 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",63 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",
64 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",64 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
65 ························"Cell·\u001b[0;32mIn[1],·line·7\u001b[0m\n\u001b[1;32m······2\u001b[0m·\u001b[38;5;28;01mimport\u001b[39;00m·\u001b[38;5;21;01mnumpy\u001b[39;00m·\u001b[38;5;28;01mas\u001b[39;00m·\u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[1;32m······4\u001b[0m·xr\u001b[38;5;241m.\u001b[39mset_options(display_style\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhtml\u001b[39m\u001b[38;5;124m\"\u001b[39m)··\u001b[38;5;66;03m#·fancy·HTML·repr\u001b[39;00m\n\u001b[1;32m······6\u001b[0m·air·\u001b[38;5;241m=\u001b[39m·(\n\u001b[0;32m---->·7\u001b[0m·····\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mair_temperature\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m······8\u001b[0m·····\u001b[38;5;241m.\u001b[39mair\u001b[38;5;241m.\u001b[39msortby(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mlat\u001b[39m\u001b[38;5;124m\"\u001b[39m)··\u001b[38;5;66;03m#·np.interp·needs·coordinate·in·ascending·order\u001b[39;00m\n\u001b[1;32m······9\u001b[0m·····\u001b[38;5;241m.\u001b[39misel(time\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mslice\u001b[39m(\u001b[38;5;241m4\u001b[39m),·lon\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mslice\u001b[39m(\u001b[38;5;241m3\u001b[39m))\n\u001b[1;32m·····10\u001b[0m·)··\u001b[38;5;66;03m#·choose·a·small·subset·for·convenience\u001b[39;00m\n\u001b[1;32m·····11\u001b[0m·air\n",65 ························"Cell·\u001b[0;32mIn[1],·line·7\u001b[0m\n\u001b[1;32m······2\u001b[0m·\u001b[38;5;28;01mimport\u001b[39;00m·\u001b[38;5;21;01mnumpy\u001b[39;00m·\u001b[38;5;28;01mas\u001b[39;00m·\u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[1;32m······4\u001b[0m·xr\u001b[38;5;241m.\u001b[39mset_options(display_style\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhtml\u001b[39m\u001b[38;5;124m\"\u001b[39m)··\u001b[38;5;66;03m#·fancy·HTML·repr\u001b[39;00m\n\u001b[1;32m······6\u001b[0m·air·\u001b[38;5;241m=\u001b[39m·(\n\u001b[0;32m---->·7\u001b[0m·····\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mair_temperature\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m······8\u001b[0m·····\u001b[38;5;241m.\u001b[39mair\u001b[38;5;241m.\u001b[39msortby(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mlat\u001b[39m\u001b[38;5;124m\"\u001b[39m)··\u001b[38;5;66;03m#·np.interp·needs·coordinate·in·ascending·order\u001b[39;00m\n\u001b[1;32m······9\u001b[0m·····\u001b[38;5;241m.\u001b[39misel(time\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mslice\u001b[39m(\u001b[38;5;241m4\u001b[39m),·lon\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mslice\u001b[39m(\u001b[38;5;241m3\u001b[39m))\n\u001b[1;32m·····10\u001b[0m·)··\u001b[38;5;66;03m#·choose·a·small·subset·for·convenience\u001b[39;00m\n\u001b[1;32m·····11\u001b[0m·air\n",
66 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:213\u001b[0m,·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····176\u001b[0m·\u001b[38;5;28;01mdef\u001b[39;00m·\u001b[38;5;21mload_dataset\u001b[39m(\u001b[38;5;241m*\u001b[39margs,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)·\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m·Dataset:\n\u001b[1;32m····177\u001b[0m·\u001b[38;5;250m····\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m····178\u001b[0m·\u001b[38;5;124;03m····Open,·load·into·memory,·and·close·a·dataset·from·the·online·repository\u001b[39;00m\n\u001b[1;32m····179\u001b[0m·\u001b[38;5;124;03m····(requires·internet).\u001b[39;00m\n\u001b[0;32m···(...)\u001b[0m\n\u001b[1;32m····211\u001b[0m·\u001b[38;5;124;03m····load_dataset\u001b[39;00m\n\u001b[1;32m····212\u001b[0m·\u001b[38;5;124;03m····\"\"\"\u001b[39;00m\n\u001b[0;32m-->·213\u001b[0m·····\u001b[38;5;28;01mwith\u001b[39;00m·\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m·\u001b[38;5;28;01mas\u001b[39;00m·ds:\n\u001b[1;32m····214\u001b[0m·········\u001b[38;5;28;01mreturn\u001b[39;00m·ds\u001b[38;5;241m.\u001b[39mload()\n",66 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:213\u001b[0m,·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····176\u001b[0m·\u001b[38;5;28;01mdef\u001b[39;00m·\u001b[38;5;21mload_dataset\u001b[39m(\u001b[38;5;241m*\u001b[39margs,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)·\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m·Dataset:\n\u001b[1;32m····177\u001b[0m·\u001b[38;5;250m····\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m····178\u001b[0m·\u001b[38;5;124;03m····Open,·load·into·memory,·and·close·a·dataset·from·the·online·repository\u001b[39;00m\n\u001b[1;32m····179\u001b[0m·\u001b[38;5;124;03m····(requires·internet).\u001b[39;00m\n\u001b[0;32m···(...)\u001b[0m\n\u001b[1;32m····211\u001b[0m·\u001b[38;5;124;03m····load_dataset\u001b[39;00m\n\u001b[1;32m····212\u001b[0m·\u001b[38;5;124;03m····\"\"\"\u001b[39;00m\n\u001b[0;32m-->·213\u001b[0m·····\u001b[38;5;28;01mwith\u001b[39;00m·\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m·\u001b[38;5;28;01mas\u001b[39;00m·ds:\n\u001b[1;32m····214\u001b[0m·········\u001b[38;5;28;01mreturn\u001b[39;00m·ds\u001b[38;5;241m.\u001b[39mload()\n",
67 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",67 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",
68 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",68 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",
69 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",69 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",
70 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."70 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."
71 ····················]71 ····················]
72 ················}72 ················}
73 ············],73 ············],
74 ············"source":·[74 ············"source":·[
75 ················"import·xarray·as·xr\n",75 ················"import·xarray·as·xr\n",
76 ················"import·numpy·as·np\n",76 ················"import·numpy·as·np\n",
77 ················"\n",77 ················"\n",
Offset 97, 18 lines modifiedOffset 97, 18 lines modified
97 ············"execution_count":·2,97 ············"execution_count":·2,
98 ············"metadata":·{98 ············"metadata":·{
99 ················"ExecuteTime":·{99 ················"ExecuteTime":·{
100 ····················"end_time":·"2020-01-15T14:45:55.431708Z",100 ····················"end_time":·"2020-01-15T14:45:55.431708Z",
101 ····················"start_time":·"2020-01-15T14:45:55.104701Z"101 ····················"start_time":·"2020-01-15T14:45:55.104701Z"
102 ················},102 ················},
103 ················"execution":·{103 ················"execution":·{
104 ····················"iopub.execute_input":·"2025-02-10T07:24:44.423548Z",104 ····················"iopub.execute_input":·"2026-03-15T16:12:06.614794Z",
105 ····················"iopub.status.busy":·"2025-02-10T07:24:44.422821Z",105 ····················"iopub.status.busy":·"2026-03-15T16:12:06.614257Z",
106 ····················"iopub.status.idle":·"2025-02-10T07:24:44.610747Z",106 ····················"iopub.status.idle":·"2026-03-15T16:12:06.674578Z",
107 ····················"shell.execute_reply":·"2025-02-10T07:24:44.594554Z"107 ····················"shell.execute_reply":·"2026-03-15T16:12:06.673416Z"
108 ················}108 ················}
109 ············},109 ············},
110 ············"outputs":·[110 ············"outputs":·[
111 ················{111 ················{
112 ····················"ename":·"NameError",112 ····················"ename":·"NameError",
113 ····················"evalue":·"name·'air'·is·not·defined",113 ····················"evalue":·"name·'air'·is·not·defined",
114 ····················"output_type":·"error",114 ····················"output_type":·"error",
Offset 137, 18 lines modifiedOffset 137, 18 lines modified
137 ············"execution_count":·3,137 ············"execution_count":·3,
138 ············"metadata":·{138 ············"metadata":·{
139 ················"ExecuteTime":·{139 ················"ExecuteTime":·{
140 ····················"end_time":·"2020-01-15T14:45:57.889496Z",140 ····················"end_time":·"2020-01-15T14:45:57.889496Z",
141 ····················"start_time":·"2020-01-15T14:45:57.792269Z"141 ····················"start_time":·"2020-01-15T14:45:57.792269Z"
142 ················},142 ················},
143 ················"execution":·{143 ················"execution":·{
144 ····················"iopub.execute_input":·"2025-02-10T07:24:44.628538Z",144 ····················"iopub.execute_input":·"2026-03-15T16:12:06.690836Z",
145 ····················"iopub.status.busy":·"2025-02-10T07:24:44.628013Z",145 ····················"iopub.status.busy":·"2026-03-15T16:12:06.683134Z",
146 ····················"iopub.status.idle":·"2025-02-10T07:24:44.819565Z",146 ····················"iopub.status.idle":·"2026-03-15T16:12:06.747267Z",
147 ····················"shell.execute_reply":·"2025-02-10T07:24:44.807633Z"147 ····················"shell.execute_reply":·"2026-03-15T16:12:06.741569Z"
148 ················}148 ················}
149 ············},149 ············},
150 ············"outputs":·[150 ············"outputs":·[
151 ················{151 ················{
152 ····················"ename":·"NameError",152 ····················"ename":·"NameError",
153 ····················"evalue":·"name·'air'·is·not·defined",153 ····················"evalue":·"name·'air'·is·not·defined",
154 ····················"output_type":·"error",154 ····················"output_type":·"error",
Offset 196, 18 lines modifiedOffset 196, 18 lines modified
196 ············"execution_count":·4,196 ············"execution_count":·4,
197 ············"metadata":·{197 ············"metadata":·{
198 ················"ExecuteTime":·{198 ················"ExecuteTime":·{
199 ····················"end_time":·"2020-01-15T14:45:59.768626Z",199 ····················"end_time":·"2020-01-15T14:45:59.768626Z",
200 ····················"start_time":·"2020-01-15T14:45:59.543808Z"200 ····················"start_time":·"2020-01-15T14:45:59.543808Z"
201 ················},201 ················},
202 ················"execution":·{202 ················"execution":·{
203 ····················"iopub.execute_input":·"2025-02-10T07:24:44.832601Z",203 ····················"iopub.execute_input":·"2026-03-15T16:12:06.758819Z",
204 ····················"iopub.status.busy":·"2025-02-10T07:24:44.832079Z",204 ····················"iopub.status.busy":·"2026-03-15T16:12:06.754185Z",
205 ····················"iopub.status.idle":·"2025-02-10T07:24:44.978679Z",205 ····················"iopub.status.idle":·"2026-03-15T16:12:06.818397Z",
206 ····················"shell.execute_reply":·"2025-02-10T07:24:44.962520Z"206 ····················"shell.execute_reply":·"2026-03-15T16:12:06.817345Z"
207 ················}207 ················}
208 ············},208 ············},
209 ············"outputs":·[209 ············"outputs":·[
210 ················{210 ················{
211 ····················"ename":·"NameError",211 ····················"ename":·"NameError",
212 ····················"evalue":·"name·'air'·is·not·defined",212 ····················"evalue":·"name·'air'·is·not·defined",
213 ····················"output_type":·"error",213 ····················"output_type":·"error",
Offset 262, 18 lines modifiedOffset 262, 18 lines modified
262 ············"execution_count":·5,262 ············"execution_count":·5,
263 ············"metadata":·{263 ············"metadata":·{
264 ················"ExecuteTime":·{264 ················"ExecuteTime":·{
265 ····················"end_time":·"2020-01-15T14:46:02.187012Z",265 ····················"end_time":·"2020-01-15T14:46:02.187012Z",
266 ····················"start_time":·"2020-01-15T14:46:02.105563Z"266 ····················"start_time":·"2020-01-15T14:46:02.105563Z"
267 ················},267 ················},
268 ················"execution":·{268 ················"execution":·{
269 ····················"iopub.execute_input":·"2025-02-10T07:24:44.991138Z",269 ····················"iopub.execute_input":·"2026-03-15T16:12:06.830038Z",
270 ····················"iopub.status.busy":·"2025-02-10T07:24:44.990446Z",270 ····················"iopub.status.busy":·"2026-03-15T16:12:06.829437Z",
271 ····················"iopub.status.idle":·"2025-02-10T07:24:45.126627Z",271 ····················"iopub.status.idle":·"2026-03-15T16:12:09.668785Z",
272 ····················"shell.execute_reply":·"2025-02-10T07:24:45.112065Z"272 ····················"shell.execute_reply":·"2026-03-15T16:12:09.667555Z"
273 ················}273 ················}
274 ············},274 ············},
275 ············"outputs":·[275 ············"outputs":·[
276 ················{276 ················{
277 ····················"ename":·"NameError",277 ····················"ename":·"NameError",
278 ····················"evalue":·"name·'air'·is·not·defined",278 ····················"evalue":·"name·'air'·is·not·defined",
279 ····················"output_type":·"error",279 ····················"output_type":·"error",
Offset 340, 18 lines modifiedOffset 340, 18 lines modified
340 ············"execution_count":·6,340 ············"execution_count":·6,
341 ············"metadata":·{341 ············"metadata":·{
342 ················"ExecuteTime":·{342 ················"ExecuteTime":·{
343 ····················"end_time":·"2020-01-15T14:46:05.031672Z",343 ····················"end_time":·"2020-01-15T14:46:05.031672Z",
344 ····················"start_time":·"2020-01-15T14:46:04.947588Z"344 ····················"start_time":·"2020-01-15T14:46:04.947588Z"
345 ················},345 ················},
346 ················"execution":·{346 ················"execution":·{
347 ····················"iopub.execute_input":·"2025-02-10T07:24:45.144125Z",347 ····················"iopub.execute_input":·"2026-03-15T16:12:09.690323Z",
348 ····················"iopub.status.busy":·"2025-02-10T07:24:45.143556Z",348 ····················"iopub.status.busy":·"2026-03-15T16:12:09.689821Z",
349 ····················"iopub.status.idle":·"2025-02-10T07:24:45.306965Z",349 ····················"iopub.status.idle":·"2026-03-15T16:12:09.821053Z",
Max diff block lines reached; 10299/28390 bytes (36.28%) of diff not shown.
3.29 KB
./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html
    
Offset 186, 15 lines modifiedOffset 186, 15 lines modified
186 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>186 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>
187 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:187 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:
188 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(188 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(
189 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>189 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>
190 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)190 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)
191 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>191 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>
  
192 <span·class="ansi-red-fg">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.192 <span·class="ansi-red-fg">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.
193 </pre></div></div>193 </pre></div></div>
194 </div>194 </div>
195 <p>Plot·the·first·timestep:</p>195 <p>Plot·the·first·timestep:</p>
196 <div·class="nbinput·docutils·container">196 <div·class="nbinput·docutils·container">
197 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[3]:197 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[3]:
198 </pre></div>198 </pre></div>
199 </div>199 </div>
685 B
html2text {}
    
Offset 121, 15 lines modifiedOffset 121, 15 lines modified
121 ····273·····message.append(121 ····273·····message.append(
122 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different122 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different
123 location."123 location."
124 ····275·····)124 ····275·····)
125 -->·276·raise·PermissionError("·".join(message))·from·error125 -->·276·raise·PermissionError("·".join(message))·from·error
  
126 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not126 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
127 create·data·cache·folder·'/nonexistent/first-build/.cache/127 create·data·cache·folder·'/nonexistent/second-build/.cache/
128 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.128 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
129 Plot·the·first·timestep:129 Plot·the·first·timestep:
130 [3]:130 [3]:
131 projection·=·ccrs.LambertConformal(central_longitude=-95,·central_latitude=45)131 projection·=·ccrs.LambertConformal(central_longitude=-95,·central_latitude=45)
  
132 f,·ax·=·plt.subplots(subplot_kw=dict(projection=projection))132 f,·ax·=·plt.subplots(subplot_kw=dict(projection=projection))
  
18.9 KB
./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz
18.7 KB
area_weighted_temperature.ipynb
18.7 KB
Pretty-printed
Similarity: 0.999094012605042% Differences: {"'cells'": "{2: {'metadata': {'execution': {'iopub.execute_input': '2026-03-15T16:12:27.763820Z', " "'iopub.status.busy': '2026-03-15T16:12:27.763434Z', 'iopub.status.idle': " "'2026-03-15T16:12:32.305210Z', 'shell.execute_reply': " "'2026-03-15T16:12:32.303792Z'}}}, 4: {'metadata': {'execution': " "{'iopub.execute_input': '2026-03-15T16:12:32.310348Z', 'iopub.status.busy': " "'2026-03-15T16:12:32.309549Z', 'iopub.status.idle': '2026-03-15T16:12:3 […]
    
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-02-10T07:25:10.132322Z",35 ····················"iopub.execute_input":·"2026-03-15T16:12:27.763820Z",
36 ····················"iopub.status.busy":·"2025-02-10T07:25:10.131675Z",36 ····················"iopub.status.busy":·"2026-03-15T16:12:27.763434Z",
37 ····················"iopub.status.idle":·"2025-02-10T07:25:17.986660Z",37 ····················"iopub.status.idle":·"2026-03-15T16:12:32.305210Z",
38 ····················"shell.execute_reply":·"2025-02-10T07:25:17.970514Z"38 ····················"shell.execute_reply":·"2026-03-15T16:12:32.303792Z"
39 ················}39 ················}
40 ············},40 ············},
41 ············"outputs":·[],41 ············"outputs":·[],
42 ············"source":·[42 ············"source":·[
43 ················"%matplotlib·inline\n",43 ················"%matplotlib·inline\n",
44 ················"\n",44 ················"\n",
45 ················"import·cartopy.crs·as·ccrs\n",45 ················"import·cartopy.crs·as·ccrs\n",
Offset 63, 24 lines modifiedOffset 63, 24 lines modified
63 ············"execution_count":·2,63 ············"execution_count":·2,
64 ············"metadata":·{64 ············"metadata":·{
65 ················"ExecuteTime":·{65 ················"ExecuteTime":·{
66 ····················"end_time":·"2020-03-17T14:43:57.831734Z",66 ····················"end_time":·"2020-03-17T14:43:57.831734Z",
67 ····················"start_time":·"2020-03-17T14:43:57.651845Z"67 ····················"start_time":·"2020-03-17T14:43:57.651845Z"
68 ················},68 ················},
69 ················"execution":·{69 ················"execution":·{
70 ····················"iopub.execute_input":·"2025-02-10T07:25:18.002370Z",70 ····················"iopub.execute_input":·"2026-03-15T16:12:32.310348Z",
71 ····················"iopub.status.busy":·"2025-02-10T07:25:18.001228Z",71 ····················"iopub.status.busy":·"2026-03-15T16:12:32.309549Z",
72 ····················"iopub.status.idle":·"2025-02-10T07:25:20.786763Z",72 ····················"iopub.status.idle":·"2026-03-15T16:12:35.781017Z",
73 ····················"shell.execute_reply":·"2025-02-10T07:25:20.770580Z"73 ····················"shell.execute_reply":·"2026-03-15T16:12:35.779589Z"
74 ················}74 ················}
75 ············},75 ············},
76 ············"outputs":·[76 ············"outputs":·[
77 ················{77 ················{
78 ····················"ename":·"PermissionError",78 ····················"ename":·"PermissionError",
79 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",79 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",
80 ····················"output_type":·"error",80 ····················"output_type":·"error",
81 ····················"traceback":·[81 ····················"traceback":·[
82 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",82 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
83 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",83 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
84 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",84 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",
85 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",85 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
86 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",86 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
Offset 90, 15 lines modifiedOffset 90, 15 lines modified
90 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",90 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",
91 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",91 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
92 ························"Cell·\u001b[0;32mIn[2],·line·1\u001b[0m\n\u001b[0;32m---->·1\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mair_temperature\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m······3\u001b[0m·\u001b[38;5;66;03m#·to·celsius\u001b[39;00m\n\u001b[1;32m······4\u001b[0m·air·\u001b[38;5;241m=\u001b[39m·ds\u001b[38;5;241m.\u001b[39mair·\u001b[38;5;241m-\u001b[39m·\u001b[38;5;241m273.15\u001b[39m\n",92 ························"Cell·\u001b[0;32mIn[2],·line·1\u001b[0m\n\u001b[0;32m---->·1\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mair_temperature\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m······3\u001b[0m·\u001b[38;5;66;03m#·to·celsius\u001b[39;00m\n\u001b[1;32m······4\u001b[0m·air·\u001b[38;5;241m=\u001b[39m·ds\u001b[38;5;241m.\u001b[39mair·\u001b[38;5;241m-\u001b[39m·\u001b[38;5;241m273.15\u001b[39m\n",
93 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:213\u001b[0m,·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····176\u001b[0m·\u001b[38;5;28;01mdef\u001b[39;00m·\u001b[38;5;21mload_dataset\u001b[39m(\u001b[38;5;241m*\u001b[39margs,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)·\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m·Dataset:\n\u001b[1;32m····177\u001b[0m·\u001b[38;5;250m····\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m····178\u001b[0m·\u001b[38;5;124;03m····Open,·load·into·memory,·and·close·a·dataset·from·the·online·repository\u001b[39;00m\n\u001b[1;32m····179\u001b[0m·\u001b[38;5;124;03m····(requires·internet).\u001b[39;00m\n\u001b[0;32m···(...)\u001b[0m\n\u001b[1;32m····211\u001b[0m·\u001b[38;5;124;03m····load_dataset\u001b[39;00m\n\u001b[1;32m····212\u001b[0m·\u001b[38;5;124;03m····\"\"\"\u001b[39;00m\n\u001b[0;32m-->·213\u001b[0m·····\u001b[38;5;28;01mwith\u001b[39;00m·\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m·\u001b[38;5;28;01mas\u001b[39;00m·ds:\n\u001b[1;32m····214\u001b[0m·········\u001b[38;5;28;01mreturn\u001b[39;00m·ds\u001b[38;5;241m.\u001b[39mload()\n",93 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:213\u001b[0m,·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····176\u001b[0m·\u001b[38;5;28;01mdef\u001b[39;00m·\u001b[38;5;21mload_dataset\u001b[39m(\u001b[38;5;241m*\u001b[39margs,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)·\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m·Dataset:\n\u001b[1;32m····177\u001b[0m·\u001b[38;5;250m····\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m····178\u001b[0m·\u001b[38;5;124;03m····Open,·load·into·memory,·and·close·a·dataset·from·the·online·repository\u001b[39;00m\n\u001b[1;32m····179\u001b[0m·\u001b[38;5;124;03m····(requires·internet).\u001b[39;00m\n\u001b[0;32m···(...)\u001b[0m\n\u001b[1;32m····211\u001b[0m·\u001b[38;5;124;03m····load_dataset\u001b[39;00m\n\u001b[1;32m····212\u001b[0m·\u001b[38;5;124;03m····\"\"\"\u001b[39;00m\n\u001b[0;32m-->·213\u001b[0m·····\u001b[38;5;28;01mwith\u001b[39;00m·\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m·\u001b[38;5;28;01mas\u001b[39;00m·ds:\n\u001b[1;32m····214\u001b[0m·········\u001b[38;5;28;01mreturn\u001b[39;00m·ds\u001b[38;5;241m.\u001b[39mload()\n",
94 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",94 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",
95 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",95 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",
96 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",96 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",
97 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."97 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."
98 ····················]98 ····················]
99 ················}99 ················}
100 ············],100 ············],
101 ············"source":·[101 ············"source":·[
102 ················"ds·=·xr.tutorial.load_dataset(\"air_temperature\")\n",102 ················"ds·=·xr.tutorial.load_dataset(\"air_temperature\")\n",
103 ················"\n",103 ················"\n",
104 ················"#·to·celsius\n",104 ················"#·to·celsius\n",
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-02-10T07:25:20.804484Z",129 ····················"iopub.execute_input":·"2026-03-15T16:12:35.786980Z",
130 ····················"iopub.status.busy":·"2025-02-10T07:25:20.803875Z",130 ····················"iopub.status.busy":·"2026-03-15T16:12:35.786228Z",
131 ····················"iopub.status.idle":·"2025-02-10T07:25:21.370915Z",131 ····················"iopub.status.idle":·"2026-03-15T16:12:36.161393Z",
132 ····················"shell.execute_reply":·"2025-02-10T07:25:21.358822Z"132 ····················"shell.execute_reply":·"2026-03-15T16:12:36.160279Z"
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-02-10T07:25:21.388707Z",185 ····················"iopub.execute_input":·"2026-03-15T16:12:36.167280Z",
186 ····················"iopub.status.busy":·"2025-02-10T07:25:21.388137Z",186 ····················"iopub.status.busy":·"2026-03-15T16:12:36.166537Z",
187 ····················"iopub.status.idle":·"2025-02-10T07:25:21.494500Z",187 ····················"iopub.status.idle":·"2026-03-15T16:12:36.233041Z",
188 ····················"shell.execute_reply":·"2025-02-10T07:25:21.478453Z"188 ····················"shell.execute_reply":·"2026-03-15T16:12:36.231877Z"
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-02-10T07:25:21.512245Z",226 ····················"iopub.execute_input":·"2026-03-15T16:12:36.237976Z",
227 ····················"iopub.status.busy":·"2025-02-10T07:25:21.511597Z",227 ····················"iopub.status.busy":·"2026-03-15T16:12:36.237255Z",
228 ····················"iopub.status.idle":·"2025-02-10T07:25:21.614536Z",228 ····················"iopub.status.idle":·"2026-03-15T16:12:36.294919Z",
229 ····················"shell.execute_reply":·"2025-02-10T07:25:21.595287Z"229 ····················"shell.execute_reply":·"2026-03-15T16:12:36.290478Z"
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-02-10T07:25:21.628036Z",259 ····················"iopub.execute_input":·"2026-03-15T16:12:36.302794Z",
260 ····················"iopub.status.busy":·"2025-02-10T07:25:21.627533Z",260 ····················"iopub.status.busy":·"2026-03-15T16:12:36.298719Z",
261 ····················"iopub.status.idle":·"2025-02-10T07:25:21.758482Z",261 ····················"iopub.status.idle":·"2026-03-15T16:12:36.358248Z",
Max diff block lines reached; 1345/18553 bytes (7.25%) of diff not shown.
3.41 KB
./usr/share/doc/python-xarray-doc/html/examples/blank_template.html
    
Offset 160, 15 lines modifiedOffset 160, 15 lines modified
160 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>160 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>
161 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:161 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:
162 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(162 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(
163 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>163 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>
164 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)164 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)
165 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>165 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>
  
166 <span·class="ansi-red-fg">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.166 <span·class="ansi-red-fg">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.
167 </pre></div></div>167 </pre></div></div>
168 </div>168 </div>
169 <div·class="nbinput·nblast·docutils·container">169 <div·class="nbinput·nblast·docutils·container">
170 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[·]:170 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[·]:
171 </pre></div>171 </pre></div>
172 </div>172 </div>
173 <div·class="input_area·highlight-ipython3·notranslate"><div·class="highlight"><pre><span></span>173 <div·class="input_area·highlight-ipython3·notranslate"><div·class="highlight"><pre><span></span>
753 B
html2text {}
    
Offset 99, 15 lines modifiedOffset 99, 15 lines modified
99 ····273·····message.append(99 ····273·····message.append(
100 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different100 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different
101 location."101 location."
102 ····275·····)102 ····275·····)
103 -->·276·raise·PermissionError("·".join(message))·from·error103 -->·276·raise·PermissionError("·".join(message))·from·error
  
104 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not104 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
105 create·data·cache·folder·'/nonexistent/first-build/.cache/105 create·data·cache·folder·'/nonexistent/second-build/.cache/
106 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.106 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
107 [·]:107 [·]:
108 _\x8[_\x8L_\x8o_\x8g_\x8o_\x8·_\x8o_\x8f_\x8·_\x8x_\x8a_\x8r_\x8r_\x8a_\x8y_\x8]108 _\x8[_\x8L_\x8o_\x8g_\x8o_\x8·_\x8o_\x8f_\x8·_\x8x_\x8a_\x8r_\x8r_\x8a_\x8y_\x8]
109 *\x8**\x8**\x8**\x8**\x8**\x8*·_\x8x\x8x_\x8a\x8a_\x8r\x8r_\x8r\x8r_\x8a\x8a_\x8y\x8y·*\x8**\x8**\x8**\x8**\x8**\x8*109 *\x8**\x8**\x8**\x8**\x8**\x8*·_\x8x\x8x_\x8a\x8a_\x8r\x8r_\x8r\x8r_\x8a\x8a_\x8y\x8y·*\x8**\x8**\x8**\x8**\x8**\x8*
110 *\x8**\x8**\x8**\x8*·N\x8Na\x8av\x8vi\x8ig\x8ga\x8at\x8ti\x8io\x8on\x8n·*\x8**\x8**\x8**\x8*110 *\x8**\x8**\x8**\x8*·N\x8Na\x8av\x8vi\x8ig\x8ga\x8at\x8ti\x8io\x8on\x8n·*\x8**\x8**\x8**\x8*
111 For·users111 For·users
112 ····*·_\x8G_\x8e_\x8t_\x8t_\x8i_\x8n_\x8g_\x8·_\x8S_\x8t_\x8a_\x8r_\x8t_\x8e_\x8d112 ····*·_\x8G_\x8e_\x8t_\x8t_\x8i_\x8n_\x8g_\x8·_\x8S_\x8t_\x8a_\x8r_\x8t_\x8e_\x8d
12.5 KB
./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb.gz
12.4 KB
blank_template.ipynb
12.3 KB
Pretty-printed
Similarity: 0.9986468545751634% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2026-03-15T16:12:47.352235Z', " "'iopub.status.busy': '2026-03-15T16:12:47.351752Z', 'iopub.status.idle': " "'2026-03-15T16:12:53.288695Z', 'shell.execute_reply': " '\'2026-03-15T16:12:53.287231Z\'}}, \'outputs\': {0: {\'evalue\': "[Errno 13] ' "Permission denied: '/nonexistent' | Pooch could not create data cache folder " "'/nonexistent/second-build/.cache/xarray_tutorial_data'. […]
    
Offset 12, 24 lines modifiedOffset 12, 24 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-02-10T07:25:37.132595Z",19 ····················"iopub.execute_input":·"2026-03-15T16:12:47.352235Z",
20 ····················"iopub.status.busy":·"2025-02-10T07:25:37.131971Z",20 ····················"iopub.status.busy":·"2026-03-15T16:12:47.351752Z",
21 ····················"iopub.status.idle":·"2025-02-10T07:25:42.518746Z",21 ····················"iopub.status.idle":·"2026-03-15T16:12:53.288695Z",
22 ····················"shell.execute_reply":·"2025-02-10T07:25:42.502432Z"22 ····················"shell.execute_reply":·"2026-03-15T16:12:53.287231Z"
23 ················}23 ················}
24 ············},24 ············},
25 ············"outputs":·[25 ············"outputs":·[
26 ················{26 ················{
27 ····················"ename":·"PermissionError",27 ····················"ename":·"PermissionError",
28 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",28 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",
29 ····················"output_type":·"error",29 ····················"output_type":·"error",
30 ····················"traceback":·[30 ····················"traceback":·[
31 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",31 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
32 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",32 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
33 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",33 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",
34 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",34 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
35 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",35 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
Offset 39, 15 lines modifiedOffset 39, 15 lines modified
39 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",39 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",
40 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",40 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
41 ························"Cell·\u001b[0;32mIn[1],·line·5\u001b[0m\n\u001b[1;32m······2\u001b[0m·\u001b[38;5;28;01mimport\u001b[39;00m·\u001b[38;5;21;01mnumpy\u001b[39;00m·\u001b[38;5;28;01mas\u001b[39;00m·\u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[1;32m······3\u001b[0m·\u001b[38;5;28;01mimport\u001b[39;00m·\u001b[38;5;21;01mpandas\u001b[39;00m·\u001b[38;5;28;01mas\u001b[39;00m·\u001b[38;5;21;01mpd\u001b[39;00m\n\u001b[0;32m---->·5\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mair_temperature\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m······6\u001b[0m·da·\u001b[38;5;241m=\u001b[39m·ds[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mair\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n",41 ························"Cell·\u001b[0;32mIn[1],·line·5\u001b[0m\n\u001b[1;32m······2\u001b[0m·\u001b[38;5;28;01mimport\u001b[39;00m·\u001b[38;5;21;01mnumpy\u001b[39;00m·\u001b[38;5;28;01mas\u001b[39;00m·\u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[1;32m······3\u001b[0m·\u001b[38;5;28;01mimport\u001b[39;00m·\u001b[38;5;21;01mpandas\u001b[39;00m·\u001b[38;5;28;01mas\u001b[39;00m·\u001b[38;5;21;01mpd\u001b[39;00m\n\u001b[0;32m---->·5\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mair_temperature\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m······6\u001b[0m·da·\u001b[38;5;241m=\u001b[39m·ds[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mair\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n",
42 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:213\u001b[0m,·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····176\u001b[0m·\u001b[38;5;28;01mdef\u001b[39;00m·\u001b[38;5;21mload_dataset\u001b[39m(\u001b[38;5;241m*\u001b[39margs,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)·\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m·Dataset:\n\u001b[1;32m····177\u001b[0m·\u001b[38;5;250m····\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m····178\u001b[0m·\u001b[38;5;124;03m····Open,·load·into·memory,·and·close·a·dataset·from·the·online·repository\u001b[39;00m\n\u001b[1;32m····179\u001b[0m·\u001b[38;5;124;03m····(requires·internet).\u001b[39;00m\n\u001b[0;32m···(...)\u001b[0m\n\u001b[1;32m····211\u001b[0m·\u001b[38;5;124;03m····load_dataset\u001b[39;00m\n\u001b[1;32m····212\u001b[0m·\u001b[38;5;124;03m····\"\"\"\u001b[39;00m\n\u001b[0;32m-->·213\u001b[0m·····\u001b[38;5;28;01mwith\u001b[39;00m·\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m·\u001b[38;5;28;01mas\u001b[39;00m·ds:\n\u001b[1;32m····214\u001b[0m·········\u001b[38;5;28;01mreturn\u001b[39;00m·ds\u001b[38;5;241m.\u001b[39mload()\n",42 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:213\u001b[0m,·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····176\u001b[0m·\u001b[38;5;28;01mdef\u001b[39;00m·\u001b[38;5;21mload_dataset\u001b[39m(\u001b[38;5;241m*\u001b[39margs,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)·\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m·Dataset:\n\u001b[1;32m····177\u001b[0m·\u001b[38;5;250m····\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m····178\u001b[0m·\u001b[38;5;124;03m····Open,·load·into·memory,·and·close·a·dataset·from·the·online·repository\u001b[39;00m\n\u001b[1;32m····179\u001b[0m·\u001b[38;5;124;03m····(requires·internet).\u001b[39;00m\n\u001b[0;32m···(...)\u001b[0m\n\u001b[1;32m····211\u001b[0m·\u001b[38;5;124;03m····load_dataset\u001b[39;00m\n\u001b[1;32m····212\u001b[0m·\u001b[38;5;124;03m····\"\"\"\u001b[39;00m\n\u001b[0;32m-->·213\u001b[0m·····\u001b[38;5;28;01mwith\u001b[39;00m·\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m·\u001b[38;5;28;01mas\u001b[39;00m·ds:\n\u001b[1;32m····214\u001b[0m·········\u001b[38;5;28;01mreturn\u001b[39;00m·ds\u001b[38;5;241m.\u001b[39mload()\n",
43 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",43 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",
44 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",44 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",
45 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",45 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",
46 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."46 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."
47 ····················]47 ····················]
48 ················}48 ················}
49 ············],49 ············],
50 ············"source":·[50 ············"source":·[
51 ················"import·xarray·as·xr\n",51 ················"import·xarray·as·xr\n",
52 ················"import·numpy·as·np\n",52 ················"import·numpy·as·np\n",
53 ················"import·pandas·as·pd\n",53 ················"import·pandas·as·pd\n",
4.39 KB
./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html
    
Offset 159, 15 lines modifiedOffset 159, 15 lines modified
159 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>159 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>
160 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:160 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:
161 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(161 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(
162 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>162 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>
163 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)163 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)
164 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>164 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>
  
165 <span·class="ansi-red-fg">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.165 <span·class="ansi-red-fg">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.
166 </pre></div></div>166 </pre></div></div>
167 </div>167 </div>
168 </section>168 </section>
169 <section·id="Now-for-the-heavy-lifting:">169 <section·id="Now-for-the-heavy-lifting:">
170 <h2>Now·for·the·heavy·lifting:<a·class="headerlink"·href="#Now-for-the-heavy-lifting:"·title="Link·to·this·heading">¶</a></h2>170 <h2>Now·for·the·heavy·lifting:<a·class="headerlink"·href="#Now-for-the-heavy-lifting:"·title="Link·to·this·heading">¶</a></h2>
171 <p>We·first·have·to·come·up·with·the·weights,·-·calculate·the·month·length·for·each·monthly·data·record·-·calculate·weights·using·<code·class="docutils·literal·notranslate"><span·class="pre">groupby('time.season')</span></code></p>171 <p>We·first·have·to·come·up·with·the·weights,·-·calculate·the·month·length·for·each·monthly·data·record·-·calculate·weights·using·<code·class="docutils·literal·notranslate"><span·class="pre">groupby('time.season')</span></code></p>
172 <p>Finally,·we·just·need·to·multiply·our·weights·by·the·<code·class="docutils·literal·notranslate"><span·class="pre">Dataset</span></code>·and·sum·along·the·time·dimension.·Creating·a·<code·class="docutils·literal·notranslate"><span·class="pre">DataArray</span></code>·for·the·month·length·is·as·easy·as·using·the·<code·class="docutils·literal·notranslate"><span·class="pre">days_in_month</span></code>·accessor·on·the·time·coordinate.·The·calendar·type,·in·this·case·<code·class="docutils·literal·notranslate"><span·class="pre">'noleap'</span></code>,·is·automatically·considered·in·this·operation.</p>172 <p>Finally,·we·just·need·to·multiply·our·weights·by·the·<code·class="docutils·literal·notranslate"><span·class="pre">Dataset</span></code>·and·sum·along·the·time·dimension.·Creating·a·<code·class="docutils·literal·notranslate"><span·class="pre">DataArray</span></code>·for·the·month·length·is·as·easy·as·using·the·<code·class="docutils·literal·notranslate"><span·class="pre">days_in_month</span></code>·accessor·on·the·time·coordinate.·The·calendar·type,·in·this·case·<code·class="docutils·literal·notranslate"><span·class="pre">'noleap'</span></code>,·is·automatically·considered·in·this·operation.</p>
1000 B
html2text {}
    
Offset 92, 15 lines modifiedOffset 92, 15 lines modified
92 ····273·····message.append(92 ····273·····message.append(
93 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different93 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different
94 location."94 location."
95 ····275·····)95 ····275·····)
96 -->·276·raise·PermissionError("·".join(message))·from·error96 -->·276·raise·PermissionError("·".join(message))·from·error
  
97 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not97 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
98 create·data·cache·folder·'/nonexistent/first-build/.cache/98 create·data·cache·folder·'/nonexistent/second-build/.cache/
99 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.99 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
100 *\x8**\x8**\x8**\x8**\x8*·N\x8No\x8ow\x8w·f\x8fo\x8or\x8r·t\x8th\x8he\x8e·h\x8he\x8ea\x8av\x8vy\x8y·l\x8li\x8if\x8ft\x8ti\x8in\x8ng\x8g:\x8:_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*100 *\x8**\x8**\x8**\x8**\x8*·N\x8No\x8ow\x8w·f\x8fo\x8or\x8r·t\x8th\x8he\x8e·h\x8he\x8ea\x8av\x8vy\x8y·l\x8li\x8if\x8ft\x8ti\x8in\x8ng\x8g:\x8:_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
101 We·first·have·to·come·up·with·the·weights,·-·calculate·the·month·length·for101 We·first·have·to·come·up·with·the·weights,·-·calculate·the·month·length·for
102 each·monthly·data·record·-·calculate·weights·using·groupby('time.season')102 each·monthly·data·record·-·calculate·weights·using·groupby('time.season')
103 Finally,·we·just·need·to·multiply·our·weights·by·the·Dataset·and·sum·along·the103 Finally,·we·just·need·to·multiply·our·weights·by·the·Dataset·and·sum·along·the
104 time·dimension.·Creating·a·DataArray·for·the·month·length·is·as·easy·as·using104 time·dimension.·Creating·a·DataArray·for·the·month·length·is·as·easy·as·using
105 the·days_in_month·accessor·on·the·time·coordinate.·The·calendar·type,·in·this105 the·days_in_month·accessor·on·the·time·coordinate.·The·calendar·type,·in·this
18.5 KB
./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz
18.3 KB
monthly-means.ipynb
18.3 KB
Pretty-printed
Similarity: 0.9985617897727272% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2026-03-15T16:13:02.494805Z', " "'iopub.status.busy': '2026-03-15T16:13:02.490302Z', 'iopub.status.idle': " "'2026-03-15T16:13:06.391976Z', 'shell.execute_reply': " "'2026-03-15T16:13:06.383643Z'}}}, 3: {'metadata': {'execution': " "{'iopub.execute_input': '2026-03-15T16:13:06.411109Z', 'iopub.status.busy': " "'2026-03-15T16:13:06.406762Z', 'iopub.status.idle': '2026-03-15T16:13:0 […]
    
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-02-10T07:25:52.324159Z",26 ····················"iopub.execute_input":·"2026-03-15T16:13:02.494805Z",
27 ····················"iopub.status.busy":·"2025-02-10T07:25:52.323679Z",27 ····················"iopub.status.busy":·"2026-03-15T16:13:02.490302Z",
28 ····················"iopub.status.idle":·"2025-02-10T07:25:59.334581Z",28 ····················"iopub.status.idle":·"2026-03-15T16:13:06.391976Z",
29 ····················"shell.execute_reply":·"2025-02-10T07:25:59.318567Z"29 ····················"shell.execute_reply":·"2026-03-15T16:13:06.383643Z"
30 ················}30 ················}
31 ············},31 ············},
32 ············"outputs":·[],32 ············"outputs":·[],
33 ············"source":·[33 ············"source":·[
34 ················"%matplotlib·inline\n",34 ················"%matplotlib·inline\n",
35 ················"import·numpy·as·np\n",35 ················"import·numpy·as·np\n",
36 ················"import·pandas·as·pd\n",36 ················"import·pandas·as·pd\n",
Offset 50, 24 lines modifiedOffset 50, 24 lines modified
50 ············"execution_count":·2,50 ············"execution_count":·2,
51 ············"metadata":·{51 ············"metadata":·{
52 ················"ExecuteTime":·{52 ················"ExecuteTime":·{
53 ····················"end_time":·"2018-11-28T20:51:36.072316Z",53 ····················"end_time":·"2018-11-28T20:51:36.072316Z",
54 ····················"start_time":·"2018-11-28T20:51:36.016594Z"54 ····················"start_time":·"2018-11-28T20:51:36.016594Z"
55 ················},55 ················},
56 ················"execution":·{56 ················"execution":·{
57 ····················"iopub.execute_input":·"2025-02-10T07:25:59.352575Z",57 ····················"iopub.execute_input":·"2026-03-15T16:13:06.411109Z",
58 ····················"iopub.status.busy":·"2025-02-10T07:25:59.351718Z",58 ····················"iopub.status.busy":·"2026-03-15T16:13:06.406762Z",
59 ····················"iopub.status.idle":·"2025-02-10T07:26:02.762661Z",59 ····················"iopub.status.idle":·"2026-03-15T16:13:08.345236Z",
60 ····················"shell.execute_reply":·"2025-02-10T07:26:02.750556Z"60 ····················"shell.execute_reply":·"2026-03-15T16:13:08.343799Z"
61 ················}61 ················}
62 ············},62 ············},
63 ············"outputs":·[63 ············"outputs":·[
64 ················{64 ················{
65 ····················"ename":·"PermissionError",65 ····················"ename":·"PermissionError",
66 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",66 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",
67 ····················"output_type":·"error",67 ····················"output_type":·"error",
68 ····················"traceback":·[68 ····················"traceback":·[
69 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",69 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
70 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",70 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
71 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",71 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",
72 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",72 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
73 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",73 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
Offset 76, 15 lines modifiedOffset 76, 15 lines modified
76 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'",76 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'",
77 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",77 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",
78 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",78 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
79 ························"Cell·\u001b[0;32mIn[2],·line·1\u001b[0m\n\u001b[0;32m---->·1\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mrasm\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[38;5;241m.\u001b[39mload()\n\u001b[1;32m······2\u001b[0m·ds\n",79 ························"Cell·\u001b[0;32mIn[2],·line·1\u001b[0m\n\u001b[0;32m---->·1\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mrasm\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[38;5;241m.\u001b[39mload()\n\u001b[1;32m······2\u001b[0m·ds\n",
80 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",80 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",
81 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",81 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",
82 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",82 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",
83 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."83 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."
84 ····················]84 ····················]
85 ················}85 ················}
86 ············],86 ············],
87 ············"source":·[87 ············"source":·[
88 ················"ds·=·xr.tutorial.open_dataset(\"rasm\").load()\n",88 ················"ds·=·xr.tutorial.open_dataset(\"rasm\").load()\n",
89 ················"ds"89 ················"ds"
90 ············]90 ············]
Offset 102, 18 lines modifiedOffset 102, 18 lines modified
102 ············]102 ············]
103 ········},103 ········},
104 ········{104 ········{
105 ············"cell_type":·"code",105 ············"cell_type":·"code",
106 ············"execution_count":·3,106 ············"execution_count":·3,
107 ············"metadata":·{107 ············"metadata":·{
108 ················"execution":·{108 ················"execution":·{
109 ····················"iopub.execute_input":·"2025-02-10T07:26:02.776159Z",109 ····················"iopub.execute_input":·"2026-03-15T16:13:08.350052Z",
110 ····················"iopub.status.busy":·"2025-02-10T07:26:02.775626Z",110 ····················"iopub.status.busy":·"2026-03-15T16:13:08.349572Z",
111 ····················"iopub.status.idle":·"2025-02-10T07:26:02.914551Z",111 ····················"iopub.status.idle":·"2026-03-15T16:13:08.442823Z",
112 ····················"shell.execute_reply":·"2025-02-10T07:26:02.898527Z"112 ····················"shell.execute_reply":·"2026-03-15T16:13:08.441718Z"
113 ················}113 ················}
114 ············},114 ············},
115 ············"outputs":·[115 ············"outputs":·[
116 ················{116 ················{
117 ····················"ename":·"NameError",117 ····················"ename":·"NameError",
118 ····················"evalue":·"name·'ds'·is·not·defined",118 ····················"evalue":·"name·'ds'·is·not·defined",
119 ····················"output_type":·"error",119 ····················"output_type":·"error",
Offset 135, 18 lines modifiedOffset 135, 18 lines modified
135 ············"execution_count":·4,135 ············"execution_count":·4,
136 ············"metadata":·{136 ············"metadata":·{
137 ················"ExecuteTime":·{137 ················"ExecuteTime":·{
138 ····················"end_time":·"2018-11-28T20:51:36.132413Z",138 ····················"end_time":·"2018-11-28T20:51:36.132413Z",
139 ····················"start_time":·"2018-11-28T20:51:36.073708Z"139 ····················"start_time":·"2018-11-28T20:51:36.073708Z"
140 ················},140 ················},
141 ················"execution":·{141 ················"execution":·{
142 ····················"iopub.execute_input":·"2025-02-10T07:26:02.928198Z",142 ····················"iopub.execute_input":·"2026-03-15T16:13:08.452264Z",
143 ····················"iopub.status.busy":·"2025-02-10T07:26:02.927628Z",143 ····················"iopub.status.busy":·"2026-03-15T16:13:08.451409Z",
144 ····················"iopub.status.idle":·"2025-02-10T07:26:03.074572Z",144 ····················"iopub.status.idle":·"2026-03-15T16:13:08.514262Z",
145 ····················"shell.execute_reply":·"2025-02-10T07:26:03.058519Z"145 ····················"shell.execute_reply":·"2026-03-15T16:13:08.513277Z"
146 ················}146 ················}
147 ············},147 ············},
148 ············"outputs":·[148 ············"outputs":·[
149 ················{149 ················{
150 ····················"ename":·"NameError",150 ····················"ename":·"NameError",
151 ····················"evalue":·"name·'month_length'·is·not·defined",151 ····················"evalue":·"name·'month_length'·is·not·defined",
152 ····················"output_type":·"error",152 ····················"output_type":·"error",
Offset 176, 18 lines modifiedOffset 176, 18 lines modified
176 ············"execution_count":·5,176 ············"execution_count":·5,
177 ············"metadata":·{177 ············"metadata":·{
178 ················"ExecuteTime":·{178 ················"ExecuteTime":·{
179 ····················"end_time":·"2018-11-28T20:51:36.152913Z",179 ····················"end_time":·"2018-11-28T20:51:36.152913Z",
180 ····················"start_time":·"2018-11-28T20:51:36.133997Z"180 ····················"start_time":·"2018-11-28T20:51:36.133997Z"
181 ················},181 ················},
182 ················"execution":·{182 ················"execution":·{
183 ····················"iopub.execute_input":·"2025-02-10T07:26:03.092525Z",183 ····················"iopub.execute_input":·"2026-03-15T16:13:08.531547Z",
184 ····················"iopub.status.busy":·"2025-02-10T07:26:03.091934Z",184 ····················"iopub.status.busy":·"2026-03-15T16:13:08.530993Z",
185 ····················"iopub.status.idle":·"2025-02-10T07:26:03.266615Z",185 ····················"iopub.status.idle":·"2026-03-15T16:13:08.614644Z",
186 ····················"shell.execute_reply":·"2025-02-10T07:26:03.250503Z"186 ····················"shell.execute_reply":·"2026-03-15T16:13:08.613435Z"
187 ················}187 ················}
188 ············},188 ············},
189 ············"outputs":·[189 ············"outputs":·[
190 ················{190 ················{
191 ····················"ename":·"NameError",191 ····················"ename":·"NameError",
192 ····················"evalue":·"name·'ds_weighted'·is·not·defined",192 ····················"evalue":·"name·'ds_weighted'·is·not·defined",
193 ····················"output_type":·"error",193 ····················"output_type":·"error",
Offset 208, 18 lines modifiedOffset 208, 18 lines modified
208 ············"execution_count":·6,208 ············"execution_count":·6,
209 ············"metadata":·{209 ············"metadata":·{
210 ················"ExecuteTime":·{210 ················"ExecuteTime":·{
211 ····················"end_time":·"2018-11-28T20:51:36.190765Z",211 ····················"end_time":·"2018-11-28T20:51:36.190765Z",
212 ····················"start_time":·"2018-11-28T20:51:36.154416Z"212 ····················"start_time":·"2018-11-28T20:51:36.154416Z"
213 ················},213 ················},
214 ················"execution":·{214 ················"execution":·{
215 ····················"iopub.execute_input":·"2025-02-10T07:26:03.284353Z",215 ····················"iopub.execute_input":·"2026-03-15T16:13:08.625864Z",
216 ····················"iopub.status.busy":·"2025-02-10T07:26:03.283789Z",216 ····················"iopub.status.busy":·"2026-03-15T16:13:08.625388Z",
217 ····················"iopub.status.idle":·"2025-02-10T07:26:03.430565Z",217 ····················"iopub.status.idle":·"2026-03-15T16:13:08.685050Z",
Max diff block lines reached; 2534/18138 bytes (13.97%) of diff not shown.
3.83 KB
./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html
    
Offset 158, 15 lines modifiedOffset 158, 15 lines modified
158 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>158 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>
159 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:159 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:
160 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(160 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(
161 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>161 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>
162 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)162 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)
163 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>163 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>
  
164 <span·class="ansi-red-fg">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.164 <span·class="ansi-red-fg">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.
165 </pre></div></div>165 </pre></div></div>
166 </div>166 </div>
167 <p>In·this·example,·the·<em>logical·coordinates</em>·are·<code·class="docutils·literal·notranslate"><span·class="pre">x</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">y</span></code>,·while·the·<em>physical·coordinates</em>·are·<code·class="docutils·literal·notranslate"><span·class="pre">xc</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">yc</span></code>,·which·represent·the·longitudes·and·latitudes·of·the·data.</p>167 <p>In·this·example,·the·<em>logical·coordinates</em>·are·<code·class="docutils·literal·notranslate"><span·class="pre">x</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">y</span></code>,·while·the·<em>physical·coordinates</em>·are·<code·class="docutils·literal·notranslate"><span·class="pre">xc</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">yc</span></code>,·which·represent·the·longitudes·and·latitudes·of·the·data.</p>
168 <div·class="nbinput·docutils·container">168 <div·class="nbinput·docutils·container">
169 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[3]:169 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[3]:
170 </pre></div>170 </pre></div>
171 </div>171 </div>
786 B
html2text {}
    
Offset 90, 15 lines modifiedOffset 90, 15 lines modified
90 ····273·····message.append(90 ····273·····message.append(
91 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different91 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different
92 location."92 location."
93 ····275·····)93 ····275·····)
94 -->·276·raise·PermissionError("·".join(message))·from·error94 -->·276·raise·PermissionError("·".join(message))·from·error
  
95 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not95 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
96 create·data·cache·folder·'/nonexistent/first-build/.cache/96 create·data·cache·folder·'/nonexistent/second-build/.cache/
97 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.97 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
98 In·this·example,·the·l\x8lo\x8og\x8gi\x8ic\x8ca\x8al\x8l·c\x8co\x8oo\x8or\x8rd\x8di\x8in\x8na\x8at\x8te\x8es\x8s·are·x·and·y,·while·the·p\x8ph\x8hy\x8ys\x8si\x8ic\x8ca\x8al\x8l98 In·this·example,·the·l\x8lo\x8og\x8gi\x8ic\x8ca\x8al\x8l·c\x8co\x8oo\x8or\x8rd\x8di\x8in\x8na\x8at\x8te\x8es\x8s·are·x·and·y,·while·the·p\x8ph\x8hy\x8ys\x8si\x8ic\x8ca\x8al\x8l
99 c\x8co\x8oo\x8or\x8rd\x8di\x8in\x8na\x8at\x8te\x8es\x8s·are·xc·and·yc,·which·represent·the·longitudes·and·latitudes·of·the99 c\x8co\x8oo\x8or\x8rd\x8di\x8in\x8na\x8at\x8te\x8es\x8s·are·xc·and·yc,·which·represent·the·longitudes·and·latitudes·of·the
100 data.100 data.
101 [3]:101 [3]:
102 print(ds.xc.attrs)102 print(ds.xc.attrs)
103 print(ds.yc.attrs)103 print(ds.yc.attrs)
17.4 KB
./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz
17.2 KB
multidimensional-coords.ipynb
17.2 KB
Pretty-printed
Similarity: 0.9991536458333333% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2026-03-15T16:13:19.571149Z', " "'iopub.status.busy': '2026-03-15T16:13:19.570631Z', 'iopub.status.idle': " "'2026-03-15T16:13:23.034815Z', 'shell.execute_reply': " "'2026-03-15T16:13:23.031797Z'}}}, 3: {'metadata': {'execution': " "{'iopub.execute_input': '2026-03-15T16:13:23.047829Z', 'iopub.status.busy': " "'2026-03-15T16:13:23.046997Z', 'iopub.status.idle': '2026-03-15T16:13:2 […]
    
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-02-10T07:26:18.880118Z",23 ····················"iopub.execute_input":·"2026-03-15T16:13:19.571149Z",
24 ····················"iopub.status.busy":·"2025-02-10T07:26:18.879632Z",24 ····················"iopub.status.busy":·"2026-03-15T16:13:19.570631Z",
25 ····················"iopub.status.idle":·"2025-02-10T07:26:28.966619Z",25 ····················"iopub.status.idle":·"2026-03-15T16:13:23.034815Z",
26 ····················"shell.execute_reply":·"2025-02-10T07:26:28.954564Z"26 ····················"shell.execute_reply":·"2026-03-15T16:13:23.031797Z"
27 ················}27 ················}
28 ············},28 ············},
29 ············"outputs":·[],29 ············"outputs":·[],
30 ············"source":·[30 ············"source":·[
31 ················"%matplotlib·inline\n",31 ················"%matplotlib·inline\n",
32 ················"import·numpy·as·np\n",32 ················"import·numpy·as·np\n",
33 ················"import·pandas·as·pd\n",33 ················"import·pandas·as·pd\n",
Offset 48, 24 lines modifiedOffset 48, 24 lines modified
48 ············"execution_count":·2,48 ············"execution_count":·2,
49 ············"metadata":·{49 ············"metadata":·{
50 ················"ExecuteTime":·{50 ················"ExecuteTime":·{
51 ····················"end_time":·"2018-11-28T20:50:13.629720Z",51 ····················"end_time":·"2018-11-28T20:50:13.629720Z",
52 ····················"start_time":·"2018-11-28T20:50:13.484542Z"52 ····················"start_time":·"2018-11-28T20:50:13.484542Z"
53 ················},53 ················},
54 ················"execution":·{54 ················"execution":·{
55 ····················"iopub.execute_input":·"2025-02-10T07:26:28.977277Z",55 ····················"iopub.execute_input":·"2026-03-15T16:13:23.047829Z",
56 ····················"iopub.status.busy":·"2025-02-10T07:26:28.976375Z",56 ····················"iopub.status.busy":·"2026-03-15T16:13:23.046997Z",
57 ····················"iopub.status.idle":·"2025-02-10T07:26:32.130605Z",57 ····················"iopub.status.idle":·"2026-03-15T16:13:24.215198Z",
58 ····················"shell.execute_reply":·"2025-02-10T07:26:32.114522Z"58 ····················"shell.execute_reply":·"2026-03-15T16:13:24.207915Z"
59 ················}59 ················}
60 ············},60 ············},
61 ············"outputs":·[61 ············"outputs":·[
62 ················{62 ················{
63 ····················"ename":·"PermissionError",63 ····················"ename":·"PermissionError",
64 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",64 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",
65 ····················"output_type":·"error",65 ····················"output_type":·"error",
66 ····················"traceback":·[66 ····················"traceback":·[
67 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",67 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
68 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",68 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
69 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",69 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",
70 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",70 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
71 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",71 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
Offset 74, 15 lines modifiedOffset 74, 15 lines modified
74 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'",74 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'",
75 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",75 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",
76 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",76 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
77 ························"Cell·\u001b[0;32mIn[2],·line·1\u001b[0m\n\u001b[0;32m---->·1\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mrasm\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[38;5;241m.\u001b[39mload()\n\u001b[1;32m······2\u001b[0m·ds\n",77 ························"Cell·\u001b[0;32mIn[2],·line·1\u001b[0m\n\u001b[0;32m---->·1\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mrasm\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[38;5;241m.\u001b[39mload()\n\u001b[1;32m······2\u001b[0m·ds\n",
78 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",78 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",
79 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",79 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",
80 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",80 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",
81 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."81 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."
82 ····················]82 ····················]
83 ················}83 ················}
84 ············],84 ············],
85 ············"source":·[85 ············"source":·[
86 ················"ds·=·xr.tutorial.open_dataset(\"rasm\").load()\n",86 ················"ds·=·xr.tutorial.open_dataset(\"rasm\").load()\n",
87 ················"ds"87 ················"ds"
88 ············]88 ············]
Offset 99, 18 lines modifiedOffset 99, 18 lines modified
99 ············"execution_count":·3,99 ············"execution_count":·3,
100 ············"metadata":·{100 ············"metadata":·{
101 ················"ExecuteTime":·{101 ················"ExecuteTime":·{
102 ····················"end_time":·"2018-11-28T20:50:15.836061Z",102 ····················"end_time":·"2018-11-28T20:50:15.836061Z",
103 ····················"start_time":·"2018-11-28T20:50:15.768376Z"103 ····················"start_time":·"2018-11-28T20:50:15.768376Z"
104 ················},104 ················},
105 ················"execution":·{105 ················"execution":·{
106 ····················"iopub.execute_input":·"2025-02-10T07:26:32.140427Z",106 ····················"iopub.execute_input":·"2026-03-15T16:13:24.220393Z",
107 ····················"iopub.status.busy":·"2025-02-10T07:26:32.139809Z",107 ····················"iopub.status.busy":·"2026-03-15T16:13:24.219901Z",
108 ····················"iopub.status.idle":·"2025-02-10T07:26:32.386688Z",108 ····················"iopub.status.idle":·"2026-03-15T16:13:24.278243Z",
109 ····················"shell.execute_reply":·"2025-02-10T07:26:32.370599Z"109 ····················"shell.execute_reply":·"2026-03-15T16:13:24.277265Z"
110 ················}110 ················}
111 ············},111 ············},
112 ············"outputs":·[112 ············"outputs":·[
113 ················{113 ················{
114 ····················"ename":·"NameError",114 ····················"ename":·"NameError",
115 ····················"evalue":·"name·'ds'·is·not·defined",115 ····················"evalue":·"name·'ds'·is·not·defined",
116 ····················"output_type":·"error",116 ····················"output_type":·"error",
Offset 141, 18 lines modifiedOffset 141, 18 lines modified
141 ············"execution_count":·4,141 ············"execution_count":·4,
142 ············"metadata":·{142 ············"metadata":·{
143 ················"ExecuteTime":·{143 ················"ExecuteTime":·{
144 ····················"end_time":·"2018-11-28T20:50:17.928556Z",144 ····················"end_time":·"2018-11-28T20:50:17.928556Z",
145 ····················"start_time":·"2018-11-28T20:50:17.031211Z"145 ····················"start_time":·"2018-11-28T20:50:17.031211Z"
146 ················},146 ················},
147 ················"execution":·{147 ················"execution":·{
148 ····················"iopub.execute_input":·"2025-02-10T07:26:32.404397Z",148 ····················"iopub.execute_input":·"2026-03-15T16:13:24.286795Z",
149 ····················"iopub.status.busy":·"2025-02-10T07:26:32.403850Z",149 ····················"iopub.status.busy":·"2026-03-15T16:13:24.282843Z",
150 ····················"iopub.status.idle":·"2025-02-10T07:26:34.194547Z",150 ····················"iopub.status.idle":·"2026-03-15T16:13:25.253400Z",
151 ····················"shell.execute_reply":·"2025-02-10T07:26:34.176610Z"151 ····················"shell.execute_reply":·"2026-03-15T16:13:25.252259Z"
152 ················}152 ················}
153 ············},153 ············},
154 ············"outputs":·[154 ············"outputs":·[
155 ················{155 ················{
156 ····················"ename":·"NameError",156 ····················"ename":·"NameError",
157 ····················"evalue":·"name·'ds'·is·not·defined",157 ····················"evalue":·"name·'ds'·is·not·defined",
158 ····················"output_type":·"error",158 ····················"output_type":·"error",
Offset 194, 18 lines modifiedOffset 194, 18 lines modified
194 ············"execution_count":·5,194 ············"execution_count":·5,
195 ············"metadata":·{195 ············"metadata":·{
196 ················"ExecuteTime":·{196 ················"ExecuteTime":·{
197 ····················"end_time":·"2018-11-28T20:50:20.567749Z",197 ····················"end_time":·"2018-11-28T20:50:20.567749Z",
198 ····················"start_time":·"2018-11-28T20:50:19.999393Z"198 ····················"start_time":·"2018-11-28T20:50:19.999393Z"
199 ················},199 ················},
200 ················"execution":·{200 ················"execution":·{
201 ····················"iopub.execute_input":·"2025-02-10T07:26:34.212320Z",201 ····················"iopub.execute_input":·"2026-03-15T16:13:25.274082Z",
202 ····················"iopub.status.busy":·"2025-02-10T07:26:34.211766Z",202 ····················"iopub.status.busy":·"2026-03-15T16:13:25.273562Z",
203 ····················"iopub.status.idle":·"2025-02-10T07:26:34.338504Z",203 ····················"iopub.status.idle":·"2026-03-15T16:13:25.340490Z",
204 ····················"shell.execute_reply":·"2025-02-10T07:26:34.326491Z"204 ····················"shell.execute_reply":·"2026-03-15T16:13:25.339094Z"
205 ················}205 ················}
206 ············},206 ············},
207 ············"outputs":·[207 ············"outputs":·[
208 ················{208 ················{
209 ····················"ename":·"NameError",209 ····················"ename":·"NameError",
210 ····················"evalue":·"name·'ds'·is·not·defined",210 ····················"evalue":·"name·'ds'·is·not·defined",
211 ····················"output_type":·"error",211 ····················"output_type":·"error",
Offset 233, 18 lines modifiedOffset 233, 18 lines modified
233 ············"execution_count":·6,233 ············"execution_count":·6,
234 ············"metadata":·{234 ············"metadata":·{
235 ················"ExecuteTime":·{235 ················"ExecuteTime":·{
236 ····················"end_time":·"2018-11-28T20:50:31.131708Z",236 ····················"end_time":·"2018-11-28T20:50:31.131708Z",
237 ····················"start_time":·"2018-11-28T20:50:30.444697Z"237 ····················"start_time":·"2018-11-28T20:50:30.444697Z"
238 ················},238 ················},
239 ················"execution":·{239 ················"execution":·{
240 ····················"iopub.execute_input":·"2025-02-10T07:26:34.352041Z",240 ····················"iopub.execute_input":·"2026-03-15T16:13:25.354346Z",
241 ····················"iopub.status.busy":·"2025-02-10T07:26:34.351555Z",241 ····················"iopub.status.busy":·"2026-03-15T16:13:25.353599Z",
242 ····················"iopub.status.idle":·"2025-02-10T07:26:35.230669Z",242 ····················"iopub.status.idle":·"2026-03-15T16:13:25.762714Z",
Max diff block lines reached; 1324/17018 bytes (7.78%) of diff not shown.
3.8 KB
./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html
    
Offset 165, 15 lines modifiedOffset 165, 15 lines modified
165 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>165 File·<span·class="ansi-green-fg">/usr/lib/python3/dist-packages/pooch/utils.py:276</span>,·in·<span·class="ansi-cyan-fg">make_local_storage</span><span·class="ansi-blue-fg">(path,·env)</span>
166 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:166 <span·class="ansi-green-intense-fg·ansi-bold">····272</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">if</span>·env·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">is</span>·<span·class="ansi-bold"·style="color:·rgb(175,0,255)">not</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>:
167 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(167 <span·class="ansi-green-intense-fg·ansi-bold">····273</span>·····message<span·style="color:·rgb(98,98,98)">.</span>append(
168 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>168 <span·class="ansi-green-intense-fg·ansi-bold">····274</span>·········<span·style="color:·rgb(175,0,0)">f</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·class="ansi-bold"·style="color:·rgb(175,95,135)">{</span>env<span·class="ansi-bold"·style="color:·rgb(175,95,135)">}</span><span·style="color:·rgb(175,0,0)">&#39;</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">&#34;</span>
169 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)169 <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····)
170 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>170 <span·class="ansi-green-fg">--&gt;·276</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">raise</span>·<span·class="ansi-bold"·style="color:·rgb(215,95,95)">PermissionError</span>(<span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">&#34;</span><span·style="color:·rgb(98,98,98)">.</span>join(message))·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">from</span>·<span·class="ansi-bold"·style="color:·rgb(0,0,255)">error</span>
  
171 <span·class="ansi-red-fg">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.171 <span·class="ansi-red-fg">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.
172 </pre></div></div>172 </pre></div></div>
173 </div>173 </div>
174 <section·id="Multiple-plots-and-map-projections">174 <section·id="Multiple-plots-and-map-projections">
175 <h2>Multiple·plots·and·map·projections<a·class="headerlink"·href="#Multiple-plots-and-map-projections"·title="Link·to·this·heading">¶</a></h2>175 <h2>Multiple·plots·and·map·projections<a·class="headerlink"·href="#Multiple-plots-and-map-projections"·title="Link·to·this·heading">¶</a></h2>
176 <p>Control·the·map·projection·parameters·on·multiple·axes</p>176 <p>Control·the·map·projection·parameters·on·multiple·axes</p>
177 <p>This·example·illustrates·how·to·plot·multiple·maps·and·control·their·extent·and·aspect·ratio.</p>177 <p>This·example·illustrates·how·to·plot·multiple·maps·and·control·their·extent·and·aspect·ratio.</p>
178 <p>For·more·details·see·<a·class="reference·external"·href="https://github.com/pydata/xarray/issues/1397#issuecomment-299190567">this·discussion</a>·on·github.</p>178 <p>For·more·details·see·<a·class="reference·external"·href="https://github.com/pydata/xarray/issues/1397#issuecomment-299190567">this·discussion</a>·on·github.</p>
875 B
html2text {}
    
Offset 98, 15 lines modifiedOffset 98, 15 lines modified
98 ····273·····message.append(98 ····273·····message.append(
99 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different99 ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different
100 location."100 location."
101 ····275·····)101 ····275·····)
102 -->·276·raise·PermissionError("·".join(message))·from·error102 -->·276·raise·PermissionError("·".join(message))·from·error
  
103 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not103 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
104 create·data·cache·folder·'/nonexistent/first-build/.cache/104 create·data·cache·folder·'/nonexistent/second-build/.cache/
105 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.105 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
106 *\x8**\x8**\x8**\x8**\x8*·M\x8Mu\x8ul\x8lt\x8ti\x8ip\x8pl\x8le\x8e·p\x8pl\x8lo\x8ot\x8ts\x8s·a\x8an\x8nd\x8d·m\x8ma\x8ap\x8p·p\x8pr\x8ro\x8oj\x8je\x8ec\x8ct\x8ti\x8io\x8on\x8ns\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*106 *\x8**\x8**\x8**\x8**\x8*·M\x8Mu\x8ul\x8lt\x8ti\x8ip\x8pl\x8le\x8e·p\x8pl\x8lo\x8ot\x8ts\x8s·a\x8an\x8nd\x8d·m\x8ma\x8ap\x8p·p\x8pr\x8ro\x8oj\x8je\x8ec\x8ct\x8ti\x8io\x8on\x8ns\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
107 Control·the·map·projection·parameters·on·multiple·axes107 Control·the·map·projection·parameters·on·multiple·axes
108 This·example·illustrates·how·to·plot·multiple·maps·and·control·their·extent·and108 This·example·illustrates·how·to·plot·multiple·maps·and·control·their·extent·and
109 aspect·ratio.109 aspect·ratio.
110 For·more·details·see·_\x8t_\x8h_\x8i_\x8s_\x8·_\x8d_\x8i_\x8s_\x8c_\x8u_\x8s_\x8s_\x8i_\x8o_\x8n·on·github.110 For·more·details·see·_\x8t_\x8h_\x8i_\x8s_\x8·_\x8d_\x8i_\x8s_\x8c_\x8u_\x8s_\x8s_\x8i_\x8o_\x8n·on·github.
111 [3]:111 [3]:
16.9 KB
./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz
16.7 KB
visualization_gallery.ipynb
16.7 KB
Pretty-printed
Similarity: 0.9982919730392157% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2026-03-15T16:13:38.093501Z', " "'iopub.status.busy': '2026-03-15T16:13:38.093001Z', 'iopub.status.idle': " "'2026-03-15T16:13:42.033446Z', 'shell.execute_reply': " "'2026-03-15T16:13:42.032258Z'}}}, 3: {'metadata': {'execution': " "{'iopub.execute_input': '2026-03-15T16:13:42.043009Z', 'iopub.status.busy': " "'2026-03-15T16:13:42.042252Z', 'iopub.status.idle': '2026-03-15T16:13:4 […]
    
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-02-10T07:26:52.844250Z",17 ····················"iopub.execute_input":·"2026-03-15T16:13:38.093501Z",
18 ····················"iopub.status.busy":·"2025-02-10T07:26:52.843731Z",18 ····················"iopub.status.busy":·"2026-03-15T16:13:38.093001Z",
19 ····················"iopub.status.idle":·"2025-02-10T07:27:00.662706Z",19 ····················"iopub.status.idle":·"2026-03-15T16:13:42.033446Z",
20 ····················"shell.execute_reply":·"2025-02-10T07:27:00.646594Z"20 ····················"shell.execute_reply":·"2026-03-15T16:13:42.032258Z"
21 ················}21 ················}
22 ············},22 ············},
23 ············"outputs":·[],23 ············"outputs":·[],
24 ············"source":·[24 ············"source":·[
25 ················"import·cartopy.crs·as·ccrs\n",25 ················"import·cartopy.crs·as·ccrs\n",
26 ················"import·matplotlib.pyplot·as·plt\n",26 ················"import·matplotlib.pyplot·as·plt\n",
27 ················"import·xarray·as·xr\n",27 ················"import·xarray·as·xr\n",
Offset 37, 24 lines modifiedOffset 37, 24 lines modified
37 ············]37 ············]
38 ········},38 ········},
39 ········{39 ········{
40 ············"cell_type":·"code",40 ············"cell_type":·"code",
41 ············"execution_count":·2,41 ············"execution_count":·2,
42 ············"metadata":·{42 ············"metadata":·{
43 ················"execution":·{43 ················"execution":·{
44 ····················"iopub.execute_input":·"2025-02-10T07:27:00.680713Z",44 ····················"iopub.execute_input":·"2026-03-15T16:13:42.043009Z",
45 ····················"iopub.status.busy":·"2025-02-10T07:27:00.679836Z",45 ····················"iopub.status.busy":·"2026-03-15T16:13:42.042252Z",
46 ····················"iopub.status.idle":·"2025-02-10T07:27:04.158681Z",46 ····················"iopub.status.idle":·"2026-03-15T16:13:43.753241Z",
47 ····················"shell.execute_reply":·"2025-02-10T07:27:04.142567Z"47 ····················"shell.execute_reply":·"2026-03-15T16:13:43.751647Z"
48 ················}48 ················}
49 ············},49 ············},
50 ············"outputs":·[50 ············"outputs":·[
51 ················{51 ················{
52 ····················"ename":·"PermissionError",52 ····················"ename":·"PermissionError",
53 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",53 ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.",
54 ····················"output_type":·"error",54 ····················"output_type":·"error",
55 ····················"traceback":·[55 ····················"traceback":·[
56 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",56 ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
57 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",57 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
58 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",58 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:262\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····258\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;241m==\u001b[39m·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcreate\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m····259\u001b[0m·····\u001b[38;5;66;03m#·When·running·in·parallel,·it's·possible·that·multiple·jobs·will\u001b[39;00m\n\u001b[1;32m····260\u001b[0m·····\u001b[38;5;66;03m#·try·to·create·the·path·at·the·same·time.·Use·exist_ok·to·avoid\u001b[39;00m\n\u001b[1;32m····261\u001b[0m·····\u001b[38;5;66;03m#·raising·an·error.\u001b[39;00m\n\u001b[0;32m-->·262\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m····263\u001b[0m·\u001b[38;5;28;01melse\u001b[39;00m:\n",
59 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",59 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
60 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",60 ························"File·\u001b[0;32m/usr/lib/python3.13/os.py:217\u001b[0m,·in·\u001b[0;36mmakedirs\u001b[0;34m(name,·mode,·exist_ok)\u001b[0m\n\u001b[1;32m····216\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·217\u001b[0m·····\u001b[43mmakedirs\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhead\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mexist_ok\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexist_ok\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····218\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileExistsError\u001b[39;00m:\n\u001b[1;32m····219\u001b[0m·····\u001b[38;5;66;03m#·Defeats·race·condition·when·another·thread·created·the·path\u001b[39;00m\n",
Offset 64, 15 lines modifiedOffset 64, 15 lines modified
64 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",64 ························"\nThe·above·exception·was·the·direct·cause·of·the·following·exception:\n",
65 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",65 ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)",
66 ························"Cell·\u001b[0;32mIn[2],·line·1\u001b[0m\n\u001b[0;32m---->·1\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mair_temperature\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n",66 ························"Cell·\u001b[0;32mIn[2],·line·1\u001b[0m\n\u001b[0;32m---->·1\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·\u001b[43mxr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtutorial\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mair_temperature\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n",
67 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:213\u001b[0m,·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····176\u001b[0m·\u001b[38;5;28;01mdef\u001b[39;00m·\u001b[38;5;21mload_dataset\u001b[39m(\u001b[38;5;241m*\u001b[39margs,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)·\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m·Dataset:\n\u001b[1;32m····177\u001b[0m·\u001b[38;5;250m····\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m····178\u001b[0m·\u001b[38;5;124;03m····Open,·load·into·memory,·and·close·a·dataset·from·the·online·repository\u001b[39;00m\n\u001b[1;32m····179\u001b[0m·\u001b[38;5;124;03m····(requires·internet).\u001b[39;00m\n\u001b[0;32m···(...)\u001b[0m\n\u001b[1;32m····211\u001b[0m·\u001b[38;5;124;03m····load_dataset\u001b[39;00m\n\u001b[1;32m····212\u001b[0m·\u001b[38;5;124;03m····\"\"\"\u001b[39;00m\n\u001b[0;32m-->·213\u001b[0m·····\u001b[38;5;28;01mwith\u001b[39;00m·\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m·\u001b[38;5;28;01mas\u001b[39;00m·ds:\n\u001b[1;32m····214\u001b[0m·········\u001b[38;5;28;01mreturn\u001b[39;00m·ds\u001b[38;5;241m.\u001b[39mload()\n",67 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:213\u001b[0m,·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····176\u001b[0m·\u001b[38;5;28;01mdef\u001b[39;00m·\u001b[38;5;21mload_dataset\u001b[39m(\u001b[38;5;241m*\u001b[39margs,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)·\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m·Dataset:\n\u001b[1;32m····177\u001b[0m·\u001b[38;5;250m····\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m····178\u001b[0m·\u001b[38;5;124;03m····Open,·load·into·memory,·and·close·a·dataset·from·the·online·repository\u001b[39;00m\n\u001b[1;32m····179\u001b[0m·\u001b[38;5;124;03m····(requires·internet).\u001b[39;00m\n\u001b[0;32m···(...)\u001b[0m\n\u001b[1;32m····211\u001b[0m·\u001b[38;5;124;03m····load_dataset\u001b[39;00m\n\u001b[1;32m····212\u001b[0m·\u001b[38;5;124;03m····\"\"\"\u001b[39;00m\n\u001b[0;32m-->·213\u001b[0m·····\u001b[38;5;28;01mwith\u001b[39;00m·\u001b[43mopen_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m·\u001b[38;5;28;01mas\u001b[39;00m·ds:\n\u001b[1;32m····214\u001b[0m·········\u001b[38;5;28;01mreturn\u001b[39;00m·ds\u001b[38;5;241m.\u001b[39mload()\n",
68 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",68 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/xarray/tutorial.py:165\u001b[0m,·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·engine,·**kws)\u001b[0m\n\u001b[1;32m····162\u001b[0m·downloader·\u001b[38;5;241m=\u001b[39m·pooch\u001b[38;5;241m.\u001b[39mHTTPDownloader(headers\u001b[38;5;241m=\u001b[39mheaders)\n\u001b[1;32m····164\u001b[0m·\u001b[38;5;66;03m#·retrieve·the·file\u001b[39;00m\n\u001b[0;32m-->·165\u001b[0m·filepath·\u001b[38;5;241m=\u001b[39m·\u001b[43mpooch\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m····166\u001b[0m·\u001b[43m····\u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mknown_hash\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcache_dir\u001b[49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mdownloader\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownloader\u001b[49m\n\u001b[1;32m····167\u001b[0m·\u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····168\u001b[0m·ds·\u001b[38;5;241m=\u001b[39m·_open_dataset(filepath,·engine\u001b[38;5;241m=\u001b[39mengine,·\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkws)\n\u001b[1;32m····169\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·cache:\n",
69 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",69 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/core.py:227\u001b[0m,·in·\u001b[0;36mretrieve\u001b[0;34m(url,·known_hash,·fname,·path,·processor,·downloader,·progressbar)\u001b[0m\n\u001b[1;32m····222\u001b[0m·action,·verb·\u001b[38;5;241m=\u001b[39m·download_action(full_path,·known_hash)\n\u001b[1;32m····224\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·action·\u001b[38;5;129;01min\u001b[39;00m·(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdownload\u001b[39m\u001b[38;5;124m\"\u001b[39m,·\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m····225\u001b[0m·····\u001b[38;5;66;03m#·We·need·to·write·data,·so·create·the·local·data·directory·if·it\u001b[39;00m\n\u001b[1;32m····226\u001b[0m·····\u001b[38;5;66;03m#·doesn't·already·exist.\u001b[39;00m\n\u001b[0;32m-->·227\u001b[0m·····\u001b[43mmake_local_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····229\u001b[0m·····get_logger()\u001b[38;5;241m.\u001b[39minfo(\n\u001b[1;32m····230\u001b[0m·········\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m·data·from·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·file·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m····231\u001b[0m·········verb,\n\u001b[1;32m····232\u001b[0m·········url,\n\u001b[1;32m····233\u001b[0m·········\u001b[38;5;28mstr\u001b[39m(full_path),\n\u001b[1;32m····234\u001b[0m·····)\n\u001b[1;32m····236\u001b[0m·····\u001b[38;5;28;01mif\u001b[39;00m·downloader·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n",
70 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",70 ························"File·\u001b[0;32m/usr/lib/python3/dist-packages/pooch/utils.py:276\u001b[0m,·in·\u001b[0;36mmake_local_storage\u001b[0;34m(path,·env)\u001b[0m\n\u001b[1;32m····272\u001b[0m·\u001b[38;5;28;01mif\u001b[39;00m·env·\u001b[38;5;129;01mis\u001b[39;00m·\u001b[38;5;129;01mnot\u001b[39;00m·\u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m····273\u001b[0m·····message\u001b[38;5;241m.\u001b[39mappend(\n\u001b[1;32m····274\u001b[0m·········\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUse·environment·variable·\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00menv\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m·to·specify·a·different·location.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m····275\u001b[0m·····)\n\u001b[0;32m-->·276\u001b[0m·\u001b[38;5;28;01mraise\u001b[39;00m·\u001b[38;5;167;01mPermissionError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m·\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(message))·\u001b[38;5;28;01mfrom\u001b[39;00m·\u001b[38;5;21;01merror\u001b[39;00m\n",
71 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/first-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."71 ························"\u001b[0;31mPermissionError\u001b[0m:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/second-build/.cache/xarray_tutorial_data'.·Will·not·be·able·to·download·data·files."
72 ····················]72 ····················]
73 ················}73 ················}
74 ············],74 ············],
75 ············"source":·[75 ············"source":·[
76 ················"ds·=·xr.tutorial.load_dataset(\"air_temperature\")"76 ················"ds·=·xr.tutorial.load_dataset(\"air_temperature\")"
77 ············]77 ············]
78 ········},78 ········},
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-02-10T07:27:04.180352Z",98 ····················"iopub.execute_input":·"2026-03-15T16:13:43.786869Z",
99 ····················"iopub.status.busy":·"2025-02-10T07:27:04.179839Z",99 ····················"iopub.status.busy":·"2026-03-15T16:13:43.775332Z",
100 ····················"iopub.status.idle":·"2025-02-10T07:27:04.394650Z",100 ····················"iopub.status.idle":·"2026-03-15T16:13:43.872738Z",
101 ····················"shell.execute_reply":·"2025-02-10T07:27:04.378556Z"101 ····················"shell.execute_reply":·"2026-03-15T16:13:43.871743Z"
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-02-10T07:27:04.420348Z",151 ····················"iopub.execute_input":·"2026-03-15T16:13:43.878044Z",
152 ····················"iopub.status.busy":·"2025-02-10T07:27:04.419798Z",152 ····················"iopub.status.busy":·"2026-03-15T16:13:43.877585Z",
153 ····················"iopub.status.idle":·"2025-02-10T07:27:04.682652Z",153 ····················"iopub.status.idle":·"2026-03-15T16:13:43.992377Z",
154 ····················"shell.execute_reply":·"2025-02-10T07:27:04.666512Z"154 ····················"shell.execute_reply":·"2026-03-15T16:13:43.991265Z"
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-02-10T07:27:04.708526Z",215 ····················"iopub.execute_input":·"2026-03-15T16:13:47.089568Z",
216 ····················"iopub.status.busy":·"2025-02-10T07:27:04.707891Z",216 ····················"iopub.status.busy":·"2026-03-15T16:13:47.089148Z",
217 ····················"iopub.status.idle":·"2025-02-10T07:27:04.994661Z",217 ····················"iopub.status.idle":·"2026-03-15T16:13:47.187075Z",
218 ····················"shell.execute_reply":·"2025-02-10T07:27:04.978572Z"218 ····················"shell.execute_reply":·"2026-03-15T16:13:47.177329Z"
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-02-10T07:27:05.020251Z",271 ····················"iopub.execute_input":·"2026-03-15T16:13:47.200440Z",
272 ····················"iopub.status.busy":·"2025-02-10T07:27:05.019718Z",272 ····················"iopub.status.busy":·"2026-03-15T16:13:47.199336Z",
273 ····················"iopub.status.idle":·"2025-02-10T07:27:05.212070Z",273 ····················"iopub.status.idle":·"2026-03-15T16:13:47.279112Z",
Max diff block lines reached; 208/16513 bytes (1.26%) of diff not shown.
50.5 KB
./usr/share/doc/python-xarray-doc/html/examples/weather-data.html
    
Offset 470, 37 lines modifiedOffset 470, 37 lines modified
470 </style><pre·class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;·Size:·41kB470 </style><pre·class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;·Size:·41kB
471 Dimensions:···(time:·731,·location:·3)471 Dimensions:···(time:·731,·location:·3)
472 Coordinates:472 Coordinates:
473 ··*·time······(time)·datetime64[ns]·6kB·2000-01-01·2000-01-02·...·2001-12-31473 ··*·time······(time)·datetime64[ns]·6kB·2000-01-01·2000-01-02·...·2001-12-31
474 ··*·location··(location)·&lt;U2·24B·&#x27;IA&#x27;·&#x27;IN&#x27;·&#x27;IL&#x27;474 ··*·location··(location)·&lt;U2·24B·&#x27;IA&#x27;·&#x27;IN&#x27;·&#x27;IL&#x27;
475 Data·variables:475 Data·variables:
476 ····tmin······(time,·location)·float64·18kB·-8.037·-1.788·...·-1.346·-4.544476 ····tmin······(time,·location)·float64·18kB·-8.037·-1.788·...·-1.346·-4.544
477 ····tmax······(time,·location)·float64·18kB·12.98·3.31·6.779·...·3.343·3.805</pre><div·class='xr-wrap'·style='display:none'><div·class='xr-header'><div·class='xr-obj-type'>xarray.Dataset</div></div><ul·class='xr-sections'><li·class='xr-section-item'><input·id='section-5f4a9642-acc8-41d1-b82f-753c7d3e8e8d'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-5f4a9642-acc8-41d1-b82f-753c7d3e8e8d'·class='xr-section-summary'··title='Expand/collapse·section'>Dimensions:</label><div·class='xr-section-in[·...·truncated·by·diffoscope;·len:·1235,·SHA:·4f3e63c56e7a8b159d8b51d94e4680af5f1828f37e112d43def4ed6b1233a987·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([&#x27;2000-01-01T00:00:00.000000000&#x27;,·&#x27;2000-01-02T00:00:00.000000000&#x27;,477 ····tmax······(time,·location)·float64·18kB·12.98·3.31·6.779·...·3.343·3.805</pre><div·class='xr-wrap'·style='display:none'><div·class='xr-header'><div·class='xr-obj-type'>xarray.Dataset</div></div><ul·class='xr-sections'><li·class='xr-section-item'><input·id='section-17061c3d-bafd-4f11-a562-7b553fddce6f'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-17061c3d-bafd-4f11-a562-7b553fddce6f'·class='xr-section-summary'··title='Expand/collapse·section'>Dimensions:</label><div·class='xr-section-in[·...·truncated·by·diffoscope;·len:·1235,·SHA:·df750505f072ef5d2afda83ec4ac3b150d1a9fb1db476ac3a31ece1cb69b8a8e·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([&#x27;2000-01-01T00:00:00.000000000&#x27;,·&#x27;2000-01-02T00:00:00.000000000&#x27;,
478 ·······&#x27;2000-01-03T00:00:00.000000000&#x27;,·...,·&#x27;2001-12-29T00:00:00.000000000&#x27;,478 ·······&#x27;2000-01-03T00:00:00.000000000&#x27;,·...,·&#x27;2001-12-29T00:00:00.000000000&#x27;,
479 ·······&#x27;2001-12-30T00:00:00.000000000&#x27;,·&#x27;2001-12-31T00:00:00.000000000&#x27;],479 ·······&#x27;2001-12-30T00:00:00.000000000&#x27;,·&#x27;2001-12-31T00:00:00.000000000&#x27;],
480 ······dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span·class='xr-has-index'>location</span></div><div·class='xr-var-dims'>(location)</div><div·class='xr-var-dtype'>&lt;U2</div><div·class='xr-var-preview·xr-preview'>&#x27;IA&#x27;·&#x27;IN&#x27;·&#x27;IL&#x27;</div><input·id='attrs-a8de52be-e014-4399-9c2c-d74d18948150'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-a8de52be-e014-4399-9c2c-d74d18948150'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·1502,·SHA:·44e0e41b1e682913caa3067563f96f3a08b324fc4924545fc60cbc166701abbd·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[·-8.03736932,··-1.78844117,··-3.93154201],480 ······dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span·class='xr-has-index'>location</span></div><div·class='xr-var-dims'>(location)</div><div·class='xr-var-dtype'>&lt;U2</div><div·class='xr-var-preview·xr-preview'>&#x27;IA&#x27;·&#x27;IN&#x27;·&#x27;IL&#x27;</div><input·id='attrs-3a2be897-729a-4689-9e4e-6c0aec3236c2'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-3a2be897-729a-4689-9e4e-6c0aec3236c2'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·1502,·SHA:·1414b0eefa620d758468ea6f1ddd28b23a82132acd62e4e1a03d18de69332cb3·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[·-8.03736932,··-1.78844117,··-3.93154201],
481 ·······[·-9.34115662,··-6.55807323,···0.13203714],481 ·······[·-9.34115662,··-6.55807323,···0.13203714],
482 ·······[-12.13971902,··-6.14641918,··-1.06187252],482 ·······[-12.13971902,··-6.14641918,··-1.06187252],
483 ·······...,483 ·······...,
484 ·······[·-5.34723825,·-13.37459826,··-4.93221199],484 ·······[·-5.34723825,·-13.37459826,··-4.93221199],
485 ·······[·-2.67283594,··-5.18072141,··-4.11567869],485 ·······[·-2.67283594,··-5.18072141,··-4.11567869],
486 ·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span>tmax</span></div><div·class='xr-var-dims'>(time,·location)</div><div·class='xr-var-dtype'>float64</div><div·class='xr-var-preview·xr-preview'>12.98·3.31·6.779·...·3.343·3.805</div><input·id='attrs-e421d4f9-ba5c-4e4e-8a41-97d11f43471d'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-e421d4f9-ba5c-4e4e-8a41-97d11f43471d'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·154,·SHA:·f7dd3b2a5cabcd1299fb2c16fbe9e6feb559d9621609c232581fc9e9887532ae·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[12.98054898,··3.31040942,··6.77855382],486 ·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span>tmax</span></div><div·class='xr-var-dims'>(time,·location)</div><div·class='xr-var-dtype'>float64</div><div·class='xr-var-preview·xr-preview'>12.98·3.31·6.779·...·3.343·3.805</div><input·id='attrs-2cf386c8-1065-44ce-860b-ebceef5f540b'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-2cf386c8-1065-44ce-860b-ebceef5f540b'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·154,·SHA:·1866d7ffb9d31296c27e7ccca169becdb31fa628197745d1f6b4ce22eb8839ed·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[12.98054898,··3.31040942,··6.77855382],
487 ·······[·0.44785582,··6.37271154,··4.8434966·],487 ·······[·0.44785582,··6.37271154,··4.8434966·],
488 ·······[·5.32269851,··6.25176289,··5.98033045],488 ·······[·5.32269851,··6.25176289,··5.98033045],
489 ·······...,489 ·······...,
490 ·······[·6.73078492,··7.74795302,··8.04569651],490 ·······[·6.73078492,··7.74795302,··8.04569651],
491 ·······[·6.46376911,··6.31695352,··1.55799171],491 ·······[·6.46376911,··6.31695352,··1.55799171],
492 ·······[·6.63593435,··3.34271537,··3.80527925]])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-049072dc-42e3-4f76-928b-b0142bb61f17'·class='xr-section-summary-in'·type='checkbox'··><label·for='section-049072dc-42e3-4f76-928b-b0142bb61f17'·class='xr-section-summary'·>Indexes:·<span>(2)</span></label><div·class='xr-section-inline-details'></div><div·c[·...·truncated·by·diffoscope;·len:·368,·SHA:·24825b0e47c74c35c312a3e7ad5ceb8df008decb642008ed664de19bc5f0f0d6·...·]'·title='Show/Hide·index·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;2000-01-01&#x27;,·&#x27;2000-01-02&#x27;,·&#x27;2000-01-03&#x27;,·&#x27;2000-01-04&#x27;,492 ·······[·6.63593435,··3.34271537,··3.80527925]])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-b09fad0f-2d4a-4d1a-8c39-c577ca370c66'·class='xr-section-summary-in'·type='checkbox'··><label·for='section-b09fad0f-2d4a-4d1a-8c39-c577ca370c66'·class='xr-section-summary'·>Indexes:·<span>(2)</span></label><div·class='xr-section-inline-details'></div><div·c[·...·truncated·by·diffoscope;·len:·368,·SHA:·b56bffa7870e31fb224209dac58ef5881176fa1efcec2a6d7b77bae094c25f5a·...·]'·title='Show/Hide·index·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;2000-01-01&#x27;,·&#x27;2000-01-02&#x27;,·&#x27;2000-01-03&#x27;,·&#x27;2000-01-04&#x27;,
493 ···············&#x27;2000-01-05&#x27;,·&#x27;2000-01-06&#x27;,·&#x27;2000-01-07&#x27;,·&#x27;2000-01-08&#x27;,493 ···············&#x27;2000-01-05&#x27;,·&#x27;2000-01-06&#x27;,·&#x27;2000-01-07&#x27;,·&#x27;2000-01-08&#x27;,
494 ···············&#x27;2000-01-09&#x27;,·&#x27;2000-01-10&#x27;,494 ···············&#x27;2000-01-09&#x27;,·&#x27;2000-01-10&#x27;,
495 ···············...495 ···············...
496 ···············&#x27;2001-12-22&#x27;,·&#x27;2001-12-23&#x27;,·&#x27;2001-12-24&#x27;,·&#x27;2001-12-25&#x27;,496 ···············&#x27;2001-12-22&#x27;,·&#x27;2001-12-23&#x27;,·&#x27;2001-12-24&#x27;,·&#x27;2001-12-25&#x27;,
497 ···············&#x27;2001-12-26&#x27;,·&#x27;2001-12-27&#x27;,·&#x27;2001-12-28&#x27;,·&#x27;2001-12-29&#x27;,497 ···············&#x27;2001-12-26&#x27;,·&#x27;2001-12-27&#x27;,·&#x27;2001-12-28&#x27;,·&#x27;2001-12-29&#x27;,
498 ···············&#x27;2001-12-30&#x27;,·&#x27;2001-12-31&#x27;],498 ···············&#x27;2001-12-30&#x27;,·&#x27;2001-12-31&#x27;],
499 ··············dtype=&#x27;datetime64[ns]&#x27;,·name=&#x27;time&#x27;,·length=731,·freq=&#x27;D&#x27;))</pre></div></li><li·class='xr-var-item'><div·class='xr-index-name'><div>location</div></div><div·class='xr-index-preview'>PandasIndex</div><input·type='checkbox'·disabled/><label></label><input·id='index-9d734806-42cc-4f27-bf1c-c22f5c04b85a'·class='xr-index-data-in'·type='checkbox'/><label·for='index-9d734806-42cc-4f27-bf1c-c22f5c04b85a'·title='Show/Hide·index·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><di[·...·truncated·by·diffoscope;·len:·380,·SHA:·17a6eda2519303c00c4f160e30554b3df5af0f691e1423de408ca467111668dd·...·]'·class='xr-section-summary'··title='Expand/collapse·section'>Attributes:·<span>(0)</span></label><div·class='xr-section-inline-details'></div><div·class='xr-section-details'><dl·class='xr-attrs'></dl></div></li></ul></div></div></div>499 ··············dtype=&#x27;datetime64[ns]&#x27;,·name=&#x27;time&#x27;,·length=731,·freq=&#x27;D&#x27;))</pre></div></li><li·class='xr-var-item'><div·class='xr-index-name'><div>location</div></div><div·class='xr-index-preview'>PandasIndex</div><input·type='checkbox'·disabled/><label></label><input·id='index-8ff54352-ff5c-4297-90cb-fcdbe59e378f'·class='xr-index-data-in'·type='checkbox'/><label·for='index-8ff54352-ff5c-4297-90cb-fcdbe59e378f'·title='Show/Hide·index·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><di[·...·truncated·by·diffoscope;·len:·380,·SHA:·3c216befe224a834b01fe7146ec29a59bf9f75f3b536924bc792d3b33da59d96·...·]'·class='xr-section-summary'··title='Expand/collapse·section'>Attributes:·<span>(0)</span></label><div·class='xr-section-inline-details'></div><div·class='xr-section-details'><dl·class='xr-attrs'></dl></div></li></ul></div></div></div>
500 </div>500 </div>
501 <section·id="Examine-a-dataset-with-pandas-and-seaborn">501 <section·id="Examine-a-dataset-with-pandas-and-seaborn">
502 <h2>Examine·a·dataset·with·pandas·and·seaborn<a·class="headerlink"·href="#Examine-a-dataset-with-pandas-and-seaborn"·title="Link·to·this·heading">¶</a></h2>502 <h2>Examine·a·dataset·with·pandas·and·seaborn<a·class="headerlink"·href="#Examine-a-dataset-with-pandas-and-seaborn"·title="Link·to·this·heading">¶</a></h2>
503 <section·id="Convert-to-a-pandas-DataFrame">503 <section·id="Convert-to-a-pandas-DataFrame">
504 <h3>Convert·to·a·pandas·DataFrame<a·class="headerlink"·href="#Convert-to-a-pandas-DataFrame"·title="Link·to·this·heading">¶</a></h3>504 <h3>Convert·to·a·pandas·DataFrame<a·class="headerlink"·href="#Convert-to-a-pandas-DataFrame"·title="Link·to·this·heading">¶</a></h3>
505 <div·class="nbinput·docutils·container">505 <div·class="nbinput·docutils·container">
506 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[2]:506 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[2]:
Offset 697, 15 lines modifiedOffset 697, 15 lines modified
697 </div>697 </div>
698 <div·class="nboutput·docutils·container">698 <div·class="nboutput·docutils·container">
699 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[5]:699 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[5]:
700 </pre></div>700 </pre></div>
701 </div>701 </div>
702 <div·class="output_area·docutils·container">702 <div·class="output_area·docutils·container">
703 <div·class="highlight"><pre>703 <div·class="highlight"><pre>
704 &lt;seaborn.axisgrid.PairGrid·at·0x7fa7dd16ee40&gt;704 &lt;seaborn.axisgrid.PairGrid·at·0x7fb4a7f96e40&gt;
705 </pre></div></div>705 </pre></div></div>
706 </div>706 </div>
707 <div·class="nboutput·nblast·docutils·container">707 <div·class="nboutput·nblast·docutils·container">
708 <div·class="prompt·empty·docutils·container">708 <div·class="prompt·empty·docutils·container">
709 </div>709 </div>
710 <div·class="output_area·docutils·container">710 <div·class="output_area·docutils·container">
711 <img·alt="../_images/examples_weather-data_9_1.png"·src="../_images/examples_weather-data_9_1.png"·/>711 <img·alt="../_images/examples_weather-data_9_1.png"·src="../_images/examples_weather-data_9_1.png"·/>
Offset 1110, 26 lines modifiedOffset 1110, 26 lines modified
1110 ·······[0.········,·0.········,·0.········],1110 ·······[0.········,·0.········,·0.········],
1111 ·······[0.········,·0.········,·0.········],1111 ·······[0.········,·0.········,·0.········],
1112 ·······[0.········,·0.01612903,·0.········],1112 ·······[0.········,·0.01612903,·0.········],
1113 ·······[0.33333333,·0.35······,·0.23333333],1113 ·······[0.33333333,·0.35······,·0.23333333],
1114 ·······[0.93548387,·0.85483871,·0.82258065]])1114 ·······[0.93548387,·0.85483871,·0.82258065]])
1115 Coordinates:1115 Coordinates:
1116 ··*·location··(location)·&lt;U2·24B·&#x27;IA&#x27;·&#x27;IN&#x27;·&#x27;IL&#x27;1116 ··*·location··(location)·&lt;U2·24B·&#x27;IA&#x27;·&#x27;IN&#x27;·&#x27;IL&#x27;
1117 ··*·month·····(month)·int64·96B·1·2·3·4·5·6·7·8·9·10·11·12</pre><div·class='xr-wrap'·style='display:none'><div·class='xr-header'><div·class='xr-obj-type'>xarray.DataArray</div><div·class='xr-array-name'>'tmin'</div><ul·class='xr-dim-list'><li><span·class='xr-has-index'>month</span>:·12</li><li><span·class='xr-has-index'>location</span>:·3</li></ul></div><ul·class='xr-sections'><li·class='xr-section-item'><div·class='xr-array-wrap'><input·id='section-99dffe58-18e5-4a02-be9f-d437bb24be50'·class='xr-array-in'·type='checkbox'·checked><label·for='section-99dffe58-18e5-4a02-be9f-d437bb24be50'·title='Show/hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-array-preview·xr-preview'><span>0.9516·0.8871·0.9355·0.8421·0.7193·...·0.2333·0.9355·0.8548·0.8226</span></div><div·class='xr-array-data'><pre>array([[0.9516129·,·0.88709677,·0.93548387],1117 ··*·month·····(month)·int64·96B·1·2·3·4·5·6·7·8·9·10·11·12</pre><div·class='xr-wrap'·style='display:none'><div·class='xr-header'><div·class='xr-obj-type'>xarray.DataArray</div><div·class='xr-array-name'>'tmin'</div><ul·class='xr-dim-list'><li><span·class='xr-has-index'>month</span>:·12</li><li><span·class='xr-has-index'>location</span>:·3</li></ul></div><ul·class='xr-sections'><li·class='xr-section-item'><div·class='xr-array-wrap'><input·id='section-d5f54768-0c47-4170-ac86-d7a509aec4ff'·class='xr-array-in'·type='checkbox'·checked><label·for='section-d5f54768-0c47-4170-ac86-d7a509aec4ff'·title='Show/hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-array-preview·xr-preview'><span>0.9516·0.8871·0.9355·0.8421·0.7193·...·0.2333·0.9355·0.8548·0.8226</span></div><div·class='xr-array-data'><pre>array([[0.9516129·,·0.88709677,·0.93548387],
1118 ·······[0.84210526,·0.71929825,·0.77192982],1118 ·······[0.84210526,·0.71929825,·0.77192982],
1119 ·······[0.24193548,·0.12903226,·0.16129032],1119 ·······[0.24193548,·0.12903226,·0.16129032],
1120 ·······[0.········,·0.········,·0.········],1120 ·······[0.········,·0.········,·0.········],
1121 ·······[0.········,·0.········,·0.········],1121 ·······[0.········,·0.········,·0.········],
1122 ·······[0.········,·0.········,·0.········],1122 ·······[0.········,·0.········,·0.········],
1123 ·······[0.········,·0.········,·0.········],1123 ·······[0.········,·0.········,·0.········],
1124 ·······[0.········,·0.········,·0.········],1124 ·······[0.········,·0.········,·0.········],
1125 ·······[0.········,·0.········,·0.········],1125 ·······[0.········,·0.········,·0.········],
1126 ·······[0.········,·0.01612903,·0.········],1126 ·······[0.········,·0.01612903,·0.········],
1127 ·······[0.33333333,·0.35······,·0.23333333],1127 ·······[0.33333333,·0.35······,·0.23333333],
1128 ·······[0.93548387,·0.85483871,·0.82258065]])</pre></div></div></li><li·class='xr-section-item'><input·id='section-1d23afd1-ddb1-4000-854e-3911ebd71d3a'·class='xr-section-summary-in'·type='checkbox'··checked><label·for='section-1d23afd1-ddb1-4000-854e-3911ebd71d3a'·class='xr-section-summary'·>Coordinates:·<span>(2)</span></label><div·class='xr-section-inline-details'><[·...·truncated·by·diffoscope;·len:·3790,·SHA:·1702f0bcb958d79ac62661f84ac8cefd0785634ba5ee3f5497b1383ef5138289·...·]'·class='xr-section-summary'··title='Expand/collapse·section'>Attributes:·<span>(0)</span></label><div·class='xr-section-inline-details'></div><div·class='xr-section-details'><dl·class='xr-attrs'></dl></div></li></ul></div></div></div>1128 ·······[0.93548387,·0.85483871,·0.82258065]])</pre></div></div></li><li·class='xr-section-item'><input·id='section-0d20c736-6adf-43de-b588-c324e7f78f35'·class='xr-section-summary-in'·type='checkbox'··checked><label·for='section-0d20c736-6adf-43de-b588-c324e7f78f35'·class='xr-section-summary'·>Coordinates:·<span>(2)</span></label><div·class='xr-section-inline-details'><[·...·truncated·by·diffoscope;·len:·3790,·SHA:·5613ab50e8bbc0b9e5abb678aa298cd9ebee77dd8a3877035c41af10f281b5cc·...·]'·class='xr-section-summary'··title='Expand/collapse·section'>Attributes:·<span>(0)</span></label><div·class='xr-section-inline-details'></div><div·class='xr-section-details'><dl·class='xr-attrs'></dl></div></li></ul></div></div></div>
1129 </div>1129 </div>
1130 <div·class="nbinput·docutils·container">1130 <div·class="nbinput·docutils·container">
1131 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[7]:1131 <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[7]:
1132 </pre></div>1132 </pre></div>
1133 </div>1133 </div>
1134 <div·class="input_area·highlight-ipython3·notranslate"><div·class="highlight"><pre><span></span><span·class="n">freeze</span><span·class="o">.</span><span·class="n">to_pandas</span><span·class="p">()</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span>1134 <div·class="input_area·highlight-ipython3·notranslate"><div·class="highlight"><pre><span></span><span·class="n">freeze</span><span·class="o">.</span><span·class="n">to_pandas</span><span·class="p">()</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span>
1135 </pre></div>1135 </pre></div>
Offset 1642, 18 lines modifiedOffset 1642, 18 lines modified
1642 Dimensions:·······(time:·731,·location:·3)1642 Dimensions:·······(time:·731,·location:·3)
1643 Coordinates:1643 Coordinates:
1644 ··*·time··········(time)·datetime64[ns]·6kB·2000-01-01·2000-01-02·...·2001-12-311644 ··*·time··········(time)·datetime64[ns]·6kB·2000-01-01·2000-01-02·...·2001-12-31
1645 ··*·location······(location)·&lt;U2·24B·&#x27;IA&#x27;·&#x27;IN&#x27;·&#x27;IL&#x27;1645 ··*·location······(location)·&lt;U2·24B·&#x27;IA&#x27;·&#x27;IN&#x27;·&#x27;IL&#x27;
1646 ····month·········(time)·int64·6kB·1·1·1·1·1·1·1·1·1·...·12·12·12·12·12·12·12·121646 ····month·········(time)·int64·6kB·1·1·1·1·1·1·1·1·1·...·12·12·12·12·12·12·12·12
1647 Data·variables:1647 Data·variables:
1648 ····some_missing··(time,·location)·float64·18kB·nan·nan·nan·...·-1.346·-4.5441648 ····some_missing··(time,·location)·float64·18kB·nan·nan·nan·...·-1.346·-4.544
1649 ····filled········(time,·location)·float64·18kB·-5.163·-4.216·...·-1.346·-4.544</pre><div·class='xr-wrap'·style='display:none'><div·class='xr-header'><div·class='xr-obj-type'>xarray.Dataset</div></div><ul·class='xr-sections'><li·class='xr-section-item'><input·id='section-7b93a378-26e1-43ba-ab43-40fc20c1b4ae'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-7b93a378-26e1-43ba-ab43-40fc20c1b4ae'·class='xr-section-summary'··title='Expand/collapse·section'>Dimensions:</label><div·class='xr-section-inl[·...·truncated·by·diffoscope;·len:·1234,·SHA:·4cb6bf9a01745f93419fa74ce3a154be822d1c0a4c2ec2c203b48569e0572624·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([&#x27;2000-01-01T00:00:00.000000000&#x27;,·&#x27;2000-01-02T00:00:00.000000000&#x27;,1649 ····filled········(time,·location)·float64·18kB·-5.163·-4.216·...·-1.346·-4.544</pre><div·class='xr-wrap'·style='display:none'><div·class='xr-header'><div·class='xr-obj-type'>xarray.Dataset</div></div><ul·class='xr-sections'><li·class='xr-section-item'><input·id='section-753c2271-0cdb-4c94-b543-926a0e8e9e57'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-753c2271-0cdb-4c94-b543-926a0e8e9e57'·class='xr-section-summary'··title='Expand/collapse·section'>Dimensions:</label><div·class='xr-section-inl[·...·truncated·by·diffoscope;·len:·1234,·SHA:·c8af1980e47e5ccad4d83ea8315be2bf6cc9166c743e86317e17df5d9f45c071·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([&#x27;2000-01-01T00:00:00.000000000&#x27;,·&#x27;2000-01-02T00:00:00.000000000&#x27;,
1650 ·······&#x27;2000-01-03T00:00:00.000000000&#x27;,·...,·&#x27;2001-12-29T00:00:00.000000000&#x27;,1650 ·······&#x27;2000-01-03T00:00:00.000000000&#x27;,·...,·&#x27;2001-12-29T00:00:00.000000000&#x27;,
1651 ·······&#x27;2001-12-30T00:00:00.000000000&#x27;,·&#x27;2001-12-31T00:00:00.000000000&#x27;],1651 ·······&#x27;2001-12-30T00:00:00.000000000&#x27;,·&#x27;2001-12-31T00:00:00.000000000&#x27;],
1652 ······dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span·class='xr-has-index'>location</span></div><div·class='xr-var-dims'>(location)</div><div·class='xr-var-dtype'>&lt;U2</div><div·class='xr-var-preview·xr-preview'>&#x27;IA&#x27;·&#x27;IN&#x27;·&#x27;IL&#x27;</div><input·id='attrs-71acbd1e-5e84-4390-aa28-1613571250cf'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-71acbd1e-5e84-4390-aa28-1613571250cf'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·1112,·SHA:·84e61dd116f1d79382aa62d76ff57f60ed6008e09aaf848654eb90af58ee5f95·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([·1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,1652 ······dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span·class='xr-has-index'>location</span></div><div·class='xr-var-dims'>(location)</div><div·class='xr-var-dtype'>&lt;U2</div><div·class='xr-var-preview·xr-preview'>&#x27;IA&#x27;·&#x27;IN&#x27;·&#x27;IL&#x27;</div><input·id='attrs-128e0fb6-a37f-47e3-8d14-596247211bb0'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-128e0fb6-a37f-47e3-8d14-596247211bb0'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·1112,·SHA:·ae92d0a51fbdcc8c6f2a65aefe64e2f92cf92713dd53a82551c30a367c187ab6·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([·1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,
1653 ········1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··2,··2,··2,1653 ········1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··2,··2,··2,
1654 ········2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,1654 ········2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,
1655 ········2,··2,··2,··2,··2,··2,··2,··2,··2,··3,··3,··3,··3,··3,··3,··3,··3,1655 ········2,··2,··2,··2,··2,··2,··2,··2,··2,··3,··3,··3,··3,··3,··3,··3,··3,
1656 ········3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,1656 ········3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,
1657 ········3,··3,··3,··3,··3,··3,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,1657 ········3,··3,··3,··3,··3,··3,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,
1658 ········4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,1658 ········4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,
1659 ········4,··4,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,1659 ········4,··4,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,
Offset 1685, 34 lines modifiedOffset 1685, 34 lines modified
1685 ········8,··8,··8,··8,··8,··8,··8,··8,··8,··8,··8,··8,··8,··8,··9,··9,··9,1685 ········8,··8,··8,··8,··8,··8,··8,··8,··8,··8,··8,··8,··8,··8,··9,··9,··9,
1686 ········9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,1686 ········9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,
1687 ········9,··9,··9,··9,··9,··9,··9,··9,··9,··9,·10,·10,·10,·10,·10,·10,·10,1687 ········9,··9,··9,··9,··9,··9,··9,··9,··9,··9,·10,·10,·10,·10,·10,·10,·10,
1688 ·······10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,1688 ·······10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,
1689 ·······10,·10,·10,·10,·10,·10,·10,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,1689 ·······10,·10,·10,·10,·10,·10,·10,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,
1690 ·······11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,1690 ·······11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,
1691 ·······11,·11,·11,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,1691 ·······11,·11,·11,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,
1692 ·······12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-d468aee9-fd49-4c76-ab93-f1ef8eb4d67a'·class='xr-section-summary-in'·type='checkbox'··checked><label·for='section-d468aee9-fd49-4c76-ab93-f1ef8eb4d67a'·class='xr-section-summary'·>Data·variables:·<span>(2)</span></label><div·class='xr-section-inline-details[·...·truncated·by·diffoscope;·len:·737,·SHA:·b35d09e6f7678652361a1fd2ba9b74967d9116fcbc1531760fbffe52f54a7e8c·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[·········nan,··········nan,··········nan],1692 ·······12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-2c2b0138-763a-4e97-a23f-268c0b7491dc'·class='xr-section-summary-in'·type='checkbox'··checked><label·for='section-2c2b0138-763a-4e97-a23f-268c0b7491dc'·class='xr-section-summary'·>Data·variables:·<span>(2)</span></label><div·class='xr-section-inline-details[·...·truncated·by·diffoscope;·len:·737,·SHA:·a52a9abea0100541d55ca8d70ad8d466967642741ff163564ba53bbf6772881a·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[·········nan,··········nan,··········nan],
1693 ·······[·········nan,··········nan,··········nan],1693 ·······[·········nan,··········nan,··········nan],
1694 ·······[·········nan,··········nan,··········nan],1694 ·······[·········nan,··········nan,··········nan],
1695 ·······...,1695 ·······...,
1696 ·······[·-5.34723825,·-13.37459826,··-4.93221199],1696 ·······[·-5.34723825,·-13.37459826,··-4.93221199],
1697 ·······[·-2.67283594,··-5.18072141,··-4.11567869],1697 ·······[·-2.67283594,··-5.18072141,··-4.11567869],
1698 ·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span>filled</span></div><div·class='xr-var-dims'>(time,·location)</div><div·class='xr-var-dtype'>float64</div><div·class='xr-var-preview·xr-preview'>-5.163·-4.216·...·-1.346·-4.544</div><input·id='attrs-1d998efe-1b4c-4db6-a115-f11079195d01'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-1d998efe-1b4c-4db6-a115-f11079195d01'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·154,·SHA:·9b5776ad1cdb07217b4f9e273e17775323d00281796b321e7bf0bdf51adc2bf5·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[·-5.16274935,··-4.21616663,··-4.68137385],1698 ·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span>filled</span></div><div·class='xr-var-dims'>(time,·location)</div><div·class='xr-var-dtype'>float64</div><div·class='xr-var-preview·xr-preview'>-5.163·-4.216·...·-1.346·-4.544</div><input·id='attrs-3c39be11-c86e-4822-a80e-e4f74455b581'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-3c39be11-c86e-4822-a80e-e4f74455b581'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·154,·SHA:·c25916a6a39b0a17d09ae8aabac62c8440336d9e8a5a3ec95ec943fc5d1f6de3·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[·-5.16274935,··-4.21616663,··-4.68137385],
1699 ·······[·-5.16274935,··-4.21616663,··-4.68137385],1699 ·······[·-5.16274935,··-4.21616663,··-4.68137385],
1700 ·······[·-5.16274935,··-4.21616663,··-4.68137385],1700 ·······[·-5.16274935,··-4.21616663,··-4.68137385],
1701 ·······...,1701 ·······...,
1702 ·······[·-5.34723825,·-13.37459826,··-4.93221199],1702 ·······[·-5.34723825,·-13.37459826,··-4.93221199],
1703 ·······[·-2.67283594,··-5.18072141,··-4.11567869],1703 ·······[·-2.67283594,··-5.18072141,··-4.11567869],
1704 ·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-b81f00ea-8dfe-409b-90cf-a7fe6ce8dd27'·class='xr-section-summary-in'·type='checkbox'··><label·for='section-b81f00ea-8dfe-409b-90cf-a7fe6ce8dd27'·class='xr-section-summary'·>Indexes:·<span>(2)</span></label><div·class='xr-section-inline-details'></div><div·c[·...·truncated·by·diffoscope;·len:·368,·SHA:·9c9e161002952208cb529babe9c15fc54f1b06bf21da509b1e700293665f45f7·...·]'·title='Show/Hide·index·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;2000-01-01&#x27;,·&#x27;2000-01-02&#x27;,·&#x27;2000-01-03&#x27;,·&#x27;2000-01-04&#x27;,1704 ·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-d617d065-e5f3-47bd-8ff2-87ba54cbf00a'·class='xr-section-summary-in'·type='checkbox'··><label·for='section-d617d065-e5f3-47bd-8ff2-87ba54cbf00a'·class='xr-section-summary'·>Indexes:·<span>(2)</span></label><div·class='xr-section-inline-details'></div><div·c[·...·truncated·by·diffoscope;·len:·368,·SHA:·f8956b5741807b3d24994f79e4ea7d7b28f3c1fbbc4a59f45ba6793070469426·...·]'·title='Show/Hide·index·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;2000-01-01&#x27;,·&#x27;2000-01-02&#x27;,·&#x27;2000-01-03&#x27;,·&#x27;2000-01-04&#x27;,
1705 ···············&#x27;2000-01-05&#x27;,·&#x27;2000-01-06&#x27;,·&#x27;2000-01-07&#x27;,·&#x27;2000-01-08&#x27;,1705 ···············&#x27;2000-01-05&#x27;,·&#x27;2000-01-06&#x27;,·&#x27;2000-01-07&#x27;,·&#x27;2000-01-08&#x27;,
1706 ···············&#x27;2000-01-09&#x27;,·&#x27;2000-01-10&#x27;,1706 ···············&#x27;2000-01-09&#x27;,·&#x27;2000-01-10&#x27;,
1707 ···············...1707 ···············...
1708 ···············&#x27;2001-12-22&#x27;,·&#x27;2001-12-23&#x27;,·&#x27;2001-12-24&#x27;,·&#x27;2001-12-25&#x27;,1708 ···············&#x27;2001-12-22&#x27;,·&#x27;2001-12-23&#x27;,·&#x27;2001-12-24&#x27;,·&#x27;2001-12-25&#x27;,
1709 ···············&#x27;2001-12-26&#x27;,·&#x27;2001-12-27&#x27;,·&#x27;2001-12-28&#x27;,·&#x27;2001-12-29&#x27;,1709 ···············&#x27;2001-12-26&#x27;,·&#x27;2001-12-27&#x27;,·&#x27;2001-12-28&#x27;,·&#x27;2001-12-29&#x27;,
1710 ···············&#x27;2001-12-30&#x27;,·&#x27;2001-12-31&#x27;],1710 ···············&#x27;2001-12-30&#x27;,·&#x27;2001-12-31&#x27;],
1711 ··············dtype=&#x27;datetime64[ns]&#x27;,·name=&#x27;time&#x27;,·length=731,·freq=&#x27;D&#x27;))</pre></div></li><li·class='xr-var-item'><div·class='xr-index-name'><div>location</div></div><div·class='xr-index-preview'>PandasIndex</div><input·type='checkbox'·disabled/><label></label><input·id='index-e55b4b02-75cb-4cf3-8f7c-680ee4f9017f'·class='xr-index-data-in'·type='checkbox'/><label·for='index-e55b4b02-75cb-4cf3-8f7c-680ee4f9017f'·title='Show/Hide·index·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><di[·...·truncated·by·diffoscope;·len:·380,·SHA:·062cf440943fc8bf0101f6a6fafb359c85e932b1c58c2b9442fdff157aaf4c8f·...·]'·class='xr-section-summary'··title='Expand/collapse·section'>Attributes:·<span>(0)</span></label><div·class='xr-section-inline-details'></div><div·class='xr-section-details'><dl·class='xr-attrs'></dl></div></li></ul></div></div></div>1711 ··············dtype=&#x27;datetime64[ns]&#x27;,·name=&#x27;time&#x27;,·length=731,·freq=&#x27;D&#x27;))</pre></div></li><li·class='xr-var-item'><div·class='xr-index-name'><div>location</div></div><div·class='xr-index-preview'>PandasIndex</div><input·type='checkbox'·disabled/><label></label><input·id='index-25b05905-12f9-49f6-95c7-aebcb4e4b86d'·class='xr-index-data-in'·type='checkbox'/><label·for='index-25b05905-12f9-49f6-95c7-aebcb4e4b86d'·title='Show/Hide·index·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><di[·...·truncated·by·diffoscope;·len:·380,·SHA:·fea910806f0fde48cec6955019b1ec7d642b77624f5cdbb6c16c8dabcdcc1582·...·]'·class='xr-section-summary'··title='Expand/collapse·section'>Attributes:·<span>(0)</span></label><div·class='xr-section-inline-details'></div><div·class='xr-section-details'><dl·class='xr-attrs'></dl></div></li></ul></div></div></div>
Max diff block lines reached; 1040/50822 bytes (2.05%) of diff not shown.
710 B
html2text {}
    
Offset 142, 15 lines modifiedOffset 142, 15 lines modified
142 [4]:142 [4]:
143 <Axes:·xlabel='time'>143 <Axes:·xlabel='time'>
144 [../_images/examples_weather-data_7_1.png]144 [../_images/examples_weather-data_7_1.png]
145 *\x8**\x8**\x8**\x8*·V\x8Vi\x8is\x8su\x8ua\x8al\x8li\x8iz\x8ze\x8e·u\x8us\x8si\x8in\x8ng\x8g·s\x8se\x8ea\x8ab\x8bo\x8or\x8rn\x8n_\x8?\x8·*\x8**\x8**\x8**\x8*145 *\x8**\x8**\x8**\x8*·V\x8Vi\x8is\x8su\x8ua\x8al\x8li\x8iz\x8ze\x8e·u\x8us\x8si\x8in\x8ng\x8g·s\x8se\x8ea\x8ab\x8bo\x8or\x8rn\x8n_\x8?\x8·*\x8**\x8**\x8**\x8*
146 [5]:146 [5]:
147 sns.pairplot(df.reset_index(),·vars=ds.data_vars)147 sns.pairplot(df.reset_index(),·vars=ds.data_vars)
148 [5]:148 [5]:
149 <seaborn.axisgrid.PairGrid·at·0x7fa7dd16ee40>149 <seaborn.axisgrid.PairGrid·at·0x7fb4a7f96e40>
150 [../_images/examples_weather-data_9_1.png]150 [../_images/examples_weather-data_9_1.png]
151 *\x8**\x8**\x8**\x8**\x8*·P\x8Pr\x8ro\x8ob\x8ba\x8ab\x8bi\x8il\x8li\x8it\x8ty\x8y·o\x8of\x8f·f\x8fr\x8re\x8ee\x8ez\x8ze\x8e·b\x8by\x8y·c\x8ca\x8al\x8le\x8en\x8nd\x8da\x8ar\x8r·m\x8mo\x8on\x8nt\x8th\x8h_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*151 *\x8**\x8**\x8**\x8**\x8*·P\x8Pr\x8ro\x8ob\x8ba\x8ab\x8bi\x8il\x8li\x8it\x8ty\x8y·o\x8of\x8f·f\x8fr\x8re\x8ee\x8ez\x8ze\x8e·b\x8by\x8y·c\x8ca\x8al\x8le\x8en\x8nd\x8da\x8ar\x8r·m\x8mo\x8on\x8nt\x8th\x8h_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
152 [6]:152 [6]:
153 freeze·=·(ds["tmin"]·<=·0).groupby("time.month").mean("time")153 freeze·=·(ds["tmin"]·<=·0).groupby("time.month").mean("time")
154 freeze154 freeze
155 [6]:155 [6]:
156 <xarray.DataArray·'tmin'·(month:·12,·location:·3)>·Size:·288B156 <xarray.DataArray·'tmin'·(month:·12,·location:·3)>·Size:·288B
66.8 KB
./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz
66.7 KB
weather-data.ipynb
66.7 KB
Pretty-printed
Similarity: 0.9992323269378145% Differences: {"'cells'": "{1: {'metadata': {'execution': {'iopub.execute_input': '2026-03-15T16:13:59.670517Z', " "'iopub.status.busy': '2026-03-15T16:13:59.669971Z', 'iopub.status.idle': " "'2026-03-15T16:14:09.649013Z', 'shell.execute_reply': " "'2026-03-15T16:14:09.647709Z'}}, 'outputs': {0: {'data': {'text/html': {insert: " '[(377, " tmax (time, location) float64 18kB 12.98 3.31 6.779 ... 3.343 ' "3.805</pre><div class='xr-wrap' style='display:none' […]
    
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-02-10T07:27:18.651154Z",22 ····················"iopub.execute_input":·"2026-03-15T16:13:59.670517Z",
23 ····················"iopub.status.busy":·"2025-02-10T07:27:18.650690Z",23 ····················"iopub.status.busy":·"2026-03-15T16:13:59.669971Z",
24 ····················"iopub.status.idle":·"2025-02-10T07:27:30.546538Z",24 ····················"iopub.status.idle":·"2026-03-15T16:14:09.649013Z",
25 ····················"shell.execute_reply":·"2025-02-10T07:27:30.530485Z"25 ····················"shell.execute_reply":·"2026-03-15T16:14:09.647709Z"
26 ················}26 ················}
27 ············},27 ············},
28 ············"outputs":·[28 ············"outputs":·[
29 ················{29 ················{
30 ····················"data":·{30 ····················"data":·{
31 ························"text/html":·[31 ························"text/html":·[
32 ····························"<div><svg·style=\"position:·absolute;·width:·0;·height:·0;·overflow:·hidden\">\n",32 ····························"<div><svg·style=\"position:·absolute;·width:·0;·height:·0;·overflow:·hidden\">\n",
Offset 402, 37 lines modifiedOffset 402, 37 lines modified
402 ····························"</style><pre·class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;·Size:·41kB\n",402 ····························"</style><pre·class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;·Size:·41kB\n",
403 ····························"Dimensions:···(time:·731,·location:·3)\n",403 ····························"Dimensions:···(time:·731,·location:·3)\n",
404 ····························"Coordinates:\n",404 ····························"Coordinates:\n",
405 ····························"··*·time······(time)·datetime64[ns]·6kB·2000-01-01·2000-01-02·...·2001-12-31\n",405 ····························"··*·time······(time)·datetime64[ns]·6kB·2000-01-01·2000-01-02·...·2001-12-31\n",
406 ····························"··*·location··(location)·&lt;U2·24B·&#x27;IA&#x27;·&#x27;IN&#x27;·&#x27;IL&#x27;\n",406 ····························"··*·location··(location)·&lt;U2·24B·&#x27;IA&#x27;·&#x27;IN&#x27;·&#x27;IL&#x27;\n",
407 ····························"Data·variables:\n",407 ····························"Data·variables:\n",
408 ····························"····tmin······(time,·location)·float64·18kB·-8.037·-1.788·...·-1.346·-4.544\n",408 ····························"····tmin······(time,·location)·float64·18kB·-8.037·-1.788·...·-1.346·-4.544\n",
409 ····························"····tmax······(time,·location)·float64·18kB·12.98·3.31·6.779·...·3.343·3.805</pre><div·class='xr-wrap'·style='display:none'><div·class='xr-header'><div·class='xr-obj-type'>xarray.Dataset</div></div><ul·class='xr-sections'><li·class='xr-section-item'><input·id='section-5f4a9642-acc8-41d1-b82f-753c7d3e8e8d'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-5f4a9642-acc8-41d1-b82f-753c7d3e8e8d'·class='xr-section-summary'··title='Expand/collapse·section'>Dimensions:</label><div·class='xr-section-in[·...·truncated·by·diffoscope;·len:·1235,·SHA:·4f3e63c56e7a8b159d8b51d94e4680af5f1828f37e112d43def4ed6b1233a987·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([&#x27;2000-01-01T00:00:00.000000000&#x27;,·&#x27;2000-01-02T00:00:00.000000000&#x27;,\n",409 ····························"····tmax······(time,·location)·float64·18kB·12.98·3.31·6.779·...·3.343·3.805</pre><div·class='xr-wrap'·style='display:none'><div·class='xr-header'><div·class='xr-obj-type'>xarray.Dataset</div></div><ul·class='xr-sections'><li·class='xr-section-item'><input·id='section-17061c3d-bafd-4f11-a562-7b553fddce6f'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-17061c3d-bafd-4f11-a562-7b553fddce6f'·class='xr-section-summary'··title='Expand/collapse·section'>Dimensions:</label><div·class='xr-section-in[·...·truncated·by·diffoscope;·len:·1235,·SHA:·df750505f072ef5d2afda83ec4ac3b150d1a9fb1db476ac3a31ece1cb69b8a8e·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([&#x27;2000-01-01T00:00:00.000000000&#x27;,·&#x27;2000-01-02T00:00:00.000000000&#x27;,\n",
410 ····························"·······&#x27;2000-01-03T00:00:00.000000000&#x27;,·...,·&#x27;2001-12-29T00:00:00.000000000&#x27;,\n",410 ····························"·······&#x27;2000-01-03T00:00:00.000000000&#x27;,·...,·&#x27;2001-12-29T00:00:00.000000000&#x27;,\n",
411 ····························"·······&#x27;2001-12-30T00:00:00.000000000&#x27;,·&#x27;2001-12-31T00:00:00.000000000&#x27;],\n",411 ····························"·······&#x27;2001-12-30T00:00:00.000000000&#x27;,·&#x27;2001-12-31T00:00:00.000000000&#x27;],\n",
412 ····························"······dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span·class='xr-has-index'>location</span></div><div·class='xr-var-dims'>(location)</div><div·class='xr-var-dtype'>&lt;U2</div><div·class='xr-var-preview·xr-preview'>&#x27;IA&#x27;·&#x27;IN&#x27;·&#x27;IL&#x27;</div><input·id='attrs-a8de52be-e014-4399-9c2c-d74d18948150'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-a8de52be-e014-4399-9c2c-d74d18948150'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·1502,·SHA:·44e0e41b1e682913caa3067563f96f3a08b324fc4924545fc60cbc166701abbd·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[·-8.03736932,··-1.78844117,··-3.93154201],\n",412 ····························"······dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span·class='xr-has-index'>location</span></div><div·class='xr-var-dims'>(location)</div><div·class='xr-var-dtype'>&lt;U2</div><div·class='xr-var-preview·xr-preview'>&#x27;IA&#x27;·&#x27;IN&#x27;·&#x27;IL&#x27;</div><input·id='attrs-3a2be897-729a-4689-9e4e-6c0aec3236c2'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-3a2be897-729a-4689-9e4e-6c0aec3236c2'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·1502,·SHA:·1414b0eefa620d758468ea6f1ddd28b23a82132acd62e4e1a03d18de69332cb3·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[·-8.03736932,··-1.78844117,··-3.93154201],\n",
413 ····························"·······[·-9.34115662,··-6.55807323,···0.13203714],\n",413 ····························"·······[·-9.34115662,··-6.55807323,···0.13203714],\n",
414 ····························"·······[-12.13971902,··-6.14641918,··-1.06187252],\n",414 ····························"·······[-12.13971902,··-6.14641918,··-1.06187252],\n",
415 ····························"·······...,\n",415 ····························"·······...,\n",
416 ····························"·······[·-5.34723825,·-13.37459826,··-4.93221199],\n",416 ····························"·······[·-5.34723825,·-13.37459826,··-4.93221199],\n",
417 ····························"·······[·-2.67283594,··-5.18072141,··-4.11567869],\n",417 ····························"·······[·-2.67283594,··-5.18072141,··-4.11567869],\n",
418 ····························"·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span>tmax</span></div><div·class='xr-var-dims'>(time,·location)</div><div·class='xr-var-dtype'>float64</div><div·class='xr-var-preview·xr-preview'>12.98·3.31·6.779·...·3.343·3.805</div><input·id='attrs-e421d4f9-ba5c-4e4e-8a41-97d11f43471d'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-e421d4f9-ba5c-4e4e-8a41-97d11f43471d'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·154,·SHA:·f7dd3b2a5cabcd1299fb2c16fbe9e6feb559d9621609c232581fc9e9887532ae·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[12.98054898,··3.31040942,··6.77855382],\n",418 ····························"·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span>tmax</span></div><div·class='xr-var-dims'>(time,·location)</div><div·class='xr-var-dtype'>float64</div><div·class='xr-var-preview·xr-preview'>12.98·3.31·6.779·...·3.343·3.805</div><input·id='attrs-2cf386c8-1065-44ce-860b-ebceef5f540b'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-2cf386c8-1065-44ce-860b-ebceef5f540b'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·154,·SHA:·1866d7ffb9d31296c27e7ccca169becdb31fa628197745d1f6b4ce22eb8839ed·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[12.98054898,··3.31040942,··6.77855382],\n",
419 ····························"·······[·0.44785582,··6.37271154,··4.8434966·],\n",419 ····························"·······[·0.44785582,··6.37271154,··4.8434966·],\n",
420 ····························"·······[·5.32269851,··6.25176289,··5.98033045],\n",420 ····························"·······[·5.32269851,··6.25176289,··5.98033045],\n",
421 ····························"·······...,\n",421 ····························"·······...,\n",
422 ····························"·······[·6.73078492,··7.74795302,··8.04569651],\n",422 ····························"·······[·6.73078492,··7.74795302,··8.04569651],\n",
423 ····························"·······[·6.46376911,··6.31695352,··1.55799171],\n",423 ····························"·······[·6.46376911,··6.31695352,··1.55799171],\n",
424 ····························"·······[·6.63593435,··3.34271537,··3.80527925]])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-049072dc-42e3-4f76-928b-b0142bb61f17'·class='xr-section-summary-in'·type='checkbox'··><label·for='section-049072dc-42e3-4f76-928b-b0142bb61f17'·class='xr-section-summary'·>Indexes:·<span>(2)</span></label><div·class='xr-section-inline-details'></div><div·c[·...·truncated·by·diffoscope;·len:·368,·SHA:·24825b0e47c74c35c312a3e7ad5ceb8df008decb642008ed664de19bc5f0f0d6·...·]'·title='Show/Hide·index·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;2000-01-01&#x27;,·&#x27;2000-01-02&#x27;,·&#x27;2000-01-03&#x27;,·&#x27;2000-01-04&#x27;,\n",424 ····························"·······[·6.63593435,··3.34271537,··3.80527925]])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-b09fad0f-2d4a-4d1a-8c39-c577ca370c66'·class='xr-section-summary-in'·type='checkbox'··><label·for='section-b09fad0f-2d4a-4d1a-8c39-c577ca370c66'·class='xr-section-summary'·>Indexes:·<span>(2)</span></label><div·class='xr-section-inline-details'></div><div·c[·...·truncated·by·diffoscope;·len:·368,·SHA:·b56bffa7870e31fb224209dac58ef5881176fa1efcec2a6d7b77bae094c25f5a·...·]'·title='Show/Hide·index·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;2000-01-01&#x27;,·&#x27;2000-01-02&#x27;,·&#x27;2000-01-03&#x27;,·&#x27;2000-01-04&#x27;,\n",
425 ····························"···············&#x27;2000-01-05&#x27;,·&#x27;2000-01-06&#x27;,·&#x27;2000-01-07&#x27;,·&#x27;2000-01-08&#x27;,\n",425 ····························"···············&#x27;2000-01-05&#x27;,·&#x27;2000-01-06&#x27;,·&#x27;2000-01-07&#x27;,·&#x27;2000-01-08&#x27;,\n",
426 ····························"···············&#x27;2000-01-09&#x27;,·&#x27;2000-01-10&#x27;,\n",426 ····························"···············&#x27;2000-01-09&#x27;,·&#x27;2000-01-10&#x27;,\n",
427 ····························"···············...\n",427 ····························"···············...\n",
428 ····························"···············&#x27;2001-12-22&#x27;,·&#x27;2001-12-23&#x27;,·&#x27;2001-12-24&#x27;,·&#x27;2001-12-25&#x27;,\n",428 ····························"···············&#x27;2001-12-22&#x27;,·&#x27;2001-12-23&#x27;,·&#x27;2001-12-24&#x27;,·&#x27;2001-12-25&#x27;,\n",
429 ····························"···············&#x27;2001-12-26&#x27;,·&#x27;2001-12-27&#x27;,·&#x27;2001-12-28&#x27;,·&#x27;2001-12-29&#x27;,\n",429 ····························"···············&#x27;2001-12-26&#x27;,·&#x27;2001-12-27&#x27;,·&#x27;2001-12-28&#x27;,·&#x27;2001-12-29&#x27;,\n",
430 ····························"···············&#x27;2001-12-30&#x27;,·&#x27;2001-12-31&#x27;],\n",430 ····························"···············&#x27;2001-12-30&#x27;,·&#x27;2001-12-31&#x27;],\n",
431 ····························"··············dtype=&#x27;datetime64[ns]&#x27;,·name=&#x27;time&#x27;,·length=731,·freq=&#x27;D&#x27;))</pre></div></li><li·class='xr-var-item'><div·class='xr-index-name'><div>location</div></div><div·class='xr-index-preview'>PandasIndex</div><input·type='checkbox'·disabled/><label></label><input·id='index-9d734806-42cc-4f27-bf1c-c22f5c04b85a'·class='xr-index-data-in'·type='checkbox'/><label·for='index-9d734806-42cc-4f27-bf1c-c22f5c04b85a'·title='Show/Hide·index·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><di[·...·truncated·by·diffoscope;·len:·380,·SHA:·17a6eda2519303c00c4f160e30554b3df5af0f691e1423de408ca467111668dd·...·]'·class='xr-section-summary'··title='Expand/collapse·section'>Attributes:·<span>(0)</span></label><div·class='xr-section-inline-details'></div><div·class='xr-section-details'><dl·class='xr-attrs'></dl></div></li></ul></div></div>"431 ····························"··············dtype=&#x27;datetime64[ns]&#x27;,·name=&#x27;time&#x27;,·length=731,·freq=&#x27;D&#x27;))</pre></div></li><li·class='xr-var-item'><div·class='xr-index-name'><div>location</div></div><div·class='xr-index-preview'>PandasIndex</div><input·type='checkbox'·disabled/><label></label><input·id='index-8ff54352-ff5c-4297-90cb-fcdbe59e378f'·class='xr-index-data-in'·type='checkbox'/><label·for='index-8ff54352-ff5c-4297-90cb-fcdbe59e378f'·title='Show/Hide·index·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><di[·...·truncated·by·diffoscope;·len:·380,·SHA:·3c216befe224a834b01fe7146ec29a59bf9f75f3b536924bc792d3b33da59d96·...·]'·class='xr-section-summary'··title='Expand/collapse·section'>Attributes:·<span>(0)</span></label><div·class='xr-section-inline-details'></div><div·class='xr-section-details'><dl·class='xr-attrs'></dl></div></li></ul></div></div>"
432 ························],432 ························],
433 ························"text/plain":·[433 ························"text/plain":·[
434 ····························"<xarray.Dataset>·Size:·41kB\n",434 ····························"<xarray.Dataset>·Size:·41kB\n",
435 ····························"Dimensions:···(time:·731,·location:·3)\n",435 ····························"Dimensions:···(time:·731,·location:·3)\n",
436 ····························"Coordinates:\n",436 ····························"Coordinates:\n",
437 ····························"··*·time······(time)·datetime64[ns]·6kB·2000-01-01·2000-01-02·...·2001-12-31\n",437 ····························"··*·time······(time)·datetime64[ns]·6kB·2000-01-01·2000-01-02·...·2001-12-31\n",
438 ····························"··*·location··(location)·<U2·24B·'IA'·'IN'·'IL'\n",438 ····························"··*·location··(location)·<U2·24B·'IA'·'IN'·'IL'\n",
Offset 494, 18 lines modifiedOffset 494, 18 lines modified
494 ············"execution_count":·2,494 ············"execution_count":·2,
495 ············"metadata":·{495 ············"metadata":·{
496 ················"ExecuteTime":·{496 ················"ExecuteTime":·{
497 ····················"end_time":·"2020-01-27T15:47:14.160297Z",497 ····················"end_time":·"2020-01-27T15:47:14.160297Z",
498 ····················"start_time":·"2020-01-27T15:47:14.126738Z"498 ····················"start_time":·"2020-01-27T15:47:14.126738Z"
499 ················},499 ················},
500 ················"execution":·{500 ················"execution":·{
501 ····················"iopub.execute_input":·"2025-02-10T07:27:30.568745Z",501 ····················"iopub.execute_input":·"2026-03-15T16:14:09.654315Z",
502 ····················"iopub.status.busy":·"2025-02-10T07:27:30.567776Z",502 ····················"iopub.status.busy":·"2026-03-15T16:14:09.653582Z",
503 ····················"iopub.status.idle":·"2025-02-10T07:27:30.718667Z",503 ····················"iopub.status.idle":·"2026-03-15T16:14:09.735911Z",
504 ····················"shell.execute_reply":·"2025-02-10T07:27:30.702470Z"504 ····················"shell.execute_reply":·"2026-03-15T16:14:09.734497Z"
505 ················}505 ················}
506 ············},506 ············},
507 ············"outputs":·[507 ············"outputs":·[
508 ················{508 ················{
509 ····················"data":·{509 ····················"data":·{
510 ························"text/html":·[510 ························"text/html":·[
511 ····························"<div>\n",511 ····························"<div>\n",
Offset 594, 18 lines modifiedOffset 594, 18 lines modified
594 ············"execution_count":·3,594 ············"execution_count":·3,
595 ············"metadata":·{595 ············"metadata":·{
596 ················"ExecuteTime":·{596 ················"ExecuteTime":·{
597 ····················"end_time":·"2020-01-27T15:47:32.682065Z",597 ····················"end_time":·"2020-01-27T15:47:32.682065Z",
598 ····················"start_time":·"2020-01-27T15:47:32.652629Z"598 ····················"start_time":·"2020-01-27T15:47:32.652629Z"
599 ················},599 ················},
600 ················"execution":·{600 ················"execution":·{
601 ····················"iopub.execute_input":·"2025-02-10T07:27:30.740676Z",601 ····················"iopub.execute_input":·"2026-03-15T16:14:09.750824Z",
602 ····················"iopub.status.busy":·"2025-02-10T07:27:30.739920Z",602 ····················"iopub.status.busy":·"2026-03-15T16:14:09.744429Z",
603 ····················"iopub.status.idle":·"2025-02-10T07:27:30.906569Z",603 ····················"iopub.status.idle":·"2026-03-15T16:14:09.797692Z",
604 ····················"shell.execute_reply":·"2025-02-10T07:27:30.894471Z"604 ····················"shell.execute_reply":·"2026-03-15T16:14:09.796800Z"
605 ················}605 ················}
606 ············},606 ············},
607 ············"outputs":·[607 ············"outputs":·[
608 ················{608 ················{
609 ····················"data":·{609 ····················"data":·{
610 ························"text/html":·[610 ························"text/html":·[
611 ····························"<div>\n",611 ····························"<div>\n",
Offset 708, 18 lines modifiedOffset 708, 18 lines modified
708 ············"execution_count":·4,708 ············"execution_count":·4,
709 ············"metadata":·{709 ············"metadata":·{
710 ················"ExecuteTime":·{710 ················"ExecuteTime":·{
711 ····················"end_time":·"2020-01-27T15:47:34.617042Z",711 ····················"end_time":·"2020-01-27T15:47:34.617042Z",
712 ····················"start_time":·"2020-01-27T15:47:34.282605Z"712 ····················"start_time":·"2020-01-27T15:47:34.282605Z"
713 ················},713 ················},
714 ················"execution":·{714 ················"execution":·{
715 ····················"iopub.execute_input":·"2025-02-10T07:27:30.928423Z",715 ····················"iopub.execute_input":·"2026-03-15T16:14:09.807869Z",
716 ····················"iopub.status.busy":·"2025-02-10T07:27:30.927831Z",716 ····················"iopub.status.busy":·"2026-03-15T16:14:09.807421Z",
717 ····················"iopub.status.idle":·"2025-02-10T07:27:33.914588Z",717 ····················"iopub.status.idle":·"2026-03-15T16:14:13.832816Z",
718 ····················"shell.execute_reply":·"2025-02-10T07:27:33.898465Z"718 ····················"shell.execute_reply":·"2026-03-15T16:14:13.831551Z"
719 ················}719 ················}
720 ············},720 ············},
721 ············"outputs":·[721 ············"outputs":·[
722 ················{722 ················{
723 ····················"data":·{723 ····················"data":·{
724 ························"text/plain":·[724 ························"text/plain":·[
725 ····························"<Axes:·xlabel='time'>"725 ····························"<Axes:·xlabel='time'>"
Offset 756, 25 lines modifiedOffset 756, 25 lines modified
756 ············"execution_count":·5,756 ············"execution_count":·5,
757 ············"metadata":·{757 ············"metadata":·{
758 ················"ExecuteTime":·{758 ················"ExecuteTime":·{
759 ····················"end_time":·"2020-01-27T15:47:37.643175Z",759 ····················"end_time":·"2020-01-27T15:47:37.643175Z",
760 ····················"start_time":·"2020-01-27T15:47:37.202479Z"760 ····················"start_time":·"2020-01-27T15:47:37.202479Z"
761 ················},761 ················},
762 ················"execution":·{762 ················"execution":·{
763 ····················"iopub.execute_input":·"2025-02-10T07:27:33.928549Z",763 ····················"iopub.execute_input":·"2026-03-15T16:14:13.840372Z",
764 ····················"iopub.status.busy":·"2025-02-10T07:27:33.927952Z",764 ····················"iopub.status.busy":·"2026-03-15T16:14:13.839461Z",
765 ····················"iopub.status.idle":·"2025-02-10T07:27:43.338572Z",765 ····················"iopub.status.idle":·"2026-03-15T16:14:18.527030Z",
766 ····················"shell.execute_reply":·"2025-02-10T07:27:43.322449Z"766 ····················"shell.execute_reply":·"2026-03-15T16:14:18.522804Z"
767 ················}767 ················}
768 ············},768 ············},
Max diff block lines reached; 44006/67673 bytes (65.03%) of diff not shown.
2.22 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·0x7fdc31c4f380&gt;</span>331 <span·class="gh">Out[37]:·</span><span·class="go">&lt;matplotlib.collections.QuadMesh·at·0x7fe007557b60&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>
884 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)·int64·16B·10·20255 ··*·x········(x)·int64·16B·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·0x7fdc31c4f380>260 Out[37]:·<matplotlib.collections.QuadMesh·at·0x7fe007557b60>
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
4.85 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·0x7fdc06cee710&gt;</span>171 <span·class="gh">Out[5]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0x7fdff1436710&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;.zmetadata&#39;,·&#39;longitude&#39;,·&#39;latitude&#39;,·&#39;.zattrs&#39;,·&#39;.zgroup&#39;]</span>174 <span·class="go">[&#39;longitude&#39;,·&#39;latitude&#39;,·&#39;.zmetadata&#39;,·&#39;.zgroup&#39;,·&#39;.zattrs&#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="go">/</span>176 <span·class="go">/</span>
177 <span·class="go">·├──·latitude·(50,)·float64</span>177 <span·class="go">·├──·latitude·(50,)·float64</span>
178 <span·class="go">·└──·longitude·(50,)·float64</span>178 <span·class="go">·└──·longitude·(50,)·float64</span>
  
179 <span·class="gp">In·[9]:·</span><span·class="nb">dict</span><span·class="p">(</span><span·class="n">zgroup</span><span·class="p">[</span><span·class="s2">&quot;Tair&quot;</span><span·class="p">]</span><span·class="o">.</span><span·class="n">attrs</span><span·class="p">)</span>179 <span·class="gp">In·[9]:·</span><span·class="nb">dict</span><span·class="p">(</span><span·class="n">zgroup</span><span·class="p">[</span><span·class="s2">&quot;Tair&quot;</span><span·class="p">]</span><span·class="o">.</span><span·class="n">attrs</span><span·class="p">)</span>
1020 B
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·0x7fdc06cee710>120 Out[5]:·<xarray.backends.zarr.ZarrStore·at·0x7fdff1436710>
  
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 ['.zmetadata',·'longitude',·'latitude',·'.zattrs',·'.zgroup']123 ['longitude',·'latitude',·'.zmetadata',·'.zgroup',·'.zattrs']
  
124 In·[8]:·print(zgroup.tree())124 In·[8]:·print(zgroup.tree())
125 /125 /
126 ·├──·latitude·(50,)·float64126 ·├──·latitude·(50,)·float64
127 ·└──·longitude·(50,)·float64127 ·└──·longitude·(50,)·float64
  
128 In·[9]:·dict(zgroup["Tair"].attrs)128 In·[9]:·dict(zgroup["Tair"].attrs)
47.6 KB
./usr/share/doc/python-xarray-doc/html/searchindex.js
47.5 KB
js-beautify {}
    
Offset 2352, 15 lines modifiedOffset 2352, 15 lines modified
2352 ········"3":·"py:property",2352 ········"3":·"py:property",
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,·9,·10,·11,·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,·9,·10,·11,·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":·[14,·36,·37,·38,·45,·47,·51,·52,·53,·54],2359 ········"00":·[14,·36,·37,·38,·45,·47,·52,·53,·54],
2360 ········"000000":·[14,·16],2360 ········"000000":·[14,·16],
2361 ········"000000000":·[14,·37,·38,·52],2361 ········"000000000":·[14,·37,·38,·52],
2362 ········"0001":·[53,·54],2362 ········"0001":·[53,·54],
2363 ········"00010101":·53,2363 ········"00010101":·53,
2364 ········"00010201":·53,2364 ········"00010201":·53,
2365 ········"00010301":·53,2365 ········"00010301":·53,
2366 ········"0002":·53,2366 ········"0002":·53,
Offset 2369, 16 lines modifiedOffset 2369, 14 lines modified
2369 ········"00021201":·53,2369 ········"00021201":·53,
2370 ········"000e":·[48,·51],2370 ········"000e":·[48,·51],
2371 ········"001e":·37,2371 ········"001e":·37,
2372 ········"005036":·40,2372 ········"005036":·40,
2373 ········"005e":·37,2373 ········"005e":·37,
2374 ········"00688889":·36,2374 ········"00688889":·36,
2375 ········"006e":·37,2375 ········"006e":·37,
2376 ········"007j":·51, 
2377 ········"008j":·51, 
2378 ········"00914929":·36,2376 ········"00914929":·36,
2379 ········"00941742":·36,2377 ········"00941742":·36,
2380 ········"00968205":·36,2378 ········"00968205":·36,
2381 ········"00973567":·36,2379 ········"00973567":·36,
2382 ········"00j":·51,2380 ········"00j":·51,
2383 ········"01":·[14,·16,·20,·26,·30,·32,·37,·38,·41,·43,·44,·45,·47,·48,·52,·53],2381 ········"01":·[14,·16,·20,·26,·30,·32,·37,·38,·41,·43,·44,·45,·47,·48,·52,·53],
2384 ········"010569":·14,2382 ········"010569":·14,
Offset 2390, 15 lines modifiedOffset 2388, 14 lines modified
2390 ········"01652764":·36,2388 ········"01652764":·36,
2391 ········"0165891":·36,2389 ········"0165891":·36,
2392 ········"01670071":·36,2390 ········"01670071":·36,
2393 ········"01670121":·36,2391 ········"01670121":·36,
2394 ········"01671269":·36,2392 ········"01671269":·36,
2395 ········"01671847":·36,2393 ········"01671847":·36,
2396 ········"01672":·36,2394 ········"01672":·36,
2397 ········"016j":·51, 
2398 ········"017":·43,2395 ········"017":·43,
2399 ········"01806694":·36,2396 ········"01806694":·36,
2400 ········"01814439":·36,2397 ········"01814439":·36,
2401 ········"0182217":·36,2398 ········"0182217":·36,
2402 ········"018e":·37,2399 ········"018e":·37,
2403 ········"019":·40,2400 ········"019":·40,
2404 ········"01906":·48,2401 ········"01906":·48,
Offset 2429, 15 lines modifiedOffset 2426, 15 lines modified
2429 ········"03642301":·36,2426 ········"03642301":·36,
2430 ········"036e":·48,2427 ········"036e":·48,
2431 ········"037":·14,2428 ········"037":·14,
2432 ········"037369":·14,2429 ········"037369":·14,
2433 ········"03736932":·14,2430 ········"03736932":·14,
2434 ········"0379266750948":·45,2431 ········"0379266750948":·45,
2435 ········"037e":·37,2432 ········"037e":·37,
2436 ········"038":·[43,·51],2433 ········"038":·43,
2437 ········"03835":·41,2434 ········"03835":·41,
2438 ········"03957499":·19,2435 ········"03957499":·19,
2439 ········"03t00":·[14,·37,·38],2436 ········"03t00":·[14,·37,·38],
2440 ········"04":·[14,·19,·36,·37,·38,·41,·43,·47,·52],2437 ········"04":·[14,·19,·36,·37,·38,·41,·43,·47,·52],
2441 ········"040347":·14,2438 ········"040347":·14,
2442 ········"04096206":·36,2439 ········"04096206":·36,
2443 ········"04097352":·36,2440 ········"04097352":·36,
Offset 2525, 71 lines modifiedOffset 2522, 71 lines modified
2525 ········"099":·41,2522 ········"099":·41,
2526 ········"09t00":·37,2523 ········"09t00":·37,
2527 ········"0alpha10":·54,2524 ········"0alpha10":·54,
2528 ········"0d":·54,2525 ········"0d":·54,
2529 ········"0dev":·54,2526 ········"0dev":·54,
2530 ········"0th":·[37,·43],2527 ········"0th":·[37,·43],
2531 ········"0x0l":·54,2528 ········"0x0l":·54,
2532 ········"0x7f70eb9525c0":·6,2529 ········"0x7f2ccaf6e480":·6,
2533 ········"0x7fa7dd16ee40":·14,2530 ········"0x7fb4a7f96e40":·14,
2534 ········"0x7fdc059dcf70":·45,2531 ········"0x7fdfe3dc4f70":·45,
2535 ········"0x7fdc059ddfc0":·45,2532 ········"0x7fdfe3dc5fc0":·45,
2536 ········"0x7fdc059de5f0":·45,2533 ········"0x7fdfe3dc65f0":·45,
2537 ········"0x7fdc059deef0":·45,2534 ········"0x7fdfe3dc6ef0":·45,
2538 ········"0x7fdc059df7f0":·45,2535 ········"0x7fdfe3dc77f0":·45,
2539 ········"0x7fdc059df880":·45,2536 ········"0x7fdfe3dc7880":·45,
2540 ········"0x7fdc05a0c690":·54,2537 ········"0x7fdfe3e39090":·54,
2541 ········"0x7fdc05ba48b0":·45,2538 ········"0x7fdfe3f8c8b0":·45,
2542 ········"0x7fdc06cee710":·32, 
2543 ········"0x7fdc06d7f230":·48, 
2544 ········"0x7fdc06d7fe00":·48, 
2545 ········"0x7fdc099ebb60":·48, 
2546 ········"0x7fdc30792c10":·38, 
2547 ········"0x7fdc30793110":·38, 
2548 ········"0x7fdc31a26490":·48, 
2549 ········"0x7fdc31a8c2f0":·48, 
2550 ········"0x7fdc31a8c590":·44, 
2551 ········"0x7fdc31ac3890":·44, 
2552 ········"0x7fdc31ac39d0":·44, 
2553 ········"0x7fdc31ac3c50":·44, 
2554 ········"0x7fdc31ac3d90":·48, 
2555 ········"0x7fdc31c4f380":·19, 
2556 ········"0x7fdc464f1450":·48,2539 ········"0x7fdff1419d30":·48,
 2540 ········"0x7fdff1436710":·32,
2557 ········"0x7fdc464f1590":·48,2541 ········"0x7fdff14c9160":·48,
 2542 ········"0x7fdff3b0f8c0":·48,
 2543 ········"0x7fe0074341a0":·48,
 2544 ········"0x7fe007434590":·44,
 2545 ········"0x7fe007464910":·48,
 2546 ········"0x7fe007465090":·44,
 2547 ········"0x7fe007467c50":·44,
 2548 ········"0x7fe007467d90":·44,
 2549 ········"0x7fe007557b60":·19,
 2550 ········"0x7fe0075c4f50":·48,
 2551 ········"0x7fe016065e50":·38,
 2552 ········"0x7fe0160660d0":·38,
 2553 ········"0x7fe0337ed450":·48,
 2554 ········"0x7fe0337ed590":·48,
 2555 ········"0x7fe0337ed6d0":·48,
 2556 ········"0x7fe0337ed810":·48,
 2557 ········"0x7fe0337ed950":·48,
 2558 ········"0x7fe0338e6d50":·48,
 2559 ········"0x7fe0338e6e90":·48,
 2560 ········"0x7fe0338e6fd0":·48,
 2561 ········"0x7fe0338e7110":·48,
 2562 ········"0x7fe0339e3d90":·48,
 2563 ········"0x7fe033a2ee90":·48,
 2564 ········"0x7fe033b0dd10":·48,
 2565 ········"0x7fe033b0de50":·48,
 2566 ········"0x7fe033b0df90":·48,
 2567 ········"0x7fe033b90cd0":·48,
 2568 ········"0x7fe03434fed0":·48,
 2569 ········"0x7fe0343e1590":·48,
Max diff block lines reached; 42697/48627 bytes (87.81%) of diff not shown.
7.13 KB
./usr/share/doc/python-xarray-doc/html/user-guide/computation.html
    
Offset 812, 15 lines modifiedOffset 812, 15 lines modified
812 <span·class="go">Dimensions:···············(degree:·2)</span>812 <span·class="go">Dimensions:···············(degree:·2)</span>
813 <span·class="go">Coordinates:</span>813 <span·class="go">Coordinates:</span>
814 <span·class="go">··*·degree················(degree)·int64·16B·1·0</span>814 <span·class="go">··*·degree················(degree)·int64·16B·1·0</span>
815 <span·class="go">Data·variables:</span>815 <span·class="go">Data·variables:</span>
816 <span·class="go">····x_matrix_rank·········int64·8B·2</span>816 <span·class="go">····x_matrix_rank·········int64·8B·2</span>
817 <span·class="go">····x_singular_values·····(degree)·float64·16B·1.358·0.3963</span>817 <span·class="go">····x_singular_values·····(degree)·float64·16B·1.358·0.3963</span>
818 <span·class="go">····polyfit_coefficients··(degree)·float64·16B·4.0·3.0</span>818 <span·class="go">····polyfit_coefficients··(degree)·float64·16B·4.0·3.0</span>
819 <span·class="go">····polyfit_residuals·····float64·8B·1.914e-28</span>819 <span·class="go">····polyfit_residuals·····float64·8B·6.474e-28</span>
820 </pre></div>820 </pre></div>
821 </div>821 </div>
822 <p>The·method·outputs·a·dataset·containing·the·coefficients·(and·more·if·<code·class="docutils·literal·notranslate"><span·class="pre">full=True</span></code>).822 <p>The·method·outputs·a·dataset·containing·the·coefficients·(and·more·if·<code·class="docutils·literal·notranslate"><span·class="pre">full=True</span></code>).
823 The·inverse·operation·is·done·with·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">polyval()</span></code>,</p>823 The·inverse·operation·is·done·with·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">polyval()</span></code>,</p>
824 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[92]:·</span><span·class="n">xr</span><span·class="o">.</span><span·class="n">polyval</span><span·class="p">(</span><span·class="n">coord</span><span·class="o">=</span><span·class="n">x</span><span·class="p">,</span>·<span·class="n">coeffs</span><span·class="o">=</span><span·class="n">out</span><span·class="o">.</span><span·class="n">polyfit_coefficients</span><span·class="p">)</span>824 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[92]:·</span><span·class="n">xr</span><span·class="o">.</span><span·class="n">polyval</span><span·class="p">(</span><span·class="n">coord</span><span·class="o">=</span><span·class="n">x</span><span·class="p">,</span>·<span·class="n">coeffs</span><span·class="o">=</span><span·class="n">out</span><span·class="o">.</span><span·class="n">polyfit_coefficients</span><span·class="p">)</span>
825 <span·class="gh">Out[92]:·</span>825 <span·class="gh">Out[92]:·</span>
826 <span·class="go">&lt;xarray.DataArray·(x:·10)&gt;·Size:·80B</span>826 <span·class="go">&lt;xarray.DataArray·(x:·10)&gt;·Size:·80B</span>
Offset 879, 15 lines modifiedOffset 879, 15 lines modified
879 <span·class="go">··*·param·······················(param)·&lt;U2·16B·&#39;a&#39;·&#39;xc&#39;</span>879 <span·class="go">··*·param·······················(param)·&lt;U2·16B·&#39;a&#39;·&#39;xc&#39;</span>
880 <span·class="go">··*·cov_i·······················(cov_i)·&lt;U2·16B·&#39;a&#39;·&#39;xc&#39;</span>880 <span·class="go">··*·cov_i·······················(cov_i)·&lt;U2·16B·&#39;a&#39;·&#39;xc&#39;</span>
881 <span·class="go">··*·cov_j·······················(cov_j)·&lt;U2·16B·&#39;a&#39;·&#39;xc&#39;</span>881 <span·class="go">··*·cov_j·······················(cov_j)·&lt;U2·16B·&#39;a&#39;·&#39;xc&#39;</span>
882 <span·class="go">Data·variables:</span>882 <span·class="go">Data·variables:</span>
883 <span·class="go">····var2_curvefit_coefficients··(x,·param)·float64·2kB·3.0·-5.0·3.0·...·3.0·4.9</span>883 <span·class="go">····var2_curvefit_coefficients··(x,·param)·float64·2kB·3.0·-5.0·3.0·...·3.0·4.9</span>
884 <span·class="go">····var2_curvefit_covariance····(x,·cov_i,·cov_j)·float64·3kB·9.286e-14·...·1...</span>884 <span·class="go">····var2_curvefit_covariance····(x,·cov_i,·cov_j)·float64·3kB·9.286e-14·...·1...</span>
885 <span·class="go">····var3_curvefit_coefficients··(x,·param)·float64·2kB·0.9999·5.0·...·1.0·-4.9</span>885 <span·class="go">····var3_curvefit_coefficients··(x,·param)·float64·2kB·0.9999·5.0·...·1.0·-4.9</span>
886 <span·class="go">····var3_curvefit_covariance····(x,·cov_i,·cov_j)·float64·3kB·5.825e-11·...·1...</span>886 <span·class="go">····var3_curvefit_covariance····(x,·cov_i,·cov_j)·float64·3kB·5.825e-11·...·6...</span>
887 </pre></div>887 </pre></div>
888 </div>888 </div>
889 <p>We·can·also·fit·multi-dimensional·functions,·and·even·use·a·wrapper·function·to889 <p>We·can·also·fit·multi-dimensional·functions,·and·even·use·a·wrapper·function·to
890 simultaneously·fit·a·summation·of·several·functions,·such·as·this·field·containing890 simultaneously·fit·a·summation·of·several·functions,·such·as·this·field·containing
891 two·gaussian·peaks:</p>891 two·gaussian·peaks:</p>
892 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[102]:·</span><span·class="k">def</span>·<span·class="nf">gaussian_2d</span><span·class="p">(</span><span·class="n">coords</span><span·class="p">,</span>·<span·class="n">a</span><span·class="p">,</span>·<span·class="n">xc</span><span·class="p">,</span>·<span·class="n">yc</span><span·class="p">,</span>·<span·class="n">xalpha</span><span·class="p">,</span>·<span·class="n">yalpha</span><span·class="p">):</span>892 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[102]:·</span><span·class="k">def</span>·<span·class="nf">gaussian_2d</span><span·class="p">(</span><span·class="n">coords</span><span·class="p">,</span>·<span·class="n">a</span><span·class="p">,</span>·<span·class="n">xc</span><span·class="p">,</span>·<span·class="n">yc</span><span·class="p">,</span>·<span·class="n">xalpha</span><span·class="p">,</span>·<span·class="n">yalpha</span><span·class="p">):</span>
893 <span·class="gp">···.....:·</span>····<span·class="n">x</span><span·class="p">,</span>·<span·class="n">y</span>·<span·class="o">=</span>·<span·class="n">coords</span>893 <span·class="gp">···.....:·</span>····<span·class="n">x</span><span·class="p">,</span>·<span·class="n">y</span>·<span·class="o">=</span>·<span·class="n">coords</span>
Offset 935, 15 lines modifiedOffset 935, 15 lines modified
935 <span·class="go">Dimensions:················(param:·10,·cov_i:·10,·cov_j:·10)</span>935 <span·class="go">Dimensions:················(param:·10,·cov_i:·10,·cov_j:·10)</span>
936 <span·class="go">Coordinates:</span>936 <span·class="go">Coordinates:</span>
937 <span·class="go">··*·param··················(param)·&lt;U7·280B·&#39;a0&#39;·&#39;xc0&#39;·...·&#39;xalpha1&#39;·&#39;yalpha1&#39;</span>937 <span·class="go">··*·param··················(param)·&lt;U7·280B·&#39;a0&#39;·&#39;xc0&#39;·...·&#39;xalpha1&#39;·&#39;yalpha1&#39;</span>
938 <span·class="go">··*·cov_i··················(cov_i)·&lt;U7·280B·&#39;a0&#39;·&#39;xc0&#39;·...·&#39;xalpha1&#39;·&#39;yalpha1&#39;</span>938 <span·class="go">··*·cov_i··················(cov_i)·&lt;U7·280B·&#39;a0&#39;·&#39;xc0&#39;·...·&#39;xalpha1&#39;·&#39;yalpha1&#39;</span>
939 <span·class="go">··*·cov_j··················(cov_j)·&lt;U7·280B·&#39;a0&#39;·&#39;xc0&#39;·...·&#39;xalpha1&#39;·&#39;yalpha1&#39;</span>939 <span·class="go">··*·cov_j··················(cov_j)·&lt;U7·280B·&#39;a0&#39;·&#39;xc0&#39;·...·&#39;xalpha1&#39;·&#39;yalpha1&#39;</span>
940 <span·class="go">Data·variables:</span>940 <span·class="go">Data·variables:</span>
941 <span·class="go">····curvefit_coefficients··(param)·float64·80B·1.994·-0.9986·...·1.999·0.9986</span>941 <span·class="go">····curvefit_coefficients··(param)·float64·80B·1.994·-0.9986·...·1.999·0.9986</span>
942 <span·class="go">····curvefit_covariance····(cov_i,·cov_j)·float64·800B·6.557e-05·...·4.467e-06</span>942 <span·class="go">····curvefit_covariance····(cov_i,·cov_j)·float64·800B·6.556e-05·...·4.467e-06</span>
943 </pre></div>943 </pre></div>
944 </div>944 </div>
945 <div·class="admonition·note">945 <div·class="admonition·note">
946 <p·class="admonition-title">Note</p>946 <p·class="admonition-title">Note</p>
947 <p>This·method·replicates·the·behavior·of·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">scipy.optimize.curve_fit()</span></code>.</p>947 <p>This·method·replicates·the·behavior·of·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">scipy.optimize.curve_fit()</span></code>.</p>
948 </div>948 </div>
949 </section>949 </section>
2.59 KB
html2text {}
    
Offset 658, 15 lines modifiedOffset 658, 15 lines modified
658 Dimensions:···············(degree:·2)658 Dimensions:···············(degree:·2)
659 Coordinates:659 Coordinates:
660 ··*·degree················(degree)·int64·16B·1·0660 ··*·degree················(degree)·int64·16B·1·0
661 Data·variables:661 Data·variables:
662 ····x_matrix_rank·········int64·8B·2662 ····x_matrix_rank·········int64·8B·2
663 ····x_singular_values·····(degree)·float64·16B·1.358·0.3963663 ····x_singular_values·····(degree)·float64·16B·1.358·0.3963
664 ····polyfit_coefficients··(degree)·float64·16B·4.0·3.0664 ····polyfit_coefficients··(degree)·float64·16B·4.0·3.0
665 ····polyfit_residuals·····float64·8B·1.914e-28665 ····polyfit_residuals·····float64·8B·6.474e-28
666 The·method·outputs·a·dataset·containing·the·coefficients·(and·more·if666 The·method·outputs·a·dataset·containing·the·coefficients·(and·more·if
667 full=True).·The·inverse·operation·is·done·with·polyval(),667 full=True).·The·inverse·operation·is·done·with·polyval(),
668 In·[92]:·xr.polyval(coord=x,·coeffs=out.polyfit_coefficients)668 In·[92]:·xr.polyval(coord=x,·coeffs=out.polyfit_coefficients)
669 Out[92]:669 Out[92]:
670 <xarray.DataArray·(x:·10)>·Size:·80B670 <xarray.DataArray·(x:·10)>·Size:·80B
671 array([·3.,··7.,·11.,·15.,·19.,·23.,·27.,·31.,·35.,·39.])671 array([·3.,··7.,·11.,·15.,·19.,·23.,·27.,·31.,·35.,·39.])
672 Dimensions·without·coordinates:·x672 Dimensions·without·coordinates:·x
Offset 721, 15 lines modifiedOffset 721, 15 lines modified
721 ··*·cov_j·······················(cov_j)·<U2·16B·'a'·'xc'721 ··*·cov_j·······················(cov_j)·<U2·16B·'a'·'xc'
722 Data·variables:722 Data·variables:
723 ····var2_curvefit_coefficients··(x,·param)·float64·2kB·3.0·-5.0·3.0·...·3.0·4.9723 ····var2_curvefit_coefficients··(x,·param)·float64·2kB·3.0·-5.0·3.0·...·3.0·4.9
724 ····var2_curvefit_covariance····(x,·cov_i,·cov_j)·float64·3kB·9.286e-14·...724 ····var2_curvefit_covariance····(x,·cov_i,·cov_j)·float64·3kB·9.286e-14·...
725 1...725 1...
726 ····var3_curvefit_coefficients··(x,·param)·float64·2kB·0.9999·5.0·...·1.0·-4.9726 ····var3_curvefit_coefficients··(x,·param)·float64·2kB·0.9999·5.0·...·1.0·-4.9
727 ····var3_curvefit_covariance····(x,·cov_i,·cov_j)·float64·3kB·5.825e-11·...727 ····var3_curvefit_covariance····(x,·cov_i,·cov_j)·float64·3kB·5.825e-11·...
728 1...728 6...
729 We·can·also·fit·multi-dimensional·functions,·and·even·use·a·wrapper·function·to729 We·can·also·fit·multi-dimensional·functions,·and·even·use·a·wrapper·function·to
730 simultaneously·fit·a·summation·of·several·functions,·such·as·this·field730 simultaneously·fit·a·summation·of·several·functions,·such·as·this·field
731 containing·two·gaussian·peaks:731 containing·two·gaussian·peaks:
732 In·[102]:·def·gaussian_2d(coords,·a,·xc,·yc,·xalpha,·yalpha):732 In·[102]:·def·gaussian_2d(coords,·a,·xc,·yc,·xalpha,·yalpha):
733 ···.....:·····x,·y·=·coords733 ···.....:·····x,·y·=·coords
734 ···.....:·····z·=·a·*·np.exp(734 ···.....:·····z·=·a·*·np.exp(
735 ···.....:·········-np.square(x·-·xc)·/·2·/·np.square(xalpha)735 ···.....:·········-np.square(x·-·xc)·/·2·/·np.square(xalpha)
Offset 776, 15 lines modifiedOffset 776, 15 lines modified
776 Dimensions:················(param:·10,·cov_i:·10,·cov_j:·10)776 Dimensions:················(param:·10,·cov_i:·10,·cov_j:·10)
777 Coordinates:777 Coordinates:
778 ··*·param··················(param)·<U7·280B·'a0'·'xc0'·...·'xalpha1'·'yalpha1'778 ··*·param··················(param)·<U7·280B·'a0'·'xc0'·...·'xalpha1'·'yalpha1'
779 ··*·cov_i··················(cov_i)·<U7·280B·'a0'·'xc0'·...·'xalpha1'·'yalpha1'779 ··*·cov_i··················(cov_i)·<U7·280B·'a0'·'xc0'·...·'xalpha1'·'yalpha1'
780 ··*·cov_j··················(cov_j)·<U7·280B·'a0'·'xc0'·...·'xalpha1'·'yalpha1'780 ··*·cov_j··················(cov_j)·<U7·280B·'a0'·'xc0'·...·'xalpha1'·'yalpha1'
781 Data·variables:781 Data·variables:
782 ····curvefit_coefficients··(param)·float64·80B·1.994·-0.9986·...·1.999·0.9986782 ····curvefit_coefficients··(param)·float64·80B·1.994·-0.9986·...·1.999·0.9986
783 ····curvefit_covariance····(cov_i,·cov_j)·float64·800B·6.557e-05·...·4.467e-06783 ····curvefit_covariance····(cov_i,·cov_j)·float64·800B·6.556e-05·...·4.467e-06
784 Note784 Note
785 This·method·replicates·the·behavior·of·scipy.optimize.curve_fit().785 This·method·replicates·the·behavior·of·scipy.optimize.curve_fit().
786 *\x8**\x8**\x8**\x8**\x8*·B\x8Br\x8ro\x8oa\x8ad\x8dc\x8ca\x8as\x8st\x8ti\x8in\x8ng\x8g·b\x8by\x8y·d\x8di\x8im\x8me\x8en\x8ns\x8si\x8io\x8on\x8n·n\x8na\x8am\x8me\x8e_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*786 *\x8**\x8**\x8**\x8**\x8*·B\x8Br\x8ro\x8oa\x8ad\x8dc\x8ca\x8as\x8st\x8ti\x8in\x8ng\x8g·b\x8by\x8y·d\x8di\x8im\x8me\x8en\x8ns\x8si\x8io\x8on\x8n·n\x8na\x8am\x8me\x8e_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
787 DataArray·objects·automatically·align·themselves·(“broadcasting”·in·the·numpy787 DataArray·objects·automatically·align·themselves·(“broadcasting”·in·the·numpy
788 parlance)·by·dimension·name·instead·of·axis·order.·With·xarray,·you·do·not·need788 parlance)·by·dimension·name·instead·of·axis·order.·With·xarray,·you·do·not·need
789 to·transpose·arrays·or·insert·dimensions·of·length·1·to·get·array·operations·to789 to·transpose·arrays·or·insert·dimensions·of·length·1·to·get·array·operations·to
790 work,·as·commonly·done·in·numpy·with·numpy.reshape()·or·numpy.newaxis.790 work,·as·commonly·done·in·numpy·with·numpy.reshape()·or·numpy.newaxis.
4.98 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·0x7fdc30792c10&gt;]</span>738 <span·class="gh">Out[64]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0x7fe0160660d0&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·0x7fdc30793110&gt;]</span>740 <span·class="gh">Out[65]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0x7fe016065e50&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.35 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·0x7fdc30792c10>]592 Out[64]:·[<matplotlib.lines.Line2D·at·0x7fe0160660d0>]
  
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·0x7fdc30793110>]595 Out[65]:·[<matplotlib.lines.Line2D·at·0x7fe016065e50>]
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.9 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·0x7fdc31ac3c50&gt;]</span>243 <span·class="gh">Out[17]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0x7fe007467c50&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·0x7fdc31ac39d0&gt;]</span>245 <span·class="gh">Out[18]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0x7fe007467d90&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·0x7fdc31ac3890&gt;]</span>247 <span·class="gh">Out[19]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0x7fe007465090&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·0x7fdc31a8c590&gt;</span>249 <span·class="gh">Out[20]:·</span><span·class="go">&lt;matplotlib.legend.Legend·at·0x7fe007434590&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.51 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·0x7fdc31ac3c50>]160 Out[17]:·[<matplotlib.lines.Line2D·at·0x7fe007467c50>]
  
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·0x7fdc31ac39d0>]163 Out[18]:·[<matplotlib.lines.Line2D·at·0x7fe007467d90>]
  
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·0x7fdc31ac3890>]166 Out[19]:·[<matplotlib.lines.Line2D·at·0x7fe007465090>]
  
167 In·[20]:·plt.legend()167 In·[20]:·plt.legend()
168 Out[20]:·<matplotlib.legend.Legend·at·0x7fdc31a8c590>168 Out[20]:·<matplotlib.legend.Legend·at·0x7fe007434590>
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
  
  
27.8 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·0x7fdc059dcf70&gt;</span>636 <span·class="gh">Out[13]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0x7fdfe3dc4f70&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-af9d4dd9-87f0-440e-8dfa-98f88ce57850&#39;)</span>728 <span·class="gh">Out[20]:·</span><span·class="go">Delayed(&#39;_finalize_store-1e7684b3-4ea6-4f9f-9f57-7f24bf314cc5&#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·0x7fdc059de5f0&gt;</span>742 <span·class="gh">Out[22]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0x7fdfe3dc65f0&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·0x7fdc059ddfc0&gt;</span>744 <span·class="gh">Out[23]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0x7fdfe3dc5fc0&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·0x7fdc05ba48b0&gt;</span>746 <span·class="gh">Out[24]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0x7fdfe3f8c8b0&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 769, 15 lines modifiedOffset 769, 15 lines modified
769 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[25]:·</span><span·class="kn">import</span>·<span·class="nn">zarr</span>769 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[25]:·</span><span·class="kn">import</span>·<span·class="nn">zarr</span>
  
770 <span·class="gp">In·[26]:·</span><span·class="kn">from</span>·<span·class="nn">numcodecs.blosc</span>·<span·class="kn">import</span>·<span·class="n">Blosc</span>770 <span·class="gp">In·[26]:·</span><span·class="kn">from</span>·<span·class="nn">numcodecs.blosc</span>·<span·class="kn">import</span>·<span·class="n">Blosc</span>
  
771 <span·class="gp">In·[27]:·</span><span·class="n">compressor</span>·<span·class="o">=</span>·<span·class="n">Blosc</span><span·class="p">(</span><span·class="n">cname</span><span·class="o">=</span><span·class="s2">&quot;zstd&quot;</span><span·class="p">,</span>·<span·class="n">clevel</span><span·class="o">=</span><span·class="mi">3</span><span·class="p">,</span>·<span·class="n">shuffle</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">)</span>771 <span·class="gp">In·[27]:·</span><span·class="n">compressor</span>·<span·class="o">=</span>·<span·class="n">Blosc</span><span·class="p">(</span><span·class="n">cname</span><span·class="o">=</span><span·class="s2">&quot;zstd&quot;</span><span·class="p">,</span>·<span·class="n">clevel</span><span·class="o">=</span><span·class="mi">3</span><span·class="p">,</span>·<span·class="n">shuffle</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">)</span>
  
772 <span·class="gp">In·[28]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;foo.zarr&quot;</span><span·class="p">,</span>·<span·class="n">encoding</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">{</span><span·class="s2">&quot;compressor&quot;</span><span·class="p">:</span>·<span·class="n">compressor</span><span·class="p">}})</span>772 <span·class="gp">In·[28]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">to_zarr</span><span·class="p">(</span><span·class="s2">&quot;foo.zarr&quot;</span><span·class="p">,</span>·<span·class="n">encoding</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;foo&quot;</span><span·class="p">:</span>·<span·class="p">{</span><span·class="s2">&quot;compressor&quot;</span><span·class="p">:</span>·<span·class="n">compressor</span><span·class="p">}})</span>
773 <span·class="gh">Out[28]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0x7fdc059deef0&gt;</span>773 <span·class="gh">Out[28]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0x7fdfe3dc6ef0&gt;</span>
774 </pre></div>774 </pre></div>
775 </div>775 </div>
776 <div·class="admonition·note">776 <div·class="admonition·note">
777 <p·class="admonition-title">Note</p>777 <p·class="admonition-title">Note</p>
778 <p>Not·all·native·zarr·compression·and·filtering·options·have·been·tested·with778 <p>Not·all·native·zarr·compression·and·filtering·options·have·been·tested·with
779 xarray.</p>779 xarray.</p>
780 </div>780 </div>
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·0x7fdc059df7f0&gt;</span>822 <span·class="gh">Out[30]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0x7fdfe3dc77f0&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·0x7fdc059df880&gt;</span>833 <span·class="gh">Out[32]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0x7fdfe3dc7880&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)·int64·240B·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)·int64·240B·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·0x7fdc485403a0&gt;</span>889 <span·class="gh">Out[36]:·</span><span·class="go">&lt;xarray.backends.zarr.ZarrStore·at·0x7fe0359683a0&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</span>892 <span·class="go">foo··x</span>
  
Max diff block lines reached; 1975/20854 bytes (9.47%) of diff not shown.
7.32 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·0x7fdc059dcf70>487 Out[13]:·<xarray.backends.zarr.ZarrStore·at·0x7fdfe3dc4f70>
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-af9d4dd9-87f0-440e-8dfa-98f88ce57850')566 Out[20]:·Delayed('_finalize_store-1e7684b3-4ea6-4f9f-9f57-7f24bf314cc5')
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·0x7fdc059de5f0>579 Out[22]:·<xarray.backends.zarr.ZarrStore·at·0x7fdfe3dc65f0>
  
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·0x7fdc059ddfc0>581 Out[23]:·<xarray.backends.zarr.ZarrStore·at·0x7fdfe3dc5fc0>
  
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·0x7fdc05ba48b0>583 Out[24]:·<xarray.backends.zarr.ZarrStore·at·0x7fdfe3f8c8b0>
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 601, 15 lines modifiedOffset 601, 15 lines modified
601 In·[25]:·import·zarr601 In·[25]:·import·zarr
  
602 In·[26]:·from·numcodecs.blosc·import·Blosc602 In·[26]:·from·numcodecs.blosc·import·Blosc
  
603 In·[27]:·compressor·=·Blosc(cname="zstd",·clevel=3,·shuffle=2)603 In·[27]:·compressor·=·Blosc(cname="zstd",·clevel=3,·shuffle=2)
  
604 In·[28]:·ds.to_zarr("foo.zarr",·encoding={"foo":·{"compressor":·compressor}})604 In·[28]:·ds.to_zarr("foo.zarr",·encoding={"foo":·{"compressor":·compressor}})
605 Out[28]:·<xarray.backends.zarr.ZarrStore·at·0x7fdc059deef0>605 Out[28]:·<xarray.backends.zarr.ZarrStore·at·0x7fdfe3dc6ef0>
606 Note606 Note
607 Not·all·native·zarr·compression·and·filtering·options·have·been·tested·with607 Not·all·native·zarr·compression·and·filtering·options·have·been·tested·with
608 xarray.608 xarray.
609 *\x8**\x8**\x8**\x8*·M\x8Mo\x8od\x8di\x8if\x8fy\x8yi\x8in\x8ng\x8g·e\x8ex\x8xi\x8is\x8st\x8ti\x8in\x8ng\x8g·Z\x8Za\x8ar\x8rr\x8r·s\x8st\x8to\x8or\x8re\x8es\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*609 *\x8**\x8**\x8**\x8*·M\x8Mo\x8od\x8di\x8if\x8fy\x8yi\x8in\x8ng\x8g·e\x8ex\x8xi\x8is\x8st\x8ti\x8in\x8ng\x8g·Z\x8Za\x8ar\x8rr\x8r·s\x8st\x8to\x8or\x8re\x8es\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*
610 Xarray·supports·several·ways·of·incrementally·writing·variables·to·a·Zarr610 Xarray·supports·several·ways·of·incrementally·writing·variables·to·a·Zarr
611 store.·These·options·are·useful·for·scenarios·when·it·is·infeasible·or611 store.·These·options·are·useful·for·scenarios·when·it·is·infeasible·or
612 undesirable·to·write·your·entire·dataset·at·once.612 undesirable·to·write·your·entire·dataset·at·once.
Offset 635, 28 lines modifiedOffset 635, 28 lines modified
635 ···....:·········"y":·[1,·2,·3,·4,·5],635 ···....:·········"y":·[1,·2,·3,·4,·5],
636 ···....:·········"t":·pd.date_range("2001-01-01",·periods=2),636 ···....:·········"t":·pd.date_range("2001-01-01",·periods=2),
637 ···....:·····},637 ···....:·····},
638 ···....:·)638 ···....:·)
639 ···....:639 ···....:
  
640 In·[30]:·ds1.to_zarr("path/to/directory.zarr")640 In·[30]:·ds1.to_zarr("path/to/directory.zarr")
641 Out[30]:·<xarray.backends.zarr.ZarrStore·at·0x7fdc059df7f0>641 Out[30]:·<xarray.backends.zarr.ZarrStore·at·0x7fdfe3dc77f0>
  
642 In·[31]:·ds2·=·xr.Dataset(642 In·[31]:·ds2·=·xr.Dataset(
643 ···....:·····{"foo":·(("x",·"y",·"t"),·np.random.rand(4,·5,·2))},643 ···....:·····{"foo":·(("x",·"y",·"t"),·np.random.rand(4,·5,·2))},
644 ···....:·····coords={644 ···....:·····coords={
645 ···....:·········"x":·[10,·20,·30,·40],645 ···....:·········"x":·[10,·20,·30,·40],
646 ···....:·········"y":·[1,·2,·3,·4,·5],646 ···....:·········"y":·[1,·2,·3,·4,·5],
647 ···....:·········"t":·pd.date_range("2001-01-03",·periods=2),647 ···....:·········"t":·pd.date_range("2001-01-03",·periods=2),
648 ···....:·····},648 ···....:·····},
649 ···....:·)649 ···....:·)
650 ···....:650 ···....:
  
651 In·[32]:·ds2.to_zarr("path/to/directory.zarr",·append_dim="t")651 In·[32]:·ds2.to_zarr("path/to/directory.zarr",·append_dim="t")
652 Out[32]:·<xarray.backends.zarr.ZarrStore·at·0x7fdc059df880>652 Out[32]:·<xarray.backends.zarr.ZarrStore·at·0x7fdfe3dc7880>
653 *\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*653 *\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 Chunk·sizes·may·be·specified·in·one·of·three·ways·when·writing·to·a·zarr·store:654 Chunk·sizes·may·be·specified·in·one·of·three·ways·when·writing·to·a·zarr·store:
655 ···1.·Manual·chunk·sizing·through·the·use·of·the·encoding·argument·in655 ···1.·Manual·chunk·sizing·through·the·use·of·the·encoding·argument·in
656 ······Dataset.to_zarr():656 ······Dataset.to_zarr():
657 ···2.·Automatic·chunking·based·on·chunks·in·dask·arrays657 ···2.·Automatic·chunking·based·on·chunks·in·dask·arrays
658 ···3.·Default·chunk·behavior·determined·by·the·zarr·library658 ···3.·Default·chunk·behavior·determined·by·the·zarr·library
659 The·resulting·chunks·will·be·determined·based·on·the·order·of·the·above·list;659 The·resulting·chunks·will·be·determined·based·on·the·order·of·the·above·list;
Offset 675, 15 lines modifiedOffset 675, 15 lines modified
675 positional·ordering·of·the·dimensions·in·each·array.·Watch·out·for·arrays·with675 positional·ordering·of·the·dimensions·in·each·array.·Watch·out·for·arrays·with
676 differently-ordered·dimensions·within·a·single·Dataset.676 differently-ordered·dimensions·within·a·single·Dataset.
677 For·example,·let’s·say·we’re·working·with·a·dataset·with·dimensions·('time',677 For·example,·let’s·say·we’re·working·with·a·dataset·with·dimensions·('time',
678 'x',·'y'),·a·variable·Tair·which·is·chunked·in·x·and·y,·and·two·multi-678 'x',·'y'),·a·variable·Tair·which·is·chunked·in·x·and·y,·and·two·multi-
679 dimensional·coordinates·xc·and·yc:679 dimensional·coordinates·xc·and·yc:
680 In·[33]:·ds·=·xr.tutorial.open_dataset("rasm")680 In·[33]:·ds·=·xr.tutorial.open_dataset("rasm")
681 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not681 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
682 create·data·cache·folder·'/nonexistent/first-build/.cache/682 create·data·cache·folder·'/nonexistent/second-build/.cache/
683 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.683 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
684 In·[34]:·ds["Tair"]·=·ds["Tair"].chunk({"x":·100,·"y":·100})684 In·[34]:·ds["Tair"]·=·ds["Tair"].chunk({"x":·100,·"y":·100})
685 KeyError:·"No·variable·named·'Tair'.·Variables·on·the·dataset·include·['foo',685 KeyError:·"No·variable·named·'Tair'.·Variables·on·the·dataset·include·['foo',
686 'x']"686 'x']"
  
Offset 696, 15 lines modifiedOffset 696, 15 lines modified
696 ··*·x········(x)·int64·240B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29696 ··*·x········(x)·int64·240B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29
697 Data·variables:697 Data·variables:
698 ····foo······(x)·int64·240B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29698 ····foo······(x)·int64·240B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29
699 These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very699 These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very
700 little·space·on·disk·or·in·memory,·yet·when·writing·to·disk·the·default·zarr700 little·space·on·disk·or·in·memory,·yet·when·writing·to·disk·the·default·zarr
701 behavior·is·to·split·them·into·chunks:701 behavior·is·to·split·them·into·chunks:
702 In·[36]:·ds.to_zarr("path/to/directory.zarr",·mode="w")702 In·[36]:·ds.to_zarr("path/to/directory.zarr",·mode="w")
703 Out[36]:·<xarray.backends.zarr.ZarrStore·at·0x7fdc485403a0>703 Out[36]:·<xarray.backends.zarr.ZarrStore·at·0x7fe0359683a0>
  
704 In·[37]:·!·ls·-R·path/to/directory.zarr704 In·[37]:·!·ls·-R·path/to/directory.zarr
705 path/to/directory.zarr:705 path/to/directory.zarr:
706 foo··x706 foo··x
  
707 path/to/directory.zarr/foo:707 path/to/directory.zarr/foo:
Max diff block lines reached; 768/7470 bytes (10.28%) of diff not shown.
55.9 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·0x7fdc4824f250&gt;]</span>449 <span·class="gh">Out[51]:·</span><span·class="go">[&lt;matplotlib.lines.Line2D·at·0x7fe03571f250&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)·int64·32B·0·1·2·3</span>858 <span·class="go">··*·z········(z)·int64·32B·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·0x7fdc482a4ec0&gt;</span>863 <span·class="gh">Out[99]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0x7fe035774ec0&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·0x7fdc47ce9a90&gt;</span>869 <span·class="gh">Out[100]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0x7fe035171a90&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·0x7fdc47b84a50&gt;</span>875 <span·class="gh">Out[101]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0x7fe035018a50&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·0x7fdc47bcbb10&gt;</span>881 <span·class="gh">Out[102]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0x7fe03505bb10&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·0x7fdc47ceb4d0&gt;</span>887 <span·class="gh">Out[103]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0x7fe035170b90&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·0x7fdc47cebd90&gt;</span>892 <span·class="gh">Out[104]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0x7fe03501a5d0&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·0x7fdc31a26490&gt;</span>899 <span·class="gh">Out[105]:·</span><span·class="go">&lt;matplotlib.collections.PathCollection·at·0x7fe0075c4f50&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·0x7fdc31ac3d90&gt;</span>905 <span·class="gh">Out[106]:·</span><span·class="go">&lt;mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0x7fe007464910&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·0x7fdc06d7f230&gt;</span>911 <span·class="gh">Out[107]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0x7fe0074341a0&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·0x7fdc475ce210&gt;</span>917 <span·class="gh">Out[108]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0x7fe034a7a210&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·0x7fdc31a8c2f0&gt;</span>928 <span·class="gh">Out[109]:·</span><span·class="go">&lt;matplotlib.quiver.Quiver·at·0x7fdff1419d30&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·0x7fdc473816d0&gt;</span>934 <span·class="gh">Out[110]:·</span><span·class="go">&lt;xarray.plot.facetgrid.FacetGrid·at·0x7fe0348396d0&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·0x7fdc46e8bed0&gt;</span>945 <span·class="gh">Out[111]:·</span><span·class="go">&lt;matplotlib.collections.LineCollection·at·0x7fe03434fed0&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; 21124/43008 bytes (49.12%) of diff not shown.
13.8 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·0x7fdc4824f250>]296 Out[51]:·[<matplotlib.lines.Line2D·at·0x7fe03571f250>]
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 612, 92 lines modifiedOffset 612, 92 lines modified
612 ··*·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.0612 ··*·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
613 ··*·z········(z)·int64·32B·0·1·2·3613 ··*·z········(z)·int64·32B·0·1·2·3
614 ··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five'614 ··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five'
615 Attributes:615 Attributes:
616 ····units:····Aunits616 ····units:····Aunits
  
617 In·[99]:·ds.A.plot.scatter(x="y")617 In·[99]:·ds.A.plot.scatter(x="y")
618 Out[99]:·<matplotlib.collections.PathCollection·at·0x7fdc482a4ec0>618 Out[99]:·<matplotlib.collections.PathCollection·at·0x7fe035774ec0>
619 [_build/html/_static/da_A_y.png]619 [_build/html/_static/da_A_y.png]
620 Same·plot·can·be·displayed·using·the·dataset:620 Same·plot·can·be·displayed·using·the·dataset:
621 In·[100]:·ds.plot.scatter(x="y",·y="A")621 In·[100]:·ds.plot.scatter(x="y",·y="A")
622 Out[100]:·<matplotlib.collections.PathCollection·at·0x7fdc47ce9a90>622 Out[100]:·<matplotlib.collections.PathCollection·at·0x7fe035171a90>
623 [_build/html/_static/ds_A_y.png]623 [_build/html/_static/ds_A_y.png]
624 Now·suppose·we·want·to·scatter·the·A·DataArray·against·the·B·DataArray624 Now·suppose·we·want·to·scatter·the·A·DataArray·against·the·B·DataArray
625 In·[101]:·ds.plot.scatter(x="A",·y="B")625 In·[101]:·ds.plot.scatter(x="A",·y="B")
626 Out[101]:·<matplotlib.collections.PathCollection·at·0x7fdc47b84a50>626 Out[101]:·<matplotlib.collections.PathCollection·at·0x7fe035018a50>
627 [_build/html/_static/ds_simple_scatter.png]627 [_build/html/_static/ds_simple_scatter.png]
628 The·hue·kwarg·lets·you·vary·the·color·by·variable·value628 The·hue·kwarg·lets·you·vary·the·color·by·variable·value
629 In·[102]:·ds.plot.scatter(x="A",·y="B",·hue="w")629 In·[102]:·ds.plot.scatter(x="A",·y="B",·hue="w")
630 Out[102]:·<matplotlib.collections.PathCollection·at·0x7fdc47bcbb10>630 Out[102]:·<matplotlib.collections.PathCollection·at·0x7fe03505bb10>
631 [_build/html/_static/ds_hue_scatter.png]631 [_build/html/_static/ds_hue_scatter.png]
632 You·can·force·a·legend·instead·of·a·colorbar·by·setting·add_legend=True,632 You·can·force·a·legend·instead·of·a·colorbar·by·setting·add_legend=True,
633 add_colorbar=False.633 add_colorbar=False.
634 In·[103]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=True,634 In·[103]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=True,
635 add_colorbar=False)635 add_colorbar=False)
636 Out[103]:·<matplotlib.collections.PathCollection·at·0x7fdc47ceb4d0>636 Out[103]:·<matplotlib.collections.PathCollection·at·0x7fe035170b90>
637 [_build/html/_static/ds_discrete_legend_hue_scatter.png]637 [_build/html/_static/ds_discrete_legend_hue_scatter.png]
638 In·[104]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=False,638 In·[104]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=False,
639 add_colorbar=True)639 add_colorbar=True)
640 Out[104]:·<matplotlib.collections.PathCollection·at·0x7fdc47cebd90>640 Out[104]:·<matplotlib.collections.PathCollection·at·0x7fe03501a5d0>
641 [_build/html/_static/ds_discrete_colorbar_hue_scatter.png]641 [_build/html/_static/ds_discrete_colorbar_hue_scatter.png]
642 The·markersize·kwarg·lets·you·vary·the·point’s·size·by·variable·value.·You·can642 The·markersize·kwarg·lets·you·vary·the·point’s·size·by·variable·value.·You·can
643 additionally·pass·size_norm·to·control·how·the·variable’s·values·are·mapped·to643 additionally·pass·size_norm·to·control·how·the·variable’s·values·are·mapped·to
644 point·sizes.644 point·sizes.
645 In·[105]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="z")645 In·[105]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="z")
646 Out[105]:·<matplotlib.collections.PathCollection·at·0x7fdc31a26490>646 Out[105]:·<matplotlib.collections.PathCollection·at·0x7fe0075c4f50>
647 [_build/html/_static/ds_hue_size_scatter.png]647 [_build/html/_static/ds_hue_size_scatter.png]
648 The·z·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well.648 The·z·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well.
649 In·[106]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x")649 In·[106]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x")
650 Out[106]:·<mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0x7fdc31ac3d90>650 Out[106]:·<mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0x7fe007464910>
651 [_build/html/_static/ds_hue_size_scatter_z.png]651 [_build/html/_static/ds_hue_size_scatter_z.png]
652 Faceting·is·also·possible652 Faceting·is·also·possible
653 In·[107]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="x",·row="x",653 In·[107]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="x",·row="x",
654 col="w")654 col="w")
655 Out[107]:·<xarray.plot.facetgrid.FacetGrid·at·0x7fdc06d7f230>655 Out[107]:·<xarray.plot.facetgrid.FacetGrid·at·0x7fe0074341a0>
656 [_build/html/_static/ds_facet_scatter.png]656 [_build/html/_static/ds_facet_scatter.png]
657 And·adding·the·z-axis657 And·adding·the·z-axis
658 In·[108]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x",658 In·[108]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x",
659 row="x",·col="w")659 row="x",·col="w")
660 Out[108]:·<xarray.plot.facetgrid.FacetGrid·at·0x7fdc475ce210>660 Out[108]:·<xarray.plot.facetgrid.FacetGrid·at·0x7fe034a7a210>
661 [_build/html/_static/ds_facet_scatter_z.png]661 [_build/html/_static/ds_facet_scatter_z.png]
662 For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data662 For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data
663 variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities663 variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities
664 of·seaborn.664 of·seaborn.
665 *\x8**\x8**\x8**\x8*·Q\x8Qu\x8ui\x8iv\x8ve\x8er\x8r_\x8?\x8·*\x8**\x8**\x8**\x8*665 *\x8**\x8**\x8**\x8*·Q\x8Qu\x8ui\x8iv\x8ve\x8er\x8r_\x8?\x8·*\x8**\x8**\x8**\x8*
666 Visualizing·vector·fields·is·supported·with·quiver·plots:666 Visualizing·vector·fields·is·supported·with·quiver·plots:
667 In·[109]:·ds.isel(w=1,·z=1).plot.quiver(x="x",·y="y",·u="A",·v="B")667 In·[109]:·ds.isel(w=1,·z=1).plot.quiver(x="x",·y="y",·u="A",·v="B")
668 Out[109]:·<matplotlib.quiver.Quiver·at·0x7fdc31a8c2f0>668 Out[109]:·<matplotlib.quiver.Quiver·at·0x7fdff1419d30>
669 [_build/html/_static/ds_simple_quiver.png]669 [_build/html/_static/ds_simple_quiver.png]
670 where·u·and·v·denote·the·x·and·y·direction·components·of·the·arrow·vectors.670 where·u·and·v·denote·the·x·and·y·direction·components·of·the·arrow·vectors.
671 Again,·faceting·is·also·possible:671 Again,·faceting·is·also·possible:
672 In·[110]:·ds.plot.quiver(x="x",·y="y",·u="A",·v="B",·col="w",·row="z",·scale=4)672 In·[110]:·ds.plot.quiver(x="x",·y="y",·u="A",·v="B",·col="w",·row="z",·scale=4)
673 Out[110]:·<xarray.plot.facetgrid.FacetGrid·at·0x7fdc473816d0>673 Out[110]:·<xarray.plot.facetgrid.FacetGrid·at·0x7fe0348396d0>
674 [_build/html/_static/ds_facet_quiver.png]674 [_build/html/_static/ds_facet_quiver.png]
675 scale·is·required·for·faceted·quiver·plots.·The·scale·determines·the·number·of675 scale·is·required·for·faceted·quiver·plots.·The·scale·determines·the·number·of
676 data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the676 data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the
677 arrow·longer.677 arrow·longer.
678 *\x8**\x8**\x8**\x8*·S\x8St\x8tr\x8re\x8ea\x8am\x8mp\x8pl\x8lo\x8ot\x8t_\x8?\x8·*\x8**\x8**\x8**\x8*678 *\x8**\x8**\x8**\x8*·S\x8St\x8tr\x8re\x8ea\x8am\x8mp\x8pl\x8lo\x8ot\x8t_\x8?\x8·*\x8**\x8**\x8**\x8*
679 Visualizing·vector·fields·is·also·supported·with·streamline·plots:679 Visualizing·vector·fields·is·also·supported·with·streamline·plots:
680 In·[111]:·ds.isel(w=1,·z=1).plot.streamplot(x="x",·y="y",·u="A",·v="B")680 In·[111]:·ds.isel(w=1,·z=1).plot.streamplot(x="x",·y="y",·u="A",·v="B")
681 Out[111]:·<matplotlib.collections.LineCollection·at·0x7fdc46e8bed0>681 Out[111]:·<matplotlib.collections.LineCollection·at·0x7fe03434fed0>
682 [_build/html/_static/ds_simple_streamplot.png]682 [_build/html/_static/ds_simple_streamplot.png]
683 where·u·and·v·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to683 where·u·and·v·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to
684 the·streamlines.·Again,·faceting·is·also·possible:684 the·streamlines.·Again,·faceting·is·also·possible:
685 In·[112]:·ds.plot.streamplot(x="x",·y="y",·u="A",·v="B",·col="w",·row="z")685 In·[112]:·ds.plot.streamplot(x="x",·y="y",·u="A",·v="B",·col="w",·row="z")
686 Out[112]:·<xarray.plot.facetgrid.FacetGrid·at·0x7fdc4850c050>686 Out[112]:·<xarray.plot.facetgrid.FacetGrid·at·0x7fe035930c30>
687 [_build/html/_static/ds_facet_streamplot.png]687 [_build/html/_static/ds_facet_streamplot.png]
688 *\x8**\x8**\x8**\x8**\x8*·M\x8Ma\x8ap\x8ps\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*688 *\x8**\x8**\x8**\x8**\x8*·M\x8Ma\x8ap\x8ps\x8s_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
689 To·follow·this·section·you’ll·need·to·have·Cartopy·installed·and·working.689 To·follow·this·section·you’ll·need·to·have·Cartopy·installed·and·working.
690 This·script·will·plot·the·air·temperature·on·a·map.690 This·script·will·plot·the·air·temperature·on·a·map.
691 In·[113]:·import·cartopy.crs·as·ccrs691 In·[113]:·import·cartopy.crs·as·ccrs
  
692 In·[114]:·air·=·xr.tutorial.open_dataset("air_temperature").air692 In·[114]:·air·=·xr.tutorial.open_dataset("air_temperature").air
693 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not693 PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not
694 create·data·cache·folder·'/nonexistent/first-build/.cache/694 create·data·cache·folder·'/nonexistent/second-build/.cache/
695 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.695 xarray_tutorial_data'.·Will·not·be·able·to·download·data·files.
  
  
696 In·[115]:·p·=·air.isel(time=0).plot(696 In·[115]:·p·=·air.isel(time=0).plot(
697 ···.....:·····subplot_kws=dict(projection=ccrs.Orthographic(-80,·35),697 ···.....:·····subplot_kws=dict(projection=ccrs.Orthographic(-80,·35),
698 facecolor="gray"),698 facecolor="gray"),
699 ···.....:·····transform=ccrs.PlateCarree(),699 ···.....:·····transform=ccrs.PlateCarree(),
Offset 744, 24 lines modifiedOffset 744, 24 lines modified
744 In·[121]:·import·xarray.plot·as·xplt744 In·[121]:·import·xarray.plot·as·xplt
  
Max diff block lines reached; 6805/14094 bytes (48.28%) 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():
29.2 KB
./usr/share/doc/python-xarray-doc/html/user-guide/testing.html
    
Offset 84, 40 lines modifiedOffset 84, 40 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·(ĖŽŰ:·6)&gt;·Size:·96B</span>90 <span·class="go">&lt;xarray.Variable·(Ż:·4,·ŽÓ:·1,·Ņ:·6)&gt;·Size:·48B</span>
91 <span·class="go">array([·······nan-1.192e-007j,········nan·······-infj,·2.225e-308-7.519e-215j,</span> 
92 <span·class="go">··············nan+9.582e-016j,········inf+5.960e-008j,·2.225e-308+4.275e+016j])</span>91 <span·class="go">array([[[-0.,·-0.,·-0.,·-0.,·-0.,·-0.]],</span>
  
 92 <span·class="go">·······[[-0.,·-0.,·-0.,·-0.,·-0.,·-0.]],</span>
  
 93 <span·class="go">·······[[-0.,·-0.,·-0.,·-0.,·-0.,·-0.]],</span>
  
 94 <span·class="go">·······[[-0.,·-0.,·-0.,·-0.,·-0.,·-0.]]],·dtype=float16)</span>
 95 <span·class="go">Attributes:</span>
 96 <span·class="go">····ÀÚŗŽX:····{&#39;ſ&#39;:·None,·&#39;Â&#39;:·array([[b&#39;*\xcd8\xc9&quot;&#39;,·b&#39;&#39;]],·dtype=&#39;|S9&#39;),·&#39;...</span>
  
93 <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>97 <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>
94 <span·class="gh">Out[4]:·</span>98 <span·class="gh">Out[4]:·</span>
95 <span·class="go">&lt;xarray.Variable·(0:·1)&gt;·Size:·1B</span>99 <span·class="go">&lt;xarray.Variable·(ĦõLſ:·1,·ſ:·1,·ĠŻž:·5)&gt;·Size:·10B</span>
96 <span·class="go">array([0],·dtype=int8)</span>100 <span·class="go">array([[[-29014,···3846,·-13269,·-18434,·-24534]]],·dtype=int16)</span>
  
97 <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>101 <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>
98 <span·class="gh">Out[5]:·</span>102 <span·class="gh">Out[5]:·</span>
99 <span·class="go">&lt;xarray.Variable·(ŋÜ:·6)&gt;·Size:·48B</span>103 <span·class="go">&lt;xarray.Variable·(ĕ:·2,·žýúżÂ:·3,·ĔŔ5Őě:·4)&gt;·Size:·48B</span>
 104 <span·class="go">array([[[5592,·5592,·5592,·5592],</span>
 105 <span·class="go">········[5592,·5592,·5592,·5592],</span>
 106 <span·class="go">········[5592,·5592,·5592,·5592]],</span>
  
 107 <span·class="go">·······[[5592,·5592,·5592,·5592],</span>
 108 <span·class="go">········[5592,·5592,·5592,·5592],</span>
 109 <span·class="go">········[5592,·5592,·5592,·5592]]],·dtype=uint16)</span>
100 <span·class="go">array([-2.225e-309,········-inf,·-1.798e+308,··1.175e-038,··1.175e-038,··1.175e-038])</span> 
101 <span·class="go">Attributes:</span> 
102 <span·class="go">····ŊµſžÐ:····[b&#39;f&#39;]</span> 
103 <span·class="go">····ſsq¾D:····[[b&#39;\xe8&#39;]]</span> 
104 <span·class="go">····ïbùQ:·····[[b&#39;\xfe\xf3\xf4\x92\x12\xc0&#39;·b&#39;&gt;\x16\x8c\x1e&gt;\xeb\xe6\x8a\xbe\...</span> 
105 <span·class="go">····¾ŧÆÒ³:····[[&#39;XG$þ\x16¤&#39;·&#39;\U00103e06\U000eecce\U000dc518&amp;Â\x12\x1a/\U000fa...</span> 
106 <span·class="go">····:·········None</span> 
107 <span·class="go">····Žģųúm:····True</span> 
108 <span·class="go">····ĴŬ:·······ŶŽ</span> 
109 <span·class="go">····¾ſ:·······True</span> 
110 <span·class="go">····9ıŏaª:····None</span> 
111 <span·class="go">····ũ:········True</span> 
112 <span·class="go">····ęž:·······[[&#39;=:X\x04n4\\&#39;·&#39;·&#39;]\n·[&#39;/Ok\x07W\x0b&#39;·&#39;õ\r\U00059752&#39;]]</span> 
113 <span·class="go">····žŊ:·······¼</span> 
114 </pre></div>110 </pre></div>
115 </div>111 </div>
116 <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·wide112 <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
117 range·of·data·that·the·xarray·strategies·can·generate.</p>113 range·of·data·that·the·xarray·strategies·can·generate.</p>
118 <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·the114 <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
119 <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.given()</span></code>·decorator:</p>115 <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.given()</span></code>·decorator:</p>
120 <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>116 <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 135, 90 lines modifiedOffset 135, 91 lines modified
135 <p>Xarray’s·strategies·can·accept·other·strategies·as·arguments,·allowing·you·to·customise·the·contents·of·the·generated135 <p>Xarray’s·strategies·can·accept·other·strategies·as·arguments,·allowing·you·to·customise·the·contents·of·the·generated
136 examples.</p>136 examples.</p>
137 <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>137 <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>
138 <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>138 <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>
  
139 <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>139 <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>
140 <span·class="gh">Out[9]:·</span>140 <span·class="gh">Out[9]:·</span>
141 <span·class="go">&lt;xarray.Variable·(ŏįüĆ:·4)&gt;·Size:·32B</span>141 <span·class="go">&lt;xarray.Variable·(0:·1)&gt;·Size:·8B</span>
 142 <span·class="go">array([0.+0.j],·dtype=complex64)</span>
142 <span·class="go">array([-1.900e+00+1.175e-38j,········nan+5.410e+16j,·-1.124e+16-1.175e-38j,··0.000e+00-1.500e+00j],</span> 
143 <span·class="go">······dtype=&#39;&gt;c8&#39;)</span> 
144 <span·class="go">Attributes:</span> 
145 <span·class="go">····:·········đ</span> 
146 <span·class="go">····ĩżŒ:······True</span> 
147 <span·class="go">····Ì½øpŁ:····[[&#39;𥛷´²k¤»«&#39;·&#39;&#39;]]</span> 
148 <span·class="go">····Ę:········[[&#39;f&#39;·&#39;\xa0\x84\x1f&#39;]\n·[&#39;Ï4\U0008c5fa\x14Å&#39;·&#39;y\x0b&#39;]]</span> 
149 </pre></div>143 </pre></div>
150 </div>144 </div>
151 <p>This·also·works·with·custom·strategies,·or·strategies·defined·in·other·packages.145 <p>This·also·works·with·custom·strategies,·or·strategies·defined·in·other·packages.
152 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>146 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>
153 </section>147 </section>
154 <section·id="fixing-arguments">148 <section·id="fixing-arguments">
155 <h3>Fixing·Arguments<a·class="headerlink"·href="#fixing-arguments"·title="Link·to·this·heading">¶</a></h3>149 <h3>Fixing·Arguments<a·class="headerlink"·href="#fixing-arguments"·title="Link·to·this·heading">¶</a></h3>
156 <p>If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation·in·the·generated·examples150 <p>If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation·in·the·generated·examples
157 over·all·other·aspects,·then·use·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>.</p>151 over·all·other·aspects,·then·use·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>.</p>
158 <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>152 <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>
  
159 <span·class="go">#·Generates·only·variable·objects·with·dimensions·[&quot;x&quot;,·&quot;y&quot;]</span>153 <span·class="go">#·Generates·only·variable·objects·with·dimensions·[&quot;x&quot;,·&quot;y&quot;]</span>
160 <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>154 <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>
161 <span·class="gh">Out[11]:·</span>155 <span·class="gh">Out[11]:·</span>
162 <span·class="go">&lt;xarray.Variable·(x:·1,·y:·1)&gt;·Size:·1B</span>156 <span·class="go">&lt;xarray.Variable·(x:·3,·y:·5)&gt;·Size:·15B</span>
163 <span·class="go">array([[0]],·dtype=uint8)</span>157 <span·class="go">array([[125,·214,·214,·197,··83],</span>
 158 <span·class="go">·······[214,···0,·214,·214,···1],</span>
 159 <span·class="go">·······[·29,·189,·214,·106,·214]],·dtype=uint8)</span>
164 </pre></div>160 </pre></div>
165 </div>161 </div>
166 <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·a162 <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
167 special·strategy·that·just·contains·a·single·example.)</p>163 special·strategy·that·just·contains·a·single·example.)</p>
168 <p>To·fix·the·length·of·dimensions·you·can·instead·pass·<code·class="docutils·literal·notranslate"><span·class="pre">dims</span></code>·as·a·mapping·of·dimension·names·to·lengths164 <p>To·fix·the·length·of·dimensions·you·can·instead·pass·<code·class="docutils·literal·notranslate"><span·class="pre">dims</span></code>·as·a·mapping·of·dimension·names·to·lengths
169 (i.e.·following·xarray·objects’·<code·class="docutils·literal·notranslate"><span·class="pre">.sizes()</span></code>·property),·e.g.</p>165 (i.e.·following·xarray·objects’·<code·class="docutils·literal·notranslate"><span·class="pre">.sizes()</span></code>·property),·e.g.</p>
170 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Generates·only·variables·with·dimensions·[&quot;x&quot;,·&quot;y&quot;],·of·lengths·2·&amp;·3·respectively</span>166 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Generates·only·variables·with·dimensions·[&quot;x&quot;,·&quot;y&quot;],·of·lengths·2·&amp;·3·respectively</span>
171 <span·class="gp">In·[12]:·</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="mi">2</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="mi">3</span><span·class="p">}))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>167 <span·class="gp">In·[12]:·</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="mi">2</span><span·class="p">,</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="mi">3</span><span·class="p">}))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>
172 <span·class="gh">Out[12]:·</span>168 <span·class="gh">Out[12]:·</span>
173 <span·class="go">&lt;xarray.Variable·(x:·2,·y:·3)&gt;·Size:·48B</span>169 <span·class="go">&lt;xarray.Variable·(x:·2,·y:·3)&gt;·Size:·48B</span>
174 <span·class="go">array([[················186,···········399611924,·5324116690600593030],</span>170 <span·class="go">array([[·················214,··2282279441851933690,··················234],</span>
175 <span·class="go">·······[··············47250,···············11193,···············32513]],·dtype=uint64)</span>171 <span·class="go">·······[18446744073709551614,··················149,················64923]],·dtype=uint64)</span>
176 <span·class="go">Attributes:</span> 
177 <span·class="go">····uÓĖŐó:····[[b&#39;\x83\xf1hF&#39;]]</span> 
178 <span·class="go">····ŗĀ:·······True</span> 
179 <span·class="go">····ėĜÿĺž:····[&#39;&#39;·&#39;&#39;]</span> 
180 </pre></div>172 </pre></div>
181 </div>173 </div>
182 <p>You·can·also·use·this·to·specify·that·you·want·examples·which·are·missing·some·part·of·the·data·structure,·for·instance</p>174 <p>You·can·also·use·this·to·specify·that·you·want·examples·which·are·missing·some·part·of·the·data·structure,·for·instance</p>
183 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Generates·a·Variable·with·no·attributes</span>175 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Generates·a·Variable·with·no·attributes</span>
184 <span·class="gp">In·[13]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">attrs</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="o">.</span><span·class="n">example</span><span·class="p">()</span>176 <span·class="gp">In·[13]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">attrs</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="o">.</span><span·class="n">example</span><span·class="p">()</span>
185 <span·class="gh">Out[13]:·</span>177 <span·class="gh">Out[13]:·</span>
186 <span·class="go">&lt;xarray.Variable·(ÁżłŬ:·5)&gt;·Size:·5B</span>178 <span·class="go">&lt;xarray.Variable·(ŨyŔ:·4)&gt;·Size:·32B</span>
187 <span·class="go">array([-89,··17,··31,··81,·-63],·dtype=int8)</span>179 <span·class="go">array([-inf-1.000e+00j,···0.+1.500e+00j,··-0.+2.482e+16j,··nan-1.175e-38j],·dtype=complex64)</span>
188 </pre></div>180 </pre></div>
189 </div>181 </div>
190 <p>Through·a·combination·of·chaining·strategies·and·fixing·arguments,·you·can·specify·quite·complicated·requirements·on·the182 <p>Through·a·combination·of·chaining·strategies·and·fixing·arguments,·you·can·specify·quite·complicated·requirements·on·the
191 objects·your·chained·strategy·will·generate.</p>183 objects·your·chained·strategy·will·generate.</p>
192 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="n">fixed_x_variable_y_maybe_z</span>·<span·class="o">=</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">fixed_dictionaries</span><span·class="p">(</span>184 <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="n">fixed_x_variable_y_maybe_z</span>·<span·class="o">=</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">fixed_dictionaries</span><span·class="p">(</span>
193 <span·class="gp">···....:·</span>····<span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">(</span><span·class="mi">2</span><span·class="p">),</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">integers</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="n">optional</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;z&quot;</span><span·class="p">:</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">(</span><span·class="mi">2</span><span·class="p">)}</span>185 <span·class="gp">···....:·</span>····<span·class="p">{</span><span·class="s2">&quot;x&quot;</span><span·class="p">:</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">(</span><span·class="mi">2</span><span·class="p">),</span>·<span·class="s2">&quot;y&quot;</span><span·class="p">:</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">integers</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="n">optional</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">&quot;z&quot;</span><span·class="p">:</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">(</span><span·class="mi">2</span><span·class="p">)}</span>
194 <span·class="gp">···....:·</span><span·class="p">)</span>186 <span·class="gp">···....:·</span><span·class="p">)</span>
195 <span·class="gp">···....:·</span>187 <span·class="gp">···....:·</span>
  
196 <span·class="gp">In·[15]:·</span><span·class="n">fixed_x_variable_y_maybe_z</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>188 <span·class="gp">In·[15]:·</span><span·class="n">fixed_x_variable_y_maybe_z</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span>
197 <span·class="gh">Out[15]:·</span><span·class="go">{&#39;x&#39;:·2,·&#39;y&#39;:·4}</span>189 <span·class="gh">Out[15]:·</span><span·class="go">{&#39;x&#39;:·2,·&#39;y&#39;:·3,·&#39;z&#39;:·2}</span>
  
198 <span·class="gp">In·[16]:·</span><span·class="n">special_variables</span>·<span·class="o">=</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">fixed_x_variable_y_maybe_z</span><span·class="p">)</span>190 <span·class="gp">In·[16]:·</span><span·class="n">special_variables</span>·<span·class="o">=</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">fixed_x_variable_y_maybe_z</span><span·class="p">)</span>
Max diff block lines reached; 7186/20981 bytes (34.25%) of diff not shown.
8.58 KB
html2text {}
    
Offset 28, 43 lines modifiedOffset 28, 41 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·(ĖŽŰ:·6)>·Size:·96B34 <xarray.Variable·(Ż:·4,·ŽÓ:·1,·Ņ:·6)>·Size:·48B
35 array([·······nan-1.192e-007j,········nan·······-infj,·2.225e-308-7.519e-215j, 
36 ··············nan+9.582e-016j,········inf+5.960e-008j,·2.225e-308+4.275e+016j])35 array([[[-0.,·-0.,·-0.,·-0.,·-0.,·-0.]],
  
 36 ·······[[-0.,·-0.,·-0.,·-0.,·-0.,·-0.]],
  
 37 ·······[[-0.,·-0.,·-0.,·-0.,·-0.,·-0.]],
  
 38 ·······[[-0.,·-0.,·-0.,·-0.,·-0.,·-0.]]],·dtype=float16)
 39 Attributes:
 40 ····ÀÚŗŽX:····{'ſ':·None,·'Â':·array([[b'*\xcd8\xc9"',·b'']],·dtype='|S9'),
 41 '...
  
37 In·[4]:·xrst.variables().example()42 In·[4]:·xrst.variables().example()
38 Out[4]:43 Out[4]:
39 <xarray.Variable·(0:·1)>·Size:·1B44 <xarray.Variable·(ĦõLſ:·1,·ſ:·1,·ĠŻž:·5)>·Size:·10B
40 array([0],·dtype=int8)45 array([[[-29014,···3846,·-13269,·-18434,·-24534]]],·dtype=int16)
  
41 In·[5]:·xrst.variables().example()46 In·[5]:·xrst.variables().example()
42 Out[5]:47 Out[5]:
 48 <xarray.Variable·(ĕ:·2,·žýúżÂ:·3,·ĔŔ5Őě:·4)>·Size:·48B
 49 array([[[5592,·5592,·5592,·5592],
 50 ········[5592,·5592,·5592,·5592],
 51 ········[5592,·5592,·5592,·5592]],
  
 52 ·······[[5592,·5592,·5592,·5592],
 53 ········[5592,·5592,·5592,·5592],
 54 ········[5592,·5592,·5592,·5592]]],·dtype=uint16)
43 <xarray.Variable·(ŋÜ:·6)>·Size:·48B 
44 array([-2.225e-309,········-inf,·-1.798e+308,··1.175e-038,··1.175e-038, 
45 1.175e-038]) 
46 Attributes: 
47 ····ŊµſžÐ:····[b'f'] 
48 ····ſsq¾D:····[[b'\xe8']] 
49 ····ïbùQ:·····[[b'\xfe\xf3\xf4\x92\x12\xc0' 
50 b'>\x16\x8c\x1e>\xeb\xe6\x8a\xbe\... 
51 ····¾ŧÆÒ³:····[['XG$þ\x16¤'·'\U00103e06\U000eecce\U000dc518&Â\x12\x1a/ 
52 \U000fa... 
53 ····:·········None 
54 ····Žģųúm:····True 
55 ····ĴŬ:·······ŶŽ 
56 ····¾ſ:·······True 
57 ····9ıŏaª:····None 
58 ····ũ:········True 
59 ····ęž:·······[['=:X\x04n4\\'·'·']\n·['/Ok\x07W\x0b'·'õ\r\U00059752']] 
60 ····žŊ:·······¼ 
61 You·can·see·that·calling·.example()·multiple·times·will·generate·different55 You·can·see·that·calling·.example()·multiple·times·will·generate·different
62 examples,·giving·you·an·idea·of·the·wide·range·of·data·that·the·xarray56 examples,·giving·you·an·idea·of·the·wide·range·of·data·that·the·xarray
63 strategies·can·generate.57 strategies·can·generate.
64 In·your·tests·however·you·should·not·use·.example()·-·instead·you·should58 In·your·tests·however·you·should·not·use·.example()·-·instead·you·should
65 parameterize·your·tests·with·the·hypothesis.given()·decorator:59 parameterize·your·tests·with·the·hypothesis.given()·decorator:
66 In·[6]:·from·hypothesis·import·given60 In·[6]:·from·hypothesis·import·given
67 In·[7]:·@given(xrst.variables())61 In·[7]:·@given(xrst.variables())
Offset 76, 92 lines modifiedOffset 74, 94 lines modified
76 customise·the·contents·of·the·generated·examples.74 customise·the·contents·of·the·generated·examples.
77 #·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all75 #·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all
78 other·details·still·arbitrary76 other·details·still·arbitrary
79 In·[8]:·from·hypothesis.extra.numpy·import·complex_number_dtypes77 In·[8]:·from·hypothesis.extra.numpy·import·complex_number_dtypes
  
80 In·[9]:·xrst.variables(dtype=complex_number_dtypes()).example()78 In·[9]:·xrst.variables(dtype=complex_number_dtypes()).example()
81 Out[9]:79 Out[9]:
82 <xarray.Variable·(ŏįüĆ:·4)>·Size:·32B80 <xarray.Variable·(0:·1)>·Size:·8B
 81 array([0.+0.j],·dtype=complex64)
83 array([-1.900e+00+1.175e-38j,········nan+5.410e+16j,·-1.124e+16-1.175e-38j, 
84 0.000e+00-1.500e+00j], 
85 ······dtype='>c8') 
86 Attributes: 
87 ····:·········đ 
88 ····ĩżŒ:······True 
89 ····Ì½øpŁ:····[['𥛷´²k¤»«'·'']] 
90 ····Ę:········[['f'·'\xa0\x84\x1f']\n·['Ï4\U0008c5fa\x14Å'·'y\x0b']] 
91 This·also·works·with·custom·strategies,·or·strategies·defined·in·other82 This·also·works·with·custom·strategies,·or·strategies·defined·in·other
92 packages.·For·example·you·could·imagine·creating·a·chunks·strategy·to·specify83 packages.·For·example·you·could·imagine·creating·a·chunks·strategy·to·specify
93 particular·chunking·patterns·for·a·dask-backed·array.84 particular·chunking·patterns·for·a·dask-backed·array.
94 *\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*85 *\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*
95 If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation86 If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation
96 in·the·generated·examples·over·all·other·aspects,·then·use87 in·the·generated·examples·over·all·other·aspects,·then·use
97 hypothesis.strategies.just().88 hypothesis.strategies.just().
98 In·[10]:·import·hypothesis.strategies·as·st89 In·[10]:·import·hypothesis.strategies·as·st
  
99 #·Generates·only·variable·objects·with·dimensions·["x",·"y"]90 #·Generates·only·variable·objects·with·dimensions·["x",·"y"]
100 In·[11]:·xrst.variables(dims=st.just(["x",·"y"])).example()91 In·[11]:·xrst.variables(dims=st.just(["x",·"y"])).example()
101 Out[11]:92 Out[11]:
102 <xarray.Variable·(x:·1,·y:·1)>·Size:·1B93 <xarray.Variable·(x:·3,·y:·5)>·Size:·15B
103 array([[0]],·dtype=uint8)94 array([[125,·214,·214,·197,··83],
 95 ·······[214,···0,·214,·214,···1],
 96 ·······[·29,·189,·214,·106,·214]],·dtype=uint8)
104 (This·is·technically·another·example·of·chaining·strategies·-97 (This·is·technically·another·example·of·chaining·strategies·-
105 hypothesis.strategies.just()·is·simply·a·special·strategy·that·just·contains·a98 hypothesis.strategies.just()·is·simply·a·special·strategy·that·just·contains·a
106 single·example.)99 single·example.)
107 To·fix·the·length·of·dimensions·you·can·instead·pass·dims·as·a·mapping·of100 To·fix·the·length·of·dimensions·you·can·instead·pass·dims·as·a·mapping·of
108 dimension·names·to·lengths·(i.e.·following·xarray·objects’·.sizes()·property),101 dimension·names·to·lengths·(i.e.·following·xarray·objects’·.sizes()·property),
109 e.g.102 e.g.
110 #·Generates·only·variables·with·dimensions·["x",·"y"],·of·lengths·2·&·3103 #·Generates·only·variables·with·dimensions·["x",·"y"],·of·lengths·2·&·3
111 respectively104 respectively
112 In·[12]:·xrst.variables(dims=st.just({"x":·2,·"y":·3})).example()105 In·[12]:·xrst.variables(dims=st.just({"x":·2,·"y":·3})).example()
113 Out[12]:106 Out[12]:
114 <xarray.Variable·(x:·2,·y:·3)>·Size:·48B107 <xarray.Variable·(x:·2,·y:·3)>·Size:·48B
115 array([[················186,···········399611924,·5324116690600593030], 
116 ·······[··············47250,···············11193,···············32513]],108 array([[·················214,··2282279441851933690,··················234],
 109 ·······[18446744073709551614,··················149,················64923]],
117 dtype=uint64)110 dtype=uint64)
118 Attributes: 
119 ····uÓĖŐó:····[[b'\x83\xf1hF']] 
120 ····ŗĀ:·······True 
121 ····ėĜÿĺž:····[''·''] 
122 You·can·also·use·this·to·specify·that·you·want·examples·which·are·missing·some111 You·can·also·use·this·to·specify·that·you·want·examples·which·are·missing·some
123 part·of·the·data·structure,·for·instance112 part·of·the·data·structure,·for·instance
124 #·Generates·a·Variable·with·no·attributes113 #·Generates·a·Variable·with·no·attributes
125 In·[13]:·xrst.variables(attrs=st.just({})).example()114 In·[13]:·xrst.variables(attrs=st.just({})).example()
126 Out[13]:115 Out[13]:
127 <xarray.Variable·(ÁżłŬ:·5)>·Size:·5B116 <xarray.Variable·(ŨyŔ:·4)>·Size:·32B
128 array([-89,··17,··31,··81,·-63],·dtype=int8)117 array([-inf-1.000e+00j,···0.+1.500e+00j,··-0.+2.482e+16j,··nan-1.175e-38j],
 118 dtype=complex64)
129 Through·a·combination·of·chaining·strategies·and·fixing·arguments,·you·can119 Through·a·combination·of·chaining·strategies·and·fixing·arguments,·you·can
130 specify·quite·complicated·requirements·on·the·objects·your·chained·strategy120 specify·quite·complicated·requirements·on·the·objects·your·chained·strategy
131 will·generate.121 will·generate.
132 In·[14]:·fixed_x_variable_y_maybe_z·=·st.fixed_dictionaries(122 In·[14]:·fixed_x_variable_y_maybe_z·=·st.fixed_dictionaries(
133 ···....:·····{"x":·st.just(2),·"y":·st.integers(3,·4)},·optional={"z":·st.just123 ···....:·····{"x":·st.just(2),·"y":·st.integers(3,·4)},·optional={"z":·st.just
134 (2)}124 (2)}
Max diff block lines reached; 3151/8764 bytes (35.95%) of diff not shown.
3.71 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·0x7fdc05a0c690&gt;</span>7941 <span·class="gh">Out[46]:·</span><span·class="go">&lt;matplotlib.collections.QuadMesh·at·0x7fdfe3e39090&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>
976 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·0x7fdc05a0c690>5105 ······Out[46]:·<matplotlib.collections.QuadMesh·at·0x7fdfe3e39090>
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)))