Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | · | 1 | ·5cc999a1bc7c7e66c91677fff73b5245·2007716·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·····61 | 2 | -rw-r--r--···0········0········0·····6168·2025-02-02·11:36:57.000000·control.tar.xz |
3 | -rw-r--r--···0········0········0··2001 | 3 | -rw-r--r--···0········0········0··2001356·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:·798 | 6 | Installed-Size:·7982 |
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 152, 31 lines modified | Offset 152, 31 lines modified | ||
152 | -rw-r--r--···0·root·········(0)·root·········(0)······461·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/dask.html | 152 | -rw-r--r--···0·root·········(0)·root·········(0)······461·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/dask.html |
153 | -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/data-structures.html | 153 | -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/data-structures.html |
154 | -rw-r--r--···0·root·········(0)·root·········(0)·····8448·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/developers-meeting.html | 154 | -rw-r--r--···0·root·········(0)·root·········(0)·····8448·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/developers-meeting.html |
155 | -rw-r--r--···0·root·········(0)·root·········(0)······479·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/duckarrays.html | 155 | -rw-r--r--···0·root·········(0)·root·········(0)······479·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/duckarrays.html |
156 | -rw-r--r--···0·root·········(0)·root·········(0)····22666·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/ecosystem.html | 156 | -rw-r--r--···0·root·········(0)·root·········(0)····22666·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/ecosystem.html |
157 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ | 157 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ |
158 | -rw-r--r--···0·root·········(0)·root·········(0)····21694·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html | 158 | -rw-r--r--···0·root·········(0)·root·········(0)····21694·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html |
159 | -rw-r--r--···0·root·········(0)·root·········(0)·····182 | 159 | -rw-r--r--···0·root·········(0)·root·········(0)·····1826·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz |
160 | -rw-r--r--···0·root·········(0)·root·········(0)····38490·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html | 160 | -rw-r--r--···0·root·········(0)·root·········(0)····38490·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html |
161 | -rw-r--r--···0·root·········(0)·root·········(0)····2372 | 161 | -rw-r--r--···0·root·········(0)·root·········(0)····23721·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz |
162 | -rw-r--r--···0·root·········(0)·root·········(0)···116838·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html | 162 | -rw-r--r--···0·root·········(0)·root·········(0)···116838·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html |
163 | -rw-r--r--···0·root·········(0)·root·········(0)·····87 | 163 | -rw-r--r--···0·root·········(0)·root·········(0)·····8785·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz |
164 | -rw-r--r--···0·root·········(0)·root·········(0)····27577·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html | 164 | -rw-r--r--···0·root·········(0)·root·········(0)····27577·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html |
165 | -rw-r--r--···0·root·········(0)·root·········(0)····209 | 165 | -rw-r--r--···0·root·········(0)·root·········(0)····20988·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz |
166 | -rw-r--r--···0·root·········(0)·root·········(0)····11448·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.html | 166 | -rw-r--r--···0·root·········(0)·root·········(0)····11448·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.html |
167 | -rw-r--r--···0·root·········(0)·root·········(0)·····2375·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb | 167 | -rw-r--r--···0·root·········(0)·root·········(0)·····2375·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/blank_template.ipynb |
168 | -rw-r--r--···0·root·········(0)·root·········(0)····38981·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html | 168 | -rw-r--r--···0·root·········(0)·root·········(0)····38981·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html |
169 | -rw-r--r--···0·root·········(0)·root·········(0)·····320 | 169 | -rw-r--r--···0·root·········(0)·root·········(0)·····3209·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz |
170 | -rw-r--r--···0·root·········(0)·root·········(0)····30434·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html | 170 | -rw-r--r--···0·root·········(0)·root·········(0)····30434·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html |
171 | -rw-r--r--···0·root·········(0)·root·········(0)·····32 | 171 | -rw-r--r--···0·root·········(0)·root·········(0)·····3218·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz |
172 | -rw-r--r--···0·root·········(0)·root·········(0)····36876·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html | 172 | -rw-r--r--···0·root·········(0)·root·········(0)····36876·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html |
173 | -rw-r--r--···0·root·········(0)·root·········(0)·····284 | 173 | -rw-r--r--···0·root·········(0)·root·········(0)·····2846·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz |
174 | -rw-r--r--···0·root·········(0)·root·········(0)····46324·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.html | 174 | -rw-r--r--···0·root·········(0)·root·········(0)····46324·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.html |
175 | -rw-r--r--···0·root·········(0)·root·········(0)·····35 | 175 | -rw-r--r--···0·root·········(0)·root·········(0)·····3554·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz |
176 | -rw-r--r--···0·root·········(0)·root·········(0)······491·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/faq.html | 176 | -rw-r--r--···0·root·········(0)·root·········(0)······491·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/faq.html |
177 | -rw-r--r--···0·root·········(0)·root·········(0)····15073·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/gallery.html | 177 | -rw-r--r--···0·root·········(0)·root·········(0)····15073·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/gallery.html |
178 | -rw-r--r--···0·root·········(0)·root·········(0)····16306·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/genindex.html | 178 | -rw-r--r--···0·root·········(0)·root·········(0)····16306·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/genindex.html |
179 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/ | 179 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/ |
180 | -rw-r--r--···0·root·········(0)·root·········(0)····50398·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/faq.html | 180 | -rw-r--r--···0·root·········(0)·root·········(0)····50398·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/faq.html |
181 | -rw-r--r--···0·root·········(0)·root·········(0)·····7741·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/index.html | 181 | -rw-r--r--···0·root·········(0)·root·········(0)·····7741·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/index.html |
182 | -rw-r--r--···0·root·········(0)·root·········(0)····23857·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/installing.html | 182 | -rw-r--r--···0·root·········(0)·root·········(0)····23857·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/getting-started-guide/installing.html |
Offset 191, 50 lines modified | Offset 191, 50 lines modified | ||
191 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/ | 191 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/ |
192 | -rw-r--r--···0·root·········(0)·root·········(0)····81178·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/chunked-arrays.html | 192 | -rw-r--r--···0·root·········(0)·root·········(0)····81178·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/chunked-arrays.html |
193 | -rw-r--r--···0·root·········(0)·root·········(0)····19678·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/duck-arrays-integration.html | 193 | -rw-r--r--···0·root·········(0)·root·········(0)····19678·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/duck-arrays-integration.html |
194 | -rw-r--r--···0·root·········(0)·root·········(0)····22842·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/extending-xarray.html | 194 | -rw-r--r--···0·root·········(0)·root·········(0)····22842·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/extending-xarray.html |
195 | -rw-r--r--···0·root·········(0)·root·········(0)····53506·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/how-to-add-new-backend.html | 195 | -rw-r--r--···0·root·········(0)·root·········(0)····53506·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/how-to-add-new-backend.html |
196 | -rw-r--r--···0·root·········(0)·root·········(0)····30758·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/how-to-create-custom-index.html | 196 | -rw-r--r--···0·root·········(0)·root·········(0)····30758·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/how-to-create-custom-index.html |
197 | -rw-r--r--···0·root·········(0)·root·········(0)·····9035·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/index.html | 197 | -rw-r--r--···0·root·········(0)·root·········(0)·····9035·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/index.html |
198 | -rw-r--r--···0·root·········(0)·root·········(0)····6025 | 198 | -rw-r--r--···0·root·········(0)·root·········(0)····60257·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/internal-design.html |
199 | -rw-r--r--···0·root·········(0)·root·········(0)····13589·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/interoperability.html | 199 | -rw-r--r--···0·root·········(0)·root·········(0)····13589·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/interoperability.html |
200 | -rw-r--r--···0·root·········(0)·root·········(0)····2707 | 200 | -rw-r--r--···0·root·········(0)·root·········(0)····27072·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/internals/zarr-encoding-spec.html |
201 | -rw-r--r--···0·root·········(0)·root·········(0)······488·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/interpolation.html | 201 | -rw-r--r--···0·root·········(0)·root·········(0)······488·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/interpolation.html |
202 | -rw-r--r--···0·root·········(0)·root·········(0)······455·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/io.html | 202 | -rw-r--r--···0·root·········(0)·root·········(0)······455·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/io.html |
203 | -rw-r--r--···0·root·········(0)·root·········(0)····22249·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/objects.inv | 203 | -rw-r--r--···0·root·········(0)·root·········(0)····22249·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/objects.inv |
204 | -rw-r--r--···0·root·········(0)·root·········(0)······467·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/pandas.html | 204 | -rw-r--r--···0·root·········(0)·root·········(0)······467·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/pandas.html |
205 | -rw-r--r--···0·root·········(0)·root·········(0)······473·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/plotting.html | 205 | -rw-r--r--···0·root·········(0)·root·········(0)······473·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/plotting.html |
206 | -rw-r--r--···0·root·········(0)·root·········(0)·····6546·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/py-modindex.html | 206 | -rw-r--r--···0·root·········(0)·root·········(0)·····6546·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/py-modindex.html |
207 | -rw-r--r--···0·root·········(0)·root·········(0)······524·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/quick-overview.html | 207 | -rw-r--r--···0·root·········(0)·root·········(0)······524·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/quick-overview.html |
208 | -rw-r--r--···0·root·········(0)·root·········(0)······443·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/related-projects.html | 208 | -rw-r--r--···0·root·········(0)·root·········(0)······443·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/related-projects.html |
209 | -rw-r--r--···0·root·········(0)·root·········(0)······476·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/reshaping.html | 209 | -rw-r--r--···0·root·········(0)·root·········(0)······476·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/reshaping.html |
210 | -rw-r--r--···0·root·········(0)·root·········(0)····24474·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/roadmap.html | 210 | -rw-r--r--···0·root·········(0)·root·········(0)····24474·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/roadmap.html |
211 | -rw-r--r--···0·root·········(0)·root·········(0)·····6341·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/search.html | 211 | -rw-r--r--···0·root·········(0)·root·········(0)·····6341·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/search.html |
212 | -rw-r--r--···0·root·········(0)·root·········(0)···240 | 212 | -rw-r--r--···0·root·········(0)·root·········(0)···240598·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/searchindex.js |
213 | -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/terminology.html | 213 | -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/terminology.html |
214 | -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/time-series.html | 214 | -rw-r--r--···0·root·········(0)·root·········(0)······482·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/time-series.html |
215 | -rw-r--r--···0·root·········(0)·root·········(0)····13358·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/tutorials-and-videos.html | 215 | -rw-r--r--···0·root·········(0)·root·········(0)····13358·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/tutorials-and-videos.html |
216 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/ | 216 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/ |
217 | -rw-r--r--···0·root·········(0)·root·········(0)····58669·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/combining.html | 217 | -rw-r--r--···0·root·········(0)·root·········(0)····58669·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/combining.html |
218 | -rw-r--r--···0·root·········(0)·root·········(0)···140307·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/computation.html | 218 | -rw-r--r--···0·root·········(0)·root·········(0)···140307·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/computation.html |
219 | -rw-r--r--···0·root·········(0)·root·········(0)····71357·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/dask.html | 219 | -rw-r--r--···0·root·········(0)·root·········(0)····71357·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/dask.html |
220 | -rw-r--r--···0·root·········(0)·root·········(0)···150187·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/data-structures.html | 220 | -rw-r--r--···0·root·········(0)·root·········(0)···150187·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/data-structures.html |
221 | -rw-r--r--···0·root·········(0)·root·········(0)····35119·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/duckarrays.html | 221 | -rw-r--r--···0·root·········(0)·root·········(0)····35119·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/duckarrays.html |
222 | -rw-r--r--···0·root·········(0)·root·········(0)····50912·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/groupby.html | 222 | -rw-r--r--···0·root·········(0)·root·········(0)····50912·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/groupby.html |
223 | -rw-r--r--···0·root·········(0)·root·········(0)···12019 | 223 | -rw-r--r--···0·root·········(0)·root·········(0)···120197·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/hierarchical-data.html |
224 | -rw-r--r--···0·root·········(0)·root·········(0)·····9025·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/index.html | 224 | -rw-r--r--···0·root·········(0)·root·········(0)·····9025·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/index.html |
225 | -rw-r--r--···0·root·········(0)·root·········(0)···14025 | 225 | -rw-r--r--···0·root·········(0)·root·········(0)···140258·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/indexing.html |
226 | -rw-r--r--···0·root·········(0)·root·········(0)····6870 | 226 | -rw-r--r--···0·root·········(0)·root·········(0)····68702·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/interpolation.html |
227 | -rw-r--r--···0·root·········(0)·root·········(0)···14443 | 227 | -rw-r--r--···0·root·········(0)·root·········(0)···144435·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/io.html |
228 | -rw-r--r--···0·root·········(0)·root·········(0)····11704·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/options.html | 228 | -rw-r--r--···0·root·········(0)·root·········(0)····11704·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/options.html |
229 | -rw-r--r--···0·root·········(0)·root·········(0)····42217·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/pandas.html | 229 | -rw-r--r--···0·root·········(0)·root·········(0)····42217·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/pandas.html |
230 | -rw-r--r--···0·root·········(0)·root·········(0)···1361 | 230 | -rw-r--r--···0·root·········(0)·root·········(0)···136131·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/plotting.html |
231 | -rw-r--r--···0·root·········(0)·root·········(0)····62 | 231 | -rw-r--r--···0·root·········(0)·root·········(0)····62900·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/reshaping.html |
232 | -rw-r--r--···0·root·········(0)·root·········(0)····46815·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/terminology.html | 232 | -rw-r--r--···0·root·········(0)·root·········(0)····46815·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/terminology.html |
233 | -rw-r--r--···0·root·········(0)·root·········(0)····47 | 233 | -rw-r--r--···0·root·········(0)·root·········(0)····47242·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/testing.html |
234 | -rw-r--r--···0·root·········(0)·root·········(0)····45838·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/time-series.html | 234 | -rw-r--r--···0·root·········(0)·root·········(0)····45838·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/time-series.html |
235 | -rw-r--r--···0·root·········(0)·root·········(0)····45414·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/weather-climate.html | 235 | -rw-r--r--···0·root·········(0)·root·········(0)····45414·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/user-guide/weather-climate.html |
236 | -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/weather-climate.html | 236 | -rw-r--r--···0·root·········(0)·root·········(0)······494·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/weather-climate.html |
237 | -rw-r--r--···0·root·········(0)·root·········(0)··1017512·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/whats-new.html | 237 | -rw-r--r--···0·root·········(0)·root·········(0)··1017512·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/whats-new.html |
238 | -rw-r--r--···0·root·········(0)·root·········(0)······512·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/why-xarray.html | 238 | -rw-r--r--···0·root·········(0)·root·········(0)······512·2025-02-02·11:36:57.000000·./usr/share/doc/python-xarray-doc/html/why-xarray.html |
239 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc-base/ | 239 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-02-02·11:36:57.000000·./usr/share/doc-base/ |
240 | -rw-r--r--···0·root·········(0)·root·········(0)······290·2025-02-02·11:36:57.000000·./usr/share/doc-base/python-xarray-doc.python-xarray-doc | 240 | -rw-r--r--···0·root·········(0)·root·········(0)······290·2025-02-02·11:36:57.000000·./usr/share/doc-base/python-xarray-doc.python-xarray-doc |
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-05T01:57:32.637343Z", |
23 | ····················"iopub.status.busy":·"202 | 23 | ····················"iopub.status.busy":·"2025-02-05T01:57:32.637028Z", |
24 | ····················"iopub.status.idle":·"202 | 24 | ····················"iopub.status.idle":·"2025-02-05T01:57:32.899598Z", |
25 | ····················"shell.execute_reply":·"202 | 25 | ····················"shell.execute_reply":·"2025-02-05T01:57:32.898703Z" |
26 | ················} | 26 | ················} |
27 | ············}, | 27 | ············}, |
28 | ············"outputs":·[ | 28 | ············"outputs":·[ |
29 | ················{ | 29 | ················{ |
30 | ····················"ename":·"ModuleNotFoundError", | 30 | ····················"ename":·"ModuleNotFoundError", |
31 | ····················"evalue":·"No·module·named·'xarray'", | 31 | ····················"evalue":·"No·module·named·'xarray'", |
32 | ····················"output_type":·"error", | 32 | ····················"output_type":·"error", |
Offset 51, 18 lines modified | Offset 51, 18 lines modified | ||
51 | ············] | 51 | ············] |
52 | ········}, | 52 | ········}, |
53 | ········{ | 53 | ········{ |
54 | ············"cell_type":·"code", | 54 | ············"cell_type":·"code", |
55 | ············"execution_count":·2, | 55 | ············"execution_count":·2, |
56 | ············"metadata":·{ | 56 | ············"metadata":·{ |
57 | ················"execution":·{ | 57 | ················"execution":·{ |
58 | ····················"iopub.execute_input":·"202 | 58 | ····················"iopub.execute_input":·"2025-02-05T01:57:32.980583Z", |
59 | ····················"iopub.status.busy":·"202 | 59 | ····················"iopub.status.busy":·"2025-02-05T01:57:32.979352Z", |
60 | ····················"iopub.status.idle":·"202 | 60 | ····················"iopub.status.idle":·"2025-02-05T01:57:33.001496Z", |
61 | ····················"shell.execute_reply":·"202 | 61 | ····················"shell.execute_reply":·"2025-02-05T01:57:33.000496Z" |
62 | ················} | 62 | ················} |
63 | ············}, | 63 | ············}, |
64 | ············"outputs":·[ | 64 | ············"outputs":·[ |
65 | ················{ | 65 | ················{ |
66 | ····················"ename":·"NameError", | 66 | ····················"ename":·"NameError", |
67 | ····················"evalue":·"name·'xr'·is·not·defined", | 67 | ····················"evalue":·"name·'xr'·is·not·defined", |
68 | ····················"output_type":·"error", | 68 | ····················"output_type":·"error", |
Offset 86, 18 lines modified | Offset 86, 18 lines modified | ||
86 | ············] | 86 | ············] |
87 | ········}, | 87 | ········}, |
88 | ········{ | 88 | ········{ |
89 | ············"cell_type":·"code", | 89 | ············"cell_type":·"code", |
90 | ············"execution_count":·3, | 90 | ············"execution_count":·3, |
91 | ············"metadata":·{ | 91 | ············"metadata":·{ |
92 | ················"execution":·{ | 92 | ················"execution":·{ |
93 | ····················"iopub.execute_input":·"202 | 93 | ····················"iopub.execute_input":·"2025-02-05T01:57:33.004801Z", |
94 | ····················"iopub.status.busy":·"202 | 94 | ····················"iopub.status.busy":·"2025-02-05T01:57:33.004502Z", |
95 | ····················"iopub.status.idle":·"202 | 95 | ····················"iopub.status.idle":·"2025-02-05T01:57:33.025677Z", |
96 | ····················"shell.execute_reply":·"202 | 96 | ····················"shell.execute_reply":·"2025-02-05T01:57:33.024682Z" |
97 | ················} | 97 | ················} |
98 | ············}, | 98 | ············}, |
99 | ············"outputs":·[ | 99 | ············"outputs":·[ |
100 | ················{ | 100 | ················{ |
101 | ····················"ename":·"NameError", | 101 | ····················"ename":·"NameError", |
102 | ····················"evalue":·"name·'ds'·is·not·defined", | 102 | ····················"evalue":·"name·'ds'·is·not·defined", |
103 | ····················"output_type":·"error", | 103 | ····················"output_type":·"error", |
Offset 122, 18 lines modified | Offset 122, 18 lines modified | ||
122 | ············] | 122 | ············] |
123 | ········}, | 123 | ········}, |
124 | ········{ | 124 | ········{ |
125 | ············"cell_type":·"code", | 125 | ············"cell_type":·"code", |
126 | ············"execution_count":·4, | 126 | ············"execution_count":·4, |
127 | ············"metadata":·{ | 127 | ············"metadata":·{ |
128 | ················"execution":·{ | 128 | ················"execution":·{ |
129 | ····················"iopub.execute_input":·"202 | 129 | ····················"iopub.execute_input":·"2025-02-05T01:57:33.028967Z", |
130 | ····················"iopub.status.busy":·"202 | 130 | ····················"iopub.status.busy":·"2025-02-05T01:57:33.028642Z", |
131 | ····················"iopub.status.idle":·"202 | 131 | ····················"iopub.status.idle":·"2025-02-05T01:57:33.239334Z", |
132 | ····················"shell.execute_reply":·"202 | 132 | ····················"shell.execute_reply":·"2025-02-05T01:57:33.238424Z" |
133 | ················} | 133 | ················} |
134 | ············}, | 134 | ············}, |
135 | ············"outputs":·[ | 135 | ············"outputs":·[ |
136 | ················{ | 136 | ················{ |
137 | ····················"ename":·"NameError", | 137 | ····················"ename":·"NameError", |
138 | ····················"evalue":·"name·'plt'·is·not·defined", | 138 | ····················"evalue":·"name·'plt'·is·not·defined", |
139 | ····················"output_type":·"error", | 139 | ····················"output_type":·"error", |
Offset 166, 18 lines modified | Offset 166, 18 lines modified | ||
166 | ············] | 166 | ············] |
167 | ········}, | 167 | ········}, |
168 | ········{ | 168 | ········{ |
169 | ············"cell_type":·"code", | 169 | ············"cell_type":·"code", |
170 | ············"execution_count":·5, | 170 | ············"execution_count":·5, |
171 | ············"metadata":·{ | 171 | ············"metadata":·{ |
172 | ················"execution":·{ | 172 | ················"execution":·{ |
173 | ····················"iopub.execute_input":·"202 | 173 | ····················"iopub.execute_input":·"2025-02-05T01:57:33.242790Z", |
174 | ····················"iopub.status.busy":·"202 | 174 | ····················"iopub.status.busy":·"2025-02-05T01:57:33.242458Z", |
175 | ····················"iopub.status.idle":·"202 | 175 | ····················"iopub.status.idle":·"2025-02-05T01:57:33.265899Z", |
176 | ····················"shell.execute_reply":·"202 | 176 | ····················"shell.execute_reply":·"2025-02-05T01:57:33.265024Z" |
177 | ················} | 177 | ················} |
178 | ············}, | 178 | ············}, |
179 | ············"outputs":·[ | 179 | ············"outputs":·[ |
180 | ················{ | 180 | ················{ |
181 | ····················"ename":·"NameError", | 181 | ····················"ename":·"NameError", |
182 | ····················"evalue":·"name·'ds'·is·not·defined", | 182 | ····················"evalue":·"name·'ds'·is·not·defined", |
183 | ····················"output_type":·"error", | 183 | ····················"output_type":·"error", |
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-05T01:57:36.941991Z", |
25 | ····················"iopub.status.busy":·"202 | 25 | ····················"iopub.status.busy":·"2025-02-05T01:57:36.941686Z", |
26 | ····················"iopub.status.idle":·"202 | 26 | ····················"iopub.status.idle":·"2025-02-05T01:57:39.021926Z", |
27 | ····················"shell.execute_reply":·"202 | 27 | ····················"shell.execute_reply":·"2025-02-05T01:57:39.020900Z" |
28 | ················} | 28 | ················} |
29 | ············}, | 29 | ············}, |
30 | ············"outputs":·[ | 30 | ············"outputs":·[ |
31 | ················{ | 31 | ················{ |
32 | ····················"ename":·"ModuleNotFoundError", | 32 | ····················"ename":·"ModuleNotFoundError", |
33 | ····················"evalue":·"No·module·named·'xarray'", | 33 | ····················"evalue":·"No·module·named·'xarray'", |
34 | ····················"output_type":·"error", | 34 | ····················"output_type":·"error", |
Offset 87, 18 lines modified | Offset 87, 18 lines modified | ||
87 | ············] | 87 | ············] |
88 | ········}, | 88 | ········}, |
89 | ········{ | 89 | ········{ |
90 | ············"cell_type":·"code", | 90 | ············"cell_type":·"code", |
91 | ············"execution_count":·2, | 91 | ············"execution_count":·2, |
92 | ············"metadata":·{ | 92 | ············"metadata":·{ |
93 | ················"execution":·{ | 93 | ················"execution":·{ |
94 | ····················"iopub.execute_input":·"202 | 94 | ····················"iopub.execute_input":·"2025-02-05T01:57:39.025654Z", |
95 | ····················"iopub.status.busy":·"202 | 95 | ····················"iopub.status.busy":·"2025-02-05T01:57:39.025246Z", |
96 | ····················"iopub.status.idle":·"202 | 96 | ····················"iopub.status.idle":·"2025-02-05T01:57:39.055263Z", |
97 | ····················"shell.execute_reply":·"202 | 97 | ····················"shell.execute_reply":·"2025-02-05T01:57:39.054212Z" |
98 | ················} | 98 | ················} |
99 | ············}, | 99 | ············}, |
100 | ············"outputs":·[ | 100 | ············"outputs":·[ |
101 | ················{ | 101 | ················{ |
102 | ····················"ename":·"NameError", | 102 | ····················"ename":·"NameError", |
103 | ····················"evalue":·"name·'xr'·is·not·defined", | 103 | ····················"evalue":·"name·'xr'·is·not·defined", |
104 | ····················"output_type":·"error", | 104 | ····················"output_type":·"error", |
Offset 137, 18 lines modified | Offset 137, 18 lines modified | ||
137 | ············] | 137 | ············] |
138 | ········}, | 138 | ········}, |
139 | ········{ | 139 | ········{ |
140 | ············"cell_type":·"code", | 140 | ············"cell_type":·"code", |
141 | ············"execution_count":·3, | 141 | ············"execution_count":·3, |
142 | ············"metadata":·{ | 142 | ············"metadata":·{ |
143 | ················"execution":·{ | 143 | ················"execution":·{ |
144 | ····················"iopub.execute_input":·"202 | 144 | ····················"iopub.execute_input":·"2025-02-05T01:57:39.058720Z", |
145 | ····················"iopub.status.busy":·"202 | 145 | ····················"iopub.status.busy":·"2025-02-05T01:57:39.058321Z", |
146 | ····················"iopub.status.idle":·"202 | 146 | ····················"iopub.status.idle":·"2025-02-05T01:57:39.097504Z", |
147 | ····················"shell.execute_reply":·"202 | 147 | ····················"shell.execute_reply":·"2025-02-05T01:57:39.096436Z" |
148 | ················} | 148 | ················} |
149 | ············}, | 149 | ············}, |
150 | ············"outputs":·[ | 150 | ············"outputs":·[ |
151 | ················{ | 151 | ················{ |
152 | ····················"ename":·"NameError", | 152 | ····················"ename":·"NameError", |
153 | ····················"evalue":·"name·'ds'·is·not·defined", | 153 | ····················"evalue":·"name·'ds'·is·not·defined", |
154 | ····················"output_type":·"error", | 154 | ····················"output_type":·"error", |
Offset 182, 18 lines modified | Offset 182, 18 lines modified | ||
182 | ············] | 182 | ············] |
183 | ········}, | 183 | ········}, |
184 | ········{ | 184 | ········{ |
185 | ············"cell_type":·"code", | 185 | ············"cell_type":·"code", |
186 | ············"execution_count":·4, | 186 | ············"execution_count":·4, |
187 | ············"metadata":·{ | 187 | ············"metadata":·{ |
188 | ················"execution":·{ | 188 | ················"execution":·{ |
189 | ····················"iopub.execute_input":·"202 | 189 | ····················"iopub.execute_input":·"2025-02-05T01:57:39.100804Z", |
190 | ····················"iopub.status.busy":·"202 | 190 | ····················"iopub.status.busy":·"2025-02-05T01:57:39.100430Z", |
191 | ····················"iopub.status.idle":·"202 | 191 | ····················"iopub.status.idle":·"2025-02-05T01:57:39.130305Z", |
192 | ····················"shell.execute_reply":·"202 | 192 | ····················"shell.execute_reply":·"2025-02-05T01:57:39.129312Z" |
193 | ················}, | 193 | ················}, |
194 | ················"scrolled":·false | 194 | ················"scrolled":·false |
195 | ············}, | 195 | ············}, |
196 | ············"outputs":·[ | 196 | ············"outputs":·[ |
197 | ················{ | 197 | ················{ |
198 | ····················"ename":·"NameError", | 198 | ····················"ename":·"NameError", |
199 | ····················"evalue":·"name·'ds'·is·not·defined", | 199 | ····················"evalue":·"name·'ds'·is·not·defined", |
Offset 218, 18 lines modified | Offset 218, 18 lines modified | ||
218 | ············] | 218 | ············] |
219 | ········}, | 219 | ········}, |
220 | ········{ | 220 | ········{ |
221 | ············"cell_type":·"code", | 221 | ············"cell_type":·"code", |
222 | ············"execution_count":·5, | 222 | ············"execution_count":·5, |
223 | ············"metadata":·{ | 223 | ············"metadata":·{ |
224 | ················"execution":·{ | 224 | ················"execution":·{ |
225 | ····················"iopub.execute_input":·"202 | 225 | ····················"iopub.execute_input":·"2025-02-05T01:57:39.133871Z", |
226 | ····················"iopub.status.busy":·"202 | 226 | ····················"iopub.status.busy":·"2025-02-05T01:57:39.133485Z", |
227 | ····················"iopub.status.idle":·"202 | 227 | ····················"iopub.status.idle":·"2025-02-05T01:57:39.166610Z", |
228 | ····················"shell.execute_reply":·"202 | 228 | ····················"shell.execute_reply":·"2025-02-05T01:57:39.165359Z" |
229 | ················} | 229 | ················} |
230 | ············}, | 230 | ············}, |
231 | ············"outputs":·[ | 231 | ············"outputs":·[ |
232 | ················{ | 232 | ················{ |
233 | ····················"ename":·"NameError", | 233 | ····················"ename":·"NameError", |
234 | ····················"evalue":·"name·'ds'·is·not·defined", | 234 | ····················"evalue":·"name·'ds'·is·not·defined", |
235 | ····················"output_type":·"error", | 235 | ····················"output_type":·"error", |
Offset 257, 18 lines modified | Offset 257, 18 lines modified | ||
257 | ············] | 257 | ············] |
258 | ········}, | 258 | ········}, |
259 | ········{ | 259 | ········{ |
260 | ············"cell_type":·"code", | 260 | ············"cell_type":·"code", |
261 | ············"execution_count":·6, | 261 | ············"execution_count":·6, |
262 | ············"metadata":·{ | 262 | ············"metadata":·{ |
263 | ················"execution":·{ | 263 | ················"execution":·{ |
264 | ····················"iopub.execute_input":·"202 | 264 | ····················"iopub.execute_input":·"2025-02-05T01:57:39.170671Z", |
265 | ····················"iopub.status.busy":·"202 | 265 | ····················"iopub.status.busy":·"2025-02-05T01:57:39.170296Z", |
266 | ····················"iopub.status.idle":·"202 | 266 | ····················"iopub.status.idle":·"2025-02-05T01:57:39.199299Z", |
267 | ····················"shell.execute_reply":·"202 | 267 | ····················"shell.execute_reply":·"2025-02-05T01:57:39.198313Z" |
268 | ················} | 268 | ················} |
269 | ············}, | 269 | ············}, |
270 | ············"outputs":·[ | 270 | ············"outputs":·[ |
271 | ················{ | 271 | ················{ |
272 | ····················"ename":·"NameError", | 272 | ····················"ename":·"NameError", |
273 | ····················"evalue":·"name·'ds'·is·not·defined", | 273 | ····················"evalue":·"name·'ds'·is·not·defined", |
274 | ····················"output_type":·"error", | 274 | ····················"output_type":·"error", |
Offset 292, 18 lines modified | Offset 292, 18 lines modified | ||
292 | ············] | 292 | ············] |
293 | ········}, | 293 | ········}, |
294 | ········{ | 294 | ········{ |
295 | ············"cell_type":·"code", | 295 | ············"cell_type":·"code", |
296 | ············"execution_count":·7, | 296 | ············"execution_count":·7, |
297 | ············"metadata":·{ | 297 | ············"metadata":·{ |
298 | ················"execution":·{ | 298 | ················"execution":·{ |
299 | ····················"iopub.execute_input":·"202 | 299 | ····················"iopub.execute_input":·"2025-02-05T01:57:39.203148Z", |
300 | ····················"iopub.status.busy":·"202 | 300 | ····················"iopub.status.busy":·"2025-02-05T01:57:39.202341Z", |
301 | ····················"iopub.status.idle":·"202 | 301 | ····················"iopub.status.idle":·"2025-02-05T01:57:39.501660Z", |
302 | ····················"shell.execute_reply":·"202 | 302 | ····················"shell.execute_reply":·"2025-02-05T01:57:39.499538Z" |
303 | ················} | 303 | ················} |
304 | ············}, | 304 | ············}, |
Max diff block lines reached; 166/7032 bytes (2.36%) of diff not shown. |
Offset 36, 18 lines modified | Offset 36, 18 lines modified | ||
36 | ············"execution_count":·1, | 36 | ············"execution_count":·1, |
37 | ············"metadata":·{ | 37 | ············"metadata":·{ |
38 | ················"ExecuteTime":·{ | 38 | ················"ExecuteTime":·{ |
39 | ····················"end_time":·"2020-01-15T14:45:51.659160Z", | 39 | ····················"end_time":·"2020-01-15T14:45:51.659160Z", |
40 | ····················"start_time":·"2020-01-15T14:45:50.528742Z" | 40 | ····················"start_time":·"2020-01-15T14:45:50.528742Z" |
41 | ················}, | 41 | ················}, |
42 | ················"execution":·{ | 42 | ················"execution":·{ |
43 | ····················"iopub.execute_input":·"202 | 43 | ····················"iopub.execute_input":·"2025-02-05T01:57:42.465599Z", |
44 | ····················"iopub.status.busy":·"2026-03-10T08:14:25.133376Z", | ||
45 | ····················"iopub.status. | 44 | ····················"iopub.status.busy":·"2025-02-05T01:57:42.465283Z", |
45 | ····················"iopub.status.idle":·"2025-02-05T01:57:42.743389Z", | ||
46 | ····················"shell.execute_reply":·"202 | 46 | ····················"shell.execute_reply":·"2025-02-05T01:57:42.742500Z" |
47 | ················} | 47 | ················} |
48 | ············}, | 48 | ············}, |
49 | ············"outputs":·[ | 49 | ············"outputs":·[ |
50 | ················{ | 50 | ················{ |
51 | ····················"ename":·"ModuleNotFoundError", | 51 | ····················"ename":·"ModuleNotFoundError", |
52 | ····················"evalue":·"No·module·named·'xarray'", | 52 | ····················"evalue":·"No·module·named·'xarray'", |
53 | ····················"output_type":·"error", | 53 | ····················"output_type":·"error", |
Offset 85, 18 lines modified | Offset 85, 18 lines modified | ||
85 | ············"execution_count":·2, | 85 | ············"execution_count":·2, |
86 | ············"metadata":·{ | 86 | ············"metadata":·{ |
87 | ················"ExecuteTime":·{ | 87 | ················"ExecuteTime":·{ |
88 | ····················"end_time":·"2020-01-15T14:45:55.431708Z", | 88 | ····················"end_time":·"2020-01-15T14:45:55.431708Z", |
89 | ····················"start_time":·"2020-01-15T14:45:55.104701Z" | 89 | ····················"start_time":·"2020-01-15T14:45:55.104701Z" |
90 | ················}, | 90 | ················}, |
91 | ················"execution":·{ | 91 | ················"execution":·{ |
92 | ····················"iopub.execute_input":·"202 | 92 | ····················"iopub.execute_input":·"2025-02-05T01:57:42.747543Z", |
93 | ····················"iopub.status.busy":·"202 | 93 | ····················"iopub.status.busy":·"2025-02-05T01:57:42.746846Z", |
94 | ····················"iopub.status.idle":·"202 | 94 | ····················"iopub.status.idle":·"2025-02-05T01:57:42.768434Z", |
95 | ····················"shell.execute_reply":·"202 | 95 | ····················"shell.execute_reply":·"2025-02-05T01:57:42.767555Z" |
96 | ················} | 96 | ················} |
97 | ············}, | 97 | ············}, |
98 | ············"outputs":·[ | 98 | ············"outputs":·[ |
99 | ················{ | 99 | ················{ |
100 | ····················"ename":·"NameError", | 100 | ····················"ename":·"NameError", |
101 | ····················"evalue":·"name·'np'·is·not·defined", | 101 | ····················"evalue":·"name·'np'·is·not·defined", |
102 | ····················"output_type":·"error", | 102 | ····················"output_type":·"error", |
Offset 125, 18 lines modified | Offset 125, 18 lines modified | ||
125 | ············"execution_count":·3, | 125 | ············"execution_count":·3, |
126 | ············"metadata":·{ | 126 | ············"metadata":·{ |
127 | ················"ExecuteTime":·{ | 127 | ················"ExecuteTime":·{ |
128 | ····················"end_time":·"2020-01-15T14:45:57.889496Z", | 128 | ····················"end_time":·"2020-01-15T14:45:57.889496Z", |
129 | ····················"start_time":·"2020-01-15T14:45:57.792269Z" | 129 | ····················"start_time":·"2020-01-15T14:45:57.792269Z" |
130 | ················}, | 130 | ················}, |
131 | ················"execution":·{ | 131 | ················"execution":·{ |
132 | ····················"iopub.execute_input":·"202 | 132 | ····················"iopub.execute_input":·"2025-02-05T01:57:42.771808Z", |
133 | ····················"iopub.status.busy":·"202 | 133 | ····················"iopub.status.busy":·"2025-02-05T01:57:42.771513Z", |
134 | ····················"iopub.status.idle":·"202 | 134 | ····················"iopub.status.idle":·"2025-02-05T01:57:42.800348Z", |
135 | ····················"shell.execute_reply":·"202 | 135 | ····················"shell.execute_reply":·"2025-02-05T01:57:42.798393Z" |
136 | ················} | 136 | ················} |
137 | ············}, | 137 | ············}, |
138 | ············"outputs":·[ | 138 | ············"outputs":·[ |
139 | ················{ | 139 | ················{ |
140 | ····················"ename":·"NameError", | 140 | ····················"ename":·"NameError", |
141 | ····················"evalue":·"name·'air'·is·not·defined", | 141 | ····················"evalue":·"name·'air'·is·not·defined", |
142 | ····················"output_type":·"error", | 142 | ····················"output_type":·"error", |
Offset 184, 18 lines modified | Offset 184, 18 lines modified | ||
184 | ············"execution_count":·4, | 184 | ············"execution_count":·4, |
185 | ············"metadata":·{ | 185 | ············"metadata":·{ |
186 | ················"ExecuteTime":·{ | 186 | ················"ExecuteTime":·{ |
187 | ····················"end_time":·"2020-01-15T14:45:59.768626Z", | 187 | ····················"end_time":·"2020-01-15T14:45:59.768626Z", |
188 | ····················"start_time":·"2020-01-15T14:45:59.543808Z" | 188 | ····················"start_time":·"2020-01-15T14:45:59.543808Z" |
189 | ················}, | 189 | ················}, |
190 | ················"execution":·{ | 190 | ················"execution":·{ |
191 | ····················"iopub.execute_input":·"202 | 191 | ····················"iopub.execute_input":·"2025-02-05T01:57:42.804488Z", |
192 | ····················"iopub.status.busy":·"202 | 192 | ····················"iopub.status.busy":·"2025-02-05T01:57:42.803841Z", |
193 | ····················"iopub.status.idle":·"202 | 193 | ····················"iopub.status.idle":·"2025-02-05T01:57:42.826035Z", |
194 | ····················"shell.execute_reply":·"202 | 194 | ····················"shell.execute_reply":·"2025-02-05T01:57:42.825142Z" |
195 | ················} | 195 | ················} |
196 | ············}, | 196 | ············}, |
197 | ············"outputs":·[ | 197 | ············"outputs":·[ |
198 | ················{ | 198 | ················{ |
199 | ····················"ename":·"NameError", | 199 | ····················"ename":·"NameError", |
200 | ····················"evalue":·"name·'xr'·is·not·defined", | 200 | ····················"evalue":·"name·'xr'·is·not·defined", |
201 | ····················"output_type":·"error", | 201 | ····················"output_type":·"error", |
Offset 250, 18 lines modified | Offset 250, 18 lines modified | ||
250 | ············"execution_count":·5, | 250 | ············"execution_count":·5, |
251 | ············"metadata":·{ | 251 | ············"metadata":·{ |
252 | ················"ExecuteTime":·{ | 252 | ················"ExecuteTime":·{ |
253 | ····················"end_time":·"2020-01-15T14:46:02.187012Z", | 253 | ····················"end_time":·"2020-01-15T14:46:02.187012Z", |
254 | ····················"start_time":·"2020-01-15T14:46:02.105563Z" | 254 | ····················"start_time":·"2020-01-15T14:46:02.105563Z" |
255 | ················}, | 255 | ················}, |
256 | ················"execution":·{ | 256 | ················"execution":·{ |
257 | ····················"iopub.execute_input":·"202 | 257 | ····················"iopub.execute_input":·"2025-02-05T01:57:42.829764Z", |
258 | ····················"iopub.status.busy":·"202 | 258 | ····················"iopub.status.busy":·"2025-02-05T01:57:42.829442Z", |
259 | ····················"iopub.status.idle":·"202 | 259 | ····················"iopub.status.idle":·"2025-02-05T01:57:42.854809Z", |
260 | ····················"shell.execute_reply":·"202 | 260 | ····················"shell.execute_reply":·"2025-02-05T01:57:42.853822Z" |
261 | ················} | 261 | ················} |
262 | ············}, | 262 | ············}, |
263 | ············"outputs":·[ | 263 | ············"outputs":·[ |
264 | ················{ | 264 | ················{ |
265 | ····················"ename":·"NameError", | 265 | ····················"ename":·"NameError", |
266 | ····················"evalue":·"name·'xr'·is·not·defined", | 266 | ····················"evalue":·"name·'xr'·is·not·defined", |
267 | ····················"output_type":·"error", | 267 | ····················"output_type":·"error", |
Offset 328, 18 lines modified | Offset 328, 18 lines modified | ||
328 | ············"execution_count":·6, | 328 | ············"execution_count":·6, |
329 | ············"metadata":·{ | 329 | ············"metadata":·{ |
330 | ················"ExecuteTime":·{ | 330 | ················"ExecuteTime":·{ |
331 | ····················"end_time":·"2020-01-15T14:46:05.031672Z", | 331 | ····················"end_time":·"2020-01-15T14:46:05.031672Z", |
332 | ····················"start_time":·"2020-01-15T14:46:04.947588Z" | 332 | ····················"start_time":·"2020-01-15T14:46:04.947588Z" |
333 | ················}, | 333 | ················}, |
334 | ················"execution":·{ | 334 | ················"execution":·{ |
335 | ····················"iopub.execute_input":·"202 | 335 | ····················"iopub.execute_input":·"2025-02-05T01:57:42.858167Z", |
336 | ····················"iopub.status.busy":·"202 | 336 | ····················"iopub.status.busy":·"2025-02-05T01:57:42.857848Z", |
337 | ····················"iopub.status.idle":·"202 | 337 | ····················"iopub.status.idle":·"2025-02-05T01:57:42.881501Z", |
338 | ····················"shell.execute_reply":·"202 | 338 | ····················"shell.execute_reply":·"2025-02-05T01:57:42.880443Z" |
339 | ················} | 339 | ················} |
340 | ············}, | 340 | ············}, |
341 | ············"outputs":·[ | 341 | ············"outputs":·[ |
342 | ················{ | 342 | ················{ |
343 | ····················"ename":·"NameError", | 343 | ····················"ename":·"NameError", |
344 | ····················"evalue":·"name·'xr'·is·not·defined", | 344 | ····················"evalue":·"name·'xr'·is·not·defined", |
345 | ····················"output_type":·"error", | 345 | ····················"output_type":·"error", |
Offset 374, 18 lines modified | Offset 374, 18 lines modified | ||
374 | ············"execution_count":·7, | 374 | ············"execution_count":·7, |
375 | ············"metadata":·{ | 375 | ············"metadata":·{ |
376 | ················"ExecuteTime":·{ | 376 | ················"ExecuteTime":·{ |
377 | ····················"end_time":·"2020-01-15T14:46:09.325218Z", | 377 | ····················"end_time":·"2020-01-15T14:46:09.325218Z", |
378 | ····················"start_time":·"2020-01-15T14:46:09.303020Z" | 378 | ····················"start_time":·"2020-01-15T14:46:09.303020Z" |
379 | ················}, | 379 | ················}, |
380 | ················"execution":·{ | 380 | ················"execution":·{ |
381 | ····················"iopub.execute_input":·"202 | 381 | ····················"iopub.execute_input":·"2025-02-05T01:57:42.884593Z", |
382 | ····················"iopub.status.busy":·"202 | 382 | ····················"iopub.status.busy":·"2025-02-05T01:57:42.884285Z", |
383 | ····················"iopub.status.idle":·"202 | 383 | ····················"iopub.status.idle":·"2025-02-05T01:57:42.908179Z", |
384 | ····················"shell.execute_reply":·"202 | 384 | ····················"shell.execute_reply":·"2025-02-05T01:57:42.907479Z" |
385 | ················} | 385 | ················} |
Max diff block lines reached; 9144/16771 bytes (54.52%) of diff not shown. |
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-05T01:57:47.138523Z", |
36 | ····················"iopub.status.busy":·"202 | 36 | ····················"iopub.status.busy":·"2025-02-05T01:57:47.138182Z", |
37 | ····················"iopub.status.idle":·"202 | 37 | ····················"iopub.status.idle":·"2025-02-05T01:57:48.167507Z", |
38 | ····················"shell.execute_reply":·"202 | 38 | ····················"shell.execute_reply":·"2025-02-05T01:57:48.166512Z" |
39 | ················} | 39 | ················} |
40 | ············}, | 40 | ············}, |
41 | ············"outputs":·[ | 41 | ············"outputs":·[ |
42 | ················{ | 42 | ················{ |
43 | ····················"ename":·"ModuleNotFoundError", | 43 | ····················"ename":·"ModuleNotFoundError", |
44 | ····················"evalue":·"No·module·named·'xarray'", | 44 | ····················"evalue":·"No·module·named·'xarray'", |
45 | ····················"output_type":·"error", | 45 | ····················"output_type":·"error", |
Offset 75, 18 lines modified | Offset 75, 18 lines modified | ||
75 | ············"execution_count":·2, | 75 | ············"execution_count":·2, |
76 | ············"metadata":·{ | 76 | ············"metadata":·{ |
77 | ················"ExecuteTime":·{ | 77 | ················"ExecuteTime":·{ |
78 | ····················"end_time":·"2020-03-17T14:43:57.831734Z", | 78 | ····················"end_time":·"2020-03-17T14:43:57.831734Z", |
79 | ····················"start_time":·"2020-03-17T14:43:57.651845Z" | 79 | ····················"start_time":·"2020-03-17T14:43:57.651845Z" |
80 | ················}, | 80 | ················}, |
81 | ················"execution":·{ | 81 | ················"execution":·{ |
82 | ····················"iopub.execute_input":·"202 | 82 | ····················"iopub.execute_input":·"2025-02-05T01:57:48.174206Z", |
83 | ····················"iopub.status.busy":·"202 | 83 | ····················"iopub.status.busy":·"2025-02-05T01:57:48.173833Z", |
84 | ····················"iopub.status.idle":·"202 | 84 | ····················"iopub.status.idle":·"2025-02-05T01:57:48.200412Z", |
85 | ····················"shell.execute_reply":·"202 | 85 | ····················"shell.execute_reply":·"2025-02-05T01:57:48.199445Z" |
86 | ················} | 86 | ················} |
87 | ············}, | 87 | ············}, |
88 | ············"outputs":·[ | 88 | ············"outputs":·[ |
89 | ················{ | 89 | ················{ |
90 | ····················"ename":·"NameError", | 90 | ····················"ename":·"NameError", |
91 | ····················"evalue":·"name·'xr'·is·not·defined", | 91 | ····················"evalue":·"name·'xr'·is·not·defined", |
92 | ····················"output_type":·"error", | 92 | ····················"output_type":·"error", |
Offset 122, 18 lines 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-05T01:57:48.203697Z", |
130 | ····················"iopub.status.busy":·"202 | 130 | ····················"iopub.status.busy":·"2025-02-05T01:57:48.203352Z", |
131 | ····················"iopub.status.idle":·"202 | 131 | ····················"iopub.status.idle":·"2025-02-05T01:57:48.350558Z", |
132 | ····················"shell.execute_reply":·"202 | 132 | ····················"shell.execute_reply":·"2025-02-05T01:57:48.349589Z" |
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-05T01:57:48.357719Z", |
186 | ····················"iopub.status.busy":·"202 | 186 | ····················"iopub.status.busy":·"2025-02-05T01:57:48.357312Z", |
187 | ····················"iopub.status.idle":·"202 | 187 | ····················"iopub.status.idle":·"2025-02-05T01:57:48.383291Z", |
188 | ····················"shell.execute_reply":·"202 | 188 | ····················"shell.execute_reply":·"2025-02-05T01:57:48.382271Z" |
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-05T01:57:48.394313Z", |
227 | ····················"iopub.status.busy":·"202 | 227 | ····················"iopub.status.busy":·"2025-02-05T01:57:48.393924Z", |
228 | ····················"iopub.status.idle":·"202 | 228 | ····················"iopub.status.idle":·"2025-02-05T01:57:48.428299Z", |
229 | ····················"shell.execute_reply":·"202 | 229 | ····················"shell.execute_reply":·"2025-02-05T01:57:48.427332Z" |
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-05T01:57:48.431581Z", |
260 | ····················"iopub.status.busy":·"202 | 260 | ····················"iopub.status.busy":·"2025-02-05T01:57:48.431197Z", |
261 | ····················"iopub.status.idle":·"202 | 261 | ····················"iopub.status.idle":·"2025-02-05T01:57:48.460039Z", |
262 | ····················"shell.execute_reply":·"202 | 262 | ····················"shell.execute_reply":·"2025-02-05T01:57:48.459052Z" |
263 | ················} | 263 | ················} |
264 | ············}, | 264 | ············}, |
265 | ············"outputs":·[ | 265 | ············"outputs":·[ |
266 | ················{ | 266 | ················{ |
267 | ····················"ename":·"NameError", | 267 | ····················"ename":·"NameError", |
268 | ····················"evalue":·"name·'air_weighted'·is·not·defined", | 268 | ····················"evalue":·"name·'air_weighted'·is·not·defined", |
269 | ····················"output_type":·"error", | 269 | ····················"output_type":·"error", |
Offset 294, 18 lines modified | Offset 294, 18 lines modified | ||
294 | ············"execution_count":·7, | 294 | ············"execution_count":·7, |
295 | ············"metadata":·{ | 295 | ············"metadata":·{ |
296 | ················"ExecuteTime":·{ | 296 | ················"ExecuteTime":·{ |
297 | ····················"end_time":·"2020-03-17T14:45:08.877307Z", | 297 | ····················"end_time":·"2020-03-17T14:45:08.877307Z", |
298 | ····················"start_time":·"2020-03-17T14:45:08.673383Z" | 298 | ····················"start_time":·"2020-03-17T14:45:08.673383Z" |
299 | ················}, | 299 | ················}, |
300 | ················"execution":·{ | 300 | ················"execution":·{ |
301 | ····················"iopub.execute_input":·"202 | 301 | ····················"iopub.execute_input":·"2025-02-05T01:57:48.463912Z", |
302 | ····················"iopub.status.busy":·"202 | 302 | ····················"iopub.status.busy":·"2025-02-05T01:57:48.463513Z", |
303 | ····················"iopub.status.idle":·"202 | 303 | ····················"iopub.status.idle":·"2025-02-05T01:57:48.491067Z", |
304 | ····················"shell.execute_reply":·"202 | 304 | ····················"shell.execute_reply":·"2025-02-05T01:57:48.490125Z" |
305 | ················} | 305 | ················} |
306 | ············}, | 306 | ············}, |
Max diff block lines reached; 177/7842 bytes (2.26%) of diff not shown. |
Offset 12, 18 lines modified | Offset 12, 18 lines modified | ||
12 | ········}, | 12 | ········}, |
13 | ········{ | 13 | ········{ |
14 | ············"cell_type":·"code", | 14 | ············"cell_type":·"code", |
15 | ············"execution_count":·1, | 15 | ············"execution_count":·1, |
16 | ············"id":·"41b90ede", | 16 | ············"id":·"41b90ede", |
17 | ············"metadata":·{ | 17 | ············"metadata":·{ |
18 | ················"execution":·{ | 18 | ················"execution":·{ |
19 | ····················"iopub.execute_input":·"202 | 19 | ····················"iopub.execute_input":·"2025-02-05T01:57:51.111496Z", |
20 | ····················"iopub.status.busy":·"202 | 20 | ····················"iopub.status.busy":·"2025-02-05T01:57:51.111119Z", |
21 | ····················"iopub.status.idle":·"202 | 21 | ····················"iopub.status.idle":·"2025-02-05T01:57:51.425528Z", |
22 | ····················"shell.execute_reply":·"202 | 22 | ····················"shell.execute_reply":·"2025-02-05T01:57:51.424448Z" |
23 | ················} | 23 | ················} |
24 | ············}, | 24 | ············}, |
25 | ············"outputs":·[ | 25 | ············"outputs":·[ |
26 | ················{ | 26 | ················{ |
27 | ····················"ename":·"ModuleNotFoundError", | 27 | ····················"ename":·"ModuleNotFoundError", |
28 | ····················"evalue":·"No·module·named·'xarray'", | 28 | ····················"evalue":·"No·module·named·'xarray'", |
29 | ····················"output_type":·"error", | 29 | ····················"output_type":·"error", |
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-05T01:57:53.541080Z", |
27 | ····················"iopub.status.busy":·"202 | 27 | ····················"iopub.status.busy":·"2025-02-05T01:57:53.540745Z", |
28 | ····················"iopub.status.idle":·"202 | 28 | ····················"iopub.status.idle":·"2025-02-05T01:57:54.923458Z", |
29 | ····················"shell.execute_reply":·"202 | 29 | ····················"shell.execute_reply":·"2025-02-05T01:57:54.922525Z" |
30 | ················} | 30 | ················} |
31 | ············}, | 31 | ············}, |
32 | ············"outputs":·[ | 32 | ············"outputs":·[ |
33 | ················{ | 33 | ················{ |
34 | ····················"ename":·"ModuleNotFoundError", | 34 | ····················"ename":·"ModuleNotFoundError", |
35 | ····················"evalue":·"No·module·named·'xarray'", | 35 | ····················"evalue":·"No·module·named·'xarray'", |
36 | ····················"output_type":·"error", | 36 | ····················"output_type":·"error", |
Offset 62, 18 lines modified | Offset 62, 18 lines modified | ||
62 | ············"execution_count":·2, | 62 | ············"execution_count":·2, |
63 | ············"metadata":·{ | 63 | ············"metadata":·{ |
64 | ················"ExecuteTime":·{ | 64 | ················"ExecuteTime":·{ |
65 | ····················"end_time":·"2018-11-28T20:51:36.072316Z", | 65 | ····················"end_time":·"2018-11-28T20:51:36.072316Z", |
66 | ····················"start_time":·"2018-11-28T20:51:36.016594Z" | 66 | ····················"start_time":·"2018-11-28T20:51:36.016594Z" |
67 | ················}, | 67 | ················}, |
68 | ················"execution":·{ | 68 | ················"execution":·{ |
69 | ····················"iopub.execute_input":·"202 | 69 | ····················"iopub.execute_input":·"2025-02-05T01:57:54.926396Z", |
70 | ····················"iopub.status.busy":·"202 | 70 | ····················"iopub.status.busy":·"2025-02-05T01:57:54.926089Z", |
71 | ····················"iopub.status.idle":·"202 | 71 | ····················"iopub.status.idle":·"2025-02-05T01:57:54.950262Z", |
72 | ····················"shell.execute_reply":·"202 | 72 | ····················"shell.execute_reply":·"2025-02-05T01:57:54.949382Z" |
73 | ················} | 73 | ················} |
74 | ············}, | 74 | ············}, |
75 | ············"outputs":·[ | 75 | ············"outputs":·[ |
76 | ················{ | 76 | ················{ |
77 | ····················"ename":·"NameError", | 77 | ····················"ename":·"NameError", |
78 | ····················"evalue":·"name·'xr'·is·not·defined", | 78 | ····················"evalue":·"name·'xr'·is·not·defined", |
79 | ····················"output_type":·"error", | 79 | ····················"output_type":·"error", |
Offset 103, 18 lines modified | Offset 103, 18 lines modified | ||
103 | ············] | 103 | ············] |
104 | ········}, | 104 | ········}, |
105 | ········{ | 105 | ········{ |
106 | ············"cell_type":·"code", | 106 | ············"cell_type":·"code", |
107 | ············"execution_count":·3, | 107 | ············"execution_count":·3, |
108 | ············"metadata":·{ | 108 | ············"metadata":·{ |
109 | ················"execution":·{ | 109 | ················"execution":·{ |
110 | ····················"iopub.execute_input":·"202 | 110 | ····················"iopub.execute_input":·"2025-02-05T01:57:54.953271Z", |
111 | ····················"iopub.status.busy":·"202 | 111 | ····················"iopub.status.busy":·"2025-02-05T01:57:54.952875Z", |
112 | ····················"iopub.status.idle":·"202 | 112 | ····················"iopub.status.idle":·"2025-02-05T01:57:54.974417Z", |
113 | ····················"shell.execute_reply":·"202 | 113 | ····················"shell.execute_reply":·"2025-02-05T01:57:54.973621Z" |
114 | ················} | 114 | ················} |
115 | ············}, | 115 | ············}, |
116 | ············"outputs":·[ | 116 | ············"outputs":·[ |
117 | ················{ | 117 | ················{ |
118 | ····················"ename":·"NameError", | 118 | ····················"ename":·"NameError", |
119 | ····················"evalue":·"name·'ds'·is·not·defined", | 119 | ····················"evalue":·"name·'ds'·is·not·defined", |
120 | ····················"output_type":·"error", | 120 | ····················"output_type":·"error", |
Offset 136, 18 lines modified | Offset 136, 18 lines modified | ||
136 | ············"execution_count":·4, | 136 | ············"execution_count":·4, |
137 | ············"metadata":·{ | 137 | ············"metadata":·{ |
138 | ················"ExecuteTime":·{ | 138 | ················"ExecuteTime":·{ |
139 | ····················"end_time":·"2018-11-28T20:51:36.132413Z", | 139 | ····················"end_time":·"2018-11-28T20:51:36.132413Z", |
140 | ····················"start_time":·"2018-11-28T20:51:36.073708Z" | 140 | ····················"start_time":·"2018-11-28T20:51:36.073708Z" |
141 | ················}, | 141 | ················}, |
142 | ················"execution":·{ | 142 | ················"execution":·{ |
143 | ····················"iopub.execute_input":·"202 | 143 | ····················"iopub.execute_input":·"2025-02-05T01:57:54.977199Z", |
144 | ····················"iopub.status.busy":·"202 | 144 | ····················"iopub.status.busy":·"2025-02-05T01:57:54.976865Z", |
145 | ····················"iopub.status.idle":·"202 | 145 | ····················"iopub.status.idle":·"2025-02-05T01:57:55.001112Z", |
146 | ····················"shell.execute_reply":·"202 | 146 | ····················"shell.execute_reply":·"2025-02-05T01:57:55.000184Z" |
147 | ················} | 147 | ················} |
148 | ············}, | 148 | ············}, |
149 | ············"outputs":·[ | 149 | ············"outputs":·[ |
150 | ················{ | 150 | ················{ |
151 | ····················"ename":·"NameError", | 151 | ····················"ename":·"NameError", |
152 | ····················"evalue":·"name·'month_length'·is·not·defined", | 152 | ····················"evalue":·"name·'month_length'·is·not·defined", |
153 | ····················"output_type":·"error", | 153 | ····················"output_type":·"error", |
Offset 177, 18 lines modified | Offset 177, 18 lines modified | ||
177 | ············"execution_count":·5, | 177 | ············"execution_count":·5, |
178 | ············"metadata":·{ | 178 | ············"metadata":·{ |
179 | ················"ExecuteTime":·{ | 179 | ················"ExecuteTime":·{ |
180 | ····················"end_time":·"2018-11-28T20:51:36.152913Z", | 180 | ····················"end_time":·"2018-11-28T20:51:36.152913Z", |
181 | ····················"start_time":·"2018-11-28T20:51:36.133997Z" | 181 | ····················"start_time":·"2018-11-28T20:51:36.133997Z" |
182 | ················}, | 182 | ················}, |
183 | ················"execution":·{ | 183 | ················"execution":·{ |
184 | ····················"iopub.execute_input":·"202 | 184 | ····················"iopub.execute_input":·"2025-02-05T01:57:55.004091Z", |
185 | ····················"iopub.status.busy":·"202 | 185 | ····················"iopub.status.busy":·"2025-02-05T01:57:55.003791Z", |
186 | ····················"iopub.status.idle":·"202 | 186 | ····················"iopub.status.idle":·"2025-02-05T01:57:55.024631Z", |
187 | ····················"shell.execute_reply":·"202 | 187 | ····················"shell.execute_reply":·"2025-02-05T01:57:55.023820Z" |
188 | ················} | 188 | ················} |
189 | ············}, | 189 | ············}, |
190 | ············"outputs":·[ | 190 | ············"outputs":·[ |
191 | ················{ | 191 | ················{ |
192 | ····················"ename":·"NameError", | 192 | ····················"ename":·"NameError", |
193 | ····················"evalue":·"name·'ds_weighted'·is·not·defined", | 193 | ····················"evalue":·"name·'ds_weighted'·is·not·defined", |
194 | ····················"output_type":·"error", | 194 | ····················"output_type":·"error", |
Offset 209, 18 lines modified | Offset 209, 18 lines modified | ||
209 | ············"execution_count":·6, | 209 | ············"execution_count":·6, |
210 | ············"metadata":·{ | 210 | ············"metadata":·{ |
211 | ················"ExecuteTime":·{ | 211 | ················"ExecuteTime":·{ |
212 | ····················"end_time":·"2018-11-28T20:51:36.190765Z", | 212 | ····················"end_time":·"2018-11-28T20:51:36.190765Z", |
213 | ····················"start_time":·"2018-11-28T20:51:36.154416Z" | 213 | ····················"start_time":·"2018-11-28T20:51:36.154416Z" |
214 | ················}, | 214 | ················}, |
215 | ················"execution":·{ | 215 | ················"execution":·{ |
216 | ····················"iopub.execute_input":·"202 | 216 | ····················"iopub.execute_input":·"2025-02-05T01:57:55.027615Z", |
217 | ····················"iopub.status.busy":·"202 | 217 | ····················"iopub.status.busy":·"2025-02-05T01:57:55.027324Z", |
218 | ····················"iopub.status.idle":·"202 | 218 | ····················"iopub.status.idle":·"2025-02-05T01:57:55.048647Z", |
219 | ····················"shell.execute_reply":·"202 | 219 | ····················"shell.execute_reply":·"2025-02-05T01:57:55.047810Z" |
220 | ················} | 220 | ················} |
221 | ············}, | 221 | ············}, |
222 | ············"outputs":·[ | 222 | ············"outputs":·[ |
223 | ················{ | 223 | ················{ |
224 | ····················"ename":·"NameError", | 224 | ····················"ename":·"NameError", |
225 | ····················"evalue":·"name·'ds'·is·not·defined", | 225 | ····················"evalue":·"name·'ds'·is·not·defined", |
226 | ····················"output_type":·"error", | 226 | ····················"output_type":·"error", |
Offset 243, 18 lines modified | Offset 243, 18 lines modified | ||
243 | ············"execution_count":·7, | 243 | ············"execution_count":·7, |
244 | ············"metadata":·{ | 244 | ············"metadata":·{ |
245 | ················"ExecuteTime":·{ | 245 | ················"ExecuteTime":·{ |
246 | ····················"end_time":·"2018-11-28T20:51:40.264871Z", | 246 | ····················"end_time":·"2018-11-28T20:51:40.264871Z", |
247 | ····················"start_time":·"2018-11-28T20:51:36.192467Z" | 247 | ····················"start_time":·"2018-11-28T20:51:36.192467Z" |
248 | ················}, | 248 | ················}, |
249 | ················"execution":·{ | 249 | ················"execution":·{ |
250 | ····················"iopub.execute_input":·"202 | 250 | ····················"iopub.execute_input":·"2025-02-05T01:57:55.051762Z", |
251 | ····················"iopub.status.busy":·"202 | 251 | ····················"iopub.status.busy":·"2025-02-05T01:57:55.051169Z", |
252 | ····················"iopub.status.idle":·"202 | 252 | ····················"iopub.status.idle":·"2025-02-05T01:57:55.093115Z", |
253 | ····················"shell.execute_reply":·"202 | 253 | ····················"shell.execute_reply":·"2025-02-05T01:57:55.092164Z" |
254 | ················} | 254 | ················} |
255 | ············}, | 255 | ············}, |
Max diff block lines reached; 1376/8936 bytes (15.40%) of diff not shown. |
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-05T01:57:57.478325Z", |
24 | ····················"iopub.status.busy":·"202 | 24 | ····················"iopub.status.busy":·"2025-02-05T01:57:57.477964Z", |
25 | ····················"iopub.status.idle":·"202 | 25 | ····················"iopub.status.idle":·"2025-02-05T01:57:58.705238Z", |
26 | ····················"shell.execute_reply":·"202 | 26 | ····················"shell.execute_reply":·"2025-02-05T01:57:58.704221Z" |
27 | ················} | 27 | ················} |
28 | ············}, | 28 | ············}, |
29 | ············"outputs":·[ | 29 | ············"outputs":·[ |
30 | ················{ | 30 | ················{ |
31 | ····················"ename":·"ModuleNotFoundError", | 31 | ····················"ename":·"ModuleNotFoundError", |
32 | ····················"evalue":·"No·module·named·'xarray'", | 32 | ····················"evalue":·"No·module·named·'xarray'", |
33 | ····················"output_type":·"error", | 33 | ····················"output_type":·"error", |
Offset 60, 18 lines modified | Offset 60, 18 lines modified | ||
60 | ············"execution_count":·2, | 60 | ············"execution_count":·2, |
61 | ············"metadata":·{ | 61 | ············"metadata":·{ |
62 | ················"ExecuteTime":·{ | 62 | ················"ExecuteTime":·{ |
63 | ····················"end_time":·"2018-11-28T20:50:13.629720Z", | 63 | ····················"end_time":·"2018-11-28T20:50:13.629720Z", |
64 | ····················"start_time":·"2018-11-28T20:50:13.484542Z" | 64 | ····················"start_time":·"2018-11-28T20:50:13.484542Z" |
65 | ················}, | 65 | ················}, |
66 | ················"execution":·{ | 66 | ················"execution":·{ |
67 | ····················"iopub.execute_input":·"202 | 67 | ····················"iopub.execute_input":·"2025-02-05T01:57:58.708630Z", |
68 | ····················"iopub.status.busy":·"202 | 68 | ····················"iopub.status.busy":·"2025-02-05T01:57:58.708298Z", |
69 | ····················"iopub.status.idle":·"202 | 69 | ····················"iopub.status.idle":·"2025-02-05T01:57:58.734741Z", |
70 | ····················"shell.execute_reply":·"202 | 70 | ····················"shell.execute_reply":·"2025-02-05T01:57:58.733963Z" |
71 | ················} | 71 | ················} |
72 | ············}, | 72 | ············}, |
73 | ············"outputs":·[ | 73 | ············"outputs":·[ |
74 | ················{ | 74 | ················{ |
75 | ····················"ename":·"NameError", | 75 | ····················"ename":·"NameError", |
76 | ····················"evalue":·"name·'xr'·is·not·defined", | 76 | ····················"evalue":·"name·'xr'·is·not·defined", |
77 | ····················"output_type":·"error", | 77 | ····················"output_type":·"error", |
Offset 100, 18 lines modified | Offset 100, 18 lines modified | ||
100 | ············"execution_count":·3, | 100 | ············"execution_count":·3, |
101 | ············"metadata":·{ | 101 | ············"metadata":·{ |
102 | ················"ExecuteTime":·{ | 102 | ················"ExecuteTime":·{ |
103 | ····················"end_time":·"2018-11-28T20:50:15.836061Z", | 103 | ····················"end_time":·"2018-11-28T20:50:15.836061Z", |
104 | ····················"start_time":·"2018-11-28T20:50:15.768376Z" | 104 | ····················"start_time":·"2018-11-28T20:50:15.768376Z" |
105 | ················}, | 105 | ················}, |
106 | ················"execution":·{ | 106 | ················"execution":·{ |
107 | ····················"iopub.execute_input":·"202 | 107 | ····················"iopub.execute_input":·"2025-02-05T01:57:58.737799Z", |
108 | ····················"iopub.status.busy":·"202 | 108 | ····················"iopub.status.busy":·"2025-02-05T01:57:58.737474Z", |
109 | ····················"iopub.status.idle":·"202 | 109 | ····················"iopub.status.idle":·"2025-02-05T01:57:58.759266Z", |
110 | ····················"shell.execute_reply":·"202 | 110 | ····················"shell.execute_reply":·"2025-02-05T01:57:58.758513Z" |
111 | ················} | 111 | ················} |
112 | ············}, | 112 | ············}, |
113 | ············"outputs":·[ | 113 | ············"outputs":·[ |
114 | ················{ | 114 | ················{ |
115 | ····················"ename":·"NameError", | 115 | ····················"ename":·"NameError", |
116 | ····················"evalue":·"name·'ds'·is·not·defined", | 116 | ····················"evalue":·"name·'ds'·is·not·defined", |
117 | ····················"output_type":·"error", | 117 | ····················"output_type":·"error", |
Offset 142, 18 lines modified | Offset 142, 18 lines modified | ||
142 | ············"execution_count":·4, | 142 | ············"execution_count":·4, |
143 | ············"metadata":·{ | 143 | ············"metadata":·{ |
144 | ················"ExecuteTime":·{ | 144 | ················"ExecuteTime":·{ |
145 | ····················"end_time":·"2018-11-28T20:50:17.928556Z", | 145 | ····················"end_time":·"2018-11-28T20:50:17.928556Z", |
146 | ····················"start_time":·"2018-11-28T20:50:17.031211Z" | 146 | ····················"start_time":·"2018-11-28T20:50:17.031211Z" |
147 | ················}, | 147 | ················}, |
148 | ················"execution":·{ | 148 | ················"execution":·{ |
149 | ····················"iopub.execute_input":·"202 | 149 | ····················"iopub.execute_input":·"2025-02-05T01:57:58.762340Z", |
150 | ····················"iopub.status.busy":·"202 | 150 | ····················"iopub.status.busy":·"2025-02-05T01:57:58.762053Z", |
151 | ····················"iopub.status.idle":·"202 | 151 | ····················"iopub.status.idle":·"2025-02-05T01:57:58.784583Z", |
152 | ····················"shell.execute_reply":·"202 | 152 | ····················"shell.execute_reply":·"2025-02-05T01:57:58.783807Z" |
153 | ················} | 153 | ················} |
154 | ············}, | 154 | ············}, |
155 | ············"outputs":·[ | 155 | ············"outputs":·[ |
156 | ················{ | 156 | ················{ |
157 | ····················"ename":·"NameError", | 157 | ····················"ename":·"NameError", |
158 | ····················"evalue":·"name·'plt'·is·not·defined", | 158 | ····················"evalue":·"name·'plt'·is·not·defined", |
159 | ····················"output_type":·"error", | 159 | ····················"output_type":·"error", |
Offset 185, 18 lines modified | Offset 185, 18 lines modified | ||
185 | ············"execution_count":·5, | 185 | ············"execution_count":·5, |
186 | ············"metadata":·{ | 186 | ············"metadata":·{ |
187 | ················"ExecuteTime":·{ | 187 | ················"ExecuteTime":·{ |
188 | ····················"end_time":·"2018-11-28T20:50:20.567749Z", | 188 | ····················"end_time":·"2018-11-28T20:50:20.567749Z", |
189 | ····················"start_time":·"2018-11-28T20:50:19.999393Z" | 189 | ····················"start_time":·"2018-11-28T20:50:19.999393Z" |
190 | ················}, | 190 | ················}, |
191 | ················"execution":·{ | 191 | ················"execution":·{ |
192 | ····················"iopub.execute_input":·"202 | 192 | ····················"iopub.execute_input":·"2025-02-05T01:57:58.787570Z", |
193 | ····················"iopub.status.busy":·"202 | 193 | ····················"iopub.status.busy":·"2025-02-05T01:57:58.787291Z", |
194 | ····················"iopub.status.idle":·"202 | 194 | ····················"iopub.status.idle":·"2025-02-05T01:57:58.808035Z", |
195 | ····················"shell.execute_reply":·"202 | 195 | ····················"shell.execute_reply":·"2025-02-05T01:57:58.807253Z" |
196 | ················} | 196 | ················} |
197 | ············}, | 197 | ············}, |
198 | ············"outputs":·[ | 198 | ············"outputs":·[ |
199 | ················{ | 199 | ················{ |
200 | ····················"ename":·"NameError", | 200 | ····················"ename":·"NameError", |
201 | ····················"evalue":·"name·'ds'·is·not·defined", | 201 | ····················"evalue":·"name·'ds'·is·not·defined", |
202 | ····················"output_type":·"error", | 202 | ····················"output_type":·"error", |
Offset 224, 18 lines modified | Offset 224, 18 lines modified | ||
224 | ············"execution_count":·6, | 224 | ············"execution_count":·6, |
225 | ············"metadata":·{ | 225 | ············"metadata":·{ |
226 | ················"ExecuteTime":·{ | 226 | ················"ExecuteTime":·{ |
227 | ····················"end_time":·"2018-11-28T20:50:31.131708Z", | 227 | ····················"end_time":·"2018-11-28T20:50:31.131708Z", |
228 | ····················"start_time":·"2018-11-28T20:50:30.444697Z" | 228 | ····················"start_time":·"2018-11-28T20:50:30.444697Z" |
229 | ················}, | 229 | ················}, |
230 | ················"execution":·{ | 230 | ················"execution":·{ |
231 | ····················"iopub.execute_input":·"202 | 231 | ····················"iopub.execute_input":·"2025-02-05T01:57:58.811035Z", |
232 | ····················"iopub.status.busy":·"202 | 232 | ····················"iopub.status.busy":·"2025-02-05T01:57:58.810757Z", |
233 | ····················"iopub.status.idle":·"202 | 233 | ····················"iopub.status.idle":·"2025-02-05T01:57:58.834735Z", |
234 | ····················"shell.execute_reply":·"202 | 234 | ····················"shell.execute_reply":·"2025-02-05T01:57:58.833937Z" |
235 | ················} | 235 | ················} |
236 | ············}, | 236 | ············}, |
237 | ············"outputs":·[ | 237 | ············"outputs":·[ |
238 | ················{ | 238 | ················{ |
239 | ····················"ename":·"NameError", | 239 | ····················"ename":·"NameError", |
240 | ····················"evalue":·"name·'plt'·is·not·defined", | 240 | ····················"evalue":·"name·'plt'·is·not·defined", |
241 | ····················"output_type":·"error", | 241 | ····················"output_type":·"error", |
Offset 272, 18 lines modified | Offset 272, 18 lines modified | ||
272 | ············"execution_count":·7, | 272 | ············"execution_count":·7, |
273 | ············"metadata":·{ | 273 | ············"metadata":·{ |
274 | ················"ExecuteTime":·{ | 274 | ················"ExecuteTime":·{ |
275 | ····················"end_time":·"2018-11-28T20:50:43.670463Z", | 275 | ····················"end_time":·"2018-11-28T20:50:43.670463Z", |
276 | ····················"start_time":·"2018-11-28T20:50:43.245501Z" | 276 | ····················"start_time":·"2018-11-28T20:50:43.245501Z" |
277 | ················}, | 277 | ················}, |
278 | ················"execution":·{ | 278 | ················"execution":·{ |
279 | ····················"iopub.execute_input":·"202 | 279 | ····················"iopub.execute_input":·"2025-02-05T01:57:58.837671Z", |
280 | ····················"iopub.status.busy":·"202 | 280 | ····················"iopub.status.busy":·"2025-02-05T01:57:58.837387Z", |
281 | ····················"iopub.status.idle":·"202 | 281 | ····················"iopub.status.idle":·"2025-02-05T01:57:58.860858Z", |
282 | ····················"shell.execute_reply":·"202 | 282 | ····················"shell.execute_reply":·"2025-02-05T01:57:58.860073Z" |
283 | ················} | 283 | ················} |
284 | ············}, | 284 | ············}, |
Max diff block lines reached; 166/7820 bytes (2.12%) of diff not shown. |
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-05T01:58:01.518674Z", |
18 | ····················"iopub.status.busy":·"202 | 18 | ····················"iopub.status.busy":·"2025-02-05T01:58:01.518381Z", |
19 | ····················"iopub.status.idle":·"202 | 19 | ····················"iopub.status.idle":·"2025-02-05T01:58:02.457976Z", |
20 | ····················"shell.execute_reply":·"202 | 20 | ····················"shell.execute_reply":·"2025-02-05T01:58:02.456866Z" |
21 | ················} | 21 | ················} |
22 | ············}, | 22 | ············}, |
23 | ············"outputs":·[ | 23 | ············"outputs":·[ |
24 | ················{ | 24 | ················{ |
25 | ····················"ename":·"ModuleNotFoundError", | 25 | ····················"ename":·"ModuleNotFoundError", |
26 | ····················"evalue":·"No·module·named·'xarray'", | 26 | ····················"evalue":·"No·module·named·'xarray'", |
27 | ····················"output_type":·"error", | 27 | ····················"output_type":·"error", |
Offset 49, 18 lines modified | Offset 49, 18 lines modified | ||
49 | ············] | 49 | ············] |
50 | ········}, | 50 | ········}, |
51 | ········{ | 51 | ········{ |
52 | ············"cell_type":·"code", | 52 | ············"cell_type":·"code", |
53 | ············"execution_count":·2, | 53 | ············"execution_count":·2, |
54 | ············"metadata":·{ | 54 | ············"metadata":·{ |
55 | ················"execution":·{ | 55 | ················"execution":·{ |
56 | ····················"iopub.execute_input":·"202 | 56 | ····················"iopub.execute_input":·"2025-02-05T01:58:02.461146Z", |
57 | ····················"iopub.status.busy":·"202 | 57 | ····················"iopub.status.busy":·"2025-02-05T01:58:02.460784Z", |
58 | ····················"iopub.status.idle":·"202 | 58 | ····················"iopub.status.idle":·"2025-02-05T01:58:02.483330Z", |
59 | ····················"shell.execute_reply":·"202 | 59 | ····················"shell.execute_reply":·"2025-02-05T01:58:02.482376Z" |
60 | ················} | 60 | ················} |
61 | ············}, | 61 | ············}, |
62 | ············"outputs":·[ | 62 | ············"outputs":·[ |
63 | ················{ | 63 | ················{ |
64 | ····················"ename":·"NameError", | 64 | ····················"ename":·"NameError", |
65 | ····················"evalue":·"name·'xr'·is·not·defined", | 65 | ····················"evalue":·"name·'xr'·is·not·defined", |
66 | ····················"output_type":·"error", | 66 | ····················"output_type":·"error", |
Offset 91, 18 lines 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-05T01:58:02.486242Z", |
99 | ····················"iopub.status.busy":·"202 | 99 | ····················"iopub.status.busy":·"2025-02-05T01:58:02.485952Z", |
100 | ····················"iopub.status.idle":·"202 | 100 | ····················"iopub.status.idle":·"2025-02-05T01:58:02.513889Z", |
101 | ····················"shell.execute_reply":·"202 | 101 | ····················"shell.execute_reply":·"2025-02-05T01:58:02.513000Z" |
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-05T01:58:02.516702Z", |
152 | ····················"iopub.status.busy":·"202 | 152 | ····················"iopub.status.busy":·"2025-02-05T01:58:02.516400Z", |
153 | ····················"iopub.status.idle":·"202 | 153 | ····················"iopub.status.idle":·"2025-02-05T01:58:02.547739Z", |
154 | ····················"shell.execute_reply":·"202 | 154 | ····················"shell.execute_reply":·"2025-02-05T01:58:02.546804Z" |
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-05T01:58:02.550822Z", |
216 | ····················"iopub.status.busy":·"202 | 216 | ····················"iopub.status.busy":·"2025-02-05T01:58:02.550520Z", |
217 | ····················"iopub.status.idle":·"202 | 217 | ····················"iopub.status.idle":·"2025-02-05T01:58:02.578569Z", |
218 | ····················"shell.execute_reply":·"202 | 218 | ····················"shell.execute_reply":·"2025-02-05T01:58:02.577904Z" |
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-05T01:58:02.581480Z", |
272 | ····················"iopub.status.busy":·"202 | 272 | ····················"iopub.status.busy":·"2025-02-05T01:58:02.581153Z", |
273 | ····················"iopub.status.idle":·"202 | 273 | ····················"iopub.status.idle":·"2025-02-05T01:58:02.608360Z", |
274 | ····················"shell.execute_reply":·"202 | 274 | ····················"shell.execute_reply":·"2025-02-05T01:58:02.607464Z" |
275 | ················} | 275 | ················} |
276 | ············}, | 276 | ············}, |
277 | ············"outputs":·[ | 277 | ············"outputs":·[ |
278 | ················{ | 278 | ················{ |
279 | ····················"ename":·"NameError", | 279 | ····················"ename":·"NameError", |
280 | ····················"evalue":·"name·'ds'·is·not·defined", | 280 | ····················"evalue":·"name·'ds'·is·not·defined", |
281 | ····················"output_type":·"error", | 281 | ····················"output_type":·"error", |
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-05T01:58:04.849865Z", |
23 | ····················"iopub.status.busy":·"202 | 23 | ····················"iopub.status.busy":·"2025-02-05T01:58:04.849575Z", |
24 | ····················"iopub.status.idle":·"202 | 24 | ····················"iopub.status.idle":·"2025-02-05T01:58:07.193451Z", |
25 | ····················"shell.execute_reply":·"202 | 25 | ····················"shell.execute_reply":·"2025-02-05T01:58:07.192529Z" |
26 | ················} | 26 | ················} |
27 | ············}, | 27 | ············}, |
28 | ············"outputs":·[ | 28 | ············"outputs":·[ |
29 | ················{ | 29 | ················{ |
30 | ····················"ename":·"ModuleNotFoundError", | 30 | ····················"ename":·"ModuleNotFoundError", |
31 | ····················"evalue":·"No·module·named·'xarray'", | 31 | ····················"evalue":·"No·module·named·'xarray'", |
32 | ····················"output_type":·"error", | 32 | ····················"output_type":·"error", |
Offset 86, 18 lines modified | Offset 86, 18 lines modified | ||
86 | ············"execution_count":·2, | 86 | ············"execution_count":·2, |
87 | ············"metadata":·{ | 87 | ············"metadata":·{ |
88 | ················"ExecuteTime":·{ | 88 | ················"ExecuteTime":·{ |
89 | ····················"end_time":·"2020-01-27T15:47:14.160297Z", | 89 | ····················"end_time":·"2020-01-27T15:47:14.160297Z", |
90 | ····················"start_time":·"2020-01-27T15:47:14.126738Z" | 90 | ····················"start_time":·"2020-01-27T15:47:14.126738Z" |
91 | ················}, | 91 | ················}, |
92 | ················"execution":·{ | 92 | ················"execution":·{ |
93 | ····················"iopub.execute_input":·"202 | 93 | ····················"iopub.execute_input":·"2025-02-05T01:58:07.196616Z", |
94 | ····················"iopub.status.busy":·"202 | 94 | ····················"iopub.status.busy":·"2025-02-05T01:58:07.196320Z", |
95 | ····················"iopub.status.idle":·"202 | 95 | ····················"iopub.status.idle":·"2025-02-05T01:58:07.217182Z", |
96 | ····················"shell.execute_reply":·"202 | 96 | ····················"shell.execute_reply":·"2025-02-05T01:58:07.216468Z" |
97 | ················} | 97 | ················} |
98 | ············}, | 98 | ············}, |
99 | ············"outputs":·[ | 99 | ············"outputs":·[ |
100 | ················{ | 100 | ················{ |
101 | ····················"ename":·"NameError", | 101 | ····················"ename":·"NameError", |
102 | ····················"evalue":·"name·'ds'·is·not·defined", | 102 | ····················"evalue":·"name·'ds'·is·not·defined", |
103 | ····················"output_type":·"error", | 103 | ····················"output_type":·"error", |
Offset 119, 18 lines modified | Offset 119, 18 lines modified | ||
119 | ············"execution_count":·3, | 119 | ············"execution_count":·3, |
120 | ············"metadata":·{ | 120 | ············"metadata":·{ |
121 | ················"ExecuteTime":·{ | 121 | ················"ExecuteTime":·{ |
122 | ····················"end_time":·"2020-01-27T15:47:32.682065Z", | 122 | ····················"end_time":·"2020-01-27T15:47:32.682065Z", |
123 | ····················"start_time":·"2020-01-27T15:47:32.652629Z" | 123 | ····················"start_time":·"2020-01-27T15:47:32.652629Z" |
124 | ················}, | 124 | ················}, |
125 | ················"execution":·{ | 125 | ················"execution":·{ |
126 | ····················"iopub.execute_input":·"202 | 126 | ····················"iopub.execute_input":·"2025-02-05T01:58:07.219866Z", |
127 | ····················"iopub.status.busy":·"202 | 127 | ····················"iopub.status.busy":·"2025-02-05T01:58:07.219582Z", |
128 | ····················"iopub.status.idle":·"202 | 128 | ····················"iopub.status.idle":·"2025-02-05T01:58:07.239870Z", |
129 | ····················"shell.execute_reply":·"202 | 129 | ····················"shell.execute_reply":·"2025-02-05T01:58:07.239215Z" |
130 | ················} | 130 | ················} |
131 | ············}, | 131 | ············}, |
132 | ············"outputs":·[ | 132 | ············"outputs":·[ |
133 | ················{ | 133 | ················{ |
134 | ····················"ename":·"NameError", | 134 | ····················"ename":·"NameError", |
135 | ····················"evalue":·"name·'df'·is·not·defined", | 135 | ····················"evalue":·"name·'df'·is·not·defined", |
136 | ····················"output_type":·"error", | 136 | ····················"output_type":·"error", |
Offset 158, 18 lines modified | Offset 158, 18 lines modified | ||
158 | ············"execution_count":·4, | 158 | ············"execution_count":·4, |
159 | ············"metadata":·{ | 159 | ············"metadata":·{ |
160 | ················"ExecuteTime":·{ | 160 | ················"ExecuteTime":·{ |
161 | ····················"end_time":·"2020-01-27T15:47:34.617042Z", | 161 | ····················"end_time":·"2020-01-27T15:47:34.617042Z", |
162 | ····················"start_time":·"2020-01-27T15:47:34.282605Z" | 162 | ····················"start_time":·"2020-01-27T15:47:34.282605Z" |
163 | ················}, | 163 | ················}, |
164 | ················"execution":·{ | 164 | ················"execution":·{ |
165 | ····················"iopub.execute_input":·"202 | 165 | ····················"iopub.execute_input":·"2025-02-05T01:58:07.242719Z", |
166 | ····················"iopub.status.busy":·"202 | 166 | ····················"iopub.status.busy":·"2025-02-05T01:58:07.242443Z", |
167 | ····················"iopub.status.idle":·"202 | 167 | ····················"iopub.status.idle":·"2025-02-05T01:58:07.263814Z", |
168 | ····················"shell.execute_reply":·"202 | 168 | ····················"shell.execute_reply":·"2025-02-05T01:58:07.263036Z" |
169 | ················} | 169 | ················} |
170 | ············}, | 170 | ············}, |
171 | ············"outputs":·[ | 171 | ············"outputs":·[ |
172 | ················{ | 172 | ················{ |
173 | ····················"ename":·"NameError", | 173 | ····················"ename":·"NameError", |
174 | ····················"evalue":·"name·'ds'·is·not·defined", | 174 | ····················"evalue":·"name·'ds'·is·not·defined", |
175 | ····················"output_type":·"error", | 175 | ····················"output_type":·"error", |
Offset 197, 18 lines modified | Offset 197, 18 lines modified | ||
197 | ············"execution_count":·5, | 197 | ············"execution_count":·5, |
198 | ············"metadata":·{ | 198 | ············"metadata":·{ |
199 | ················"ExecuteTime":·{ | 199 | ················"ExecuteTime":·{ |
200 | ····················"end_time":·"2020-01-27T15:47:37.643175Z", | 200 | ····················"end_time":·"2020-01-27T15:47:37.643175Z", |
201 | ····················"start_time":·"2020-01-27T15:47:37.202479Z" | 201 | ····················"start_time":·"2020-01-27T15:47:37.202479Z" |
202 | ················}, | 202 | ················}, |
203 | ················"execution":·{ | 203 | ················"execution":·{ |
204 | ····················"iopub.execute_input":·"202 | 204 | ····················"iopub.execute_input":·"2025-02-05T01:58:07.267209Z", |
205 | ····················"iopub.status.busy":·"202 | 205 | ····················"iopub.status.busy":·"2025-02-05T01:58:07.266910Z", |
206 | ····················"iopub.status.idle":·"202 | 206 | ····················"iopub.status.idle":·"2025-02-05T01:58:07.288054Z", |
207 | ····················"shell.execute_reply":·"202 | 207 | ····················"shell.execute_reply":·"2025-02-05T01:58:07.287232Z" |
208 | ················} | 208 | ················} |
209 | ············}, | 209 | ············}, |
210 | ············"outputs":·[ | 210 | ············"outputs":·[ |
211 | ················{ | 211 | ················{ |
212 | ····················"ename":·"NameError", | 212 | ····················"ename":·"NameError", |
213 | ····················"evalue":·"name·'df'·is·not·defined", | 213 | ····················"evalue":·"name·'df'·is·not·defined", |
214 | ····················"output_type":·"error", | 214 | ····················"output_type":·"error", |
Offset 236, 18 lines modified | Offset 236, 18 lines modified | ||
236 | ············"execution_count":·6, | 236 | ············"execution_count":·6, |
237 | ············"metadata":·{ | 237 | ············"metadata":·{ |
238 | ················"ExecuteTime":·{ | 238 | ················"ExecuteTime":·{ |
239 | ····················"end_time":·"2020-01-27T15:48:11.241224Z", | 239 | ····················"end_time":·"2020-01-27T15:48:11.241224Z", |
240 | ····················"start_time":·"2020-01-27T15:48:11.211156Z" | 240 | ····················"start_time":·"2020-01-27T15:48:11.211156Z" |
241 | ················}, | 241 | ················}, |
242 | ················"execution":·{ | 242 | ················"execution":·{ |
243 | ····················"iopub.execute_input":·"202 | 243 | ····················"iopub.execute_input":·"2025-02-05T01:58:07.291153Z", |
244 | ····················"iopub.status.busy":·"202 | 244 | ····················"iopub.status.busy":·"2025-02-05T01:58:07.290871Z", |
245 | ····················"iopub.status.idle":·"202 | 245 | ····················"iopub.status.idle":·"2025-02-05T01:58:07.312888Z", |
246 | ····················"shell.execute_reply":·"202 | 246 | ····················"shell.execute_reply":·"2025-02-05T01:58:07.311993Z" |
247 | ················} | 247 | ················} |
248 | ············}, | 248 | ············}, |
249 | ············"outputs":·[ | 249 | ············"outputs":·[ |
250 | ················{ | 250 | ················{ |
251 | ····················"ename":·"NameError", | 251 | ····················"ename":·"NameError", |
252 | ····················"evalue":·"name·'ds'·is·not·defined", | 252 | ····················"evalue":·"name·'ds'·is·not·defined", |
253 | ····················"output_type":·"error", | 253 | ····················"output_type":·"error", |
Offset 269, 18 lines modified | Offset 269, 18 lines modified | ||
269 | ············"execution_count":·7, | 269 | ············"execution_count":·7, |
270 | ············"metadata":·{ | 270 | ············"metadata":·{ |
271 | ················"ExecuteTime":·{ | 271 | ················"ExecuteTime":·{ |
272 | ····················"end_time":·"2020-01-27T15:48:13.131247Z", | 272 | ····················"end_time":·"2020-01-27T15:48:13.131247Z", |
273 | ····················"start_time":·"2020-01-27T15:48:12.924985Z" | 273 | ····················"start_time":·"2020-01-27T15:48:12.924985Z" |
274 | ················}, | 274 | ················}, |
275 | ················"execution":·{ | 275 | ················"execution":·{ |
276 | ····················"iopub.execute_input":·"202 | 276 | ····················"iopub.execute_input":·"2025-02-05T01:58:07.315843Z", |
277 | ····················"iopub.status.busy":·"202 | 277 | ····················"iopub.status.busy":·"2025-02-05T01:58:07.315544Z", |
278 | ····················"iopub.status.idle":·"202 | 278 | ····················"iopub.status.idle":·"2025-02-05T01:58:07.336336Z", |
279 | ····················"shell.execute_reply":·"202 | 279 | ····················"shell.execute_reply":·"2025-02-05T01:58:07.335552Z" |
280 | ················} | 280 | ················} |
281 | ············}, | 281 | ············}, |
Max diff block lines reached; 6872/14524 bytes (47.31%) 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·0xe | 331 | <span·class="gh">Out[37]:·</span><span·class="go"><matplotlib.collections.QuadMesh·at·0xea02d818></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)·int32·8B·10·20 | 255 | ··*·x········(x)·int32·8B·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·0xe | 260 | Out[37]:·<matplotlib.collections.QuadMesh·at·0xea02d818> |
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·0xe3 | 171 | <span·class="gh">Out[5]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe37e9da8></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">['latitude',·' | 174 | <span·class="go">['latitude',·'longitude',·'.zattrs',·'.zmetadata',·'.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·0xe3 | 120 | Out[5]:·<xarray.backends.zarr.ZarrStore·at·0xe37e9da8> |
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 | ['latitude',·'.zattrs',·'.zmetadata',·'.zgroup | 123 | ['latitude',·'longitude',·'.zattrs',·'.zmetadata',·'.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 2352, 117 lines modified | Offset 2352, 116 lines modified | ||
2352 | ········"3":·"py:property", | 2352 | ········"3":·"py:property", |
2353 | ········"4":·"py:attribute", | 2353 | ········"4":·"py:attribute", |
2354 | ········"5":·"py:function" | 2354 | ········"5":·"py:function" |
2355 | ····}, | 2355 | ····}, |
2356 | ····"terms":·{ | 2356 | ····"terms":·{ |
2357 | ········"":·[1,·3,·5,·6,·7,·8,·12,·14,·15,·16,·17,·19,·20,·21,·23,·24,·25,·26,·27,·28,·30,·31,·32,·33,·34,·35,·36,·37,·38,·39,·40,·41,·43,·44,·45,·47,·48,·49,·50,·51,·52], | 2357 | ········"":·[1,·3,·5,·6,·7,·8,·12,·14,·15,·16,·17,·19,·20,·21,·23,·24,·25,·26,·27,·28,·30,·31,·32,·33,·34,·35,·36,·37,·38,·39,·40,·41,·43,·44,·45,·47,·48,·49,·50,·51,·52], |
2358 | ········"0":·[3,·6,·7,·8,·9,·11,·12,·13,·14,·16,·18,·19,·20,·22,·24,·25,·26,·27,·28,·30,·33,·35,·36,·37,·38,·40,·41,·43,·44,·45,·47,·48,·49,·50,·51,·52,·53], | 2358 | ········"0":·[3,·6,·7,·8,·9,·11,·12,·13,·14,·16,·18,·19,·20,·22,·24,·25,·26,·27,·28,·30,·33,·35,·36,·37,·38,·40,·41,·43,·44,·45,·47,·48,·49,·50,·51,·52,·53], |
2359 | ········"00":·[36,·37,·38,·45,·47,·52,·53,·54], | 2359 | ········"00":·[36,·37,·38,·45,·47,·51,·52,·53,·54], |
2360 | ········"000":·51, | ||
2360 | ········"000000":·16, | 2361 | ········"000000":·16, |
2361 | ········"000000000":·[37,·38,·52], | 2362 | ········"000000000":·[37,·38,·52], |
2362 | ········"0001":·[53,·54], | 2363 | ········"0001":·[53,·54], |
2363 | ········"00010101":·53, | 2364 | ········"00010101":·53, |
2364 | ········"00010201":·53, | 2365 | ········"00010201":·53, |
2365 | ········"00010301":·53, | 2366 | ········"00010301":·53, |
2366 | ········"0002":·53, | 2367 | ········"0002":·53, |
2367 | ········"00021001":·53, | 2368 | ········"00021001":·53, |
2368 | ········"00021101":·53, | 2369 | ········"00021101":·53, |
2369 | ········"00021201":·53, | 2370 | ········"00021201":·53, |
2370 | ········"000e":·[48,·51], | 2371 | ········"000e":·[48,·51], |
2371 | ········"00 | 2372 | ········"000j":·51, |
2372 | ········"001e":·37, | 2373 | ········"001e":·37, |
2373 | ········"002e":·51, | ||
2374 | ········"003":·36, | 2374 | ········"003":·36, |
2375 | ········"004":·36, | 2375 | ········"004":·36, |
2376 | ········"005":·51, | ||
2377 | ········"005036":·40, | 2376 | ········"005036":·40, |
2378 | ········"005e":·37, | 2377 | ········"005e":·37, |
2379 | ········"005j":·51, | ||
2380 | ········"00688889":·36, | 2378 | ········"00688889":·36, |
2381 | ········"006e":·37, | 2379 | ········"006e":·37, |
2382 | ········"007":·36, | 2380 | ········"007":·36, |
2383 | ········"007e":·51, | 2381 | ········"007e":·51, |
2384 | ········"008":·36, | 2382 | ········"008":·36, |
2385 | ········"00914929":·36, | 2383 | ········"00914929":·36, |
2386 | ········"00941742":·36, | 2384 | ········"00941742":·36, |
2387 | ········"00968205":·36, | 2385 | ········"00968205":·36, |
2388 | ········"00973567":·36, | 2386 | ········"00973567":·36, |
2389 | ········"00j":·51, | 2387 | ········"00j":·51, |
2390 | ········"01":·[14,·16,·20,·26,·30,·32,·37,·38,·41,·43,·44,·45,·47,·48,·51,·52,·53], | 2388 | ········"01":·[14,·16,·20,·26,·30,·32,·37,·38,·41,·43,·44,·45,·47,·48,·51,·52,·53], |
2391 | ········"01082401":·36, | 2389 | ········"01082401":·36, |
2392 | ········"01183847":·36, | 2390 | ········"01183847":·36, |
2393 | ········"015":·51, | ||
2394 | ········"016":·51, | 2391 | ········"016":·51, |
2395 | ········"01636376":·36, | 2392 | ········"01636376":·36, |
2396 | ········"01652688":·36, | 2393 | ········"01652688":·36, |
2397 | ········"01652764":·36, | 2394 | ········"01652764":·36, |
2398 | ········"0165891":·36, | 2395 | ········"0165891":·36, |
2399 | ········"01670071":·36, | 2396 | ········"01670071":·36, |
2400 | ········"01670121":·36, | 2397 | ········"01670121":·36, |
2401 | ········"01671269":·36, | 2398 | ········"01671269":·36, |
2402 | ········"01671847":·36, | 2399 | ········"01671847":·36, |
2403 | ········"01672":·36, | 2400 | ········"01672":·36, |
2401 | ········"016j":·51, | ||
2404 | ········"017":·43, | 2402 | ········"017":·43, |
2405 | ········"01806694":·36, | 2403 | ········"01806694":·36, |
2406 | ········"01814439":·36, | 2404 | ········"01814439":·36, |
2407 | ········"0182217":·36, | 2405 | ········"0182217":·36, |
2408 | ········"018e":·37, | 2406 | ········"018e":·37, |
2409 | ········"019":·40, | 2407 | ········"019":·40, |
2410 | ········"01906":·48, | 2408 | ········"01906":·48, |
2411 | ········"019e":·37, | 2409 | ········"019e":·37, |
2412 | ········"01j":·51, | ||
2413 | ········"01t00":·[37,·38,·52,·54], | 2410 | ········"01t00":·[37,·38,·52,·54], |
2414 | ········"01t03":·52, | 2411 | ········"01t03":·52, |
2415 | ········"01t12":·52, | 2412 | ········"01t12":·52, |
2416 | ········"02":·[11,·36,·37,·38,·41,·43,·44,·45,·48,·52,·53], | 2413 | ········"02":·[11,·36,·37,·38,·41,·43,·44,·45,·48,·52,·53], |
2417 | ········"020e":·37, | 2414 | ········"020e":·37, |
2418 | ········"021e":·[37,·45], | 2415 | ········"021e":·[37,·45], |
2419 | ········"023e":·37, | 2416 | ········"023e":·37, |
2420 | ········"024e":·[37,·45], | 2417 | ········"024e":·[37,·45], |
2421 | ········"026e":·37, | 2418 | ········"026e":·37, |
2422 | ········"02756784":·19, | 2419 | ········"02756784":·19, |
2423 | ········"029e":·48, | 2420 | ········"029e":·48, |
2424 | ········"02t00":·[37,·38], | 2421 | ········"02t00":·[37,·38], |
2425 | ········"03":·[6,·37,·43,·44,·45,·48,·52,·53], | 2422 | ········"03":·[6,·37,·43,·44,·45,·48,·52,·53], |
2426 | ········"03047":·48, | 2423 | ········"03047":·48, |
2424 | ········"030e":·51, | ||
2427 | ········"031":·41, | 2425 | ········"031":·41, |
2428 | ········"03333":·44, | 2426 | ········"03333":·44, |
2429 | ········"03343807":·36, | 2427 | ········"03343807":·36, |
2430 | ········"03343845":·36, | 2428 | ········"03343845":·36, |
2431 | ········"03343858":·36, | 2429 | ········"03343858":·36, |
2432 | ········"03344":·36, | 2430 | ········"03344":·36, |
2433 | ········"035e":·37, | 2431 | ········"035e":·37, |
2434 | ········"03611368":·36, | 2432 | ········"03611368":·36, |
2435 | ········"03626848":·36, | 2433 | ········"03626848":·36, |
2436 | ········"03642301":·36, | 2434 | ········"03642301":·36, |
2437 | ········"036e":·48, | 2435 | ········"036e":·48, |
2438 | ········"0379266750948":·45, | 2436 | ········"0379266750948":·45, |
2439 | ········"037e":·37, | 2437 | ········"037e":·37, |
2440 | ········"038":· | 2438 | ········"038":·43, |
2441 | ········"03835":·41, | 2439 | ········"03835":·41, |
2440 | ········"038e":·51, | ||
2442 | ········"03957499":·19, | 2441 | ········"03957499":·19, |
2443 | ········"03t00":·[37,·38], | 2442 | ········"03t00":·[37,·38], |
2444 | ········"04":·[19,·36,·37,·38,·41,·43,·47,·52], | 2443 | ········"04":·[19,·36,·37,·38,·41,·43,·47,·52], |
2445 | ········"04096206":·36, | 2444 | ········"04096206":·36, |
2446 | ········"04097352":·36, | 2445 | ········"04097352":·36, |
2447 | ········"040e":·48, | 2446 | ········"040e":·48, |
2448 | ········"0417827":·45, | 2447 | ········"0417827":·45, |
2449 | ········"042e":·37, | 2448 | ········"042e":·37, |
2449 | ········"043e":·51, | ||
2450 | ········"044":·[35,·47], | 2450 | ········"044":·[35,·47], |
2451 | ········"04423597":·19, | 2451 | ········"04423597":·19, |
2452 | ········"044236":·47, | 2452 | ········"044236":·47, |
2453 | ········"04569531":·36, | 2453 | ········"04569531":·36, |
2454 | ········"04703446":·36, | 2454 | ········"04703446":·36, |
2455 | ········"047e":·[37,·48], | 2455 | ········"047e":·[37,·48], |
2456 | ········"0483":·45, | ||
2457 | ········"04835611":·36, | 2456 | ········"04835611":·36, |
2458 | ········"04862391":·36, | 2457 | ········"04862391":·36, |
2459 | ········"048e":·37, | 2458 | ········"048e":·37, |
2460 | ········"04t00":·[37,·38], | 2459 | ········"04t00":·[37,·38], |
2461 | ········"05":·[36,·38,·45,·48,·5 | 2460 | ········"05":·[36,·38,·45,·48,·52,·53], |
2462 | ········"05405954":·36, | 2461 | ········"05405954":·36, |
2463 | ········"05556":·44, | 2462 | ········"05556":·44, |
2464 | ········"056":·44, | 2463 | ········"056":·44, |
2465 | ········"057e":·37, | 2464 | ········"057e":·37, |
2466 | ········"058e":·37, | 2465 | ········"058e":·37, |
2467 | ········"05912615":·36, | 2466 | ········"05912615":·36, |
2468 | ········"05t00":·37, | 2467 | ········"05t00":·37, |
Offset 2486, 34 lines modified | Offset 2485, 37 lines modified | ||
2486 | ········"07180381":·19, | 2485 | ········"07180381":·19, |
2487 | ········"071804":·47, | 2486 | ········"071804":·47, |
2488 | ········"072":·47, | 2487 | ········"072":·47, |
2489 | ········"072e":·48, | 2488 | ········"072e":·48, |
Max diff block lines reached; 45591/49221 bytes (92.63%) 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·0xe | 738 | <span·class="gh">Out[64]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xea24a500>]</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·0xe4 | 740 | <span·class="gh">Out[65]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xe4068f50>]</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·0xe | 592 | Out[64]:·[<matplotlib.lines.Line2D·at·0xea24a500>] |
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·0xe4 | 595 | Out[65]:·[<matplotlib.lines.Line2D·at·0xe4068f50>] |
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 1054, 15 lines modified | Offset 1054, 15 lines modified | ||
1054 | <span·class="go">····└──·Group:·/b/B</span> | 1054 | <span·class="go">····└──·Group:·/b/B</span> |
1055 | </pre></div> | 1055 | </pre></div> |
1056 | </div> | 1056 | </div> |
1057 | <p>Now·we·have·a·valid·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">DataTree</span></code>·structure·which·contains·all·the·data·at·each·different·time·frequency,·stored·in·a·separate·group.</p> | 1057 | <p>Now·we·have·a·valid·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">DataTree</span></code>·structure·which·contains·all·the·data·at·each·different·time·frequency,·stored·in·a·separate·group.</p> |
1058 | <p>This·is·a·useful·way·to·organise·our·data·because·we·can·still·operate·on·all·the·groups·at·once. | 1058 | <p>This·is·a·useful·way·to·organise·our·data·because·we·can·still·operate·on·all·the·groups·at·once. |
1059 | For·example·we·can·extract·all·three·timeseries·at·a·specific·lat-lon·location:</p> | 1059 | For·example·we·can·extract·all·three·timeseries·at·a·specific·lat-lon·location:</p> |
1060 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[100]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">lat</span><span·class="o">=</span><span·class="mi">75</span><span·class="p">,</span>·<span·class="n">lon</span><span·class="o">=</span><span·class="mi">300</span><span·class="p">)</span> | 1060 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[100]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">lat</span><span·class="o">=</span><span·class="mi">75</span><span·class="p">,</span>·<span·class="n">lon</span><span·class="o">=</span><span·class="mi">300</span><span·class="p">)</span> |
1061 | <span·class="go">ValueError:·Dimensions·{'l | 1061 | <span·class="go">ValueError:·Dimensions·{'lon',·'lat'}·do·not·exist.·Expected·one·or·more·of·set()</span> |
1062 | </pre></div> | 1062 | </pre></div> |
1063 | </div> | 1063 | </div> |
1064 | <p>or·compute·the·standard·deviation·of·each·timeseries·to·find·out·how·it·varies·with·sampling·frequency:</p> | 1064 | <p>or·compute·the·standard·deviation·of·each·timeseries·to·find·out·how·it·varies·with·sampling·frequency:</p> |
1065 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[101]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">std</span><span·class="p">(</span><span·class="n">dim</span><span·class="o">=</span><span·class="s2">"time"</span><span·class="p">)</span> | 1065 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[101]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">std</span><span·class="p">(</span><span·class="n">dim</span><span·class="o">=</span><span·class="s2">"time"</span><span·class="p">)</span> |
1066 | <span·class="go">ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set()</span> | 1066 | <span·class="go">ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set()</span> |
1067 | </pre></div> | 1067 | </pre></div> |
1068 | </div> | 1068 | </div> |
Offset 1128, 15 lines modified | Offset 1128, 15 lines modified | ||
1128 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[107]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">dt</span><span·class="p">[</span><span·class="s2">"/daily"</span><span·class="p">])</span> | 1128 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[107]:·</span><span·class="nb">print</span><span·class="p">(</span><span·class="n">dt</span><span·class="p">[</span><span·class="s2">"/daily"</span><span·class="p">])</span> |
1129 | <span·class="go">KeyError:·'Could·not·find·node·at·/daily'</span> | 1129 | <span·class="go">KeyError:·'Could·not·find·node·at·/daily'</span> |
1130 | </pre></div> | 1130 | </pre></div> |
1131 | </div> | 1131 | </div> |
1132 | <p>This·helps·to·differentiate·which·variables·are·defined·on·the·datatree·node·that·you·are·currently·looking·at,·and·which·were·defined·somewhere·above·it.</p> | 1132 | <p>This·helps·to·differentiate·which·variables·are·defined·on·the·datatree·node·that·you·are·currently·looking·at,·and·which·were·defined·somewhere·above·it.</p> |
1133 | <p>We·can·also·still·perform·all·the·same·operations·on·the·whole·tree:</p> | 1133 | <p>We·can·also·still·perform·all·the·same·operations·on·the·whole·tree:</p> |
1134 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[108]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">lat</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">75</span><span·class="p">],</span>·<span·class="n">lon</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">300</span><span·class="p">])</span> | 1134 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[108]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">lat</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">75</span><span·class="p">],</span>·<span·class="n">lon</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">300</span><span·class="p">])</span> |
1135 | <span·class="go">ValueError:·Dimensions·{'l | 1135 | <span·class="go">ValueError:·Dimensions·{'lon',·'lat'}·do·not·exist.·Expected·one·or·more·of·set()</span> |
1136 | <span·class="gp">In·[109]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">std</span><span·class="p">(</span><span·class="n">dim</span><span·class="o">=</span><span·class="s2">"time"</span><span·class="p">)</span> | 1136 | <span·class="gp">In·[109]:·</span><span·class="n">dt</span><span·class="o">.</span><span·class="n">std</span><span·class="p">(</span><span·class="n">dim</span><span·class="o">=</span><span·class="s2">"time"</span><span·class="p">)</span> |
1137 | <span·class="go">ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set()</span> | 1137 | <span·class="go">ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set()</span> |
1138 | </pre></div> | 1138 | </pre></div> |
1139 | </div> | 1139 | </div> |
1140 | </section> | 1140 | </section> |
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 944, 15 lines modified | Offset 944, 15 lines modified | ||
944 | ····└──·Group:·/b/B | 944 | ····└──·Group:·/b/B |
945 | Now·we·have·a·valid·DataTree·structure·which·contains·all·the·data·at·each | 945 | Now·we·have·a·valid·DataTree·structure·which·contains·all·the·data·at·each |
946 | different·time·frequency,·stored·in·a·separate·group. | 946 | different·time·frequency,·stored·in·a·separate·group. |
947 | This·is·a·useful·way·to·organise·our·data·because·we·can·still·operate·on·all | 947 | This·is·a·useful·way·to·organise·our·data·because·we·can·still·operate·on·all |
948 | the·groups·at·once.·For·example·we·can·extract·all·three·timeseries·at·a | 948 | the·groups·at·once.·For·example·we·can·extract·all·three·timeseries·at·a |
949 | specific·lat-lon·location: | 949 | specific·lat-lon·location: |
950 | In·[100]:·dt.sel(lat=75,·lon=300) | 950 | In·[100]:·dt.sel(lat=75,·lon=300) |
951 | ValueError:·Dimensions·{'l | 951 | ValueError:·Dimensions·{'lon',·'lat'}·do·not·exist.·Expected·one·or·more·of·set |
952 | () | 952 | () |
953 | or·compute·the·standard·deviation·of·each·timeseries·to·find·out·how·it·varies | 953 | or·compute·the·standard·deviation·of·each·timeseries·to·find·out·how·it·varies |
954 | with·sampling·frequency: | 954 | with·sampling·frequency: |
955 | In·[101]:·dt.std(dim="time") | 955 | In·[101]:·dt.std(dim="time") |
956 | ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set() | 956 | ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set() |
957 | *\x8**\x8**\x8**\x8*·C\x8Co\x8oo\x8or\x8rd\x8di\x8in\x8na\x8at\x8te\x8e·I\x8In\x8nh\x8he\x8er\x8ri\x8it\x8ta\x8an\x8nc\x8ce\x8e_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 957 | *\x8**\x8**\x8**\x8*·C\x8Co\x8oo\x8or\x8rd\x8di\x8in\x8na\x8at\x8te\x8e·I\x8In\x8nh\x8he\x8er\x8ri\x8it\x8ta\x8an\x8nc\x8ce\x8e_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
958 | Notice·that·in·the·trees·we·constructed·above·there·is·some·redundancy·-·the | 958 | Notice·that·in·the·trees·we·constructed·above·there·is·some·redundancy·-·the |
Offset 1016, 15 lines modified | Offset 1016, 15 lines modified | ||
1016 | coordinates,·but·explicitly·mark·them·as·such: | 1016 | coordinates,·but·explicitly·mark·them·as·such: |
1017 | In·[107]:·print(dt["/daily"]) | 1017 | In·[107]:·print(dt["/daily"]) |
1018 | KeyError:·'Could·not·find·node·at·/daily' | 1018 | KeyError:·'Could·not·find·node·at·/daily' |
1019 | This·helps·to·differentiate·which·variables·are·defined·on·the·datatree·node | 1019 | This·helps·to·differentiate·which·variables·are·defined·on·the·datatree·node |
1020 | that·you·are·currently·looking·at,·and·which·were·defined·somewhere·above·it. | 1020 | that·you·are·currently·looking·at,·and·which·were·defined·somewhere·above·it. |
1021 | We·can·also·still·perform·all·the·same·operations·on·the·whole·tree: | 1021 | We·can·also·still·perform·all·the·same·operations·on·the·whole·tree: |
1022 | In·[108]:·dt.sel(lat=[75],·lon=[300]) | 1022 | In·[108]:·dt.sel(lat=[75],·lon=[300]) |
1023 | ValueError:·Dimensions·{'l | 1023 | ValueError:·Dimensions·{'lon',·'lat'}·do·not·exist.·Expected·one·or·more·of·set |
1024 | () | 1024 | () |
1025 | In·[109]:·dt.std(dim="time") | 1025 | In·[109]:·dt.std(dim="time") |
1026 | ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set() | 1026 | ValueError:·Dimension(s)·'time'·do·not·exist.·Expected·one·or·more·of·set() |
1027 | _\x8[_\x8L_\x8o_\x8g_\x8o_\x8·_\x8o_\x8f_\x8·_\x8x_\x8a_\x8r_\x8r_\x8a_\x8y_\x8] | 1027 | _\x8[_\x8L_\x8o_\x8g_\x8o_\x8·_\x8o_\x8f_\x8·_\x8x_\x8a_\x8r_\x8r_\x8a_\x8y_\x8] |
1028 | *\x8**\x8**\x8**\x8**\x8**\x8*·_\x8x\x8x_\x8a\x8a_\x8r\x8r_\x8r\x8r_\x8a\x8a_\x8y\x8y·*\x8**\x8**\x8**\x8**\x8**\x8* | 1028 | *\x8**\x8**\x8**\x8**\x8**\x8*·_\x8x\x8x_\x8a\x8a_\x8r\x8r_\x8r\x8r_\x8a\x8a_\x8y\x8y·*\x8**\x8**\x8**\x8**\x8**\x8* |
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·0xe | 243 | <span·class="gh">Out[17]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xe2adf450>]</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·0xe | 245 | <span·class="gh">Out[18]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xe2b69ea0>]</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·0xe | 247 | <span·class="gh">Out[19]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xea031190>]</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·0xe | 249 | <span·class="gh">Out[20]:·</span><span·class="go"><matplotlib.legend.Legend·at·0xea02de90></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 511, 15 lines modified | Offset 511, 15 lines modified | ||
511 | <span·class="gp">···....:·</span>····<span·class="n">axes</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">]</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="o">*</span><span·class="n">xr</span><span·class="o">.</span><span·class="n">broadcast</span><span·class="p">(</span><span·class="n">lon</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">z</span><span·class="o">=</span><span·class="n">idx</span><span·class="p">),</span>·<span·class="n">lat</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">z</span><span·class="o">=</span><span·class="n">idx</span><span·class="p">)),</span>·<span·class="s2">"--k"</span><span·class="p">)</span> | 511 | <span·class="gp">···....:·</span>····<span·class="n">axes</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">]</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="o">*</span><span·class="n">xr</span><span·class="o">.</span><span·class="n">broadcast</span><span·class="p">(</span><span·class="n">lon</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">z</span><span·class="o">=</span><span·class="n">idx</span><span·class="p">),</span>·<span·class="n">lat</span><span·class="o">.</span><span·class="n">isel</span><span·class="p">(</span><span·class="n">z</span><span·class="o">=</span><span·class="n">idx</span><span·class="p">)),</span>·<span·class="s2">"--k"</span><span·class="p">)</span> |
512 | <span·class="gp">···....:·</span> | 512 | <span·class="gp">···....:·</span> |
513 | <span·class="gp">In·[61]:·</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">]</span><span·class="o">.</span><span·class="n">set_title</span><span·class="p">(</span><span·class="s2">"Raw·data"</span><span·class="p">)</span> | 513 | <span·class="gp">In·[61]:·</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">0</span><span·class="p">]</span><span·class="o">.</span><span·class="n">set_title</span><span·class="p">(</span><span·class="s2">"Raw·data"</span><span·class="p">)</span> |
514 | <span·class="gh">Out[61]:·</span><span·class="go">Text(0.5,·1.0,·'Raw·data')</span> | 514 | <span·class="gh">Out[61]:·</span><span·class="go">Text(0.5,·1.0,·'Raw·data')</span> |
515 | <span·class="gp">In·[62]:·</span><span·class="n">dsi</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">lon</span><span·class="o">=</span><span·class="n">lon</span><span·class="p">,</span>·<span·class="n">lat</span><span·class="o">=</span><span·class="n">lat</span><span·class="p">)</span> | 515 | <span·class="gp">In·[62]:·</span><span·class="n">dsi</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">interp</span><span·class="p">(</span><span·class="n">lon</span><span·class="o">=</span><span·class="n">lon</span><span·class="p">,</span>·<span·class="n">lat</span><span·class="o">=</span><span·class="n">lat</span><span·class="p">)</span> |
516 | <span·class="go">ValueError:·Dimensions·{'l | 516 | <span·class="go">ValueError:·Dimensions·{'lon',·'lat'}·do·not·exist.·Expected·one·or·more·of·FrozenMappingWarningOnValuesAccess({'x':·3,·'y':·4})</span> |
517 | <span·class="gp">In·[63]:·</span><span·class="n">dsi</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">ax</span><span·class="o">=</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">])</span> | 517 | <span·class="gp">In·[63]:·</span><span·class="n">dsi</span><span·class="o">.</span><span·class="n">air</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">ax</span><span·class="o">=</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">])</span> |
518 | <span·class="go">NameError:·name·'dsi'·is·not·defined</span> | 518 | <span·class="go">NameError:·name·'dsi'·is·not·defined</span> |
519 | <span·class="gp">In·[64]:·</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">]</span><span·class="o">.</span><span·class="n">set_title</span><span·class="p">(</span><span·class="s2">"Remapped·data"</span><span·class="p">)</span> | 519 | <span·class="gp">In·[64]:·</span><span·class="n">axes</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">]</span><span·class="o">.</span><span·class="n">set_title</span><span·class="p">(</span><span·class="s2">"Remapped·data"</span><span·class="p">)</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·0xe | 160 | Out[17]:·[<matplotlib.lines.Line2D·at·0xe2adf450>] |
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·0xe | 163 | Out[18]:·[<matplotlib.lines.Line2D·at·0xe2b69ea0>] |
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·0xe | 166 | Out[19]:·[<matplotlib.lines.Line2D·at·0xea031190>] |
167 | In·[20]:·plt.legend() | 167 | In·[20]:·plt.legend() |
168 | Out[20]:·<matplotlib.legend.Legend·at·0xe | 168 | Out[20]:·<matplotlib.legend.Legend·at·0xea02de90> |
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 410, 15 lines modified | Offset 410, 15 lines modified | ||
410 | k") | 410 | k") |
411 | ···....: | 411 | ···....: |
412 | In·[61]:·axes[0].set_title("Raw·data") | 412 | In·[61]:·axes[0].set_title("Raw·data") |
413 | Out[61]:·Text(0.5,·1.0,·'Raw·data') | 413 | Out[61]:·Text(0.5,·1.0,·'Raw·data') |
414 | In·[62]:·dsi·=·ds.interp(lon=lon,·lat=lat) | 414 | In·[62]:·dsi·=·ds.interp(lon=lon,·lat=lat) |
415 | ValueError:·Dimensions·{'l | 415 | ValueError:·Dimensions·{'lon',·'lat'}·do·not·exist.·Expected·one·or·more·of |
416 | FrozenMappingWarningOnValuesAccess({'x':·3,·'y':·4}) | 416 | FrozenMappingWarningOnValuesAccess({'x':·3,·'y':·4}) |
417 | In·[63]:·dsi.air.plot(ax=axes[1]) | 417 | In·[63]:·dsi.air.plot(ax=axes[1]) |
418 | NameError:·name·'dsi'·is·not·defined | 418 | NameError:·name·'dsi'·is·not·defined |
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·0xe2 | 636 | <span·class="gh">Out[13]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe291e388></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-c135d9f5-8967-49cb-beb2-f02e92ce7636')</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·0xe2 | 742 | <span·class="gh">Out[22]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe24b9df0></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·0xe2 | 744 | <span·class="gh">Out[23]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe24b9220></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·0xe2 | 746 | <span·class="gh">Out[24]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe24b9898></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·0xe2 | 773 | <span·class="gh">Out[28]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe24c09b8></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·0xe2 | 822 | <span·class="gh">Out[30]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe24d2028></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·0xe2 | 833 | <span·class="gh">Out[32]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe24c0f10></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)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29</span> | 882 | <span·class="go">····foo······(x)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29</span> |
883 | </pre></div> | 883 | </pre></div> |
884 | </div> | 884 | </div> |
885 | <p>These·multi-dimensional·coordinates·are·only·two-dimensional·and·take·up·very·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·0xe2 | 889 | <span·class="gh">Out[36]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xe24d3ad8></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/20790 bytes (9.50%) 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·0xe2 | 487 | Out[13]:·<xarray.backends.zarr.ZarrStore·at·0xe291e388> |
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-c135d9f5-8967-49cb-beb2-f02e92ce7636') |
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·0xe2 | 579 | Out[22]:·<xarray.backends.zarr.ZarrStore·at·0xe24b9df0> |
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·0xe2 | 581 | Out[23]:·<xarray.backends.zarr.ZarrStore·at·0xe24b9220> |
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·0xe2 | 583 | Out[24]:·<xarray.backends.zarr.ZarrStore·at·0xe24b9898> |
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·0xe2 | 605 | Out[28]:·<xarray.backends.zarr.ZarrStore·at·0xe24c09b8> |
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·0xe2 | 641 | Out[30]:·<xarray.backends.zarr.ZarrStore·at·0xe24d2028> |
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·0xe2 | 652 | Out[32]:·<xarray.backends.zarr.ZarrStore·at·0xe24c0f10> |
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)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29 | 696 | ··*·x········(x)·int32·120B·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)·int32·120B·0·1·2·3·4·5·6·7·8·9·...·21·22·23·24·25·26·27·28·29 | 698 | ····foo······(x)·int32·120B·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·0xe2 | 703 | Out[36]:·<xarray.backends.zarr.ZarrStore·at·0xe24d3ad8> |
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/7406 bytes (10.37%) 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·0xe | 449 | <span·class="gh">Out[51]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xe0bcd500>]</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)·int32·16B·0·1·2·3</span> | 858 | <span·class="go">··*·z········(z)·int32·16B·0·1·2·3</span> |
859 | <span·class="go">··*·w········(w)·<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·0xe2 | 863 | <span·class="gh">Out[99]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xe29c73c8></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·0xe0 | 869 | <span·class="gh">Out[100]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xe0840df0></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·0xe0 | 875 | <span·class="gh">Out[101]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xe09f10e0></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·0xe | 881 | <span·class="gh">Out[102]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xe0bcd450></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·0xe0 | 887 | <span·class="gh">Out[103]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xe0829b30></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·0xe0 | 892 | <span·class="gh">Out[104]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xe07cc190></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·0xe0 | 899 | <span·class="gh">Out[105]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xe0a3cf50></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·0xe0 | 905 | <span·class="gh">Out[106]:·</span><span·class="go"><mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xe077b030></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·0xe | 911 | <span·class="gh">Out[107]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0xe1ea3030></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·0xe0 | 917 | <span·class="gh">Out[108]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0xe01b3df0></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·0xe3 | 928 | <span·class="gh">Out[109]:·</span><span·class="go"><matplotlib.quiver.Quiver·at·0xe3339760></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·0xe | 934 | <span·class="gh">Out[110]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0xe2b2ef48></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·0xe0 | 945 | <span·class="gh">Out[111]:·</span><span·class="go"><matplotlib.collections.LineCollection·at·0xe05673a0></span> |
946 | </pre></div> | 946 | </pre></div> |
947 | </div> | 947 | </div> |
948 | <img·alt="_build/html/_static/ds_simple_streamplot.png"·src="_build/html/_static/ds_simple_streamplot.png"·/> | 948 | <img·alt="_build/html/_static/ds_simple_streamplot.png"·src="_build/html/_static/ds_simple_streamplot.png"·/> |
949 | <p>where·<code·class="docutils·literal·notranslate"><span·class="pre">u</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">v</span></code>·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to·the·streamlines. | 949 | <p>where·<code·class="docutils·literal·notranslate"><span·class="pre">u</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">v</span></code>·denote·the·x·and·y·direction·components·of·the·vectors·tangent·to·the·streamlines. |
950 | Again,·faceting·is·also·possible:</p> | 950 | Again,·faceting·is·also·possible:</p> |
Max diff block lines reached; 20932/42704 bytes (49.02%) of diff not shown. |
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·0xe | 296 | Out[51]:·[<matplotlib.lines.Line2D·at·0xe0bcd500>] |
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)·int32·16B·0·1·2·3 | 614 | ··*·z········(z)·int32·16B·0·1·2·3 |
615 | ··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five' | 615 | ··*·w········(w)·<U5·80B·'one'·'two'·'three'·'five' |
616 | Attributes: | 616 | Attributes: |
617 | ····units:····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·0xe2 | 619 | Out[99]:·<matplotlib.collections.PathCollection·at·0xe29c73c8> |
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·0xe0 | 623 | Out[100]:·<matplotlib.collections.PathCollection·at·0xe0840df0> |
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·0xe0 | 627 | Out[101]:·<matplotlib.collections.PathCollection·at·0xe09f10e0> |
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·0xe | 631 | Out[102]:·<matplotlib.collections.PathCollection·at·0xe0bcd450> |
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·0xe0 | 637 | Out[103]:·<matplotlib.collections.PathCollection·at·0xe0829b30> |
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·0xe0 | 641 | Out[104]:·<matplotlib.collections.PathCollection·at·0xe07cc190> |
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·0xe0 | 647 | Out[105]:·<matplotlib.collections.PathCollection·at·0xe0a3cf50> |
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·0xe0 | 651 | Out[106]:·<mpl_toolkits.mplot3d.art3d.Path3DCollection·at·0xe077b030> |
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·0xe | 656 | Out[107]:·<xarray.plot.facetgrid.FacetGrid·at·0xe1ea3030> |
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·0xe0 | 661 | Out[108]:·<xarray.plot.facetgrid.FacetGrid·at·0xe01b3df0> |
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·0xe3 | 669 | Out[109]:·<matplotlib.quiver.Quiver·at·0xe3339760> |
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·0xe | 674 | Out[110]:·<xarray.plot.facetgrid.FacetGrid·at·0xe2b2ef48> |
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·0xe0 | 682 | Out[111]:·<matplotlib.collections.LineCollection·at·0xe05673a0> |
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·0xe | 687 | Out[112]:·<xarray.plot.facetgrid.FacetGrid·at·0xe2b42180> |
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; 6635/13804 bytes (48.07%) 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, 32 lines modified | Offset 84, 29 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·(ģa:·3)>·Size:·6B</span> |
91 | <span·class="go">array([ | 91 | <span·class="go">array([-31411,·-11635,·-13617],·dtype=int16)</span> |
92 | <span·class="gp">In·[4]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> | 92 | <span·class="gp">In·[4]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">()</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> |
93 | <span·class="gh">Out[4]:·</span> | 93 | <span·class="gh">Out[4]:·</span> |
94 | <span·class="go"><xarray.Variable·(0:·1)>·Size:·1B</span> | 94 | <span·class="go"><xarray.Variable·(0:·1)>·Size:·1B</span> |
95 | <span·class="go">array([0],·dtype=int8)</span> | 95 | <span·class="go">array([0],·dtype=int8)</span> |
96 | <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> | 96 | <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> |
97 | <span·class="gh">Out[5]:·</span> | 97 | <span·class="gh">Out[5]:·</span> |
98 | <span·class="go"><xarray.Variable·( | 98 | <span·class="go"><xarray.Variable·(ż¹żŲ:·4,·3ĺ:·2)>·Size:·128B</span> |
99 | <span·class="go">array([[········nan-9.288e+295j,··3.648e+016-1.100e+000j],</span> | ||
100 | <span·class="go">·······[·8.888e+083+1.827e+016j,·-1.500e+000-2.220e-016j],</span> | ||
101 | <span·class="go">·······[········nan·······+infj,··1.000e+000+2.225e-311j],</span> | ||
102 | <span·class="go">·······[-2.225e-309+1.100e+000j,·········inf·······+infj]])</span> | ||
99 | <span·class="go">array([[[2613192455,·········50,·········12],</span> | ||
100 | <span·class="go">········[·····19653,·······4118,·2613192455],</span> | ||
101 | <span·class="go">········[2613192455,·2613192455,·······8022]],</span> | ||
102 | <span·class="go">·······[[2613192455,·2613192455,········165],</span> | ||
103 | <span·class="go">········[2613192455,·2613192455,·2613192455],</span> | ||
104 | <span·class="go">········[2613192455,·2613192455,·2613192455]]],·shape=(2,·3,·3),·dtype=uint32)</span> | ||
105 | </pre></div> | 103 | </pre></div> |
106 | </div> | 104 | </div> |
107 | <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 | 105 | <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 |
108 | range·of·data·that·the·xarray·strategies·can·generate.</p> | 106 | range·of·data·that·the·xarray·strategies·can·generate.</p> |
109 | <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 | 107 | <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 |
110 | <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.given()</span></code>·decorator:</p> | 108 | <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.given()</span></code>·decorator:</p> |
111 | <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> | 109 | <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 127, 107 lines modified | Offset 124, 115 lines modified | ||
127 | <p>Xarray’s·strategies·can·accept·other·strategies·as·arguments,·allowing·you·to·customise·the·contents·of·the·generated | 124 | <p>Xarray’s·strategies·can·accept·other·strategies·as·arguments,·allowing·you·to·customise·the·contents·of·the·generated |
128 | examples.</p> | 125 | examples.</p> |
129 | <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> | 126 | <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> |
130 | <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> | 127 | <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> |
131 | <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> | 128 | <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> |
132 | <span·class="gh">Out[9]:·</span> | 129 | <span·class="gh">Out[9]:·</span> |
133 | <span·class="go"><xarray.Variable·( | 130 | <span·class="go"><xarray.Variable·(0:·1)>·Size:·8B</span> |
131 | <span·class="go">array([0.+0.j],·dtype='>c8')</span> | ||
134 | <span·class="go">array([·······inf-2.225e-308j,·1.000e-005-1.000e-005j,·3.106e-214+1.000e-005j,</span> | ||
135 | <span·class="go">·······2.456e+016-1.000e-005j,·4.182e+016·······+nanj],·dtype='>c16')</span> | ||
136 | </pre></div> | 132 | </pre></div> |
137 | </div> | 133 | </div> |
138 | <p>This·also·works·with·custom·strategies,·or·strategies·defined·in·other·packages. | 134 | <p>This·also·works·with·custom·strategies,·or·strategies·defined·in·other·packages. |
139 | 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> | 135 | 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> |
140 | </section> | 136 | </section> |
141 | <section·id="fixing-arguments"> | 137 | <section·id="fixing-arguments"> |
142 | <h3>Fixing·Arguments<a·class="headerlink"·href="#fixing-arguments"·title="Link·to·this·heading">¶</a></h3> | 138 | <h3>Fixing·Arguments<a·class="headerlink"·href="#fixing-arguments"·title="Link·to·this·heading">¶</a></h3> |
143 | <p>If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation·in·the·generated·examples | 139 | <p>If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation·in·the·generated·examples |
144 | over·all·other·aspects,·then·use·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>.</p> | 140 | over·all·other·aspects,·then·use·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>.</p> |
145 | <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> | 141 | <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> |
146 | <span·class="go">#·Generates·only·variable·objects·with·dimensions·["x",·"y"]</span> | 142 | <span·class="go">#·Generates·only·variable·objects·with·dimensions·["x",·"y"]</span> |
147 | <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> | 143 | <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> |
148 | <span·class="gh">Out[11]:·</span> | 144 | <span·class="gh">Out[11]:·</span> |
149 | <span·class="go"><xarray.Variable·(x:· | 145 | <span·class="go"><xarray.Variable·(x:·6,·y:·3)>·Size:·144B</span> |
146 | <span·class="go">array([[29408,·29408,··4176],</span> | ||
147 | <span·class="go">·······[29408,·29408,·29408],</span> | ||
148 | <span·class="go">·······[29408,·15793,·29408],</span> | ||
149 | <span·class="go">·······[29408,·53414,·29408],</span> | ||
150 | <span·class="go">·······[29408,·29408,·29408],</span> | ||
151 | <span·class="go">·······[29408,·29408,·29408]],·shape=(6,·3),·dtype=uint64)</span> | ||
150 | <span·class="go">array([[··············-52464,··-786453851854018143,···············-52464,···············-52464,</span> | ||
151 | <span·class="go">······················-52464,···············-52464],</span> | ||
152 | <span·class="go">·······[···············10533,···············-52464,···············-52464,···············-52464,</span> | ||
153 | <span·class="go">······················-32324,···············-52464],</span> | ||
154 | <span·class="go">·······[-2917799381959081349,·-3712367082676216948,···············-52464,················37242,</span> | ||
155 | <span·class="go">······················-52464,················-1931],</span> | ||
156 | <span·class="go">·······[·2460872617773150123,·-3769050785953571223,···············-52464,···············-52464,</span> | ||
157 | <span·class="go">·········7011038661760930734,···············-52464]],·shape=(4,·6),·dtype=int64)</span> | ||
158 | <span·class="go">Attributes:</span> | 152 | <span·class="go">Attributes:</span> |
153 | <span·class="go">····ætF¼Ŋ:····{'Ų':·array([55157],·dtype='>u8')}</span> | ||
159 | <span·class="go">····ż:········{'ž':·True,·'ïÌźč':·False,·'':·True,·'VM¾ſÇ':·True}</span> | ||
160 | <span·class="go">····1:········{'žſĢżČ':·array([nan+3.403e+38j]),·'mċ':·None,·'':·False,·'ħņÝ'...</span> | ||
161 | <span·class="go">····ŃãùÕ:·····{'':·False,·'ďñĜÏó':·None}</span> | ||
162 | </pre></div> | 154 | </pre></div> |
163 | </div> | 155 | </div> |
164 | <p>(This·is·technically·another·example·of·chaining·strategies·-·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>·is·simply·a | 156 | <p>(This·is·technically·another·example·of·chaining·strategies·-·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">hypothesis.strategies.just()</span></code>·is·simply·a |
165 | special·strategy·that·just·contains·a·single·example.)</p> | 157 | special·strategy·that·just·contains·a·single·example.)</p> |
166 | <p>To·fix·the·length·of·dimensions·you·can·instead·pass·<code·class="docutils·literal·notranslate"><span·class="pre">dims</span></code>·as·a·mapping·of·dimension·names·to·lengths | 158 | <p>To·fix·the·length·of·dimensions·you·can·instead·pass·<code·class="docutils·literal·notranslate"><span·class="pre">dims</span></code>·as·a·mapping·of·dimension·names·to·lengths |
167 | (i.e.·following·xarray·objects’·<code·class="docutils·literal·notranslate"><span·class="pre">.sizes()</span></code>·property),·e.g.</p> | 159 | (i.e.·following·xarray·objects’·<code·class="docutils·literal·notranslate"><span·class="pre">.sizes()</span></code>·property),·e.g.</p> |
168 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Generates·only·variables·with·dimensions·["x",·"y"],·of·lengths·2·&·3·respectively</span> | 160 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Generates·only·variables·with·dimensions·["x",·"y"],·of·lengths·2·&·3·respectively</span> |
169 | <span·class="gp">In·[12]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dims</span><span·class="o">=</span><span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">({</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="mi">3</span><span·class="p">}))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> | 161 | <span·class="gp">In·[12]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">dims</span><span·class="o">=</span><span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">({</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="mi">2</span><span·class="p">,</span>·<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="mi">3</span><span·class="p">}))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> |
170 | <span·class="gh">Out[12]:·</span> | 162 | <span·class="gh">Out[12]:·</span> |
171 | <span·class="go"><xarray.Variable·(x:·2,·y:·3)>·Size:· | 163 | <span·class="go"><xarray.Variable·(x:·2,·y:·3)>·Size:·24B</span> |
172 | <span·class="go">array([[-0.·,··nan,·-0.·],</span> | ||
173 | <span·class="go"> | 164 | <span·class="go">array([[··363522030,···363522030,·········234],</span> |
165 | <span·class="go">·······[-1302831096,··-980324081,···363522030]])</span> | ||
166 | <span·class="go">Attributes:</span> | ||
167 | <span·class="go">····ųÂĆüâ:····{'ŻHőÚM':·array([['\xa0_Èu\U000d2a8a!\x06\x8a¹\U0008feb0\x17',·...</span> | ||
174 | </pre></div> | 168 | </pre></div> |
175 | </div> | 169 | </div> |
176 | <p>You·can·also·use·this·to·specify·that·you·want·examples·which·are·missing·some·part·of·the·data·structure,·for·instance</p> | 170 | <p>You·can·also·use·this·to·specify·that·you·want·examples·which·are·missing·some·part·of·the·data·structure,·for·instance</p> |
177 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Generates·a·Variable·with·no·attributes</span> | 171 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·Generates·a·Variable·with·no·attributes</span> |
178 | <span·class="gp">In·[13]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">attrs</span><span·class="o">=</span><span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">({}))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> | 172 | <span·class="gp">In·[13]:·</span><span·class="n">xrst</span><span·class="o">.</span><span·class="n">variables</span><span·class="p">(</span><span·class="n">attrs</span><span·class="o">=</span><span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">({}))</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> |
179 | <span·class="gh">Out[13]:·</span> | 173 | <span·class="gh">Out[13]:·</span> |
180 | <span·class="go"><xarray.Variable·( | 174 | <span·class="go"><xarray.Variable·(ż:·6,·ľŪíý:·1)>·Size:·12B</span> |
175 | <span·class="go">array([[35072],</span> | ||
176 | <span·class="go">·······[14588],</span> | ||
177 | <span·class="go">·······[19313],</span> | ||
178 | <span·class="go">·······[14608],</span> | ||
179 | <span·class="go">·······[37816],</span> | ||
180 | <span·class="go">·······[19969]],·dtype=uint16)</span> | ||
181 | <span·class="go">array([[[-3.333e-001,········-inf,··2.225e-309]],</span> | ||
182 | <span·class="go">·······[[········nan,·-2.225e-311,··3.333e-001]],</span> | ||
183 | <span·class="go">·······[[·6.104e-005,·-1.175e-038,·-2.949e+143]],</span> | ||
184 | <span·class="go">·······[[·1.113e-308,··6.400e+016,··9.007e+015]]],·shape=(4,·1,·3))</span> | ||
185 | </pre></div> | 181 | </pre></div> |
186 | </div> | 182 | </div> |
187 | <p>Through·a·combination·of·chaining·strategies·and·fixing·arguments,·you·can·specify·quite·complicated·requirements·on·the | 183 | <p>Through·a·combination·of·chaining·strategies·and·fixing·arguments,·you·can·specify·quite·complicated·requirements·on·the |
188 | objects·your·chained·strategy·will·generate.</p> | 184 | objects·your·chained·strategy·will·generate.</p> |
189 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="n">fixed_x_variable_y_maybe_z</span>·<span·class="o">=</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">fixed_dictionaries</span><span·class="p">(</span> | 185 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[14]:·</span><span·class="n">fixed_x_variable_y_maybe_z</span>·<span·class="o">=</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">fixed_dictionaries</span><span·class="p">(</span> |
190 | <span·class="gp">···....:·</span>····<span·class="p">{</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">(</span><span·class="mi">2</span><span·class="p">),</span>·<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">integers</span><span·class="p">(</span><span·class="mi">3</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">)},</span>·<span·class="n">optional</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"z"</span><span·class="p">:</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">(</span><span·class="mi">2</span><span·class="p">)}</span> | 186 | <span·class="gp">···....:·</span>····<span·class="p">{</span><span·class="s2">"x"</span><span·class="p">:</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">(</span><span·class="mi">2</span><span·class="p">),</span>·<span·class="s2">"y"</span><span·class="p">:</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">integers</span><span·class="p">(</span><span·class="mi">3</span><span·class="p">,</span>·<span·class="mi">4</span><span·class="p">)},</span>·<span·class="n">optional</span><span·class="o">=</span><span·class="p">{</span><span·class="s2">"z"</span><span·class="p">:</span>·<span·class="n">st</span><span·class="o">.</span><span·class="n">just</span><span·class="p">(</span><span·class="mi">2</span><span·class="p">)}</span> |
191 | <span·class="gp">···....:·</span><span·class="p">)</span> | 187 | <span·class="gp">···....:·</span><span·class="p">)</span> |
192 | <span·class="gp">···....:·</span> | 188 | <span·class="gp">···....:·</span> |
193 | <span·class="gp">In·[15]:·</span><span·class="n">fixed_x_variable_y_maybe_z</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> | 189 | <span·class="gp">In·[15]:·</span><span·class="n">fixed_x_variable_y_maybe_z</span><span·class="o">.</span><span·class="n">example</span><span·class="p">()</span> |
Max diff block lines reached; 10547/24145 bytes (43.68%) of diff not shown. |
Offset 28, 32 lines modified | Offset 28, 29 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·( | 34 | <xarray.Variable·(ģa:·3)>·Size:·6B |
35 | array([ | 35 | array([-31411,·-11635,·-13617],·dtype=int16) |
36 | In·[4]:·xrst.variables().example() | 36 | In·[4]:·xrst.variables().example() |
37 | Out[4]: | 37 | Out[4]: |
38 | <xarray.Variable·(0:·1)>·Size:·1B | 38 | <xarray.Variable·(0:·1)>·Size:·1B |
39 | array([0],·dtype=int8) | 39 | array([0],·dtype=int8) |
40 | In·[5]:·xrst.variables().example() | 40 | In·[5]:·xrst.variables().example() |
41 | Out[5]: | 41 | Out[5]: |
42 | <xarray.Variable·(ż¹żŲ:·4,·3ĺ:·2)>·Size:·128B | ||
43 | array([[········nan-9.288e+295j,··3.648e+016-1.100e+000j], | ||
44 | ·······[·8.888e+083+1.827e+016j,·-1.500e+000-2.220e-016j], | ||
45 | ·······[········nan·······+infj,··1.000e+000+2.225e-311j], | ||
46 | ·······[-2.225e-309+1.100e+000j,·········inf·······+infj]]) | ||
42 | <xarray.Variable·(žŵĖŇŀ:·2,·¼:·3,·Ý:·3)>·Size:·72B | ||
43 | array([[[2613192455,·········50,·········12], | ||
44 | ········[·····19653,·······4118,·2613192455], | ||
45 | ········[2613192455,·2613192455,·······8022]], | ||
46 | ·······[[2613192455,·2613192455,········165], | ||
47 | ········[2613192455,·2613192455,·2613192455], | ||
48 | ········[2613192455,·2613192455,·2613192455]]],·shape=(2,·3,·3),·dtype=uint32) | ||
49 | You·can·see·that·calling·.example()·multiple·times·will·generate·different | 47 | You·can·see·that·calling·.example()·multiple·times·will·generate·different |
50 | examples,·giving·you·an·idea·of·the·wide·range·of·data·that·the·xarray | 48 | examples,·giving·you·an·idea·of·the·wide·range·of·data·that·the·xarray |
51 | strategies·can·generate. | 49 | strategies·can·generate. |
52 | In·your·tests·however·you·should·not·use·.example()·-·instead·you·should | 50 | In·your·tests·however·you·should·not·use·.example()·-·instead·you·should |
53 | parameterize·your·tests·with·the·hypothesis.given()·decorator: | 51 | parameterize·your·tests·with·the·hypothesis.given()·decorator: |
54 | In·[6]:·from·hypothesis·import·given | 52 | In·[6]:·from·hypothesis·import·given |
55 | In·[7]:·@given(xrst.variables()) | 53 | In·[7]:·@given(xrst.variables()) |
Offset 65, 112 lines modified | Offset 62, 115 lines modified | ||
65 | customise·the·contents·of·the·generated·examples. | 62 | customise·the·contents·of·the·generated·examples. |
66 | #·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all | 63 | #·generate·a·Variable·containing·an·array·with·a·complex·number·dtype,·but·all |
67 | other·details·still·arbitrary | 64 | other·details·still·arbitrary |
68 | In·[8]:·from·hypothesis.extra.numpy·import·complex_number_dtypes | 65 | In·[8]:·from·hypothesis.extra.numpy·import·complex_number_dtypes |
69 | In·[9]:·xrst.variables(dtype=complex_number_dtypes()).example() | 66 | In·[9]:·xrst.variables(dtype=complex_number_dtypes()).example() |
70 | Out[9]: | 67 | Out[9]: |
71 | <xarray.Variable·( | 68 | <xarray.Variable·(0:·1)>·Size:·8B |
69 | array([0.+0.j],·dtype='>c8') | ||
72 | array([·······inf-2.225e-308j,·1.000e-005-1.000e-005j,·3.106e-214+1.000e-005j, | ||
73 | ·······2.456e+016-1.000e-005j,·4.182e+016·······+nanj],·dtype='>c16') | ||
74 | This·also·works·with·custom·strategies,·or·strategies·defined·in·other | 70 | This·also·works·with·custom·strategies,·or·strategies·defined·in·other |
75 | packages.·For·example·you·could·imagine·creating·a·chunks·strategy·to·specify | 71 | packages.·For·example·you·could·imagine·creating·a·chunks·strategy·to·specify |
76 | particular·chunking·patterns·for·a·dask-backed·array. | 72 | particular·chunking·patterns·for·a·dask-backed·array. |
77 | *\x8**\x8**\x8**\x8*·F\x8Fi\x8ix\x8xi\x8in\x8ng\x8g·A\x8Ar\x8rg\x8gu\x8um\x8me\x8en\x8nt\x8ts\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8* | 73 | *\x8**\x8**\x8**\x8*·F\x8Fi\x8ix\x8xi\x8in\x8ng\x8g·A\x8Ar\x8rg\x8gu\x8um\x8me\x8en\x8nt\x8ts\x8s_\x8?\x8¶·*\x8**\x8**\x8**\x8* |
78 | If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation | 74 | If·you·want·to·fix·one·aspect·of·the·data·structure,·whilst·allowing·variation |
79 | in·the·generated·examples·over·all·other·aspects,·then·use | 75 | in·the·generated·examples·over·all·other·aspects,·then·use |
80 | hypothesis.strategies.just(). | 76 | hypothesis.strategies.just(). |
81 | In·[10]:·import·hypothesis.strategies·as·st | 77 | In·[10]:·import·hypothesis.strategies·as·st |
82 | #·Generates·only·variable·objects·with·dimensions·["x",·"y"] | 78 | #·Generates·only·variable·objects·with·dimensions·["x",·"y"] |
83 | In·[11]:·xrst.variables(dims=st.just(["x",·"y"])).example() | 79 | In·[11]:·xrst.variables(dims=st.just(["x",·"y"])).example() |
84 | Out[11]: | 80 | Out[11]: |
85 | <xarray.Variable·(x:· | 81 | <xarray.Variable·(x:·6,·y:·3)>·Size:·144B |
82 | array([[29408,·29408,··4176], | ||
83 | ·······[29408,·29408,·29408], | ||
84 | ·······[29408,·15793,·29408], | ||
85 | ·······[29408,·53414,·29408], | ||
86 | ·······[29408,·29408,·29408], | ||
87 | ·······[29408,·29408,·29408]],·shape=(6,·3),·dtype=uint64) | ||
86 | array([[··············-52464,··-786453851854018143,···············-52464, | ||
87 | -52464, | ||
88 | ······················-52464,···············-52464], | ||
89 | ·······[···············10533,···············-52464,···············-52464, | ||
90 | -52464, | ||
91 | ······················-32324,···············-52464], | ||
92 | ·······[-2917799381959081349,·-3712367082676216948,···············-52464, | ||
93 | 37242, | ||
94 | ······················-52464,················-1931], | ||
95 | ·······[·2460872617773150123,·-3769050785953571223,···············-52464, | ||
96 | -52464, | ||
97 | ·········7011038661760930734,···············-52464]],·shape=(4,·6), | ||
98 | dtype=int64) | ||
99 | Attributes: | 88 | Attributes: |
89 | ····ætF¼Ŋ:····{'Ų':·array([55157],·dtype='>u8')} | ||
100 | ····ż:········{'ž':·True,·'ïÌźč':·False,·'':·True,·'VM¾ſÇ':·True} | ||
101 | ····1:········{'žſĢżČ':·array([nan+3.403e+38j]),·'mċ':·None,·'':·False, | ||
102 | 'ħņÝ'... | ||
103 | ····ŃãùÕ:·····{'':·False,·'ďñĜÏó':·None} | ||
104 | (This·is·technically·another·example·of·chaining·strategies·- | 90 | (This·is·technically·another·example·of·chaining·strategies·- |
105 | hypothesis.strategies.just()·is·simply·a·special·strategy·that·just·contains·a | 91 | hypothesis.strategies.just()·is·simply·a·special·strategy·that·just·contains·a |
106 | single·example.) | 92 | single·example.) |
107 | To·fix·the·length·of·dimensions·you·can·instead·pass·dims·as·a·mapping·of | 93 | To·fix·the·length·of·dimensions·you·can·instead·pass·dims·as·a·mapping·of |
108 | dimension·names·to·lengths·(i.e.·following·xarray·objects’·.sizes()·property), | 94 | dimension·names·to·lengths·(i.e.·following·xarray·objects’·.sizes()·property), |
109 | e.g. | 95 | e.g. |
110 | #·Generates·only·variables·with·dimensions·["x",·"y"],·of·lengths·2·&·3 | 96 | #·Generates·only·variables·with·dimensions·["x",·"y"],·of·lengths·2·&·3 |
111 | respectively | 97 | respectively |
112 | In·[12]:·xrst.variables(dims=st.just({"x":·2,·"y":·3})).example() | 98 | In·[12]:·xrst.variables(dims=st.just({"x":·2,·"y":·3})).example() |
113 | Out[12]: | 99 | Out[12]: |
114 | <xarray.Variable·(x:·2,·y:·3)>·Size:· | 100 | <xarray.Variable·(x:·2,·y:·3)>·Size:·24B |
115 | array([[-0.·,··nan,·-0.·], | ||
116 | 101 | array([[··363522030,···363522030,·········234], | |
102 | ·······[-1302831096,··-980324081,···363522030]]) | ||
103 | Attributes: | ||
104 | ····ųÂĆüâ:····{'ŻHőÚM':·array([['\xa0_Èu\U000d2a8a!\x06\x8a¹\U0008feb0\x17', | ||
105 | ... | ||
117 | You·can·also·use·this·to·specify·that·you·want·examples·which·are·missing·some | 106 | You·can·also·use·this·to·specify·that·you·want·examples·which·are·missing·some |
118 | part·of·the·data·structure,·for·instance | 107 | part·of·the·data·structure,·for·instance |
119 | #·Generates·a·Variable·with·no·attributes | 108 | #·Generates·a·Variable·with·no·attributes |
120 | In·[13]:·xrst.variables(attrs=st.just({})).example() | 109 | In·[13]:·xrst.variables(attrs=st.just({})).example() |
121 | Out[13]: | 110 | Out[13]: |
111 | <xarray.Variable·(ż:·6,·ľŪíý:·1)>·Size:·12B | ||
112 | array([[35072], | ||
113 | ·······[14588], | ||
114 | ·······[19313], | ||
115 | ·······[14608], | ||
116 | ·······[37816], | ||
117 | ·······[19969]],·dtype=uint16) | ||
122 | <xarray.Variable·(ŽŚŽ3:·4,·žž:·1,·yž:·3)>·Size:·96B | ||
123 | array([[[-3.333e-001,········-inf,··2.225e-309]], | ||
124 | ·······[[········nan,·-2.225e-311,··3.333e-001]], | ||
125 | ·······[[·6.104e-005,·-1.175e-038,·-2.949e+143]], | ||
126 | ·······[[·1.113e-308,··6.400e+016,··9.007e+015]]],·shape=(4,·1,·3)) | ||
127 | Through·a·combination·of·chaining·strategies·and·fixing·arguments,·you·can | 118 | Through·a·combination·of·chaining·strategies·and·fixing·arguments,·you·can |
128 | specify·quite·complicated·requirements·on·the·objects·your·chained·strategy | 119 | specify·quite·complicated·requirements·on·the·objects·your·chained·strategy |
129 | will·generate. | 120 | will·generate. |
Max diff block lines reached; 4798/10525 bytes (45.59%) 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·0xde | 7941 | <span·class="gh">Out[46]:·</span><span·class="go"><matplotlib.collections.QuadMesh·at·0xde07abe0></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·0xde | 5105 | ······Out[46]:·<matplotlib.collections.QuadMesh·at·0xde07abe0> |
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))) |