Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | · | 1 | ·bc06d3747c74f94f1eff860e3a6b54db·2752460·doc·optional·python-xarray-doc_2025.01.2-1_all.deb |
2 | ·65b17ea58f6b0a83ea67cd4000a96d9f·799856·python·optional·python3-xarray_2025.01.2-1_all.deb | 2 | ·65b17ea58f6b0a83ea67cd4000a96d9f·799856·python·optional·python3-xarray_2025.01.2-1_all.deb |
Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | -rw-r--r--···0········0········0········4·2025-02-02·11:36:57.000000·debian-binary | 1 | -rw-r--r--···0········0········0········4·2025-02-02·11:36:57.000000·debian-binary |
2 | -rw-r--r--···0········0········0·····63 | 2 | -rw-r--r--···0········0········0·····6372·2025-02-02·11:36:57.000000·control.tar.xz |
3 | -rw-r--r--···0········0········0··274 | 3 | -rw-r--r--···0········0········0··2745896·2025-02-02·11:36:57.000000·data.tar.xz |
Offset 1, 13 lines modified | Offset 1, 13 lines modified | ||
1 | Package:·python-xarray-doc | 1 | Package:·python-xarray-doc |
2 | Source:·python-xarray | 2 | Source:·python-xarray |
3 | Version:·2025.01.2-1 | 3 | Version:·2025.01.2-1 |
4 | Architecture:·all | 4 | 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:·899 | 6 | Installed-Size:·8996 |
7 | Depends:·libjs-sphinxdoc·(>=·8.1),·libjs-mathjax,·libjs-requirejs | 7 | 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:·doc | 9 | Section:·doc |
10 | Priority:·optional | 10 | Priority:·optional |
11 | Multi-Arch:·foreign | 11 | Multi-Arch:·foreign |
12 | Homepage:·https://xarray.pydata.org/ | 12 | Homepage:·https://xarray.pydata.org/ |
13 | Description:·documentation·for·xarray | 13 | Description:·documentation·for·xarray |
Offset 160, 32 lines modified | Offset 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.html | 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.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.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.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.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.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.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.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.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.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.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.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)···1510 | 167 | -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)····10278·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz | 168 | -rw-r--r--···0·root·········(0)·root·········(0)····10278·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)····5105 | 169 | -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)····249 | 170 | -rw-r--r--···0·root·········(0)·root·········(0)····24976·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)···13413 | 171 | -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)····104 | 172 | -rw-r--r--···0·root·········(0)·root·········(0)····10495·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)····420 | 173 | -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)····2266 | 174 | -rw-r--r--···0·root·········(0)·root·········(0)····22664·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)····2790 | 175 | -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)·····256 | 176 | -rw-r--r--···0·root·········(0)·root·········(0)·····2566·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)····509 | 177 | -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)·····45 | 178 | -rw-r--r--···0·root·········(0)·root·········(0)·····4544·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)····4374 | 179 | -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)····122 | 180 | -rw-r--r--···0·root·········(0)·root·········(0)····12219·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)····5084 | 181 | -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)·····43 | 182 | -rw-r--r--···0·root·········(0)·root·········(0)·····4372·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)····87944·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.html | 183 | -rw-r--r--···0·root·········(0)·root·········(0)····87944·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)···3679 | 184 | -rw-r--r--···0·root·········(0)·root·········(0)···367986·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.html | 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.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.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.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.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.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.html | 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.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.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.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.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.html |
Offset 200, 50 lines modified | Offset 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.html | 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.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.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.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.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.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.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.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.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.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.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.html |
207 | -rw-r--r--···0·root·········(0)·root·········(0)····6025 | 207 | -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.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.html |
209 | -rw-r--r--···0·root·········(0)·root·········(0)····2707 | 209 | -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.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.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.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.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.inv | 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.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.html | 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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.html |
221 | -rw-r--r--···0·root·········(0)·root·········(0)···2 | 221 | -rw-r--r--···0·root·········(0)·root·········(0)···251156·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.html | 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.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.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.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.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.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.html | 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.html |
227 | -rw-r--r--···0·root·········(0)·root·········(0)···140284·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/computation.html | 227 | -rw-r--r--···0·root·········(0)·root·········(0)···140284·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)····71358·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/dask.html | 228 | -rw-r--r--···0·root·········(0)·root·········(0)····71358·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)···150185·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/data-structures.html | 229 | -rw-r--r--···0·root·········(0)·root·········(0)···150185·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.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.html |
231 | -rw-r--r--···0·root·········(0)·root·········(0)····50924·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/groupby.html | 231 | -rw-r--r--···0·root·········(0)·root·········(0)····50924·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)···12019 | 232 | -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.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.html |
234 | -rw-r--r--···0·root·········(0)·root·········(0)···14027 | 234 | -rw-r--r--···0·root·········(0)·root·········(0)···140278·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)····687 | 235 | -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)···14448 | 236 | -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.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.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.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.html |
239 | -rw-r--r--···0·root·········(0)·root·········(0)···13628 | 239 | -rw-r--r--···0·root·········(0)·root·········(0)···136283·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)····6291 | 240 | -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)····46815·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/terminology.html | 241 | -rw-r--r--···0·root·········(0)·root·········(0)····46815·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/terminology.html |
242 | -rw-r--r--···0·root·········(0)·root·········(0)···· | 242 | -rw-r--r--···0·root·········(0)·root·········(0)····52102·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)····45787·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/time-series.html | 243 | -rw-r--r--···0·root·········(0)·root·········(0)····45787·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)····45368·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/weather-climate.html | 244 | -rw-r--r--···0·root·········(0)·root·········(0)····45368·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.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.html |
246 | -rw-r--r--···0·root·········(0)·root·········(0)··1017523·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/whats-new.html | 246 | -rw-r--r--···0·root·········(0)·root·········(0)··1017523·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.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.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-doc | 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-doc |
Offset 170, 15 lines modified | Offset 170, 15 lines modified | ||
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> | 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> |
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>: | 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>: |
172 | <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( |
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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</span> |
174 | <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····) | 174 | <span·class="ansi-green-intense-fg·ansi-bold">····275</span>·····) |
175 | <span·class="ansi-green-fg">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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> |
176 | <span·class="ansi-red-fg">PermissionError</span>:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 176 | <span·class="ansi-red-fg">PermissionError</span>:·[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. |
177 | </pre></div></div> | 177 | </pre></div></div> |
178 | </div> | 178 | </div> |
179 | <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> |
180 | <div·class="nbinput·docutils·container"> | 180 | <div·class="nbinput·docutils·container"> |
181 | <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]: |
182 | </pre></div> | 182 | </pre></div> |
183 | </div> | 183 | </div> |
Offset 238, 90 lines modified | Offset 238, 90 lines modified | ||
238 | </pre></div></div> | 238 | </pre></div></div> |
239 | </div> | 239 | </div> |
240 | <div·class="nboutput·docutils·container"> | 240 | <div·class="nboutput·docutils·container"> |
241 | <div·class="prompt·empty·docutils·container"> | 241 | <div·class="prompt·empty·docutils·container"> |
242 | </div> | 242 | </div> |
243 | <div·class="output_area·docutils·container"> | 243 | <div·class="output_area·docutils·container"> |
244 | <div·class="highlight"><pre> | 244 | <div·class="highlight"><pre> |
245 | Error·in·callback·<function·_draw_all_if_interactive·at·0xffff | 245 | Error·in·callback·<function·_draw_all_if_interactive·at·0xffff3ed5ca40>·(for·post_execute),·with·arguments·args·(),kwargs·{}: |
246 | </pre></div></div> | 246 | </pre></div></div> |
247 | </div> | 247 | </div> |
248 | <div·class="nboutput·docutils·container"> | 248 | <div·class="nboutput·docutils·container"> |
249 | <div·class="prompt·empty·docutils·container"> | 249 | <div·class="prompt·empty·docutils·container"> |
250 | </div> | 250 | </div> |
251 | <div·class="output_area·docutils·container"> | 251 | <div·class="output_area·docutils·container"> |
252 | <div·class="highlight"><pre> | 252 | <div·class="highlight"><pre> |
253 | <span·class="ansi-red-fg">---------------------------------------------------------------------------</span> | 253 | <span·class="ansi-red-fg">---------------------------------------------------------------------------</span> |
254 | <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) |
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> | 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> |
256 | <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>: |
257 | <span·class="ansi-green-fg">-->·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">-->·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> |
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>: | 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>: |
259 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 259 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.local/share/cartopy/shapefiles/natural_earth/physical' |
260 | During·handling·of·the·above·exception,·another·exception·occurred: | 260 | During·handling·of·the·above·exception,·another·exception·occurred: |
261 | <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) |
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> | 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> |
263 | <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>: |
264 | <span·class="ansi-green-fg">-->·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">-->·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> |
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>: | 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>: |
266 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 266 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.local/share/cartopy/shapefiles/natural_earth' |
267 | During·handling·of·the·above·exception,·another·exception·occurred: | 267 | During·handling·of·the·above·exception,·another·exception·occurred: |
268 | <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) |
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> | 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> |
270 | <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>: |
271 | <span·class="ansi-green-fg">-->·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">-->·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> |
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>: | 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>: |
273 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 273 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.local/share/cartopy/shapefiles' |
274 | During·handling·of·the·above·exception,·another·exception·occurred: | 274 | During·handling·of·the·above·exception,·another·exception·occurred: |
275 | <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) |
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> | 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> |
277 | <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>: |
278 | <span·class="ansi-green-fg">-->·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">-->·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> |
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>: | 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>: |
280 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 280 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.local/share/cartopy' |
281 | During·handling·of·the·above·exception,·another·exception·occurred: | 281 | During·handling·of·the·above·exception,·another·exception·occurred: |
282 | <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) |
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> | 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> |
284 | <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>: |
285 | <span·class="ansi-green-fg">-->·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">-->·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> |
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>: | 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>: |
287 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 287 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.local/share' |
288 | During·handling·of·the·above·exception,·another·exception·occurred: | 288 | During·handling·of·the·above·exception,·another·exception·occurred: |
289 | <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) |
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> | 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> |
291 | <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>: |
292 | <span·class="ansi-green-fg">-->·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">-->·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> |
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>: | 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>: |
294 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 294 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.local' |
295 | During·handling·of·the·above·exception,·another·exception·occurred: | 295 | During·handling·of·the·above·exception,·another·exception·occurred: |
296 | <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) |
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> | 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> |
298 | <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>: |
299 | <span·class="ansi-green-fg">-->·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">-->·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> |
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>: | 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>: |
301 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 301 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build' |
302 | During·handling·of·the·above·exception,·another·exception·occurred: | 302 | During·handling·of·the·above·exception,·another·exception·occurred: |
303 | <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) |
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> | 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> |
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)">></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)">></span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">None</span>: |
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(): | 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 530, 75 lines modified | Offset 530, 75 lines modified | ||
530 | <span·class="ansi-red-fg">---------------------------------------------------------------------------</span> | 530 | <span·class="ansi-red-fg">---------------------------------------------------------------------------</span> |
531 | <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) |
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> | 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> |
533 | <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>: |
534 | <span·class="ansi-green-fg">-->·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> | 534 | <span·class="ansi-green-fg">-->·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> |
535 | <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>: | 535 | <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>: |
536 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 536 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.local/share/cartopy/shapefiles/natural_earth/physical' |
537 | During·handling·of·the·above·exception,·another·exception·occurred: | 537 | During·handling·of·the·above·exception,·another·exception·occurred: |
538 | <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last) | 538 | <span·class="ansi-red-fg">FileNotFoundError</span>·························Traceback·(most·recent·call·last) |
539 | 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> | 539 | 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> |
540 | <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>: | 540 | <span·class="ansi-green-intense-fg·ansi-bold">····723</span>·<span·class="ansi-bold"·style="color:·rgb(0,135,0)">try</span>: |
541 | <span·class="ansi-green-fg">-->·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> | 541 | <span·class="ansi-green-fg">-->·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> |
542 | <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>: | 542 | <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>: |
543 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 543 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.local/share/cartopy/shapefiles/natural_earth' |
544 | During·handling·of·the·above·exception,·another·exception·occurred: | 544 | During·handling·of·the·above·exception,·another·exception·occurred: |
Max diff block lines reached; 7822/25515 bytes (30.66%) of diff not shown. |
Offset 99, 15 lines modified | Offset 99, 15 lines modified | ||
99 | ····273·····message.append( | 99 | ····273·····message.append( |
100 | ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different | 100 | ····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·error | 103 | -->·276·raise·PermissionError("·".join(message))·from·error |
104 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not | 104 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
105 | create·data·cache·folder·'/nonexistent/ | 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 | 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: |
108 | [3]: | 108 | [3]: |
109 | ds·=·ds·-·273.15 | 109 | ds·=·ds·-·273.15 |
110 | ds.t2m[0].plot(cmap=plt.cm.coolwarm) | 110 | ds.t2m[0].plot(cmap=plt.cm.coolwarm) |
111 | --------------------------------------------------------------------------- | 111 | --------------------------------------------------------------------------- |
112 | NameError·································Traceback·(most·recent·call·last) | 112 | NameError·································Traceback·(most·recent·call·last) |
Offset 138, 97 lines modified | Offset 138, 97 lines modified | ||
138 | ---->·7·plot·=·ds.t2m[0].plot( | 138 | ---->·7·plot·=·ds.t2m[0].plot( |
139 | ······8·····cmap=plt.cm.coolwarm,·transform=ccrs.PlateCarree(),·cbar_kwargs= | 139 | ······8·····cmap=plt.cm.coolwarm,·transform=ccrs.PlateCarree(),·cbar_kwargs= |
140 | {"shrink":·0.6} | 140 | {"shrink":·0.6} |
141 | ······9·) | 141 | ······9·) |
142 | ·····10·plt.title("ERA5·-·2m·temperature·British·Isles·March·2019") | 142 | ·····10·plt.title("ERA5·-·2m·temperature·British·Isles·March·2019") |
143 | NameError:·name·'ds'·is·not·defined | 143 | NameError:·name·'ds'·is·not·defined |
144 | Error·in·callback·<function·_draw_all_if_interactive·at·0xffff | 144 | Error·in·callback·<function·_draw_all_if_interactive·at·0xffff3ed5ca40>·(for |
145 | post_execute),·with·arguments·args·(),kwargs·{}: | 145 | post_execute),·with·arguments·args·(),kwargs·{}: |
146 | --------------------------------------------------------------------------- | 146 | --------------------------------------------------------------------------- |
147 | FileNotFoundError·························Traceback·(most·recent·call·last) | 147 | FileNotFoundError·························Traceback·(most·recent·call·last) |
148 | 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, |
149 | parents,·exist_ok) | 149 | parents,·exist_ok) |
150 | ····723·try: | 150 | ····723·try: |
151 | -->·724·····os.mkdir(self,·mode) | 151 | -->·724·····os.mkdir(self,·mode) |
152 | ····725·except·FileNotFoundError: | 152 | ····725·except·FileNotFoundError: |
153 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 153 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
154 | build/.local/share/cartopy/shapefiles/natural_earth/physical' | 154 | build/.local/share/cartopy/shapefiles/natural_earth/physical' |
155 | During·handling·of·the·above·exception,·another·exception·occurred: | 155 | During·handling·of·the·above·exception,·another·exception·occurred: |
156 | FileNotFoundError·························Traceback·(most·recent·call·last) | 156 | FileNotFoundError·························Traceback·(most·recent·call·last) |
157 | 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, |
158 | parents,·exist_ok) | 158 | parents,·exist_ok) |
159 | ····723·try: | 159 | ····723·try: |
160 | -->·724·····os.mkdir(self,·mode) | 160 | -->·724·····os.mkdir(self,·mode) |
161 | ····725·except·FileNotFoundError: | 161 | ····725·except·FileNotFoundError: |
162 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 162 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
163 | build/.local/share/cartopy/shapefiles/natural_earth' | 163 | build/.local/share/cartopy/shapefiles/natural_earth' |
164 | During·handling·of·the·above·exception,·another·exception·occurred: | 164 | During·handling·of·the·above·exception,·another·exception·occurred: |
165 | FileNotFoundError·························Traceback·(most·recent·call·last) | 165 | FileNotFoundError·························Traceback·(most·recent·call·last) |
166 | 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, |
167 | parents,·exist_ok) | 167 | parents,·exist_ok) |
168 | ····723·try: | 168 | ····723·try: |
169 | -->·724·····os.mkdir(self,·mode) | 169 | -->·724·····os.mkdir(self,·mode) |
170 | ····725·except·FileNotFoundError: | 170 | ····725·except·FileNotFoundError: |
171 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 171 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
172 | build/.local/share/cartopy/shapefiles' | 172 | build/.local/share/cartopy/shapefiles' |
173 | During·handling·of·the·above·exception,·another·exception·occurred: | 173 | During·handling·of·the·above·exception,·another·exception·occurred: |
174 | FileNotFoundError·························Traceback·(most·recent·call·last) | 174 | FileNotFoundError·························Traceback·(most·recent·call·last) |
175 | 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, |
176 | parents,·exist_ok) | 176 | parents,·exist_ok) |
177 | ····723·try: | 177 | ····723·try: |
178 | -->·724·····os.mkdir(self,·mode) | 178 | -->·724·····os.mkdir(self,·mode) |
179 | ····725·except·FileNotFoundError: | 179 | ····725·except·FileNotFoundError: |
180 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 180 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
181 | build/.local/share/cartopy' | 181 | build/.local/share/cartopy' |
182 | During·handling·of·the·above·exception,·another·exception·occurred: | 182 | During·handling·of·the·above·exception,·another·exception·occurred: |
183 | FileNotFoundError·························Traceback·(most·recent·call·last) | 183 | FileNotFoundError·························Traceback·(most·recent·call·last) |
184 | 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, |
185 | parents,·exist_ok) | 185 | parents,·exist_ok) |
186 | ····723·try: | 186 | ····723·try: |
187 | -->·724·····os.mkdir(self,·mode) | 187 | -->·724·····os.mkdir(self,·mode) |
188 | ····725·except·FileNotFoundError: | 188 | ····725·except·FileNotFoundError: |
189 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 189 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
190 | build/.local/share' | 190 | build/.local/share' |
191 | During·handling·of·the·above·exception,·another·exception·occurred: | 191 | During·handling·of·the·above·exception,·another·exception·occurred: |
192 | FileNotFoundError·························Traceback·(most·recent·call·last) | 192 | FileNotFoundError·························Traceback·(most·recent·call·last) |
193 | 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, |
194 | parents,·exist_ok) | 194 | parents,·exist_ok) |
195 | ····723·try: | 195 | ····723·try: |
196 | -->·724·····os.mkdir(self,·mode) | 196 | -->·724·····os.mkdir(self,·mode) |
197 | ····725·except·FileNotFoundError: | 197 | ····725·except·FileNotFoundError: |
198 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 198 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
199 | build/.local' | 199 | build/.local' |
200 | During·handling·of·the·above·exception,·another·exception·occurred: | 200 | During·handling·of·the·above·exception,·another·exception·occurred: |
201 | FileNotFoundError·························Traceback·(most·recent·call·last) | 201 | FileNotFoundError·························Traceback·(most·recent·call·last) |
202 | 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, |
203 | parents,·exist_ok) | 203 | parents,·exist_ok) |
204 | ····723·try: | 204 | ····723·try: |
205 | -->·724·····os.mkdir(self,·mode) | 205 | -->·724·····os.mkdir(self,·mode) |
206 | ····725·except·FileNotFoundError: | 206 | ····725·except·FileNotFoundError: |
207 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 207 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
208 | build' | 208 | build' |
209 | During·handling·of·the·above·exception,·another·exception·occurred: | 209 | During·handling·of·the·above·exception,·another·exception·occurred: |
210 | PermissionError···························Traceback·(most·recent·call·last) | 210 | PermissionError···························Traceback·(most·recent·call·last) |
211 | File·/usr/lib/python3/dist-packages/matplotlib/pyplot.py:197,·in | 211 | File·/usr/lib/python3/dist-packages/matplotlib/pyplot.py:197,·in |
212 | _draw_all_if_interactive() | 212 | _draw_all_if_interactive() |
Offset 458, 87 lines modified | Offset 458, 87 lines modified | ||
458 | FileNotFoundError·························Traceback·(most·recent·call·last) | 458 | FileNotFoundError·························Traceback·(most·recent·call·last) |
459 | File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode, | 459 | File·/usr/lib/python3.13/pathlib/_local.py:724,·in·Path.mkdir(self,·mode, |
460 | parents,·exist_ok) | 460 | parents,·exist_ok) |
461 | ····723·try: | 461 | ····723·try: |
462 | -->·724·····os.mkdir(self,·mode) | 462 | -->·724·····os.mkdir(self,·mode) |
463 | ····725·except·FileNotFoundError: | 463 | ····725·except·FileNotFoundError: |
464 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 464 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
465 | build/.local/share/cartopy/shapefiles/natural_earth/physical' | 465 | build/.local/share/cartopy/shapefiles/natural_earth/physical' |
466 | During·handling·of·the·above·exception,·another·exception·occurred: | 466 | During·handling·of·the·above·exception,·another·exception·occurred: |
467 | FileNotFoundError·························Traceback·(most·recent·call·last) | 467 | FileNotFoundError·························Traceback·(most·recent·call·last) |
Max diff block lines reached; 3121/8974 bytes (34.78%) of diff not shown. |
Offset 15, 18 lines modified | Offset 15, 18 lines modified | ||
15 | ············] | 15 | ············] |
16 | ········}, | 16 | ········}, |
17 | ········{ | 17 | ········{ |
18 | ············"cell_type":·"code", | 18 | ············"cell_type":·"code", |
19 | ············"execution_count":·1, | 19 | ············"execution_count":·1, |
20 | ············"metadata":·{ | 20 | ············"metadata":·{ |
21 | ················"execution":·{ | 21 | ················"execution":·{ |
22 | ····················"iopub.execute_input":·"202 | 22 | ····················"iopub.execute_input":·"2025-02-05T04:01:40.611494Z", |
23 | ····················"iopub.status.busy":·"202 | 23 | ····················"iopub.status.busy":·"2025-02-05T04:01:40.611255Z", |
24 | ····················"iopub.status.idle":·"202 | 24 | ····················"iopub.status.idle":·"2025-02-05T04:01:42.142607Z", |
25 | ····················"shell.execute_reply":·"202 | 25 | ····················"shell.execute_reply":·"2025-02-05T04:01:42.141949Z" |
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":·[ |
Offset 47, 24 lines modified | Offset 47, 24 lines modified | ||
47 | ············] | 47 | ············] |
48 | ········}, | 48 | ········}, |
49 | ········{ | 49 | ········{ |
50 | ············"cell_type":·"code", | 50 | ············"cell_type":·"code", |
51 | ············"execution_count":·2, | 51 | ············"execution_count":·2, |
52 | ············"metadata":·{ | 52 | ············"metadata":·{ |
53 | ················"execution":·{ | 53 | ················"execution":·{ |
54 | ····················"iopub.execute_input":·"202 | 54 | ····················"iopub.execute_input":·"2025-02-05T04:01:42.145948Z", |
55 | ····················"iopub.status.busy":·"202 | 55 | ····················"iopub.status.busy":·"2025-02-05T04:01:42.145497Z", |
56 | ····················"iopub.status.idle":·"202 | 56 | ····················"iopub.status.idle":·"2025-02-05T04:01:42.446336Z", |
57 | ····················"shell.execute_reply":·"202 | 57 | ····················"shell.execute_reply":·"2025-02-05T04:01:42.445530Z" |
58 | ················} | 58 | ················} |
59 | ············}, | 59 | ············}, |
60 | ············"outputs":·[ | 60 | ············"outputs":·[ |
61 | ················{ | 61 | ················{ |
62 | ····················"ename":·"PermissionError", | 62 | ····················"ename":·"PermissionError", |
63 | ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 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.", |
64 | ····················"output_type":·"error", | 64 | ····················"output_type":·"error", |
65 | ····················"traceback":·[ | 65 | ····················"traceback":·[ |
66 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | 66 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
67 | ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)", | 67 | ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)", |
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", | 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", |
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", | 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", |
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", |
Offset 74, 15 lines modified | Offset 74, 15 lines modified | ||
74 | ························"\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", |
75 | ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)", | 75 | ························"\u001b[0;31mPermissionError\u001b[0m···························Traceback·(most·recent·call·last)", |
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", | 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", |
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", | 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", |
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/ | 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.load_dataset(\"era5-2mt-2019-03-uk.grib\",·engine=\"cfgrib\")" | 86 | ················"ds·=·xr.tutorial.load_dataset(\"era5-2mt-2019-03-uk.grib\",·engine=\"cfgrib\")" |
87 | ············] | 87 | ············] |
88 | ········}, | 88 | ········}, |
Offset 94, 18 lines modified | Offset 94, 18 lines modified | ||
94 | ············] | 94 | ············] |
95 | ········}, | 95 | ········}, |
96 | ········{ | 96 | ········{ |
97 | ············"cell_type":·"code", | 97 | ············"cell_type":·"code", |
98 | ············"execution_count":·3, | 98 | ············"execution_count":·3, |
99 | ············"metadata":·{ | 99 | ············"metadata":·{ |
100 | ················"execution":·{ | 100 | ················"execution":·{ |
101 | ····················"iopub.execute_input":·"202 | 101 | ····················"iopub.execute_input":·"2025-02-05T04:01:42.449662Z", |
102 | ····················"iopub.status.busy":·"202 | 102 | ····················"iopub.status.busy":·"2025-02-05T04:01:42.449398Z", |
103 | ····················"iopub.status.idle":·"202 | 103 | ····················"iopub.status.idle":·"2025-02-05T04:01:42.465282Z", |
104 | ····················"shell.execute_reply":·"202 | 104 | ····················"shell.execute_reply":·"2025-02-05T04:01:42.464671Z" |
105 | ················} | 105 | ················} |
106 | ············}, | 106 | ············}, |
107 | ············"outputs":·[ | 107 | ············"outputs":·[ |
108 | ················{ | 108 | ················{ |
109 | ····················"ename":·"NameError", | 109 | ····················"ename":·"NameError", |
110 | ····················"evalue":·"name·'ds'·is·not·defined", | 110 | ····················"evalue":·"name·'ds'·is·not·defined", |
111 | ····················"output_type":·"error", | 111 | ····················"output_type":·"error", |
Offset 130, 18 lines modified | Offset 130, 18 lines modified | ||
130 | ············] | 130 | ············] |
131 | ········}, | 131 | ········}, |
132 | ········{ | 132 | ········{ |
133 | ············"cell_type":·"code", | 133 | ············"cell_type":·"code", |
134 | ············"execution_count":·4, | 134 | ············"execution_count":·4, |
135 | ············"metadata":·{ | 135 | ············"metadata":·{ |
136 | ················"execution":·{ | 136 | ················"execution":·{ |
137 | ····················"iopub.execute_input":·"202 | 137 | ····················"iopub.execute_input":·"2025-02-05T04:01:42.468110Z", |
138 | ····················"iopub.status.busy":·"202 | 138 | ····················"iopub.status.busy":·"2025-02-05T04:01:42.467845Z", |
139 | ····················"iopub.status.idle":·"202 | 139 | ····················"iopub.status.idle":·"2025-02-05T04:01:44.871051Z", |
140 | ····················"shell.execute_reply":·"202 | 140 | ····················"shell.execute_reply":·"2025-02-05T04:01:44.870087Z" |
141 | ················} | 141 | ················} |
142 | ············}, | 142 | ············}, |
143 | ············"outputs":·[ | 143 | ············"outputs":·[ |
144 | ················{ | 144 | ················{ |
145 | ····················"ename":·"NameError", | 145 | ····················"ename":·"NameError", |
146 | ····················"evalue":·"name·'ds'·is·not·defined", | 146 | ····················"evalue":·"name·'ds'·is·not·defined", |
147 | ····················"output_type":·"error", | 147 | ····················"output_type":·"error", |
Offset 152, 50 lines modified | Offset 152, 50 lines modified | ||
152 | ························"\u001b[0;31mNameError\u001b[0m:·name·'ds'·is·not·defined" | 152 | ························"\u001b[0;31mNameError\u001b[0m:·name·'ds'·is·not·defined" |
153 | ····················] | 153 | ····················] |
154 | ················}, | 154 | ················}, |
155 | ················{ | 155 | ················{ |
156 | ····················"name":·"stdout", | 156 | ····················"name":·"stdout", |
157 | ····················"output_type":·"stream", | 157 | ····················"output_type":·"stream", |
158 | ····················"text":·[ | 158 | ····················"text":·[ |
159 | ························"Error·in·callback·<function·_draw_all_if_interactive·at·0xffff | 159 | ························"Error·in·callback·<function·_draw_all_if_interactive·at·0xffff3ed5ca40>·(for·post_execute),·with·arguments·args·(),kwargs·{}:\n" |
160 | ····················] | 160 | ····················] |
161 | ················}, | 161 | ················}, |
162 | ················{ | 162 | ················{ |
163 | ····················"ename":·"PermissionError", | 163 | ····················"ename":·"PermissionError", |
164 | ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'", | 164 | ····················"evalue":·"[Errno·13]·Permission·denied:·'/nonexistent'", |
165 | ····················"output_type":·"error", | 165 | ····················"output_type":·"error", |
166 | ····················"traceback":·[ | 166 | ····················"traceback":·[ |
167 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | 167 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
168 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", | 168 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", |
169 | ························"File·\u001b[0;32m/usr/lib/python3.13/pathlib/_local.py:724\u001b[0m,·in·\u001b[0;36mPath.mkdir\u001b[0;34m(self,·mode,·parents,·exist_ok)\u001b[0m\n\u001b[1;32m····723\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·724\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmkdir\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mmode\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····725\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileNotFoundError\u001b[39;00m:\n", | 169 | ························"File·\u001b[0;32m/usr/lib/python3.13/pathlib/_local.py:724\u001b[0m,·in·\u001b[0;36mPath.mkdir\u001b[0;34m(self,·mode,·parents,·exist_ok)\u001b[0m\n\u001b[1;32m····723\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·724\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmkdir\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mmode\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····725\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileNotFoundError\u001b[39;00m:\n", |
170 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 170 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.local/share/cartopy/shapefiles/natural_earth/physical'", |
171 | ························"\nDuring·handling·of·the·above·exception,·another·exception·occurred:\n", | 171 | ························"\nDuring·handling·of·the·above·exception,·another·exception·occurred:\n", |
172 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", | 172 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", |
173 | ························"File·\u001b[0;32m/usr/lib/python3.13/pathlib/_local.py:724\u001b[0m,·in·\u001b[0;36mPath.mkdir\u001b[0;34m(self,·mode,·parents,·exist_ok)\u001b[0m\n\u001b[1;32m····723\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·724\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmkdir\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mmode\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····725\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileNotFoundError\u001b[39;00m:\n", | 173 | ························"File·\u001b[0;32m/usr/lib/python3.13/pathlib/_local.py:724\u001b[0m,·in·\u001b[0;36mPath.mkdir\u001b[0;34m(self,·mode,·parents,·exist_ok)\u001b[0m\n\u001b[1;32m····723\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·724\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmkdir\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mmode\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····725\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileNotFoundError\u001b[39;00m:\n", |
174 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 174 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.local/share/cartopy/shapefiles/natural_earth'", |
175 | ························"\nDuring·handling·of·the·above·exception,·another·exception·occurred:\n", | 175 | ························"\nDuring·handling·of·the·above·exception,·another·exception·occurred:\n", |
176 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", | 176 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", |
177 | ························"File·\u001b[0;32m/usr/lib/python3.13/pathlib/_local.py:724\u001b[0m,·in·\u001b[0;36mPath.mkdir\u001b[0;34m(self,·mode,·parents,·exist_ok)\u001b[0m\n\u001b[1;32m····723\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·724\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmkdir\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mmode\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····725\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileNotFoundError\u001b[39;00m:\n", | 177 | ························"File·\u001b[0;32m/usr/lib/python3.13/pathlib/_local.py:724\u001b[0m,·in·\u001b[0;36mPath.mkdir\u001b[0;34m(self,·mode,·parents,·exist_ok)\u001b[0m\n\u001b[1;32m····723\u001b[0m·\u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-->·724\u001b[0m·····\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmkdir\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m·\u001b[49m\u001b[43mmode\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m····725\u001b[0m·\u001b[38;5;28;01mexcept\u001b[39;00m·\u001b[38;5;167;01mFileNotFoundError\u001b[39;00m:\n", |
178 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 178 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.local/share/cartopy/shapefiles'", |
179 | ························"\nDuring·handling·of·the·above·exception,·another·exception·occurred:\n", | 179 | ························"\nDuring·handling·of·the·above·exception,·another·exception·occurred:\n", |
180 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", | 180 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", |
Max diff block lines reached; 23813/43854 bytes (54.30%) of diff not shown. |
Offset 191, 15 lines modified | Offset 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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 197 | <span·class="ansi-red-fg">PermissionError</span>:·[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. |
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> |
Offset 131, 15 lines modified | Offset 131, 15 lines modified | ||
131 | ····273·····message.append( | 131 | ····273·····message.append( |
132 | ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different | 132 | ····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·error | 135 | -->·276·raise·PermissionError("·".join(message))·from·error |
136 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not | 136 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
137 | create·data·cache·folder·'/nonexistent/ | 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·only | 140 | Write·equations·to·calculate·the·vertical·coordinate.·These·will·be·only |
141 | evaluated·when·data·is·requested.·Information·about·the·ROMS·vertical | 141 | 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, |
Offset 17, 18 lines modified | Offset 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":·"202 | 24 | ····················"iopub.execute_input":·"2025-02-05T04:01:52.572469Z", |
25 | ····················"iopub.status.busy":·"202 | 25 | ····················"iopub.status.busy":·"2025-02-05T04:01:52.572224Z", |
26 | ····················"iopub.status.idle":·"202 | 26 | ····················"iopub.status.idle":·"2025-02-05T04:01:53.782598Z", |
27 | ····················"shell.execute_reply":·"202 | 27 | ····················"shell.execute_reply":·"2025-02-05T04:01:53.781893Z" |
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 modified | Offset 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":·"202 | 82 | ····················"iopub.execute_input":·"2025-02-05T04:01:53.791058Z", |
83 | ····················"iopub.status.busy":·"202 | 83 | ····················"iopub.status.busy":·"2025-02-05T04:01:53.790635Z", |
84 | ····················"iopub.status.idle":·"202 | 84 | ····················"iopub.status.idle":·"2025-02-05T04:01:54.099331Z", |
85 | ····················"shell.execute_reply":·"202 | 85 | ····················"shell.execute_reply":·"2025-02-05T04:01:54.098721Z" |
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/ | 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 modified | Offset 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/ | 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 modified | Offset 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":·"202 | 143 | ····················"iopub.execute_input":·"2025-02-05T04:01:54.102323Z", |
144 | ····················"iopub.status.busy":·"202 | 144 | ····················"iopub.status.busy":·"2025-02-05T04:01:54.102077Z", |
145 | ····················"iopub.status.idle":·"202 | 145 | ····················"iopub.status.idle":·"2025-02-05T04:01:54.126771Z", |
146 | ····················"shell.execute_reply":·"202 | 146 | ····················"shell.execute_reply":·"2025-02-05T04:01:54.126085Z" |
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 modified | Offset 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":·"202 | 188 | ····················"iopub.execute_input":·"2025-02-05T04:01:54.129596Z", |
189 | ····················"iopub.status.busy":·"202 | 189 | ····················"iopub.status.busy":·"2025-02-05T04:01:54.129356Z", |
190 | ····················"iopub.status.idle":·"202 | 190 | ····················"iopub.status.idle":·"2025-02-05T04:01:54.144908Z", |
191 | ····················"shell.execute_reply":·"202 | 191 | ····················"shell.execute_reply":·"2025-02-05T04:01:54.144195Z" |
192 | ················}, | 192 | ················}, |
193 | ················"scrolled":·false | 193 | ················"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 modified | Offset 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":·"202 | 224 | ····················"iopub.execute_input":·"2025-02-05T04:01:54.147645Z", |
225 | ····················"iopub.status.busy":·"202 | 225 | ····················"iopub.status.busy":·"2025-02-05T04:01:54.147407Z", |
226 | ····················"iopub.status.idle":·"202 | 226 | ····················"iopub.status.idle":·"2025-02-05T04:01:54.168315Z", |
227 | ····················"shell.execute_reply":·"202 | 227 | ····················"shell.execute_reply":·"2025-02-05T04:01:54.167190Z" |
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 modified | Offset 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":·"202 | 263 | ····················"iopub.execute_input":·"2025-02-05T04:01:54.172214Z", |
264 | ····················"iopub.status.busy":·"202 | 264 | ····················"iopub.status.busy":·"2025-02-05T04:01:54.171969Z", |
265 | ····················"iopub.status.idle":·"202 | 265 | ····················"iopub.status.idle":·"2025-02-05T04:01:54.190843Z", |
Max diff block lines reached; 1213/16978 bytes (7.14%) of diff not shown. |
Offset 185, 15 lines modified | Offset 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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 191 | <span·class="ansi-red-fg">PermissionError</span>:·[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. |
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> |
Offset 123, 15 lines modified | Offset 123, 15 lines modified | ||
123 | ····273·····message.append( | 123 | ····273·····message.append( |
124 | ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different | 124 | ····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·error | 127 | -->·276·raise·PermissionError("·".join(message))·from·error |
128 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not | 128 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
129 | create·data·cache·folder·'/nonexistent/ | 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.·This | 131 | 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·to | 132 | 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) |
Offset 36, 24 lines modified | Offset 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":·"202 | 43 | ····················"iopub.execute_input":·"2025-02-05T04:01:59.416196Z", |
44 | ····················"iopub.status.busy":·"202 | 44 | ····················"iopub.status.busy":·"2025-02-05T04:01:59.415905Z", |
45 | ····················"iopub.status.idle":·"202 | 45 | ····················"iopub.status.idle":·"2025-02-05T04:02:00.298954Z", |
46 | ····················"shell.execute_reply":·"202 | 46 | ····················"shell.execute_reply":·"2025-02-05T04:02:00.298106Z" |
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/ | 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 modified | Offset 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/ | 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 modified | Offset 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":·"202 | 104 | ····················"iopub.execute_input":·"2025-02-05T04:02:00.302922Z", |
105 | ····················"iopub.status.busy":·"202 | 105 | ····················"iopub.status.busy":·"2025-02-05T04:02:00.302643Z", |
106 | ····················"iopub.status.idle":·"202 | 106 | ····················"iopub.status.idle":·"2025-02-05T04:02:00.338811Z", |
107 | ····················"shell.execute_reply":·"202 | 107 | ····················"shell.execute_reply":·"2025-02-05T04:02:00.338090Z" |
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 modified | Offset 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":·"202 | 144 | ····················"iopub.execute_input":·"2025-02-05T04:02:00.342111Z", |
145 | ····················"iopub.status.busy":·"202 | 145 | ····················"iopub.status.busy":·"2025-02-05T04:02:00.341819Z", |
146 | ····················"iopub.status.idle":·"202 | 146 | ····················"iopub.status.idle":·"2025-02-05T04:02:00.382832Z", |
147 | ····················"shell.execute_reply":·"202 | 147 | ····················"shell.execute_reply":·"2025-02-05T04:02:00.382094Z" |
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 modified | Offset 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":·"202 | 203 | ····················"iopub.execute_input":·"2025-02-05T04:02:00.386462Z", |
204 | ····················"iopub.status.busy":·"202 | 204 | ····················"iopub.status.busy":·"2025-02-05T04:02:00.385875Z", |
205 | ····················"iopub.status.idle":·"202 | 205 | ····················"iopub.status.idle":·"2025-02-05T04:02:00.418837Z", |
206 | ····················"shell.execute_reply":·"202 | 206 | ····················"shell.execute_reply":·"2025-02-05T04:02:00.418088Z" |
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 modified | Offset 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":·"202 | 269 | ····················"iopub.execute_input":·"2025-02-05T04:02:00.422219Z", |
270 | ····················"iopub.status.busy":·"202 | 270 | ····················"iopub.status.busy":·"2025-02-05T04:02:00.421906Z", |
271 | ····················"iopub.status.idle":·"202 | 271 | ····················"iopub.status.idle":·"2025-02-05T04:02:00.458832Z", |
272 | ····················"shell.execute_reply":·"202 | 272 | ····················"shell.execute_reply":·"2025-02-05T04:02:00.458105Z" |
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 modified | Offset 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":·"202 | 347 | ····················"iopub.execute_input":·"2025-02-05T04:02:00.462337Z", |
348 | ····················"iopub.status.busy":·"202 | 348 | ····················"iopub.status.busy":·"2025-02-05T04:02:00.461968Z", |
349 | ····················"iopub.status.idle":·"202 | 349 | ····················"iopub.status.idle":·"2025-02-05T04:02:00.498821Z", |
Max diff block lines reached; 10299/28390 bytes (36.28%) of diff not shown. |
Offset 186, 15 lines modified | Offset 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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 192 | <span·class="ansi-red-fg">PermissionError</span>:·[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. |
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> |
Offset 121, 15 lines modified | Offset 121, 15 lines modified | ||
121 | ····273·····message.append( | 121 | ····273·····message.append( |
122 | ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different | 122 | ····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·error | 125 | -->·276·raise·PermissionError("·".join(message))·from·error |
126 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not | 126 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
127 | create·data·cache·folder·'/nonexistent/ | 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)) |
Offset 28, 18 lines modified | Offset 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":·"202 | 35 | ····················"iopub.execute_input":·"2025-02-05T04:02:08.950888Z", |
36 | ····················"iopub.status.busy":·"202 | 36 | ····················"iopub.status.busy":·"2025-02-05T04:02:08.950639Z", |
37 | ····················"iopub.status.idle":·"202 | 37 | ····················"iopub.status.idle":·"2025-02-05T04:02:10.770501Z", |
38 | ····················"shell.execute_reply":·"202 | 38 | ····················"shell.execute_reply":·"2025-02-05T04:02:10.765394Z" |
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 modified | Offset 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":·"202 | 70 | ····················"iopub.execute_input":·"2025-02-05T04:02:10.779164Z", |
71 | ····················"iopub.status.busy":·"202 | 71 | ····················"iopub.status.busy":·"2025-02-05T04:02:10.778701Z", |
72 | ····················"iopub.status.idle":·"202 | 72 | ····················"iopub.status.idle":·"2025-02-05T04:02:11.462860Z", |
73 | ····················"shell.execute_reply":·"202 | 73 | ····················"shell.execute_reply":·"2025-02-05T04:02:11.462092Z" |
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/ | 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 modified | Offset 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/ | 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 modified | Offset 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":·"202 | 129 | ····················"iopub.execute_input":·"2025-02-05T04:02:11.471323Z", |
130 | ····················"iopub.status.busy":·"202 | 130 | ····················"iopub.status.busy":·"2025-02-05T04:02:11.471036Z", |
131 | ····················"iopub.status.idle":·"202 | 131 | ····················"iopub.status.idle":·"2025-02-05T04:02:11.630832Z", |
132 | ····················"shell.execute_reply":·"202 | 132 | ····················"shell.execute_reply":·"2025-02-05T04:02:11.630092Z" |
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 modified | Offset 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":·"202 | 185 | ····················"iopub.execute_input":·"2025-02-05T04:02:11.633972Z", |
186 | ····················"iopub.status.busy":·"202 | 186 | ····················"iopub.status.busy":·"2025-02-05T04:02:11.633712Z", |
187 | ····················"iopub.status.idle":·"202 | 187 | ····················"iopub.status.idle":·"2025-02-05T04:02:11.666735Z", |
188 | ····················"shell.execute_reply":·"202 | 188 | ····················"shell.execute_reply":·"2025-02-05T04:02:11.666077Z" |
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 modified | Offset 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":·"202 | 226 | ····················"iopub.execute_input":·"2025-02-05T04:02:11.669784Z", |
227 | ····················"iopub.status.busy":·"202 | 227 | ····················"iopub.status.busy":·"2025-02-05T04:02:11.669520Z", |
228 | ····················"iopub.status.idle":·"202 | 228 | ····················"iopub.status.idle":·"2025-02-05T04:02:11.706809Z", |
229 | ····················"shell.execute_reply":·"202 | 229 | ····················"shell.execute_reply":·"2025-02-05T04:02:11.706094Z" |
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 modified | Offset 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":·"202 | 259 | ····················"iopub.execute_input":·"2025-02-05T04:02:11.709871Z", |
260 | ····················"iopub.status.busy":·"202 | 260 | ····················"iopub.status.busy":·"2025-02-05T04:02:11.709617Z", |
261 | ····················"iopub.status.idle":·"202 | 261 | ····················"iopub.status.idle":·"2025-02-05T04:02:11.742770Z", |
Max diff block lines reached; 1345/18553 bytes (7.25%) of diff not shown. |
Offset 160, 15 lines modified | Offset 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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 166 | <span·class="ansi-red-fg">PermissionError</span>:·[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. |
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> |
Offset 99, 15 lines modified | Offset 99, 15 lines modified | ||
99 | ····273·····message.append( | 99 | ····273·····message.append( |
100 | ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different | 100 | ····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·error | 103 | -->·276·raise·PermissionError("·".join(message))·from·error |
104 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not | 104 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
105 | create·data·cache·folder·'/nonexistent/ | 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·users | 111 | For·users |
112 | ····*·_\x8G_\x8e_\x8t_\x8t_\x8i_\x8n_\x8g_\x8·_\x8S_\x8t_\x8a_\x8r_\x8t_\x8e_\x8d | 112 | ····*·_\x8G_\x8e_\x8t_\x8t_\x8i_\x8n_\x8g_\x8·_\x8S_\x8t_\x8a_\x8r_\x8t_\x8e_\x8d |
Offset 12, 24 lines modified | Offset 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":·"202 | 19 | ····················"iopub.execute_input":·"2025-02-05T04:02:16.550882Z", |
20 | ····················"iopub.status.busy":·"202 | 20 | ····················"iopub.status.busy":·"2025-02-05T04:02:16.550619Z", |
21 | ····················"iopub.status.idle":·"202 | 21 | ····················"iopub.status.idle":·"2025-02-05T04:02:17.754908Z", |
22 | ····················"shell.execute_reply":·"202 | 22 | ····················"shell.execute_reply":·"2025-02-05T04:02:17.754105Z" |
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/ | 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 modified | Offset 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/ | 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", |
Offset 159, 15 lines modified | Offset 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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 165 | <span·class="ansi-red-fg">PermissionError</span>:·[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. |
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> |
Offset 92, 15 lines modified | Offset 92, 15 lines modified | ||
92 | ····273·····message.append( | 92 | ····273·····message.append( |
93 | ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different | 93 | ····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·error | 96 | -->·276·raise·PermissionError("·".join(message))·from·error |
97 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not | 97 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
98 | create·data·cache·folder·'/nonexistent/ | 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·for | 101 | 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·the | 103 | 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·using | 104 | 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·this | 105 | the·days_in_month·accessor·on·the·time·coordinate.·The·calendar·type,·in·this |
Offset 19, 18 lines modified | Offset 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":·"202 | 26 | ····················"iopub.execute_input":·"2025-02-05T04:02:21.118997Z", |
27 | ····················"iopub.status.busy":·"202 | 27 | ····················"iopub.status.busy":·"2025-02-05T04:02:21.118713Z", |
28 | ····················"iopub.status.idle":·"202 | 28 | ····················"iopub.status.idle":·"2025-02-05T04:02:22.896036Z", |
29 | ····················"shell.execute_reply":·"202 | 29 | ····················"shell.execute_reply":·"2025-02-05T04:02:22.895362Z" |
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 modified | Offset 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":·"202 | 57 | ····················"iopub.execute_input":·"2025-02-05T04:02:22.903109Z", |
58 | ····················"iopub.status.busy":·"202 | 58 | ····················"iopub.status.busy":·"2025-02-05T04:02:22.902665Z", |
59 | ····················"iopub.status.idle":·"202 | 59 | ····················"iopub.status.idle":·"2025-02-05T04:02:23.202146Z", |
60 | ····················"shell.execute_reply":·"202 | 60 | ····················"shell.execute_reply":·"2025-02-05T04:02:23.201427Z" |
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/ | 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 modified | Offset 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/ | 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 modified | Offset 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":·"202 | 109 | ····················"iopub.execute_input":·"2025-02-05T04:02:23.204997Z", |
110 | ····················"iopub.status.busy":·"202 | 110 | ····················"iopub.status.busy":·"2025-02-05T04:02:23.204715Z", |
111 | ····················"iopub.status.idle":·"202 | 111 | ····················"iopub.status.idle":·"2025-02-05T04:02:23.238832Z", |
112 | ····················"shell.execute_reply":·"202 | 112 | ····················"shell.execute_reply":·"2025-02-05T04:02:23.238092Z" |
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 modified | Offset 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":·"202 | 142 | ····················"iopub.execute_input":·"2025-02-05T04:02:23.241910Z", |
143 | ····················"iopub.status.busy":·"202 | 143 | ····················"iopub.status.busy":·"2025-02-05T04:02:23.241647Z", |
144 | ····················"iopub.status.idle":·"202 | 144 | ····················"iopub.status.idle":·"2025-02-05T04:02:23.278818Z", |
145 | ····················"shell.execute_reply":·"202 | 145 | ····················"shell.execute_reply":·"2025-02-05T04:02:23.278094Z" |
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 modified | Offset 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":·"202 | 183 | ····················"iopub.execute_input":·"2025-02-05T04:02:23.281977Z", |
184 | ····················"iopub.status.busy":·"202 | 184 | ····················"iopub.status.busy":·"2025-02-05T04:02:23.281703Z", |
185 | ····················"iopub.status.idle":·"202 | 185 | ····················"iopub.status.idle":·"2025-02-05T04:02:23.337546Z", |
186 | ····················"shell.execute_reply":·"202 | 186 | ····················"shell.execute_reply":·"2025-02-05T04:02:23.336913Z" |
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 modified | Offset 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":·"202 | 215 | ····················"iopub.execute_input":·"2025-02-05T04:02:23.341187Z", |
216 | ····················"iopub.status.busy":·"202 | 216 | ····················"iopub.status.busy":·"2025-02-05T04:02:23.340899Z", |
217 | ····················"iopub.status.idle":·"202 | 217 | ····················"iopub.status.idle":·"2025-02-05T04:02:23.360567Z", |
Max diff block lines reached; 2534/18138 bytes (13.97%) of diff not shown. |
Offset 158, 15 lines modified | Offset 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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 164 | <span·class="ansi-red-fg">PermissionError</span>:·[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. |
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> |
Offset 90, 15 lines modified | Offset 90, 15 lines modified | ||
90 | ····273·····message.append( | 90 | ····273·····message.append( |
91 | ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different | 91 | ····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·error | 94 | -->·276·raise·PermissionError("·".join(message))·from·error |
95 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not | 95 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
96 | create·data·cache·folder·'/nonexistent/ | 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\x8l | 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\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·the | 99 | 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) |
Offset 16, 18 lines modified | Offset 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":·"202 | 23 | ····················"iopub.execute_input":·"2025-02-05T04:02:26.701948Z", |
24 | ····················"iopub.status.busy":·"202 | 24 | ····················"iopub.status.busy":·"2025-02-05T04:02:26.701669Z", |
25 | ····················"iopub.status.idle":·"202 | 25 | ····················"iopub.status.idle":·"2025-02-05T04:02:27.712765Z", |
26 | ····················"shell.execute_reply":·"202 | 26 | ····················"shell.execute_reply":·"2025-02-05T04:02:27.712024Z" |
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 modified | Offset 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":·"202 | 55 | ····················"iopub.execute_input":·"2025-02-05T04:02:27.716782Z", |
56 | ····················"iopub.status.busy":·"202 | 56 | ····················"iopub.status.busy":·"2025-02-05T04:02:27.716306Z", |
57 | ····················"iopub.status.idle":·"202 | 57 | ····················"iopub.status.idle":·"2025-02-05T04:02:28.004661Z", |
58 | ····················"shell.execute_reply":·"202 | 58 | ····················"shell.execute_reply":·"2025-02-05T04:02:28.003938Z" |
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/ | 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 modified | Offset 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/ | 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 modified | Offset 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":·"202 | 106 | ····················"iopub.execute_input":·"2025-02-05T04:02:28.009285Z", |
107 | ····················"iopub.status.busy":·"202 | 107 | ····················"iopub.status.busy":·"2025-02-05T04:02:28.008998Z", |
108 | ····················"iopub.status.idle":·"202 | 108 | ····················"iopub.status.idle":·"2025-02-05T04:02:28.030453Z", |
109 | ····················"shell.execute_reply":·"202 | 109 | ····················"shell.execute_reply":·"2025-02-05T04:02:28.029021Z" |
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 modified | Offset 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":·"202 | 148 | ····················"iopub.execute_input":·"2025-02-05T04:02:28.033620Z", |
149 | ····················"iopub.status.busy":·"202 | 149 | ····················"iopub.status.busy":·"2025-02-05T04:02:28.033344Z", |
150 | ····················"iopub.status.idle":·"202 | 150 | ····················"iopub.status.idle":·"2025-02-05T04:02:28.318128Z", |
151 | ····················"shell.execute_reply":·"202 | 151 | ····················"shell.execute_reply":·"2025-02-05T04:02:28.302091Z" |
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 modified | Offset 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":·"202 | 201 | ····················"iopub.execute_input":·"2025-02-05T04:02:28.327098Z", |
202 | ····················"iopub.status.busy":·"202 | 202 | ····················"iopub.status.busy":·"2025-02-05T04:02:28.326807Z", |
203 | ····················"iopub.status.idle":·"202 | 203 | ····················"iopub.status.idle":·"2025-02-05T04:02:28.362821Z", |
204 | ····················"shell.execute_reply":·"202 | 204 | ····················"shell.execute_reply":·"2025-02-05T04:02:28.362093Z" |
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 modified | Offset 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":·"202 | 240 | ····················"iopub.execute_input":·"2025-02-05T04:02:28.365862Z", |
241 | ····················"iopub.status.busy":·"202 | 241 | ····················"iopub.status.busy":·"2025-02-05T04:02:28.365598Z", |
242 | ····················"iopub.status.idle":·"202 | 242 | ····················"iopub.status.idle":·"2025-02-05T04:02:28.541454Z", |
Max diff block lines reached; 1324/17018 bytes (7.78%) of diff not shown. |
Offset 165, 15 lines modified | Offset 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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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)">"</span><span·style="color:·rgb(175,0,0)">Use·environment·variable·</span><span·style="color:·rgb(175,0,0)">'</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)">'</span><span·style="color:·rgb(175,0,0)">·to·specify·a·different·location.</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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">-->·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)">"</span><span·style="color:·rgb(175,0,0)">·</span><span·style="color:·rgb(175,0,0)">"</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:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 171 | <span·class="ansi-red-fg">PermissionError</span>:·[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. |
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> |
Offset 98, 15 lines modified | Offset 98, 15 lines modified | ||
98 | ····273·····message.append( | 98 | ····273·····message.append( |
99 | ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different | 99 | ····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·error | 102 | -->·276·raise·PermissionError("·".join(message))·from·error |
103 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not | 103 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
104 | create·data·cache·folder·'/nonexistent/ | 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·axes | 107 | Control·the·map·projection·parameters·on·multiple·axes |
108 | This·example·illustrates·how·to·plot·multiple·maps·and·control·their·extent·and | 108 | 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]: |
Offset 10, 18 lines modified | Offset 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":·"202 | 17 | ····················"iopub.execute_input":·"2025-02-05T04:02:34.582955Z", |
18 | ····················"iopub.status.busy":·"202 | 18 | ····················"iopub.status.busy":·"2025-02-05T04:02:34.582681Z", |
19 | ····················"iopub.status.idle":·"202 | 19 | ····················"iopub.status.idle":·"2025-02-05T04:02:36.038165Z", |
20 | ····················"shell.execute_reply":·"202 | 20 | ····················"shell.execute_reply":·"2025-02-05T04:02:36.022095Z" |
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 modified | Offset 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":·"202 | 44 | ····················"iopub.execute_input":·"2025-02-05T04:02:36.048422Z", |
45 | ····················"iopub.status.busy":·"202 | 45 | ····················"iopub.status.busy":·"2025-02-05T04:02:36.047960Z", |
46 | ····················"iopub.status.idle":·"202 | 46 | ····················"iopub.status.idle":·"2025-02-05T04:02:36.475575Z", |
47 | ····················"shell.execute_reply":·"202 | 47 | ····················"shell.execute_reply":·"2025-02-05T04:02:36.474875Z" |
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/ | 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 modified | Offset 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/ | 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 modified | Offset 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":·"202 | 98 | ····················"iopub.execute_input":·"2025-02-05T04:02:36.478732Z", |
99 | ····················"iopub.status.busy":·"202 | 99 | ····················"iopub.status.busy":·"2025-02-05T04:02:36.478476Z", |
100 | ····················"iopub.status.idle":·"202 | 100 | ····················"iopub.status.idle":·"2025-02-05T04:02:36.497084Z", |
101 | ····················"shell.execute_reply":·"202 | 101 | ····················"shell.execute_reply":·"2025-02-05T04:02:36.496458Z" |
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 modified | Offset 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":·"202 | 151 | ····················"iopub.execute_input":·"2025-02-05T04:02:36.500027Z", |
152 | ····················"iopub.status.busy":·"202 | 152 | ····················"iopub.status.busy":·"2025-02-05T04:02:36.499772Z", |
153 | ····················"iopub.status.idle":·"202 | 153 | ····················"iopub.status.idle":·"2025-02-05T04:02:36.526274Z", |
154 | ····················"shell.execute_reply":·"202 | 154 | ····················"shell.execute_reply":·"2025-02-05T04:02:36.525641Z" |
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 modified | Offset 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":·"202 | 215 | ····················"iopub.execute_input":·"2025-02-05T04:02:36.528887Z", |
216 | ····················"iopub.status.busy":·"202 | 216 | ····················"iopub.status.busy":·"2025-02-05T04:02:36.528608Z", |
217 | ····················"iopub.status.idle":·"202 | 217 | ····················"iopub.status.idle":·"2025-02-05T04:02:36.548354Z", |
218 | ····················"shell.execute_reply":·"202 | 218 | ····················"shell.execute_reply":·"2025-02-05T04:02:36.547751Z" |
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 modified | Offset 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":·"202 | 271 | ····················"iopub.execute_input":·"2025-02-05T04:02:36.551316Z", |
272 | ····················"iopub.status.busy":·"202 | 272 | ····················"iopub.status.busy":·"2025-02-05T04:02:36.551073Z", |
273 | ····················"iopub.status.idle":·"202 | 273 | ····················"iopub.status.idle":·"2025-02-05T04:02:36.568923Z", |
Max diff block lines reached; 208/16513 bytes (1.26%) of diff not shown. |
Offset 470, 37 lines modified | Offset 470, 37 lines modified | ||
470 | </style><pre·class='xr-text-repr-fallback'><xarray.Dataset>·Size:·41kB | 470 | </style><pre·class='xr-text-repr-fallback'><xarray.Dataset>·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-31 | 473 | ··*·time······(time)·datetime64[ns]·6kB·2000-01-01·2000-01-02·...·2001-12-31 |
474 | ··*·location··(location)·<U2·24B·'IA'·'IN'·'IL' | 474 | ··*·location··(location)·<U2·24B·'IA'·'IN'·'IL' |
475 | Data·variables: | 475 | Data·variables: |
476 | ····tmin······(time,·location)·float64·18kB·-8.037·-1.788·...·-1.346·-4.544 | 476 | ····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- | 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-dcca2edd-0774-439e-aabe-62a8e467382d'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-dcca2edd-0774-439e-aabe-62a8e467382d'·class='xr-section-summary'··title='Expand/collapse·section'>Dimensions:</label><div·class='xr-section-in[·...·truncated·by·diffoscope;·len:·1235,·SHA:·abed6b7de178fcfce78404846010f07fdba72db72009a7f43a002a36e105074d·...·]'·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(['2000-01-01T00:00:00.000000000',·'2000-01-02T00:00:00.000000000', |
478 | ·······'2000-01-03T00:00:00.000000000',·...,·'2001-12-29T00:00:00.000000000', | 478 | ·······'2000-01-03T00:00:00.000000000',·...,·'2001-12-29T00:00:00.000000000', |
479 | ·······'2001-12-30T00:00:00.000000000',·'2001-12-31T00:00:00.000000000'], | 479 | ·······'2001-12-30T00:00:00.000000000',·'2001-12-31T00:00:00.000000000'], |
480 | ······shape=(731,),·dtype='datetime64[ns]')</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'><U2</div><div·class='xr-var-preview·xr-preview'>'IA'·'IN'·'IL'</div><input·id='attrs- | 480 | ······shape=(731,),·dtype='datetime64[ns]')</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'><U2</div><div·class='xr-var-preview·xr-preview'>'IA'·'IN'·'IL'</div><input·id='attrs-1a0de564-b954-4dc0-b0b2-a68581885c25'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-1a0de564-b954-4dc0-b0b2-a68581885c25'·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:·a3362162b8aec992a23f2672a5d4cc963c9daf4fb9e4a6c44e436e474005356b·...·]'·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]],·shape=(731,·3))</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- | 486 | ·······[··2.06327582,··-1.34576404,··-4.54392729]],·shape=(731,·3))</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-1dfdb2b9-15f1-41e3-8ac5-10c55defe2fa'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-1dfdb2b9-15f1-41e3-8ac5-10c55defe2fa'·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:·c90d72397cefd7f371b32df697c1ba047ceb7b73d882fc730af4c0a8f8bda711·...·]'·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]],·shape=(731,·3))</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section- | 492 | ·······[·6.63593435,··3.34271537,··3.80527925]],·shape=(731,·3))</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-e600313c-126a-4e64-9232-b889cbe74e04'·class='xr-section-summary-in'·type='checkbox'··><label·for='section-e600313c-126a-4e64-9232-b889cbe74e04'·class='xr-section-summary'·>Indexes:·<span>(2)</span></label><div·class='xr-section-inline-details'></div><div·c[·...·truncated·by·diffoscope;·len:·368,·SHA:·4ec666e73635cc9a02859ac2180dff514565e755dae4b33c759e5f869a13f869·...·]'·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(['2000-01-01',·'2000-01-02',·'2000-01-03',·'2000-01-04', |
493 | ···············'2000-01-05',·'2000-01-06',·'2000-01-07',·'2000-01-08', | 493 | ···············'2000-01-05',·'2000-01-06',·'2000-01-07',·'2000-01-08', |
494 | ···············'2000-01-09',·'2000-01-10', | 494 | ···············'2000-01-09',·'2000-01-10', |
495 | ···············... | 495 | ···············... |
496 | ···············'2001-12-22',·'2001-12-23',·'2001-12-24',·'2001-12-25', | 496 | ···············'2001-12-22',·'2001-12-23',·'2001-12-24',·'2001-12-25', |
497 | ···············'2001-12-26',·'2001-12-27',·'2001-12-28',·'2001-12-29', | 497 | ···············'2001-12-26',·'2001-12-27',·'2001-12-28',·'2001-12-29', |
498 | ···············'2001-12-30',·'2001-12-31'], | 498 | ···············'2001-12-30',·'2001-12-31'], |
499 | ··············dtype='datetime64[ns]',·name='time',·length=731,·freq='D'))</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- | 499 | ··············dtype='datetime64[ns]',·name='time',·length=731,·freq='D'))</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-e5155f0c-a0de-4130-91d4-11641117548c'·class='xr-index-data-in'·type='checkbox'/><label·for='index-e5155f0c-a0de-4130-91d4-11641117548c'·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:·c6ce868ef69071f7c9a97d3e83d299650a3fcb1ae671bbc4c5634bdd19d2bfec·...·]'·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 modified | Offset 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 | <seaborn.axisgrid.PairGrid·at·0xffff | 704 | <seaborn.axisgrid.PairGrid·at·0xffff590cf230> |
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 modified | Offset 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)·<U2·24B·'IA'·'IN'·'IL' | 1116 | ··*·location··(location)·<U2·24B·'IA'·'IN'·'IL' |
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- | 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-bd6c1740-81fb-4c54-95c1-89a7816001df'·class='xr-array-in'·type='checkbox'·checked><label·for='section-bd6c1740-81fb-4c54-95c1-89a7816001df'·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- | 1128 | ·······[0.93548387,·0.85483871,·0.82258065]])</pre></div></div></li><li·class='xr-section-item'><input·id='section-fe414de6-5913-47f0-afaa-1a8d49af4836'·class='xr-section-summary-in'·type='checkbox'··checked><label·for='section-fe414de6-5913-47f0-afaa-1a8d49af4836'·class='xr-section-summary'·>Coordinates:·<span>(2)</span></label><div·class='xr-section-inline-details'><[·...·truncated·by·diffoscope;·len:·3790,·SHA:·8ff49b07136d22b44997c2f0b9f5a34343fabf25a36f20ed84ce53d5b2c57cc3·...·]'·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 modified | Offset 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-31 | 1644 | ··*·time··········(time)·datetime64[ns]·6kB·2000-01-01·2000-01-02·...·2001-12-31 |
1645 | ··*·location······(location)·<U2·24B·'IA'·'IN'·'IL' | 1645 | ··*·location······(location)·<U2·24B·'IA'·'IN'·'IL' |
1646 | ····month·········(time)·int64·6kB·1·1·1·1·1·1·1·1·1·...·12·12·12·12·12·12·12·12 | 1646 | ····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.544 | 1648 | ····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- | 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-70c6308b-eb8d-472d-aa11-dea1c9bb3670'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-70c6308b-eb8d-472d-aa11-dea1c9bb3670'·class='xr-section-summary'··title='Expand/collapse·section'>Dimensions:</label><div·class='xr-section-in[·...·truncated·by·diffoscope;·len:·1235,·SHA:·4666c1fa3b98045ea9de51f65e49452e685a5d9ae6cf8bb9be911d898f831ab9·...·]'·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(['2000-01-01T00:00:00.000000000',·'2000-01-02T00:00:00.000000000', |
1650 | ·······'2000-01-03T00:00:00.000000000',·...,·'2001-12-29T00:00:00.000000000', | 1650 | ·······'2000-01-03T00:00:00.000000000',·...,·'2001-12-29T00:00:00.000000000', |
1651 | ·······'2001-12-30T00:00:00.000000000',·'2001-12-31T00:00:00.000000000'], | 1651 | ·······'2001-12-30T00:00:00.000000000',·'2001-12-31T00:00:00.000000000'], |
1652 | ······shape=(731,),·dtype='datetime64[ns]')</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'><U2</div><div·class='xr-var-preview·xr-preview'>'IA'·'IN'·'IL'</div><input·id='attrs- | 1652 | ······shape=(731,),·dtype='datetime64[ns]')</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'><U2</div><div·class='xr-var-preview·xr-preview'>'IA'·'IN'·'IL'</div><input·id='attrs-36a27660-cde6-4f47-9681-5b4265854ad9'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-36a27660-cde6-4f47-9681-5b4265854ad9'·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:·ea75c9d34a26e69b3efe3246af24acbc96ec85e5960519f36f731b2df29acf96·...·]'·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 modified | Offset 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- | 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-b9cbb849-9f76-4959-beca-45dbc1c9a193'·class='xr-section-summary-in'·type='checkbox'··checked><label·for='section-b9cbb849-9f76-4959-beca-45dbc1c9a193'·class='xr-section-summary'·>Data·variables:·<span>(2)</span></label><div·class='xr-section-inline-details[·...·truncated·by·diffoscope;·len:·737,·SHA:·5cddd5e6013b8c48484e6d2a28510dd9c772361f81613992411a7931fa077939·...·]'·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]],·shape=(731,·3))</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- | 1698 | ·······[··2.06327582,··-1.34576404,··-4.54392729]],·shape=(731,·3))</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-a3d54e31-c3cb-453d-a9fa-0870d6d536e9'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-a3d54e31-c3cb-453d-a9fa-0870d6d536e9'·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:·6a47fc898890c26ee933da4ed61943da38d3324f095b9de33544f24cea5e263c·...·]'·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]],·shape=(731,·3))</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-c | 1704 | ·······[··2.06327582,··-1.34576404,··-4.54392729]],·shape=(731,·3))</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-9cf474ce-f4c2-469a-995a-57e971617962'·class='xr-section-summary-in'·type='checkbox'··><label·for='section-9cf474ce-f4c2-469a-995a-57e971617962'·class='xr-section-summary'·>Indexes:·<span>(2)</span></label><div·class='xr-section-inline-details'></div><div·c[·...·truncated·by·diffoscope;·len:·368,·SHA:·b0f2386fd7ff31439f46699337295c4d682874a81bd834fec12e8e86c35e4878·...·]'·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(['2000-01-01',·'2000-01-02',·'2000-01-03',·'2000-01-04', |
1705 | ···············'2000-01-05',·'2000-01-06',·'2000-01-07',·'2000-01-08', | 1705 | ···············'2000-01-05',·'2000-01-06',·'2000-01-07',·'2000-01-08', |
1706 | ···············'2000-01-09',·'2000-01-10', | 1706 | ···············'2000-01-09',·'2000-01-10', |
1707 | ···············... | 1707 | ···············... |
1708 | ···············'2001-12-22',·'2001-12-23',·'2001-12-24',·'2001-12-25', | 1708 | ···············'2001-12-22',·'2001-12-23',·'2001-12-24',·'2001-12-25', |
1709 | ···············'2001-12-26',·'2001-12-27',·'2001-12-28',·'2001-12-29', | 1709 | ···············'2001-12-26',·'2001-12-27',·'2001-12-28',·'2001-12-29', |
1710 | ···············'2001-12-30',·'2001-12-31'], | 1710 | ···············'2001-12-30',·'2001-12-31'], |
1711 | ··············dtype='datetime64[ns]',·name='time',·length=731,·freq='D'))</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- | 1711 | ··············dtype='datetime64[ns]',·name='time',·length=731,·freq='D'))</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-c9281f46-fab9-4b4c-a66b-a65b275a0ae3'·class='xr-index-data-in'·type='checkbox'/><label·for='index-c9281f46-fab9-4b4c-a66b-a65b275a0ae3'·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:·df617d89b47d344879d10fa3ec2270f06c858bb1e69a4e1e414defd8818265b6·...·]'·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/51006 bytes (2.04%) of diff not shown. |
Offset 142, 15 lines modified | Offset 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·0xffff | 149 | <seaborn.axisgrid.PairGrid·at·0xffff590cf230> |
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 | freeze | 154 | freeze |
155 | [6]: | 155 | [6]: |
156 | <xarray.DataArray·'tmin'·(month:·12,·location:·3)>·Size:·288B | 156 | <xarray.DataArray·'tmin'·(month:·12,·location:·3)>·Size:·288B |
Offset 15, 18 lines modified | Offset 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":·"202 | 22 | ····················"iopub.execute_input":·"2025-02-05T04:02:41.495021Z", |
23 | ····················"iopub.status.busy":·"202 | 23 | ····················"iopub.status.busy":·"2025-02-05T04:02:41.494709Z", |
24 | ····················"iopub.status.idle":·"202 | 24 | ····················"iopub.status.idle":·"2025-02-05T04:02:44.334159Z", |
25 | ····················"shell.execute_reply":·"202 | 25 | ····················"shell.execute_reply":·"2025-02-05T04:02:44.318132Z" |
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 modified | Offset 402, 37 lines modified | ||
402 | ····························"</style><pre·class='xr-text-repr-fallback'><xarray.Dataset>·Size:·41kB\n", | 402 | ····························"</style><pre·class='xr-text-repr-fallback'><xarray.Dataset>·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)·<U2·24B·'IA'·'IN'·'IL'\n", | 406 | ····························"··*·location··(location)·<U2·24B·'IA'·'IN'·'IL'\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- | 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-dcca2edd-0774-439e-aabe-62a8e467382d'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-dcca2edd-0774-439e-aabe-62a8e467382d'·class='xr-section-summary'··title='Expand/collapse·section'>Dimensions:</label><div·class='xr-section-in[·...·truncated·by·diffoscope;·len:·1235,·SHA:·abed6b7de178fcfce78404846010f07fdba72db72009a7f43a002a36e105074d·...·]'·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(['2000-01-01T00:00:00.000000000',·'2000-01-02T00:00:00.000000000',\n", |
410 | ····························"·······'2000-01-03T00:00:00.000000000',·...,·'2001-12-29T00:00:00.000000000',\n", | 410 | ····························"·······'2000-01-03T00:00:00.000000000',·...,·'2001-12-29T00:00:00.000000000',\n", |
411 | ····························"·······'2001-12-30T00:00:00.000000000',·'2001-12-31T00:00:00.000000000'],\n", | 411 | ····························"·······'2001-12-30T00:00:00.000000000',·'2001-12-31T00:00:00.000000000'],\n", |
412 | ····························"······shape=(731,),·dtype='datetime64[ns]')</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'><U2</div><div·class='xr-var-preview·xr-preview'>'IA'·'IN'·'IL'</div><input·id='attrs- | 412 | ····························"······shape=(731,),·dtype='datetime64[ns]')</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'><U2</div><div·class='xr-var-preview·xr-preview'>'IA'·'IN'·'IL'</div><input·id='attrs-1a0de564-b954-4dc0-b0b2-a68581885c25'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-1a0de564-b954-4dc0-b0b2-a68581885c25'·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:·a3362162b8aec992a23f2672a5d4cc963c9daf4fb9e4a6c44e436e474005356b·...·]'·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]],·shape=(731,·3))</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- | 418 | ····························"·······[··2.06327582,··-1.34576404,··-4.54392729]],·shape=(731,·3))</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-1dfdb2b9-15f1-41e3-8ac5-10c55defe2fa'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-1dfdb2b9-15f1-41e3-8ac5-10c55defe2fa'·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:·c90d72397cefd7f371b32df697c1ba047ceb7b73d882fc730af4c0a8f8bda711·...·]'·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]],·shape=(731,·3))</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section- | 424 | ····························"·······[·6.63593435,··3.34271537,··3.80527925]],·shape=(731,·3))</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-e600313c-126a-4e64-9232-b889cbe74e04'·class='xr-section-summary-in'·type='checkbox'··><label·for='section-e600313c-126a-4e64-9232-b889cbe74e04'·class='xr-section-summary'·>Indexes:·<span>(2)</span></label><div·class='xr-section-inline-details'></div><div·c[·...·truncated·by·diffoscope;·len:·368,·SHA:·4ec666e73635cc9a02859ac2180dff514565e755dae4b33c759e5f869a13f869·...·]'·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(['2000-01-01',·'2000-01-02',·'2000-01-03',·'2000-01-04',\n", |
425 | ····························"···············'2000-01-05',·'2000-01-06',·'2000-01-07',·'2000-01-08',\n", | 425 | ····························"···············'2000-01-05',·'2000-01-06',·'2000-01-07',·'2000-01-08',\n", |
426 | ····························"···············'2000-01-09',·'2000-01-10',\n", | 426 | ····························"···············'2000-01-09',·'2000-01-10',\n", |
427 | ····························"···············...\n", | 427 | ····························"···············...\n", |
428 | ····························"···············'2001-12-22',·'2001-12-23',·'2001-12-24',·'2001-12-25',\n", | 428 | ····························"···············'2001-12-22',·'2001-12-23',·'2001-12-24',·'2001-12-25',\n", |
429 | ····························"···············'2001-12-26',·'2001-12-27',·'2001-12-28',·'2001-12-29',\n", | 429 | ····························"···············'2001-12-26',·'2001-12-27',·'2001-12-28',·'2001-12-29',\n", |
430 | ····························"···············'2001-12-30',·'2001-12-31'],\n", | 430 | ····························"···············'2001-12-30',·'2001-12-31'],\n", |
431 | ····························"··············dtype='datetime64[ns]',·name='time',·length=731,·freq='D'))</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- | 431 | ····························"··············dtype='datetime64[ns]',·name='time',·length=731,·freq='D'))</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-e5155f0c-a0de-4130-91d4-11641117548c'·class='xr-index-data-in'·type='checkbox'/><label·for='index-e5155f0c-a0de-4130-91d4-11641117548c'·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:·c6ce868ef69071f7c9a97d3e83d299650a3fcb1ae671bbc4c5634bdd19d2bfec·...·]'·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 modified | Offset 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":·"202 | 501 | ····················"iopub.execute_input":·"2025-02-05T04:02:44.351206Z", |
502 | ····················"iopub.status.busy":·"202 | 502 | ····················"iopub.status.busy":·"2025-02-05T04:02:44.350700Z", |
503 | ····················"iopub.status.idle":·"202 | 503 | ····················"iopub.status.idle":·"2025-02-05T04:02:44.390510Z", |
504 | ····················"shell.execute_reply":·"202 | 504 | ····················"shell.execute_reply":·"2025-02-05T04:02:44.385901Z" |
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 modified | Offset 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":·"202 | 601 | ····················"iopub.execute_input":·"2025-02-05T04:02:44.398935Z", |
602 | ····················"iopub.status.busy":·"202 | 602 | ····················"iopub.status.busy":·"2025-02-05T04:02:44.398648Z", |
603 | ····················"iopub.status.idle":·"202 | 603 | ····················"iopub.status.idle":·"2025-02-05T04:02:44.426829Z", |
604 | ····················"shell.execute_reply":·"202 | 604 | ····················"shell.execute_reply":·"2025-02-05T04:02:44.426092Z" |
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 modified | Offset 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":·"202 | 715 | ····················"iopub.execute_input":·"2025-02-05T04:02:44.432279Z", |
716 | ····················"iopub.status.busy":·"202 | 716 | ····················"iopub.status.busy":·"2025-02-05T04:02:44.431987Z", |
717 | ····················"iopub.status.idle":·"202 | 717 | ····················"iopub.status.idle":·"2025-02-05T04:02:44.942803Z", |
718 | ····················"shell.execute_reply":·"202 | 718 | ····················"shell.execute_reply":·"2025-02-05T04:02:44.942090Z" |
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 modified | Offset 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":·"202 | 763 | ····················"iopub.execute_input":·"2025-02-05T04:02:44.945915Z", |
764 | ····················"iopub.status.busy":·"202 | 764 | ····················"iopub.status.busy":·"2025-02-05T04:02:44.945645Z", |
765 | ····················"iopub.status.idle":·"202 | 765 | ····················"iopub.status.idle":·"2025-02-05T04:02:46.514822Z", |
766 | ····················"shell.execute_reply":·"202 | 766 | ····················"shell.execute_reply":·"2025-02-05T04:02:46.514097Z" |
767 | ················} | 767 | ················} |
768 | ············}, | 768 | ············}, |
Max diff block lines reached; 44098/67857 bytes (64.99%) of diff not shown. |
Offset 324, 15 lines modified | Offset 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"><matplotlib.collections.QuadMesh·at·0xffff | 331 | <span·class="gh">Out[37]:·</span><span·class="go"><matplotlib.collections.QuadMesh·at·0xffff7fdaaba0></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> |
Offset 253, 15 lines modified | Offset 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·20 | 255 | ··*·x········(x)·int64·16B·10·20 |
256 | Dimensions·without·coordinates:·y | 256 | 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·0xffff | 260 | Out[37]:·<matplotlib.collections.QuadMesh·at·0xffff7fdaaba0> |
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·metadata | 262 | 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:·see | 263 | 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·the | 266 | 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: |
Offset 210, 15 lines modified | Offset 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">"Use·environment·variable·'</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">'·to·specify·a·different·location."</span> | 213 | <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">"Use·environment·variable·'</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">'·to·specify·a·different·location."</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">-->·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">"·"</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">-->·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">"·"</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:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 216 | <span·class="ne">PermissionError</span>:·[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. |
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">---->·</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">---->·</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 modified | Offset 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">"Use·environment·variable·'</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">'·to·specify·a·different·location."</span> | 315 | <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">"Use·environment·variable·'</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">'·to·specify·a·different·location."</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">-->·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">"·"</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">-->·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">"·"</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:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 318 | <span·class="ne">PermissionError</span>:·[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. |
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">---->·</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">---->·</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 159, 15 lines modified | Offset 159, 15 lines modified | ||
159 | ····273·····message.append( | 159 | ····273·····message.append( |
160 | ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different | 160 | ····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·error | 163 | -->·276·raise·PermissionError("·".join(message))·from·error |
164 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not | 164 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
165 | create·data·cache·folder·'/nonexistent/ | 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.variable | 167 | 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·1 | 170 | Cell·In[2],·line·1 |
171 | ---->·1·var·=·da.variable | 171 | ---->·1·var·=·da.variable |
Offset 260, 15 lines modified | Offset 260, 15 lines modified | ||
260 | ····273·····message.append( | 260 | ····273·····message.append( |
261 | ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different | 261 | ····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·error | 264 | -->·276·raise·PermissionError("·".join(message))·from·error |
265 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not | 265 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
266 | create·data·cache·folder·'/nonexistent/ | 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.variable | 268 | 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·1 | 271 | Cell·In[8],·line·1 |
272 | ---->·1·var·=·da.variable | 272 | ---->·1·var·=·da.variable |
Offset 163, 23 lines modified | Offset 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">"Use·environment·variable·'</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">'·to·specify·a·different·location."</span> | 166 | <span·class="g·g-Whitespace">····</span><span·class="mi">274</span>·········<span·class="sa">f</span><span·class="s2">"Use·environment·variable·'</span><span·class="si">{</span><span·class="n">env</span><span·class="si">}</span><span·class="s2">'·to·specify·a·different·location."</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">-->·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">"·"</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">-->·</span><span·class="mi">276</span>·<span·class="k">raise</span>·<span·class="ne">PermissionError</span><span·class="p">(</span><span·class="s2">"·"</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:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 169 | <span·class="ne">PermissionError</span>:·[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. |
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">"rasm.zarr"</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">"w"</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">"rasm.zarr"</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> |
171 | <span·class="gh">Out[5]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff | 171 | <span·class="gh">Out[5]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff65917520></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">"rasm.zarr"</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">"rasm.zarr"</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">"rasm.zarr"</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">"rasm.zarr"</span><span·class="p">))</span> |
174 | <span·class="go">['.zmetadata',·'l | 174 | <span·class="go">['.zmetadata',·'longitude',·'latitude',·'.zattrs',·'.zgroup']</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">"Tair"</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">"Tair"</span><span·class="p">]</span><span·class="o">.</span><span·class="n">attrs</span><span·class="p">)</span> |
Offset 111, 24 lines modified | Offset 111, 24 lines modified | ||
111 | ····273·····message.append( | 111 | ····273·····message.append( |
112 | ····274·········f"Use·environment·variable·'{env}'·to·specify·a·different | 112 | ····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·error | 115 | -->·276·raise·PermissionError("·".join(message))·from·error |
116 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not | 116 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
117 | create·data·cache·folder·'/nonexistent/ | 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·0xffff | 120 | Out[5]:·<xarray.backends.zarr.ZarrStore·at·0xffff65917520> |
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',·'l | 123 | ['.zmetadata',·'longitude',·'latitude',·'.zattrs',·'.zgroup'] |
124 | In·[8]:·print(zgroup.tree()) | 124 | In·[8]:·print(zgroup.tree()) |
125 | / | 125 | / |
126 | ·├──·latitude·(50,)·float64 | 126 | ·├──·latitude·(50,)·float64 |
127 | ·└──·longitude·(50,)·float64 | 127 | ·└──·longitude·(50,)·float64 |
128 | In·[9]:·dict(zgroup["Tair"].attrs) | 128 | In·[9]:·dict(zgroup["Tair"].attrs) |
Offset 2363, 24 lines modified | Offset 2363, 26 lines modified | ||
2363 | ········"00010101":·53, | 2363 | ········"00010101":·53, |
2364 | ········"00010201":·53, | 2364 | ········"00010201":·53, |
2365 | ········"00010301":·53, | 2365 | ········"00010301":·53, |
2366 | ········"0002":·53, | 2366 | ········"0002":·53, |
2367 | ········"00021001":·53, | 2367 | ········"00021001":·53, |
2368 | ········"00021101":·53, | 2368 | ········"00021101":·53, |
2369 | ········"00021201":·53, | 2369 | ········"00021201":·53, |
2370 | ········"000e":·48, | 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 | ········"007e":·51, | ||
2376 | ········"00914929":·36, | 2377 | ········"00914929":·36, |
2377 | ········"00941742":·36, | 2378 | ········"00941742":·36, |
2378 | ········"00968205":·36, | 2379 | ········"00968205":·36, |
2379 | ········"00973567":·36, | 2380 | ········"00973567":·36, |
2381 | ········"00j":·51, | ||
2380 | ········"01":·[14,·16,·20,·26,·30,·32,·37,·38,·41,·43,·44,·45,·47,·48,·52,·53], | 2382 | ········"01":·[14,·16,·20,·26,·30,·32,·37,·38,·41,·43,·44,·45,·47,·48,·52,·53], |
2381 | ········"010569":·14, | 2383 | ········"010569":·14, |
2382 | ········"01082401":·36, | 2384 | ········"01082401":·36, |
2383 | ········"01183847":·36, | 2385 | ········"01183847":·36, |
2384 | ········"01612903":·14, | 2386 | ········"01612903":·14, |
2385 | ········"01636376":·36, | 2387 | ········"01636376":·36, |
2386 | ········"01652688":·36, | 2388 | ········"01652688":·36, |
Offset 2455, 14 lines modified | Offset 2457, 15 lines modified | ||
2455 | ········"05":·[14,·36,·38,·45,·48,·52,·53], | 2457 | ········"05":·[14,·36,·38,·45,·48,·52,·53], |
2456 | ········"05405954":·36, | 2458 | ········"05405954":·36, |
2457 | ········"05556":·44, | 2459 | ········"05556":·44, |
2458 | ········"056":·44, | 2460 | ········"056":·44, |
2459 | ········"057e":·37, | 2461 | ········"057e":·37, |
2460 | ········"058e":·37, | 2462 | ········"058e":·37, |
2461 | ········"05912615":·36, | 2463 | ········"05912615":·36, |
2464 | ········"05j":·51, | ||
2462 | ········"05t00":·37, | 2465 | ········"05t00":·37, |
2463 | ········"06":·[14,·28,·36,·38,·45,·52], | 2466 | ········"06":·[14,·28,·36,·38,·45,·52], |
2464 | ········"060403":·14, | 2467 | ········"060403":·14, |
2465 | ········"061":·43, | 2468 | ········"061":·43, |
2466 | ········"06141":·41, | 2469 | ········"06141":·41, |
2467 | ········"06187252":·14, | 2470 | ········"06187252":·14, |
2468 | ········"062":·41, | 2471 | ········"062":·41, |
Offset 2483, 15 lines modified | Offset 2486, 15 lines modified | ||
2483 | ········"07180381":·19, | 2486 | ········"07180381":·19, |
2484 | ········"071804":·47, | 2487 | ········"071804":·47, |
2485 | ········"072":·47, | 2488 | ········"072":·47, |
2486 | ········"072e":·48, | 2489 | ········"072e":·48, |
2487 | ········"074e":·37, | 2490 | ········"074e":·37, |
2488 | ········"078":·41, | 2491 | ········"078":·41, |
2489 | ········"07t00":·37, | 2492 | ········"07t00":·37, |
2490 | ········"08":·[14,·38,·5 | 2493 | ········"08":·[14,·38,·52], |
2491 | ········"08002":·40, | 2494 | ········"08002":·40, |
2492 | ········"08172729":·36, | 2495 | ········"08172729":·36, |
2493 | ········"08203696":·36, | 2496 | ········"08203696":·36, |
2494 | ········"08285275":·36, | 2497 | ········"08285275":·36, |
2495 | ········"08299933":·36, | 2498 | ········"08299933":·36, |
2496 | ········"08305695":·36, | 2499 | ········"08305695":·36, |
2497 | ········"08341016":·36, | 2500 | ········"08341016":·36, |
Offset 2521, 81 lines modified | Offset 2524, 81 lines modified | ||
2521 | ········"099":·41, | 2524 | ········"099":·41, |
2522 | ········"09t00":·37, | 2525 | ········"09t00":·37, |
2523 | ········"0alpha10":·54, | 2526 | ········"0alpha10":·54, |
2524 | ········"0d":·54, | 2527 | ········"0d":·54, |
2525 | ········"0dev":·54, | 2528 | ········"0dev":·54, |
2526 | ········"0th":·[37,·43], | 2529 | ········"0th":·[37,·43], |
2527 | ········"0x0l":·54, | 2530 | ········"0x0l":·54, |
2528 | ········"0xffff348627a0":·45, | ||
2529 | ········"0xffff348637f0":·45, | ||
2530 | ········"0xffff34863e20":·45, | ||
2531 | ········"0xffff348ac050":·48, | ||
2532 | ········"0xffff349fa050":·45, | ||
2533 | ········"0xffff356ef9d0":·54, | ||
2534 | ········"0xffff3 | 2531 | ········"0xffff3ed5ca40":·6, |
2535 | ········"0xffff3593d7f0":·48, | ||
2536 | ········"0xffff35cd7520":·32, | ||
2537 | ········"0xffff361bfcb0":·48, | ||
2538 | ········"0xffff36b079d0":·38, | ||
2539 | ········"0xffff371e57f0":·48, | ||
2540 | ········"0xffff37974410":·48, | ||
2541 | ········"0xffff | 2532 | ········"0xffff590cf230":·14, |
2533 | ········"0xffff6449e7a0":·45, | ||
2534 | ········"0xffff6449f7f0":·45, | ||
2535 | ········"0xffff6449fe20":·45, | ||
2542 | ········"0xffff | 2536 | ········"0xffff644ec050":·48, |
2543 | ········"0xffff5dc22ad0":·44, | ||
2544 | ········"0xffff5dc4eba0":·19, | ||
2545 | ········"0xffff5dc4f770":·44, | ||
2546 | ········"0xffff5dcb9e50":·44, | ||
2547 | ········"0xffff5dcb9f90":·44, | ||
2548 | ········"0xffff6 | 2537 | ········"0xffff6463a050":·45, |
2538 | ········"0xffff64722e90":·54, | ||
2539 | ········"0xffff653817f0":·48, | ||
2540 | ········"0xffff654efc50":·38, | ||
2541 | ········"0xffff65917520":·32, | ||
2549 | ········"0xffff7479 | 2542 | ········"0xffff667479d0":·38, |
2550 | ········"0xffff747af390":·48, | ||
2551 | ········"0xffff747af4d0":·48, | ||
2552 | ········"0xffff747af610":·48, | ||
2553 | ········"0xffff | 2543 | ········"0xffff66e27e00":·48, |
2554 | ········"0xffff74801a90":·48, | ||
2555 | ········"0xffff74801bd0":·48, | ||
2556 | ········"0xffff74801d10":·48, | ||
2557 | ········"0xffff74820050":·48, | ||
2558 | ········"0xffff74820190":·48, | ||
2559 | ········"0xffff748202d0":·48, | ||
2560 | ········"0xffff74820410":·48, | ||
2561 | ········"0xffff74820550":·48, | ||
2562 | ········"0xffff74988f50":·48, | ||
2563 | ········"0xffff74b43b10":·48, | ||
2564 | ········"0xffff751a25d0":·48, | ||
2565 | ········"0xffff75276990":·48, | ||
2566 | ········"0xffff75276c10":·48, | ||
2567 | ········"0xffff75461310":·48, | ||
2568 | ········"0xffff75 | 2544 | ········"0xffff675b9450":·48, |
2569 | ········"0xffff7 | 2545 | ········"0xffff7fc48050":·[44,·48], |
2570 | ········"0xffff756c7c50":·48, | ||
2571 | ········"0xffff7581d090":·48, | ||
2572 | ········"0xffff758e1f90":·48, | ||
2573 | ········"0xffff75ebde50":·48, | ||
2574 | ········"0xffff7 | 2546 | ········"0xffff7fc48980":·48, |
2547 | ········"0xffff7fd5ead0":·44, | ||
2548 | ········"0xffff7fdaaba0":·19, | ||
2549 | ········"0xffff7fdfde50":·44, | ||
2550 | ········"0xffff7fdfdf90":·44, | ||
2551 | ········"0xffff94392d50":·48, | ||
2552 | ········"0xffff943ab390":·48, | ||
2553 | ········"0xffff943ab4d0":·48, | ||
Max diff block lines reached; 48356/53745 bytes (89.97%) of diff not shown. |
Offset 731, 18 lines modified | Offset 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·of | 731 | 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·for | 732 | 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·to | 733 | 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">"instrument"</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">"instrument"</span><span·class="p">))</span> |
738 | <span·class="gh">Out[64]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xffff | 738 | <span·class="gh">Out[64]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xffff667479d0>]</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">"instrument"</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">"instrument"</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">[<matplotlib.lines.Line2D·at·0xffff | 740 | <span·class="gh">Out[65]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xffff654efc50>]</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·names | 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·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>·and | 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>·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·if | 746 | <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·instead | 747 | variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead |
Offset 585, 19 lines modified | Offset 585, 19 lines modified | ||
585 | There·is·also·the·pipe()·method·that·allows·you·to·use·a·method·call·with·an | 585 | 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·(using | 587 | 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·flow | 589 | #·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow |
590 | #·entirely·from·left·to·right | 590 | #·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·0xffff | 592 | Out[64]:·[<matplotlib.lines.Line2D·at·0xffff667479d0>] |
593 | In·[65]:·(ds.temperature.sel(loc=0).pipe(lambda·x:·2·*·x).mean | 593 | 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·0xffff | 595 | Out[65]:·[<matplotlib.lines.Line2D·at·0xffff654efc50>] |
596 | Both·pipe·and·assign·replicate·the·pandas·methods·of·the·same·names | 596 | 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·if | 598 | 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·instead | 599 | 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·we | 600 | 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* |
Offset 982, 15 lines modified | Offset 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">"air_temperature"</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">"air_temperature"</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:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 989 | <span·class="go">PermissionError:·[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.</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">"D"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"time"</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">"D"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"time"</span><span·class="p">)</span> |
991 | <span·class="go">KeyError:·"No·variable·named·'time'.·Variables·on·the·dataset·include·['foo',·'x',·'letters']"</span> | 991 | <span·class="go">KeyError:·"No·variable·named·'time'.·Variables·on·the·dataset·include·['foo',·'x',·'letters']"</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">"W"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"time"</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">"W"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"time"</span><span·class="p">)</span> |
Offset 868, 15 lines modified | Offset 868, 15 lines modified | ||
868 | model·is·now·slightly·stricter.·This·allows·us·to·provide·features·like | 868 | 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·not | 870 | 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·not | 874 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
875 | create·data·cache·folder·'/nonexistent/ | 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 653, 15 lines modified | Offset 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·behavior | 654 | To·trigger·vectorized·indexing·behavior |
655 | you·will·need·to·provide·the·selection·dimensions·with·a·new | 655 | you·will·need·to·provide·the·selection·dimensions·with·a·new |
656 | shared·output·dimension·name.·In·the·example·below,·the·selections | 656 | shared·output·dimension·name.·In·the·example·below,·the·selections |
657 | of·the·closest·latitude·and·longitude·are·renamed·to·an·output | 657 | 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">"air_temperature"</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">"air_temperature"</span><span·class="p">)</span> |
660 | <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 660 | <span·class="go">PermissionError:·[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.</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">"points"</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">"points"</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">"points"</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">"points"</span><span·class="p">)</span> |
Offset 697, 15 lines modified | Offset 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>·you | 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>·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">"air_temperature"</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">"air_temperature"</span><span·class="p">)</span> |
704 | <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 704 | <span·class="go">PermissionError:·[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.</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">"empty"</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">"time"</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">"empty"</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">"time"</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:·'Dataset'·object·has·no·attribute·'air'</span> | 707 | <span·class="go">AttributeError:·'Dataset'·object·has·no·attribute·'air'</span> |
Offset 869, 15 lines modified | Offset 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">"eraint_uvz"</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">"eraint_uvz"</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:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 876 | <span·class="go">PermissionError:·[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.</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·'ds_org'·is·not·defined</span> | 879 | <span·class="go">NameError:·name·'ds_org'·is·not·defined</span> |
Offset 474, 15 lines modified | Offset 474, 15 lines modified | ||
474 | collection·specified·weather·station·latitudes·and·longitudes.·To·trigger | 474 | collection·specified·weather·station·latitudes·and·longitudes.·To·trigger |
475 | vectorized·indexing·behavior·you·will·need·to·provide·the·selection·dimensions | 475 | vectorized·indexing·behavior·you·will·need·to·provide·the·selection·dimensions |
476 | with·a·new·shared·output·dimension·name.·In·the·example·below,·the·selections | 476 | 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·named | 477 | 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·not | 480 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
481 | create·data·cache·folder·'/nonexistent/ | 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 modified | Offset 513, 15 lines modified | ||
513 | selected·subpart·of·the·target·array·(except·for·the·explicitly·indexed | 513 | 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·indexing | 516 | 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·not | 519 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
520 | create·data·cache·folder·'/nonexistent/ | 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·dataarray | 522 | #·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 modified | Offset 673, 15 lines modified | ||
673 | Dimensions·without·coordinates:·x | 673 | 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=0 | 676 | ···....:·····latitude=slice(56,·59),·longitude=slice(255,·258),·level=0 |
677 | ···....:·) | 677 | ···....:·) |
678 | ···....: | 678 | ···....: |
679 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not | 679 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
680 | create·data·cache·folder·'/nonexistent/ | 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·0 | 682 | #·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·defined | 684 | NameError:·name·'ds_org'·is·not·defined |
Offset 237, 24 lines modified | Offset 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">"x"</span><span·class="p">,</span> | 238 | <span·class="gp">···....:·</span>····<span·class="n">dims</span><span·class="o">=</span><span·class="s2">"x"</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">"x"</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">"x"</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">"o"</span><span·class="p">,</span>·<span·class="n">label</span><span·class="o">=</span><span·class="s2">"original"</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">"o"</span><span·class="p">,</span>·<span·class="n">label</span><span·class="o">=</span><span·class="s2">"original"</span><span·class="p">)</span> |
243 | <span·class="gh">Out[17]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xffff | 243 | <span·class="gh">Out[17]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xffff7fd5ead0>]</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">"linear·(default)"</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">"linear·(default)"</span><span·class="p">)</span> |
245 | <span·class="gh">Out[18]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xffff | 245 | <span·class="gh">Out[18]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xffff7fdfdf90>]</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">"cubic"</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">"cubic"</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">"cubic"</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">"cubic"</span><span·class="p">)</span> |
247 | <span·class="gh">Out[19]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xffff | 247 | <span·class="gh">Out[19]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xffff7fdfde50>]</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"><matplotlib.legend.Legend·at·0xffff | 249 | <span·class="gh">Out[20]:·</span><span·class="go"><matplotlib.legend.Legend·at·0xffff7fc48050></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">"fill_value"</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">"fill_value"</span><span·class="p">:</span>·<span·class="mf">0.0</span><span·class="p">})</span> |
Offset 439, 15 lines modified | Offset 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">"air_temperature"</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">"air_temperature"</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:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 446 | <span·class="go">PermissionError:·[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.</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:·'Dataset'·object·has·no·attribute·'air'</span> | 449 | <span·class="go">AttributeError:·'Dataset'·object·has·no·attribute·'air'</span> |
Offset 154, 26 lines modified | Offset 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·0xffff | 160 | Out[17]:·[<matplotlib.lines.Line2D·at·0xffff7fd5ead0>] |
161 | In·[18]:·da.interp(x=np.linspace(0,·1,·100)).plot.line(label="linear | 161 | 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·0xffff | 163 | Out[18]:·[<matplotlib.lines.Line2D·at·0xffff7fdfdf90>] |
164 | In·[19]:·da.interp(x=np.linspace(0,·1,·100),·method="cubic").plot.line | 164 | 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·0xffff | 166 | Out[19]:·[<matplotlib.lines.Line2D·at·0xffff7fdfde50>] |
167 | In·[20]:·plt.legend() | 167 | In·[20]:·plt.legend() |
168 | Out[20]:·<matplotlib.legend.Legend·at·0xffff | 168 | Out[20]:·<matplotlib.legend.Legend·at·0xffff7fc48050> |
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:·80B | 174 | <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 modified | Offset 337, 15 lines modified | ||
337 | ··*·x········(x)·float64·24B·0.5·1.5·2.5 | 337 | ··*·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·data | 341 | #·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·not | 343 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
344 | create·data·cache·folder·'/nonexistent/ | 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 630, 15 lines modified | Offset 630, 15 lines modified | ||
630 | <span·class="gp">···....:·</span>········<span·class="s2">"y"</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">"2000-01-01"</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">"y"</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">"2000-01-01"</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">"z"</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="nb">list</span><span·class="p">(</span><span·class="s2">"abcd"</span><span·class="p">)),</span> | 631 | <span·class="gp">···....:·</span>········<span·class="s2">"z"</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="nb">list</span><span·class="p">(</span><span·class="s2">"abcd"</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">"path/to/directory.zarr"</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">"path/to/directory.zarr"</span><span·class="p">)</span> |
636 | <span·class="gh">Out[13]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff | 636 | <span·class="gh">Out[13]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff6449e7a0></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·lives | 639 | <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·zarr | 640 | 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·it | 641 | 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·existing | 642 | 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 modified | Offset 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">"foo"</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">"x"</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">"x"</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">"foo"</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">"x"</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">"x"</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">"path/to/directory.zarr"</span> | 725 | <span·class="gp">In·[19]:·</span><span·class="n">path</span>·<span·class="o">=</span>·<span·class="s2">"path/to/directory.zarr"</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('_finalize_store- | 728 | <span·class="gh">Out[20]:·</span><span·class="go">Delayed('_finalize_store-a0a4da12-db94-4431-921b-868aadfd660f')</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·that | 731 | <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="auto"</span></code>·will·open·the·existing·store·and·determine·the | 733 | Setting·<code·class="docutils·literal·notranslate"><span·class="pre">region="auto"</span></code>·will·open·the·existing·store·and·determine·the |
734 | correct·alignment·of·the·new·data·with·the·existing·dimensions,·or·as·an | 734 | 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·indicating | 735 | 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'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'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">"foo"</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">"x"</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">"x"</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">"foo"</span><span·class="p">:</span>·<span·class="p">(</span><span·class="s2">"x"</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">"x"</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">"auto"</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">"auto"</span><span·class="p">)</span> |
742 | <span·class="gh">Out[22]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff | 742 | <span·class="gh">Out[22]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff6449fe20></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">"x"</span><span·class="p">:</span>·<span·class="s2">"auto"</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">"x"</span><span·class="p">:</span>·<span·class="s2">"auto"</span><span·class="p">})</span> |
744 | <span·class="gh">Out[23]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff | 744 | <span·class="gh">Out[23]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff6449f7f0></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">"x"</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">"x"</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"><xarray.backends.zarr.ZarrStore·at·0xffff | 746 | <span·class="gh">Out[24]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff6463a050></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·distinct | 749 | <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·have | 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·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 modified | Offset 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">"zstd"</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">"zstd"</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">"foo.zarr"</span><span·class="p">,</span>·<span·class="n">encoding</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"foo"</span><span·class="p">:</span>·<span·class="p">{</span><span·class="s2">"compressor"</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">"foo.zarr"</span><span·class="p">,</span>·<span·class="n">encoding</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"foo"</span><span·class="p">:</span>·<span·class="p">{</span><span·class="s2">"compressor"</span><span·class="p">:</span>·<span·class="n">compressor</span><span·class="p">}})</span> |
773 | <span·class="gh">Out[28]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff | 773 | <span·class="gh">Out[28]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff966d8790></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·with | 778 | <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 modified | Offset 816, 28 lines modified | ||
816 | <span·class="gp">···....:·</span>········<span·class="s2">"y"</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">"y"</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">"t"</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">"2001-01-01"</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">"t"</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">"2001-01-01"</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">"path/to/directory.zarr"</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">"path/to/directory.zarr"</span><span·class="p">)</span> |
822 | <span·class="gh">Out[30]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff | 822 | <span·class="gh">Out[30]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff966d9090></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">"foo"</span><span·class="p">:</span>·<span·class="p">((</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="s2">"y"</span><span·class="p">,</span>·<span·class="s2">"t"</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">"foo"</span><span·class="p">:</span>·<span·class="p">((</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="s2">"y"</span><span·class="p">,</span>·<span·class="s2">"t"</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">"x"</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">"x"</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">"y"</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">"y"</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">"t"</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">"2001-01-03"</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">"t"</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">"2001-01-03"</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">"path/to/directory.zarr"</span><span·class="p">,</span>·<span·class="n">append_dim</span><span·class="o">=</span><span·class="s2">"t"</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">"path/to/directory.zarr"</span><span·class="p">,</span>·<span·class="n">append_dim</span><span·class="o">=</span><span·class="s2">"t"</span><span·class="p">)</span> |
833 | <span·class="gh">Out[32]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff | 833 | <span·class="gh">Out[32]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff966d9120></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 modified | Offset 861, 15 lines modified | ||
861 | positional·ordering·of·the·dimensions·in·each·array.·Watch·out·for·arrays·with | 861 | 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·dimensions | 864 | <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">"rasm"</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">"rasm"</span><span·class="p">)</span> |
868 | <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 868 | <span·class="go">PermissionError:·[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.</span> |
869 | <span·class="gp">In·[34]:·</span><span·class="n">ds</span><span·class="p">[</span><span·class="s2">"Tair"</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="p">[</span><span·class="s2">"Tair"</span><span·class="p">]</span><span·class="o">.</span><span·class="n">chunk</span><span·class="p">({</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">,</span>·<span·class="s2">"y"</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">"Tair"</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="p">[</span><span·class="s2">"Tair"</span><span·class="p">]</span><span·class="o">.</span><span·class="n">chunk</span><span·class="p">({</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">,</span>·<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="mi">100</span><span·class="p">})</span> |
870 | <span·class="go">KeyError:·"No·variable·named·'Tair'.·Variables·on·the·dataset·include·['foo',·'x']"</span> | 870 | <span·class="go">KeyError:·"No·variable·named·'Tair'.·Variables·on·the·dataset·include·['foo',·'x']"</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 modified | Offset 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·little | 885 | <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·to | 886 | 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">"path/to/directory.zarr"</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">"w"</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">"path/to/directory.zarr"</span><span·class="p">,</span>·<span·class="n">mode</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> |
889 | <span·class="gh">Out[36]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff | 889 | <span·class="gh">Out[36]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xffff966d9bd0></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.zarr | 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.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. |
Offset 481, 15 lines modified | Offset 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·0xffff | 487 | Out[13]:·<xarray.backends.zarr.ZarrStore·at·0xffff6449e7a0> |
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·already | 489 | 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·being | 490 | present·at·that·path,·an·error·will·be·raised,·preventing·it·from·being |
491 | overwritten.·To·override·this·behavior·and·overwrite·an·existing·store,·add | 491 | 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,·and | 493 | 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 modified | Offset 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·values | 564 | #·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- | 566 | Out[20]:·Delayed('_finalize_store-a0a4da12-db94-4431-921b-868aadfd660f') |
567 | Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that | 567 | 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"·will | 568 | 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·data | 569 | 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·to | 570 | 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·index | 571 | 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-case | 573 | #·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.arange | 575 | 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·valid | 577 | #·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·0xffff | 579 | Out[22]:·<xarray.backends.zarr.ZarrStore·at·0xffff6449fe20> |
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·0xffff | 581 | Out[23]:·<xarray.backends.zarr.ZarrStore·at·0xffff6449f7f0> |
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·0xffff | 583 | Out[24]:·<xarray.backends.zarr.ZarrStore·at·0xffff6463a050> |
584 | Concurrent·writes·with·region·are·safe·as·long·as·they·modify·distinct·chunks | 584 | 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·dimensions | 587 | 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·be | 588 | 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 modified | Offset 601, 15 lines modified | ||
601 | In·[25]:·import·zarr | 601 | In·[25]:·import·zarr |
602 | In·[26]:·from·numcodecs.blosc·import·Blosc | 602 | 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·0xffff | 605 | Out[28]:·<xarray.backends.zarr.ZarrStore·at·0xffff966d8790> |
606 | Note | 606 | Note |
607 | Not·all·native·zarr·compression·and·filtering·options·have·been·tested·with | 607 | 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·Zarr | 610 | Xarray·supports·several·ways·of·incrementally·writing·variables·to·a·Zarr |
611 | store.·These·options·are·useful·for·scenarios·when·it·is·infeasible·or | 611 | 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 modified | Offset 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·0xffff | 641 | Out[30]:·<xarray.backends.zarr.ZarrStore·at·0xffff966d9090> |
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·0xffff | 652 | Out[32]:·<xarray.backends.zarr.ZarrStore·at·0xffff966d9120> |
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·in | 655 | ···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·arrays | 657 | ···2.·Automatic·chunking·based·on·chunks·in·dask·arrays |
658 | ···3.·Default·chunk·behavior·determined·by·the·zarr·library | 658 | ···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 modified | Offset 675, 15 lines modified | ||
675 | positional·ordering·of·the·dimensions·in·each·array.·Watch·out·for·arrays·with | 675 | 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·not | 681 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
682 | create·data·cache·folder·'/nonexistent/ | 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 modified | Offset 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·29 | 696 | ··*·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·29 | 698 | ····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·very | 699 | 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·zarr | 700 | 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·0xffff | 703 | Out[36]:·<xarray.backends.zarr.ZarrStore·at·0xffff966d9bd0> |
704 | In·[37]:·!·ls·-R·path/to/directory.zarr | 704 | In·[37]:·!·ls·-R·path/to/directory.zarr |
705 | path/to/directory.zarr: | 705 | path/to/directory.zarr: |
706 | foo··x | 706 | 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. |
Offset 100, 15 lines modified | Offset 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">"air_temperature"</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">"air_temperature"</span><span·class="p">)</span> |
106 | <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 106 | <span·class="go">PermissionError:·[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.</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·'airtemps'·is·not·defined</span> | 108 | <span·class="go">NameError:·name·'airtemps'·is·not·defined</span> |
109 | <span·class="go">#·Convert·to·celsius</span> | 109 | <span·class="go">#·Convert·to·celsius</span> |
Offset 445, 15 lines modified | Offset 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">"lat"</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">"lat"</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">"lat"</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">"lat"</span><span·class="p">])</span> |
447 | <span·class="go">KeyError:·'lat'</span> | 447 | <span·class="go">KeyError:·'lat'</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">[<matplotlib.lines.Line2D·at·0xffff | 449 | <span·class="gh">Out[51]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xffff95d3a0d0>]</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 modified | Offset 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)·<U5·80B·'one'·'two'·'three'·'five'</span> | 859 | <span·class="go">··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five'</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">"y"</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">"y"</span><span·class="p">)</span> |
863 | <span·class="gh">Out[99]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xffff | 863 | <span·class="gh">Out[99]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xffff964e78c0></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">"y"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"A"</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">"y"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">)</span> |
869 | <span·class="gh">Out[100]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xffff | 869 | <span·class="gh">Out[100]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xffff95aade50></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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">)</span> |
875 | <span·class="gh">Out[101]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xffff | 875 | <span·class="gh">Out[101]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xffff95aed450></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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"w"</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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> |
881 | <span·class="gh">Out[102]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xffff | 881 | <span·class="gh">Out[102]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xffff95b282d0></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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"w"</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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"w"</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"><matplotlib.collections.PathCollection·at·0xffff | 887 | <span·class="gh">Out[103]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xffff95aaf890></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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"w"</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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"w"</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"><matplotlib.collections.PathCollection·at·0xffff | 892 | <span·class="gh">Out[104]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xffff675b9450></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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"z"</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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">)</span> |
899 | <span·class="gh">Out[105]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xffff | 899 | <span·class="gh">Out[105]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xffff95bf9d10></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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"x"</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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">)</span> |
905 | <span·class="gh">Out[106]:·</span><span·class="go"><mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xffff | 905 | <span·class="gh">Out[106]:·</span><span·class="go"><mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xffff95d38cd0></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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">"w"</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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> |
911 | <span·class="gh">Out[107]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0xffff | 911 | <span·class="gh">Out[107]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0xffff66e27e00></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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">"w"</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">"A"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">z</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">,</span>·<span·class="n">hue</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">)</span> |
917 | <span·class="gh">Out[108]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0xffff | 917 | <span·class="gh">Out[108]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0xffff954d1f90></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·variables | 921 | <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">"x"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">"B"</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">"x"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">)</span> |
928 | <span·class="gh">Out[109]:·</span><span·class="go"><matplotlib.quiver.Quiver·at·0xffff | 928 | <span·class="gh">Out[109]:·</span><span·class="go"><matplotlib.quiver.Quiver·at·0xffff7fc48050></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">"x"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">"z"</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">"x"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">,</span>·<span·class="n">col</span><span·class="o">=</span><span·class="s2">"w"</span><span·class="p">,</span>·<span·class="n">row</span><span·class="o">=</span><span·class="s2">"z"</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"><xarray.plot.facetgrid.FacetGrid·at·0xffff | 934 | <span·class="gh">Out[110]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0xffff952b7c50></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">"x"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">"B"</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">"x"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"y"</span><span·class="p">,</span>·<span·class="n">u</span><span·class="o">=</span><span·class="s2">"A"</span><span·class="p">,</span>·<span·class="n">v</span><span·class="o">=</span><span·class="s2">"B"</span><span·class="p">)</span> |
945 | <span·class="gh">Out[111]:·</span><span·class="go"><matplotlib.collections.LineCollection·at·0xffff | 945 | <span·class="gh">Out[111]:·</span><span·class="go"><matplotlib.collections.LineCollection·at·0xffff94d925d0></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. |
Offset 30, 15 lines modified | Offset 30, 15 lines modified | ||
30 | In·[3]:·import·matplotlib.pyplot·as·plt | 30 | In·[3]:·import·matplotlib.pyplot·as·plt |
31 | In·[4]:·import·xarray·as·xr | 31 | 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·not | 34 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
35 | create·data·cache·folder·'/nonexistent/ | 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]:·airtemps | 37 | In·[6]:·airtemps |
38 | NameError:·name·'airtemps'·is·not·defined | 38 | NameError:·name·'airtemps'·is·not·defined |
Offset 292, 15 lines modified | Offset 292, 15 lines modified | ||
292 | #·Apply·a·nonlinear·transformation·to·one·of·the·coords | 292 | #·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·0xffff | 296 | Out[51]:·[<matplotlib.lines.Line2D·at·0xffff95d3a0d0>] |
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·defined | 302 | NameError:·name·'air2d'·is·not·defined |
303 | _\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8p_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g_\x8__\x8c_\x8o_\x8n_\x8t_\x8o_\x8u_\x8r_\x8._\x8p_\x8n_\x8g_\x8] | 303 | _\x8[_\x8__\x8b_\x8u_\x8i_\x8l_\x8d_\x8/_\x8h_\x8t_\x8m_\x8l_\x8/_\x8__\x8s_\x8t_\x8a_\x8t_\x8i_\x8c_\x8/_\x8p_\x8l_\x8o_\x8t_\x8t_\x8i_\x8n_\x8g_\x8__\x8c_\x8o_\x8n_\x8t_\x8o_\x8u_\x8r_\x8._\x8p_\x8n_\x8g_\x8] |
Offset 613, 92 lines modified | Offset 613, 92 lines modified | ||
613 | ··*·y········(y)·float64·88B·0.0·0.1·0.2·0.3·0.4·0.5·0.6·0.7·0.8·0.9·1.0 | 613 | ··*·y········(y)·float64·88B·0.0·0.1·0.2·0.3·0.4·0.5·0.6·0.7·0.8·0.9·1.0 |
614 | ··*·z········(z)·int64·32B·0·1·2·3 | 614 | ··*·z········(z)·int64·32B·0·1·2·3 |
615 | ··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five' | 615 | ··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five' |
616 | Attributes: | 616 | Attributes: |
617 | ····units:····Aunits | 617 | ····units:····Aunits |
618 | In·[99]:·ds.A.plot.scatter(x="y") | 618 | In·[99]:·ds.A.plot.scatter(x="y") |
619 | Out[99]:·<matplotlib.collections.PathCollection·at·0xffff | 619 | Out[99]:·<matplotlib.collections.PathCollection·at·0xffff964e78c0> |
620 | [_build/html/_static/da_A_y.png] | 620 | [_build/html/_static/da_A_y.png] |
621 | Same·plot·can·be·displayed·using·the·dataset: | 621 | Same·plot·can·be·displayed·using·the·dataset: |
622 | In·[100]:·ds.plot.scatter(x="y",·y="A") | 622 | In·[100]:·ds.plot.scatter(x="y",·y="A") |
623 | Out[100]:·<matplotlib.collections.PathCollection·at·0xffff | 623 | Out[100]:·<matplotlib.collections.PathCollection·at·0xffff95aade50> |
624 | [_build/html/_static/ds_A_y.png] | 624 | [_build/html/_static/ds_A_y.png] |
625 | Now·suppose·we·want·to·scatter·the·A·DataArray·against·the·B·DataArray | 625 | Now·suppose·we·want·to·scatter·the·A·DataArray·against·the·B·DataArray |
626 | In·[101]:·ds.plot.scatter(x="A",·y="B") | 626 | In·[101]:·ds.plot.scatter(x="A",·y="B") |
627 | Out[101]:·<matplotlib.collections.PathCollection·at·0xffff | 627 | Out[101]:·<matplotlib.collections.PathCollection·at·0xffff95aed450> |
628 | [_build/html/_static/ds_simple_scatter.png] | 628 | [_build/html/_static/ds_simple_scatter.png] |
629 | The·hue·kwarg·lets·you·vary·the·color·by·variable·value | 629 | The·hue·kwarg·lets·you·vary·the·color·by·variable·value |
630 | In·[102]:·ds.plot.scatter(x="A",·y="B",·hue="w") | 630 | In·[102]:·ds.plot.scatter(x="A",·y="B",·hue="w") |
631 | Out[102]:·<matplotlib.collections.PathCollection·at·0xffff | 631 | Out[102]:·<matplotlib.collections.PathCollection·at·0xffff95b282d0> |
632 | [_build/html/_static/ds_hue_scatter.png] | 632 | [_build/html/_static/ds_hue_scatter.png] |
633 | You·can·force·a·legend·instead·of·a·colorbar·by·setting·add_legend=True, | 633 | You·can·force·a·legend·instead·of·a·colorbar·by·setting·add_legend=True, |
634 | add_colorbar=False. | 634 | add_colorbar=False. |
635 | In·[103]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=True, | 635 | In·[103]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=True, |
636 | add_colorbar=False) | 636 | add_colorbar=False) |
637 | Out[103]:·<matplotlib.collections.PathCollection·at·0xffff | 637 | Out[103]:·<matplotlib.collections.PathCollection·at·0xffff95aaf890> |
638 | [_build/html/_static/ds_discrete_legend_hue_scatter.png] | 638 | [_build/html/_static/ds_discrete_legend_hue_scatter.png] |
639 | In·[104]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=False, | 639 | In·[104]:·ds.plot.scatter(x="A",·y="B",·hue="w",·add_legend=False, |
640 | add_colorbar=True) | 640 | add_colorbar=True) |
641 | Out[104]:·<matplotlib.collections.PathCollection·at·0xffff | 641 | Out[104]:·<matplotlib.collections.PathCollection·at·0xffff675b9450> |
642 | [_build/html/_static/ds_discrete_colorbar_hue_scatter.png] | 642 | [_build/html/_static/ds_discrete_colorbar_hue_scatter.png] |
643 | The·markersize·kwarg·lets·you·vary·the·point’s·size·by·variable·value.·You·can | 643 | The·markersize·kwarg·lets·you·vary·the·point’s·size·by·variable·value.·You·can |
644 | additionally·pass·size_norm·to·control·how·the·variable’s·values·are·mapped·to | 644 | additionally·pass·size_norm·to·control·how·the·variable’s·values·are·mapped·to |
645 | point·sizes. | 645 | point·sizes. |
646 | In·[105]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="z") | 646 | In·[105]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="z") |
647 | Out[105]:·<matplotlib.collections.PathCollection·at·0xffff | 647 | Out[105]:·<matplotlib.collections.PathCollection·at·0xffff95bf9d10> |
648 | [_build/html/_static/ds_hue_size_scatter.png] | 648 | [_build/html/_static/ds_hue_size_scatter.png] |
649 | The·z·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well. | 649 | The·z·kwarg·lets·you·plot·the·data·along·the·z-axis·as·well. |
650 | In·[106]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x") | 650 | In·[106]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x") |
651 | Out[106]:·<mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xffff | 651 | Out[106]:·<mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xffff95d38cd0> |
652 | [_build/html/_static/ds_hue_size_scatter_z.png] | 652 | [_build/html/_static/ds_hue_size_scatter_z.png] |
653 | Faceting·is·also·possible | 653 | Faceting·is·also·possible |
654 | In·[107]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="x",·row="x", | 654 | In·[107]:·ds.plot.scatter(x="A",·y="B",·hue="y",·markersize="x",·row="x", |
655 | col="w") | 655 | col="w") |
656 | Out[107]:·<xarray.plot.facetgrid.FacetGrid·at·0xffff | 656 | Out[107]:·<xarray.plot.facetgrid.FacetGrid·at·0xffff66e27e00> |
657 | [_build/html/_static/ds_facet_scatter.png] | 657 | [_build/html/_static/ds_facet_scatter.png] |
658 | And·adding·the·z-axis | 658 | And·adding·the·z-axis |
659 | In·[108]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x", | 659 | In·[108]:·ds.plot.scatter(x="A",·y="B",·z="z",·hue="y",·markersize="x", |
660 | row="x",·col="w") | 660 | row="x",·col="w") |
661 | Out[108]:·<xarray.plot.facetgrid.FacetGrid·at·0xffff | 661 | Out[108]:·<xarray.plot.facetgrid.FacetGrid·at·0xffff954d1f90> |
662 | [_build/html/_static/ds_facet_scatter_z.png] | 662 | [_build/html/_static/ds_facet_scatter_z.png] |
663 | For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data | 663 | For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data |
664 | variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities | 664 | variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities |
665 | of·seaborn. | 665 | of·seaborn. |
666 | *\x8**\x8**\x8**\x8*·Q\x8Qu\x8ui\x8iv\x8ve\x8er\x8r_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 666 | *\x8**\x8**\x8**\x8*·Q\x8Qu\x8ui\x8iv\x8ve\x8er\x8r_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
667 | Visualizing·vector·fields·is·supported·with·quiver·plots: | 667 | Visualizing·vector·fields·is·supported·with·quiver·plots: |
668 | In·[109]:·ds.isel(w=1,·z=1).plot.quiver(x="x",·y="y",·u="A",·v="B") | 668 | In·[109]:·ds.isel(w=1,·z=1).plot.quiver(x="x",·y="y",·u="A",·v="B") |
669 | Out[109]:·<matplotlib.quiver.Quiver·at·0xffff | 669 | Out[109]:·<matplotlib.quiver.Quiver·at·0xffff7fc48050> |
670 | [_build/html/_static/ds_simple_quiver.png] | 670 | [_build/html/_static/ds_simple_quiver.png] |
671 | where·u·and·v·denote·the·x·and·y·direction·components·of·the·arrow·vectors. | 671 | where·u·and·v·denote·the·x·and·y·direction·components·of·the·arrow·vectors. |
672 | Again,·faceting·is·also·possible: | 672 | Again,·faceting·is·also·possible: |
673 | In·[110]:·ds.plot.quiver(x="x",·y="y",·u="A",·v="B",·col="w",·row="z",·scale=4) | 673 | In·[110]:·ds.plot.quiver(x="x",·y="y",·u="A",·v="B",·col="w",·row="z",·scale=4) |
674 | Out[110]:·<xarray.plot.facetgrid.FacetGrid·at·0xffff | 674 | Out[110]:·<xarray.plot.facetgrid.FacetGrid·at·0xffff952b7c50> |
675 | [_build/html/_static/ds_facet_quiver.png] | 675 | [_build/html/_static/ds_facet_quiver.png] |
676 | scale·is·required·for·faceted·quiver·plots.·The·scale·determines·the·number·of | 676 | scale·is·required·for·faceted·quiver·plots.·The·scale·determines·the·number·of |
677 | data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the | 677 | data·units·per·arrow·length·unit,·i.e.·a·smaller·scale·parameter·makes·the |
678 | arrow·longer. | 678 | arrow·longer. |
679 | *\x8**\x8**\x8**\x8*·S\x8St\x8tr\x8re\x8ea\x8am\x8mp\x8pl\x8lo\x8ot\x8t_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 679 | *\x8**\x8**\x8**\x8*·S\x8St\x8tr\x8re\x8ea\x8am\x8mp\x8pl\x8lo\x8ot\x8t_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
680 | Visualizing·vector·fields·is·also·supported·with·streamline·plots: | 680 | Visualizing·vector·fields·is·also·supported·with·streamline·plots: |
681 | In·[111]:·ds.isel(w=1,·z=1).plot.streamplot(x="x",·y="y",·u="A",·v="B") | 681 | In·[111]:·ds.isel(w=1,·z=1).plot.streamplot(x="x",·y="y",·u="A",·v="B") |
682 | Out[111]:·<matplotlib.collections.LineCollection·at·0xffff | 682 | Out[111]:·<matplotlib.collections.LineCollection·at·0xffff94d925d0> |
683 | [_build/html/_static/ds_simple_streamplot.png] | 683 | [_build/html/_static/ds_simple_streamplot.png] |
684 | where·u·and·v·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to | 684 | where·u·and·v·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to |
685 | the·streamlines.·Again,·faceting·is·also·possible: | 685 | the·streamlines.·Again,·faceting·is·also·possible: |
686 | In·[112]:·ds.plot.streamplot(x="x",·y="y",·u="A",·v="B",·col="w",·row="z") | 686 | In·[112]:·ds.plot.streamplot(x="x",·y="y",·u="A",·v="B",·col="w",·row="z") |
687 | Out[112]:·<xarray.plot.facetgrid.FacetGrid·at·0xffff | 687 | Out[112]:·<xarray.plot.facetgrid.FacetGrid·at·0xffff644ec050> |
688 | [_build/html/_static/ds_facet_streamplot.png] | 688 | [_build/html/_static/ds_facet_streamplot.png] |
689 | *\x8**\x8**\x8**\x8**\x8*·M\x8Ma\x8ap\x8ps\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8**\x8* | 689 | *\x8**\x8**\x8**\x8**\x8*·M\x8Ma\x8ap\x8ps\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8**\x8* |
690 | To·follow·this·section·you’ll·need·to·have·Cartopy·installed·and·working. | 690 | To·follow·this·section·you’ll·need·to·have·Cartopy·installed·and·working. |
691 | This·script·will·plot·the·air·temperature·on·a·map. | 691 | This·script·will·plot·the·air·temperature·on·a·map. |
692 | In·[113]:·import·cartopy.crs·as·ccrs | 692 | In·[113]:·import·cartopy.crs·as·ccrs |
693 | In·[114]:·air·=·xr.tutorial.open_dataset("air_temperature").air | 693 | In·[114]:·air·=·xr.tutorial.open_dataset("air_temperature").air |
694 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not | 694 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
695 | create·data·cache·folder·'/nonexistent/ | 695 | create·data·cache·folder·'/nonexistent/second-build/.cache/ |
696 | xarray_tutorial_data'.·Will·not·be·able·to·download·data·files. | 696 | xarray_tutorial_data'.·Will·not·be·able·to·download·data·files. |
697 | In·[115]:·p·=·air.isel(time=0).plot( | 697 | In·[115]:·p·=·air.isel(time=0).plot( |
698 | ···.....:·····subplot_kws=dict(projection=ccrs.Orthographic(-80,·35), | 698 | ···.....:·····subplot_kws=dict(projection=ccrs.Orthographic(-80,·35), |
699 | facecolor="gray"), | 699 | facecolor="gray"), |
700 | ···.....:·····transform=ccrs.PlateCarree(), | 700 | ···.....:·····transform=ccrs.PlateCarree(), |
Offset 745, 24 lines modified | Offset 745, 24 lines modified | ||
745 | In·[121]:·import·xarray.plot·as·xplt | 745 | In·[121]:·import·xarray.plot·as·xplt |
Max diff block lines reached; 6819/14108 bytes (48.33%) of diff not shown. |
Offset 554, 15 lines modified | Offset 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·function | 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·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">"air_temperature"</span><span·class="p">)[</span><span·class="s2">"air"</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">"air_temperature"</span><span·class="p">)[</span><span·class="s2">"air"</span><span·class="p">]</span> |
561 | <span·class="go">PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not·create·data·cache·folder·'/nonexistent/ | 561 | <span·class="go">PermissionError:·[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.</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">"lon"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"lat"</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">"lon"</span><span·class="p">,</span>·<span·class="n">y</span><span·class="o">=</span><span·class="s2">"lat"</span><span·class="p">)</span> |
563 | <span·class="go">NameError:·name·'air'·is·not·defined</span> | 563 | <span·class="go">NameError:·name·'air'·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"·/> |
Offset 440, 15 lines modified | Offset 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·applying | 441 | 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·to | 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·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·US | 444 | 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·not | 446 | PermissionError:·[Errno·13]·Permission·denied:·'/nonexistent'·|·Pooch·could·not |
447 | create·data·cache·folder·'/nonexistent/ | 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·defined | 450 | 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(): |
Offset 84, 46 lines modified | Offset 84, 57 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"><xarray.Variable·( | 90 | <span·class="go"><xarray.Variable·(Mż6Ūě:·3,·bŕďĿU:·2)>·Size:·48B</span> |
91 | <span·class="go">array([[······-inf······-infj,·-2.844e+16······-infj],</span> | ||
92 | <span·class="go">·······[······-inf······+infj,··1.100e+00-1.100e+00j],</span> | ||
93 | <span·class="go">·······[-0.000e+00-1.175e-38j,··0.000e+00-1.175e-38j]],·dtype=complex64)</span> | ||
91 | <span·class="go">array([[[-2736,·-2736],</span> | ||
92 | <span·class="go">········[-2736,·-2736],</span> | ||
93 | <span·class="go">········[-2736,·-2736],</span> | ||
94 | <span·class="go">········[28277,·-2736]]],·dtype=int32)</span> | ||
95 | <span·class="go">Attributes:</span> | ||
96 | <span·class="go">····Ÿ:········ã</span> | ||
97 | <span·class="go">····:·········ŜUįÿŽ</span> | ||
98 | <span·class="go">····őŽÿſB:····None</span> | ||
99 | <span·class="go">····ŀſŃŋ8:····Žóìğß</span> | ||
100 | <span·class="go">····Ęž:·······True</span> | ||
101 | <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="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> |
102 | <span·class="gh">Out[4]:·</span> | 95 | <span·class="gh">Out[4]:·</span> |
103 | <span·class="go"><xarray.Variable·( | 96 | <span·class="go"><xarray.Variable·(ÛźIċ:·2,·W:·3,·ſŻ:·4)>·Size:·48B</span> |
104 | <span·class="go">array([ | 97 | <span·class="go">array([[[nan,·nan,·nan,·nan],</span> |
98 | <span·class="go">········[-0.,·nan,·nan,·nan],</span> | ||
99 | <span·class="go">········[nan,·nan,·nan,·nan]],</span> | ||
100 | <span·class="go">·······[[nan,·nan,·nan,·nan],</span> | ||
101 | <span·class="go">········[nan,·inf,·nan,·nan],</span> | ||
102 | <span·class="go">········[nan,·-0.,·nan,·nan]]],·shape=(2,·3,·4),·dtype=float16)</span> | ||
105 | <span·class="go">Attributes:</span> | 103 | <span·class="go">Attributes:</span> |
106 | <span·class="go">···· | 104 | <span·class="go">····:·········['V\uf7afÀ\x17']</span> |
107 | <span·class="go">···· | 105 | <span·class="go">····DÛijā:·····None</span> |
108 | <span·class="go">····Žtłöž:····False</span> | ||
109 | <span·class="go">····:·········False</span> | ||
110 | <span·class="go">····ž:········Ë8ŎåO</span> | ||
111 | <span·class="go">···· | 106 | <span·class="go">····NēÂżŐ:····</span> |
112 | <span·class="go">···· | 107 | <span·class="go">····ŻžżĞſ:····ęž</span> |
113 | <span·class="go">····Žĉ:·······None</span> | ||
114 | <span·class="go">····ûCŒŢd:····False</span> | ||
115 | <span·class="go">····çųɹ:·····öæÙũ</span> | ||
116 | <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> | 108 | <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> |
117 | <span·class="gh">Out[5]:·</span> | 109 | <span·class="gh">Out[5]:·</span> |
118 | <span·class="go"><xarray.Variable·( | 110 | <span·class="go"><xarray.Variable·(9ĕ:·5,·žŸsŽŝ:·2,·žż:·4)>·Size:·320B</span> |
119 | <span·class="go">array([ | 111 | <span·class="go">array([[[··············-35365,···············-35365,···············-35365,················54634],</span> |
112 | <span·class="go">········[··············-35365,···············-35365,···············-35365,···············-35365]],</span> | ||
113 | <span·class="go">·······[[··············-35365,···············-35365,···············-35365,···············-35365],</span> | ||
114 | <span·class="go">········[··············-35365,···············-35365,···············-35365,···············-35365]],</span> | ||
115 | <span·class="go">·······[[··············-35365,···············-35365,··5043046791440720276,···············-35365],</span> | ||
116 | <span·class="go">········[··············-35365,···············-30682,···············-35365,···············-35365]],</span> | ||
117 | <span·class="go">·······[[··············-35365,···············-35365,···············-35365,···············-35365],</span> | ||
118 | <span·class="go">········[··············-35365,···············-35365,·-9223372036854775808,···············-35365]],</span> | ||
119 | <span·class="go">·······[[··············-35365,···············-35365,···············-35365,···············-35365],</span> | ||
120 | <span·class="go">········[··············-35365,···············-35365,···············-35365,···············-35365]]],</span> | ||
121 | <span·class="go">······shape=(5,·2,·4))</span> | ||
122 | <span·class="go">Attributes:</span> | ||
123 | <span·class="go">····ŭYèþř:····{'ĝĺ':·'h'}</span> | ||
124 | <span·class="go">····żwíÎW:····{'ŻŹÝåÞ':·None,·'ĔìōŻ²':·None,·'îxũŽÃ':·array([[···············...</span> | ||
125 | <span·class="go">····łłĭřž:····{'Ŧdh':·'ŋMſż9',·'º':·array(['Ju'],·dtype='<U4'),·'âſ':·'S',·'Ŀ...</span> | ||
120 | </pre></div> | 126 | </pre></div> |
121 | </div> | 127 | </div> |
122 | <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 | 128 | <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 |
123 | range·of·data·that·the·xarray·strategies·can·generate.</p> | 129 | range·of·data·that·the·xarray·strategies·can·generate.</p> |
124 | <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 | 130 | <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 |
125 | <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.given()</span></code>·decorator:</p> | 131 | <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.given()</span></code>·decorator:</p> |
126 | <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> | 132 | <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 141, 103 lines modified | Offset 152, 127 lines modified | ||
141 | <p>Xarray’s·strategies·can·accept·other·strategies·as·arguments,·allowing·you·to·customise·the·contents·of·the·generated | 152 | <p>Xarray’s·strategies·can·accept·other·strategies·as·arguments,·allowing·you·to·customise·the·contents·of·the·generated |
142 | examples.</p> | 153 | examples.</p> |
143 | <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> | 154 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all·other·details·still·arbitrary</span> |
144 | <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> | 155 | <span·class="gp">In·[8]:·</span><span·class="kn">from</span>·<span·class="nn">hypothesis.extra.numpy</span>·<span·class="kn">import</span>·<span·class="n">complex_number_dtypes</span> |
145 | <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> | 156 | <span·class="gp">In·[9]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dtype</span><span·class="o">=</span><span·class="n">complex_number_dtypes</span><span·class="p">())</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> |
146 | <span·class="gh">Out[9]:·</span> | 157 | <span·class="gh">Out[9]:·</span> |
147 | <span·class="go"><xarray.Variable·( | 158 | <span·class="go"><xarray.Variable·(ŻCſ5Ě:·6)>·Size:·48B</span> |
159 | <span·class="go">array([·3.403e+38-3.521e+16j,·······-inf+0.000e+00j,········inf+0.000e+00j,·-1.500e+00-1.175e-38j,</span> | ||
160 | <span·class="go">·············-inf······+infj,··1.500e+00······+nanj],·dtype='>c8')</span> | ||
148 | <span·class="go">array([[-5.96e-08+infj,·-5.96e-08+infj,·-1.50e+00+nanj,·-5.96e-08+infj,·-5.96e-08+infj],</span> | ||
149 | <span·class="go">·······[-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj],</span> | ||
150 | <span·class="go">·······[-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj],</span> | ||
151 | <span·class="go">·······[-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj],</span> | ||
152 | <span·class="go">·······[-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj],</span> | ||
153 | <span·class="go">·······[-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj]],</span> | ||
154 | <span·class="go">······shape=(6,·5),·dtype='>c8')</span> | ||
155 | <span·class="go">Attributes:</span> | 161 | <span·class="go">Attributes:·(12/29)</span> |
156 | <span·class="go">···· | 162 | <span·class="go">····Ĵ1ŽK:·····KŔÖſĠ</span> |
163 | <span·class="go">····æ:········</span> | ||
164 | <span·class="go">····žŻĔŒQ:····None</span> | ||
165 | <span·class="go">····2ňćÆÀ:····True</span> | ||
166 | <span·class="go">····ØĊ:·······[b'\x10E']</span> | ||
167 | <span·class="go">····fëſú:·····[['MZ¶\x13Z躤F\x8c\U000ed9dbDj'·'ë\x81𛊃\x1c\x8cJ6\x1b\x85']\n·['...</span> | ||
168 | <span·class="go">····...·······...</span> | ||
169 | <span·class="go">····ìĪğſ³:····None</span> | ||
170 | <span·class="go">····äÊ:·······None</span> | ||
171 | <span·class="go">····ō:········None</span> | ||
172 | <span·class="go">····ĽśĔžÇ:····ŧŎŷñ</span> | ||
173 | <span·class="go">····û:········L¹ôĠ</span> | ||
174 | <span·class="go">····ťÅAżf:····vŻB</span> | ||
157 | </pre></div> | 175 | </pre></div> |
158 | </div> | 176 | </div> |
159 | <p>This·also·works·with·custom·strategies,·or·strategies·defined·in·other·packages. | 177 | <p>This·also·works·with·custom·strategies,·or·strategies·defined·in·other·packages. |
160 | 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> | 178 | 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> |
161 | </section> | 179 | </section> |
162 | <section·id="fixing-arguments"> | 180 | <section·id="fixing-arguments"> |
163 | <h3>Fixing·Arguments<a·class="headerlink"·href="#fixing-arguments"·title="Link·to·this·heading">¶</a></h3> | 181 | <h3>Fixing·Arguments<a·class="headerlink"·href="#fixing-arguments"·title="Link·to·this·heading">¶</a></h3> |
164 | <p>If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation·in·the·generated·examples | 182 | <p>If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation·in·the·generated·examples |
165 | over·all·other·aspects,·then·use·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>.</p> | 183 | over·all·other·aspects,·then·use·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>.</p> |
166 | <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> | 184 | <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> |
167 | <span·class="go">#·Generates·only·variable·objects·with·dimensions·["x",·"y"]</span> | 185 | <span·class="go">#·Generates·only·variable·objects·with·dimensions·["x",·"y"]</span> |
168 | <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">"x"</span><span·class="p">,</span>·<span·class="s2">"y"</span><span·class="p">]))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> | 186 | <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">"x"</span><span·class="p">,</span>·<span·class="s2">"y"</span><span·class="p">]))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> |
169 | <span·class="gh">Out[11]:·</span> | 187 | <span·class="gh">Out[11]:·</span> |
170 | <span·class="go"><xarray.Variable·(x:·1,·y:· | 188 | <span·class="go"><xarray.Variable·(x:·1,·y:·5)>·Size:·20B</span> |
171 | <span·class="go">array([[0]],·dtype=int | 189 | <span·class="go">array([[········121,··-831721605,·-1650089367,·······-6381,·······11205]],·dtype=int32)</span> |
190 | <span·class="go">Attributes:·(12/16)</span> | ||
191 | <span·class="go">····:·········[·9555·-8908]</span> | ||
192 | <span·class="go">····Ó:········['\U00099922mů¡'·'w\U00053591\U0004e3fe']</span> | ||
193 | <span·class="go">····ďŻż:······True</span> | ||
194 | <span·class="go">····īu:·······ÿİ</span> | ||
195 | <span·class="go">····üŹ¾â:·····None</span> | ||
Max diff block lines reached; 16511/28470 bytes (57.99%) of diff not shown. |
Offset 28, 47 lines modified | Offset 28, 69 lines modified | ||
28 | To·see·an·example·of·what·each·of·these·strategies·might·produce,·you·can·call | 28 | 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·method | 29 | 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·xrst | 31 | 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·(Mż6Ūě:·3,·bŕďĿU:·2)>·Size:·48B | ||
35 | array([[······-inf······-infj,·-2.844e+16······-infj], | ||
36 | ·······[······-inf······+infj,··1.100e+00-1.100e+00j], | ||
37 | ·······[-0.000e+00-1.175e-38j,··0.000e+00-1.175e-38j]],·dtype=complex64) | ||
34 | <xarray.Variable·(ξsÚŽ:·1,·HŦbĖĢ:·4,·Äw:·2)>·Size:·32B | ||
35 | array([[[-2736,·-2736], | ||
36 | ········[-2736,·-2736], | ||
37 | ········[-2736,·-2736], | ||
38 | ········[28277,·-2736]]],·dtype=int32) | ||
39 | Attributes: | ||
40 | ····Ÿ:········ã | ||
41 | ····:·········ŜUįÿŽ | ||
42 | ····őŽÿſB:····None | ||
43 | ····ŀſŃŋ8:····Žóìğß | ||
44 | ····Ęž:·······True | ||
45 | In·[4]:·xrst.variables().example() | 38 | In·[4]:·xrst.variables().example() |
46 | Out[4]: | 39 | Out[4]: |
47 | <xarray.Variable·(Ü:·5)>·Size:·20B | ||
48 | array([2069244976,······29602,······29602,·2906764076,······29602], | ||
49 | 40 | <xarray.Variable·(ÛźIċ:·2,·W:·3,·ſŻ:·4)>·Size:·48B | |
41 | array([[[nan,·nan,·nan,·nan], | ||
42 | ········[-0.,·nan,·nan,·nan], | ||
43 | ········[nan,·nan,·nan,·nan]], | ||
44 | ·······[[nan,·nan,·nan,·nan], | ||
45 | ········[nan,·inf,·nan,·nan], | ||
46 | ········[nan,·-0.,·nan,·nan]]],·shape=(2,·3,·4),·dtype=float16) | ||
50 | Attributes: | 47 | Attributes: |
51 | ···· | 48 | ····:·········['V\uf7afÀ\x17'] |
52 | ···· | 49 | ····DÛijā:·····None |
50 | ····NēÂżŐ: | ||
51 | ····ŻžżĞſ:····ęž | ||
53 | ····Žtłöž:····False | ||
54 | ····:·········False | ||
55 | ····ž:········Ë8ŎåO | ||
56 | ····àL:·······True | ||
57 | ····žő3ņÆ:····False | ||
58 | ····Žĉ:·······None | ||
59 | ····ûCŒŢd:····False | ||
60 | ····çųɹ:·····öæÙũ | ||
61 | In·[5]:·xrst.variables().example() | 52 | In·[5]:·xrst.variables().example() |
62 | Out[5]: | 53 | Out[5]: |
63 | <xarray.Variable·(0:·1)>·Size:·8B | ||
64 | array( | 54 | <xarray.Variable·(9ĕ:·5,·žŸsŽŝ:·2,·žż:·4)>·Size:·320B |
55 | array([[[··············-35365,···············-35365,···············-35365, | ||
56 | 54634], | ||
57 | ········[··············-35365,···············-35365,···············-35365, | ||
58 | -35365]], | ||
59 | ·······[[··············-35365,···············-35365,···············-35365, | ||
60 | -35365], | ||
61 | ········[··············-35365,···············-35365,···············-35365, | ||
62 | -35365]], | ||
63 | ·······[[··············-35365,···············-35365,··5043046791440720276, | ||
64 | -35365], | ||
65 | ········[··············-35365,···············-30682,···············-35365, | ||
66 | -35365]], | ||
67 | ·······[[··············-35365,···············-35365,···············-35365, | ||
68 | -35365], | ||
69 | ········[··············-35365,···············-35365,·-9223372036854775808, | ||
70 | -35365]], | ||
71 | ·······[[··············-35365,···············-35365,···············-35365, | ||
72 | -35365], | ||
73 | ········[··············-35365,···············-35365,···············-35365, | ||
74 | -35365]]], | ||
75 | ······shape=(5,·2,·4)) | ||
76 | Attributes: | ||
77 | ····ŭYèþř:····{'ĝĺ':·'h'} | ||
78 | ····żwíÎW:····{'ŻŹÝåÞ':·None,·'ĔìōŻ²':·None,·'îxũŽÃ':·array([ | ||
79 | [···············... | ||
80 | ····łłĭřž:····{'Ŧdh':·'ŋMſż9',·'º':·array(['Ju'],·dtype='<U4'),·'âſ':·'S', | ||
81 | 'Ŀ... | ||
65 | You·can·see·that·calling·.example()·multiple·times·will·generate·different | 82 | You·can·see·that·calling·.example()·multiple·times·will·generate·different |
66 | examples,·giving·you·an·idea·of·the·wide·range·of·data·that·the·xarray | 83 | examples,·giving·you·an·idea·of·the·wide·range·of·data·that·the·xarray |
67 | strategies·can·generate. | 84 | strategies·can·generate. |
68 | In·your·tests·however·you·should·not·use·.example()·-·instead·you·should | 85 | In·your·tests·however·you·should·not·use·.example()·-·instead·you·should |
69 | parameterize·your·tests·with·the·hypothesis.given()·decorator: | 86 | parameterize·your·tests·with·the·hypothesis.given()·decorator: |
70 | In·[6]:·from·hypothesis·import·given | 87 | In·[6]:·from·hypothesis·import·given |
71 | In·[7]:·@given(xrst.variables()) | 88 | In·[7]:·@given(xrst.variables()) |
Offset 80, 108 lines modified | Offset 102, 130 lines modified | ||
80 | customise·the·contents·of·the·generated·examples. | 102 | customise·the·contents·of·the·generated·examples. |
81 | #·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all | 103 | #·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all |
82 | other·details·still·arbitrary | 104 | other·details·still·arbitrary |
83 | In·[8]:·from·hypothesis.extra.numpy·import·complex_number_dtypes | 105 | In·[8]:·from·hypothesis.extra.numpy·import·complex_number_dtypes |
84 | In·[9]:·xrst.variables(dtype=complex_number_dtypes()).example() | 106 | In·[9]:·xrst.variables(dtype=complex_number_dtypes()).example() |
85 | Out[9]: | 107 | Out[9]: |
86 | <xarray.Variable·( | 108 | <xarray.Variable·(ŻCſ5Ě:·6)>·Size:·48B |
87 | array([[-5.96e-08+infj,·-5.96e-08+infj,·-1.50e+00+nanj,·-5.96e-08+infj,·-5.96e- | ||
88 | 08+infj], | ||
89 | ·······[-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e- | ||
90 | 08+infj], | ||
91 | ·······[-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e- | ||
92 | 08+infj], | ||
93 | ·······[-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e- | ||
94 | 08+infj], | ||
95 | ·······[-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e- | ||
96 | 08+infj], | ||
97 | ·······[-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e-08+infj,·-5.96e- | ||
98 | 08+infj]], | ||
99 | ······shape=(6,·5),·dtype='>c8') | ||
100 | Attributes: | ||
101 | ····³U:·······{'':·None,·'PcĮþÄ':·None,·'Ī':·array(['_𭤙2\x987X'], | ||
102 | 109 | array([·3.403e+38-3.521e+16j,·······-inf+0.000e+00j,········inf+0.000e+00j,·- | |
110 | 1.500e+00-1.175e-38j, | ||
111 | ·············-inf······+infj,··1.500e+00······+nanj],·dtype='>c8') | ||
112 | Attributes:·(12/29) | ||
113 | ····Ĵ1ŽK:·····KŔÖſĠ | ||
114 | ····æ: | ||
115 | ····žŻĔŒQ:····None | ||
116 | ····2ňćÆÀ:····True | ||
117 | ····ØĊ:·······[b'\x10E'] | ||
118 | ····fëſú:·····[['MZ¶\x13Z躤F\x8c\U000ed9dbDj'·'ë\x81𛊃\x1c\x8cJ6\x1b\x85']\n | ||
119 | ['... | ||
120 | ····...·······... | ||
Max diff block lines reached; 8049/12978 bytes (62.02%) of diff not shown. |
Offset 7936, 15 lines modified | Offset 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·according | 7936 | <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">"x"</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">"y"</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">"x"</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">"y"</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">"distance"</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">"distance"</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"><</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"><</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"><matplotlib.collections.QuadMesh·at·0xffff | 7941 | <span·class="gh">Out[46]:·</span><span·class="go"><matplotlib.collections.QuadMesh·at·0xffff64722e90></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> |
Offset 5100, 15 lines modified | Offset 5100, 15 lines modified | ||
5100 | ····*·New·xray.Dataset.where·method·for·masking·xray·objects·according·to·some | 5100 | ····*·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·0xffff | 5105 | ······Out[46]:·<matplotlib.collections.QuadMesh·at·0xffff64722e90> |
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·finite | 5107 | ····*·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·a | 5109 | ····*·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))) |