Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | · | 1 | ·bb5a32e8c261fd0fdc1c143926364dbd·2042584·doc·optional·python-xarray-doc_0.16.2-2_all.deb |
2 | ·9a2456450e2c51d89ccb00d8c4a100d8·486600·python·optional·python3-xarray_0.16.2-2_all.deb | 2 | ·9a2456450e2c51d89ccb00d8c4a100d8·486600·python·optional·python3-xarray_0.16.2-2_all.deb |
Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | -rw-r--r--···0········0········0········4·2021-01-02·13:06:33.000000·debian-binary | 1 | -rw-r--r--···0········0········0········4·2021-01-02·13:06:33.000000·debian-binary |
2 | -rw-r--r--···0········0········0·····49 | 2 | -rw-r--r--···0········0········0·····4976·2021-01-02·13:06:33.000000·control.tar.xz |
3 | -rw-r--r--···0········0········0··20374 | 3 | -rw-r--r--···0········0········0··2037416·2021-01-02·13:06:33.000000·data.tar.xz |
Offset 178, 54 lines modified | Offset 178, 54 lines modified | ||
178 | -rw-r--r--···0·root·········(0)·root·········(0)······412·2020-12-01·07:05:15.000000·./usr/share/doc/python-xarray-doc/html/_static/style.css | 178 | -rw-r--r--···0·root·········(0)·root·········(0)······412·2020-12-01·07:05:15.000000·./usr/share/doc/python-xarray-doc/html/_static/style.css |
179 | -rw-r--r--···0·root·········(0)·root·········(0)····23991·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/_static/where_example.png | 179 | -rw-r--r--···0·root·········(0)·root·········(0)····23991·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/_static/where_example.png |
180 | -rw-r--r--···0·root·········(0)·root·········(0)·····8018·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/api-hidden.html | 180 | -rw-r--r--···0·root·········(0)·root·········(0)·····8018·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/api-hidden.html |
181 | -rw-r--r--···0·root·········(0)·root·········(0)····35061·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/api.html | 181 | -rw-r--r--···0·root·········(0)·root·········(0)····35061·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/api.html |
182 | -rw-r--r--···0·root·········(0)·root·········(0)····57284·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/combining.html | 182 | -rw-r--r--···0·root·········(0)·root·········(0)····57284·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/combining.html |
183 | -rw-r--r--···0·root·········(0)·root·········(0)···110206·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/computation.html | 183 | -rw-r--r--···0·root·········(0)·root·········(0)···110206·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/computation.html |
184 | -rw-r--r--···0·root·········(0)·root·········(0)····90070·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/contributing.html | 184 | -rw-r--r--···0·root·········(0)·root·········(0)····90070·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/contributing.html |
185 | -rw-r--r--···0·root·········(0)·root·········(0)····79 | 185 | -rw-r--r--···0·root·········(0)·root·········(0)····79208·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/dask.html |
186 | -rw-r--r--···0·root·········(0)·root·········(0)···102955·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/data-structures.html | 186 | -rw-r--r--···0·root·········(0)·root·········(0)···102955·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/data-structures.html |
187 | -rw-r--r--···0·root·········(0)·root·········(0)····17225·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/duckarrays.html | 187 | -rw-r--r--···0·root·········(0)·root·········(0)····17225·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/duckarrays.html |
188 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/ | 188 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/ |
189 | -rw-r--r--···0·root·········(0)·root·········(0)····6808 | 189 | -rw-r--r--···0·root·········(0)·root·········(0)····68085·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.html |
190 | -rw-r--r--···0·root·········(0)·root·········(0)·····5090·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz | 190 | -rw-r--r--···0·root·········(0)·root·········(0)·····5090·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/ERA5-GRIB-example.ipynb.gz |
191 | -rw-r--r--···0·root·········(0)·root·········(0)····4951 | 191 | -rw-r--r--···0·root·········(0)·root·········(0)····49515·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.html |
192 | -rw-r--r--···0·root·········(0)·root·········(0)····18700·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz | 192 | -rw-r--r--···0·root·········(0)·root·········(0)····18700·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/ROMS_ocean_model.ipynb.gz |
193 | -rw-r--r--···0·root·········(0)·root·········(0)···1074 | 193 | -rw-r--r--···0·root·········(0)·root·········(0)···107470·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.html |
194 | -rw-r--r--···0·root·········(0)·root·········(0)·····8091·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz | 194 | -rw-r--r--···0·root·········(0)·root·········(0)·····8091·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/apply_ufunc_vectorize_1d.ipynb.gz |
195 | -rw-r--r--···0·root·········(0)·root·········(0)····3821 | 195 | -rw-r--r--···0·root·········(0)·root·········(0)····38213·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.html |
196 | -rw-r--r--···0·root·········(0)·root·········(0)····1455 | 196 | -rw-r--r--···0·root·········(0)·root·········(0)····14555·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/area_weighted_temperature.ipynb.gz |
197 | -rw-r--r--···0·root·········(0)·root·········(0)····4784 | 197 | -rw-r--r--···0·root·········(0)·root·········(0)····47847·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.html |
198 | -rw-r--r--···0·root·········(0)·root·········(0)·····316 | 198 | -rw-r--r--···0·root·········(0)·root·········(0)·····3168·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/monthly-means.ipynb.gz |
199 | -rw-r--r--···0·root·········(0)·root·········(0)····4191 | 199 | -rw-r--r--···0·root·········(0)·root·········(0)····41914·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.html |
200 | -rw-r--r--···0·root·········(0)·root·········(0)·····7546·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz | 200 | -rw-r--r--···0·root·········(0)·root·········(0)·····7546·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/multidimensional-coords.ipynb.gz |
201 | -rw-r--r--···0·root·········(0)·root·········(0)····8121 | 201 | -rw-r--r--···0·root·········(0)·root·········(0)····81213·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.html |
202 | -rw-r--r--···0·root·········(0)·root·········(0)·····530 | 202 | -rw-r--r--···0·root·········(0)·root·········(0)·····5303·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/visualization_gallery.ipynb.gz |
203 | -rw-r--r--···0·root·········(0)·root·········(0)····90692·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.html | 203 | -rw-r--r--···0·root·········(0)·root·········(0)····90692·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.html |
204 | -rw-r--r--···0·root·········(0)·root·········(0)···2086 | 204 | -rw-r--r--···0·root·········(0)·root·········(0)···208637·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples/weather-data.ipynb.gz |
205 | -rw-r--r--···0·root·········(0)·root·········(0)····12844·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples.html | 205 | -rw-r--r--···0·root·········(0)·root·········(0)····12844·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/examples.html |
206 | -rw-r--r--···0·root·········(0)·root·········(0)····33153·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/faq.html | 206 | -rw-r--r--···0·root·········(0)·root·········(0)····33153·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/faq.html |
207 | -rw-r--r--···0·root·········(0)·root·········(0)·····9794·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/genindex.html | 207 | -rw-r--r--···0·root·········(0)·root·········(0)·····9794·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/genindex.html |
208 | -rw-r--r--···0·root·········(0)·root·········(0)····38989·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/groupby.html | 208 | -rw-r--r--···0·root·········(0)·root·········(0)····38989·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/groupby.html |
209 | -rw-r--r--···0·root·········(0)·root·········(0)····19098·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/howdoi.html | 209 | -rw-r--r--···0·root·········(0)·root·········(0)····19098·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/howdoi.html |
210 | -rw-r--r--···0·root·········(0)·root·········(0)····17531·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/index.html | 210 | -rw-r--r--···0·root·········(0)·root·········(0)····17531·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/index.html |
211 | -rw-r--r--···0·root·········(0)·root·········(0)···18301 | 211 | -rw-r--r--···0·root·········(0)·root·········(0)···183016·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/indexing.html |
212 | -rw-r--r--···0·root·········(0)·root·········(0)····24660·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/installing.html | 212 | -rw-r--r--···0·root·········(0)·root·········(0)····24660·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/installing.html |
213 | -rw-r--r--···0·root·········(0)·root·········(0)····3414 | 213 | -rw-r--r--···0·root·········(0)·root·········(0)····34149·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/internals.html |
214 | -rw-r--r--···0·root·········(0)·root·········(0)····8996 | 214 | -rw-r--r--···0·root·········(0)·root·········(0)····89962·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/interpolation.html |
215 | -rw-r--r--···0·root·········(0)·root·········(0)···125219·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/io.html | 215 | -rw-r--r--···0·root·········(0)·root·········(0)···125219·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/io.html |
216 | -rw-r--r--···0·root·········(0)·root·········(0)····13348·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/objects.inv | 216 | -rw-r--r--···0·root·········(0)·root·········(0)····13348·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/objects.inv |
217 | -rw-r--r--···0·root·········(0)·root·········(0)····41507·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/pandas.html | 217 | -rw-r--r--···0·root·········(0)·root·········(0)····41507·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/pandas.html |
218 | -rw-r--r--···0·root·········(0)·root·········(0)···20853 | 218 | -rw-r--r--···0·root·········(0)·root·········(0)···208537·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/plotting.html |
219 | -rw-r--r--···0·root·········(0)·root·········(0)····46150·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/quick-overview.html | 219 | -rw-r--r--···0·root·········(0)·root·········(0)····46150·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/quick-overview.html |
220 | -rw-r--r--···0·root·········(0)·root·········(0)····21186·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/related-projects.html | 220 | -rw-r--r--···0·root·········(0)·root·········(0)····21186·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/related-projects.html |
221 | -rw-r--r--···0·root·········(0)·root·········(0)····56597·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/reshaping.html | 221 | -rw-r--r--···0·root·········(0)·root·········(0)····56597·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/reshaping.html |
222 | -rw-r--r--···0·root·········(0)·root·········(0)····22480·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/roadmap.html | 222 | -rw-r--r--···0·root·········(0)·root·········(0)····22480·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/roadmap.html |
223 | -rw-r--r--···0·root·········(0)·root·········(0)·····7920·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/search.html | 223 | -rw-r--r--···0·root·········(0)·root·········(0)·····7920·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/search.html |
224 | -rw-r--r--···0·root·········(0)·root·········(0)···100 | 224 | -rw-r--r--···0·root·········(0)·root·········(0)···100400·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/searchindex.js |
225 | -rw-r--r--···0·root·········(0)·root·········(0)····20789·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/terminology.html | 225 | -rw-r--r--···0·root·········(0)·root·········(0)····20789·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/terminology.html |
226 | -rw-r--r--···0·root·········(0)·root·········(0)····39876·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/time-series.html | 226 | -rw-r--r--···0·root·········(0)·root·········(0)····39876·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/time-series.html |
227 | -rw-r--r--···0·root·········(0)·root·········(0)····41691·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/weather-climate.html | 227 | -rw-r--r--···0·root·········(0)·root·········(0)····41691·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/weather-climate.html |
228 | -rw-r--r--···0·root·········(0)·root·········(0)···574379·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/whats-new.html | 228 | -rw-r--r--···0·root·········(0)·root·········(0)···574379·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/whats-new.html |
229 | -rw-r--r--···0·root·········(0)·root·········(0)····18651·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/why-xarray.html | 229 | -rw-r--r--···0·root·········(0)·root·········(0)····18651·2021-01-02·13:06:33.000000·./usr/share/doc/python-xarray-doc/html/why-xarray.html |
230 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-02·13:06:33.000000·./usr/share/doc-base/ | 230 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2021-01-02·13:06:33.000000·./usr/share/doc-base/ |
231 | -rw-r--r--···0·root·········(0)·root·········(0)······290·2021-01-02·13:06:33.000000·./usr/share/doc-base/python-xarray-doc | 231 | -rw-r--r--···0·root·········(0)·root·········(0)······290·2021-01-02·13:06:33.000000·./usr/share/doc-base/python-xarray-doc |
Offset 300, 15 lines modified | Offset 300, 15 lines modified | ||
300 | <p>You’ll·notice·that·printing·a·dataset·still·shows·a·preview·of·array·values, | 300 | <p>You’ll·notice·that·printing·a·dataset·still·shows·a·preview·of·array·values, |
301 | even·if·they·are·actually·Dask·arrays.·We·can·do·this·quickly·with·Dask·because | 301 | even·if·they·are·actually·Dask·arrays.·We·can·do·this·quickly·with·Dask·because |
302 | we·only·need·to·compute·the·first·few·values·(typically·from·the·first·block). | 302 | we·only·need·to·compute·the·first·few·values·(typically·from·the·first·block). |
303 | To·reveal·the·true·nature·of·an·array,·print·a·DataArray:</p> | 303 | To·reveal·the·true·nature·of·an·array,·print·a·DataArray:</p> |
304 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[3]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">temperature</span> | 304 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[3]:·</span><span·class="n">ds</span><span·class="o">.</span><span·class="n">temperature</span> |
305 | <span·class="gh">Out[3]:·</span><span·class="go"></span> | 305 | <span·class="gh">Out[3]:·</span><span·class="go"></span> |
306 | <span·class="go"><xarray.DataArray·'temperature'·(time:·30,·latitude:·180,·longitude:·180)></span> | 306 | <span·class="go"><xarray.DataArray·'temperature'·(time:·30,·latitude:·180,·longitude:·180)></span> |
307 | <span·class="go">dask.array<open_dataset- | 307 | <span·class="go">dask.array<open_dataset-616fe0734e26416bb4b6b0639e0646cdtemperature,·shape=(30,·180,·180),·dtype=float64,·chunksize=(10,·180,·180),·chunktype=numpy.ndarray></span> |
308 | <span·class="go">Coordinates:</span> | 308 | <span·class="go">Coordinates:</span> |
309 | <span·class="go">··*·time·······(time)·datetime64[ns]·2015-01-01·2015-01-02·...·2015-01-30</span> | 309 | <span·class="go">··*·time·······(time)·datetime64[ns]·2015-01-01·2015-01-02·...·2015-01-30</span> |
310 | <span·class="go">··*·longitude··(longitude)·int32·0·1·2·3·4·5·6·7·...·173·174·175·176·177·178·179</span> | 310 | <span·class="go">··*·longitude··(longitude)·int32·0·1·2·3·4·5·6·7·...·173·174·175·176·177·178·179</span> |
311 | <span·class="go">··*·latitude···(latitude)·float64·89.5·88.5·87.5·86.5·...·-87.5·-88.5·-89.5</span> | 311 | <span·class="go">··*·latitude···(latitude)·float64·89.5·88.5·87.5·86.5·...·-87.5·-88.5·-89.5</span> |
312 | </pre></div> | 312 | </pre></div> |
313 | </div> | 313 | </div> |
314 | <p>Once·you’ve·manipulated·a·Dask·array,·you·can·still·write·a·dataset·too·big·to | 314 | <p>Once·you’ve·manipulated·a·Dask·array,·you·can·still·write·a·dataset·too·big·to |
Offset 325, 15 lines modified | Offset 325, 16 lines modified | ||
325 | <span·class="gp">In·[6]:·</span><span·class="n">delayed_obj</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">to_netcdf</span><span·class="p">(</span><span·class="s2">"manipulated-example-data.nc"</span><span·class="p">,</span>·<span·class="n">compute</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span> | 325 | <span·class="gp">In·[6]:·</span><span·class="n">delayed_obj</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">to_netcdf</span><span·class="p">(</span><span·class="s2">"manipulated-example-data.nc"</span><span·class="p">,</span>·<span·class="n">compute</span><span·class="o">=</span><span·class="kc">False</span><span·class="p">)</span> |
326 | <span·class="gp">In·[7]:·</span><span·class="k">with</span>·<span·class="n">ProgressBar</span><span·class="p">():</span> | 326 | <span·class="gp">In·[7]:·</span><span·class="k">with</span>·<span·class="n">ProgressBar</span><span·class="p">():</span> |
327 | <span·class="gp">···...:·</span>····<span·class="n">results</span>·<span·class="o">=</span>·<span·class="n">delayed_obj</span><span·class="o">.</span><span·class="n">compute</span><span·class="p">()</span> | 327 | <span·class="gp">···...:·</span>····<span·class="n">results</span>·<span·class="o">=</span>·<span·class="n">delayed_obj</span><span·class="o">.</span><span·class="n">compute</span><span·class="p">()</span> |
328 | <span·class="gp">···...:·</span> | 328 | <span·class="gp">···...:·</span> |
329 | <span·class="go">[········································]·|·0%·Completed·|··0.0s</span> | 329 | <span·class="go">[········································]·|·0%·Completed·|··0.0s</span> |
330 | <span·class="go">[###############·························]·|·37%·Completed·|··0.2s</span> | ||
330 | <span·class="go">[########################################]·|·100%·Completed·|··0. | 331 | <span·class="go">[########################################]·|·100%·Completed·|··0.3s</span> |
331 | </pre></div> | 332 | </pre></div> |
332 | </div> | 333 | </div> |
333 | <div·class="admonition·note"> | 334 | <div·class="admonition·note"> |
334 | <p·class="admonition-title">Note</p> | 335 | <p·class="admonition-title">Note</p> |
335 | <p>When·using·Dask’s·distributed·scheduler·to·write·NETCDF4·files, | 336 | <p>When·using·Dask’s·distributed·scheduler·to·write·NETCDF4·files, |
336 | it·may·be·necessary·to·set·the·environment·variable·<cite>HDF5_USE_FILE_LOCKING=FALSE</cite> | 337 | it·may·be·necessary·to·set·the·environment·variable·<cite>HDF5_USE_FILE_LOCKING=FALSE</cite> |
337 | to·avoid·competing·locks·within·the·HDF5·SWMR·file·locking·scheme.·Note·that | 338 | to·avoid·competing·locks·within·the·HDF5·SWMR·file·locking·scheme.·Note·that |
Offset 114, 15 lines modified | Offset 114, 15 lines modified | ||
114 | Youâll·notice·that·printing·a·dataset·still·shows·a·preview·of·array·values, | 114 | Youâll·notice·that·printing·a·dataset·still·shows·a·preview·of·array·values, |
115 | even·if·they·are·actually·Dask·arrays.·We·can·do·this·quickly·with·Dask·because | 115 | even·if·they·are·actually·Dask·arrays.·We·can·do·this·quickly·with·Dask·because |
116 | we·only·need·to·compute·the·first·few·values·(typically·from·the·first·block). | 116 | we·only·need·to·compute·the·first·few·values·(typically·from·the·first·block). |
117 | To·reveal·the·true·nature·of·an·array,·print·a·DataArray: | 117 | To·reveal·the·true·nature·of·an·array,·print·a·DataArray: |
118 | In·[3]:·ds.temperature | 118 | In·[3]:·ds.temperature |
119 | Out[3]: | 119 | Out[3]: |
120 | <xarray.DataArray·'temperature'·(time:·30,·latitude:·180,·longitude:·180)> | 120 | <xarray.DataArray·'temperature'·(time:·30,·latitude:·180,·longitude:·180)> |
121 | dask.array<open_dataset- | 121 | dask.array<open_dataset-616fe0734e26416bb4b6b0639e0646cdtemperature,·shape=(30, |
122 | 180,·180),·dtype=float64,·chunksize=(10,·180,·180),·chunktype=numpy.ndarray> | 122 | 180,·180),·dtype=float64,·chunksize=(10,·180,·180),·chunktype=numpy.ndarray> |
123 | Coordinates: | 123 | Coordinates: |
124 | ··*·time·······(time)·datetime64[ns]·2015-01-01·2015-01-02·...·2015-01-30 | 124 | ··*·time·······(time)·datetime64[ns]·2015-01-01·2015-01-02·...·2015-01-30 |
125 | ··*·longitude··(longitude)·int32·0·1·2·3·4·5·6·7·...·173·174·175·176·177·178 | 125 | ··*·longitude··(longitude)·int32·0·1·2·3·4·5·6·7·...·173·174·175·176·177·178 |
126 | 179 | 126 | 179 |
127 | ··*·latitude···(latitude)·float64·89.5·88.5·87.5·86.5·...·-87.5·-88.5·-89.5 | 127 | ··*·latitude···(latitude)·float64·89.5·88.5·87.5·86.5·...·-87.5·-88.5·-89.5 |
128 | Once·youâve·manipulated·a·Dask·array,·you·can·still·write·a·dataset·too·big | 128 | Once·youâve·manipulated·a·Dask·array,·you·can·still·write·a·dataset·too·big |
Offset 137, 15 lines modified | Offset 137, 16 lines modified | ||
137 | compute=False) | 137 | compute=False) |
138 | In·[7]:·with·ProgressBar(): | 138 | In·[7]:·with·ProgressBar(): |
139 | ···...:·····results·=·delayed_obj.compute() | 139 | ···...:·····results·=·delayed_obj.compute() |
140 | ···...: | 140 | ···...: |
141 | [········································]·|·0%·Completed·|··0.0s | 141 | [········································]·|·0%·Completed·|··0.0s |
142 | [###############·························]·|·37%·Completed·|··0.2s | ||
142 | [########################################]·|·100%·Completed·|··0. | 143 | [########################################]·|·100%·Completed·|··0.3s |
143 | Note | 144 | Note |
144 | When·using·Daskâs·distributed·scheduler·to·write·NETCDF4·files,·it·may·be | 145 | When·using·Daskâs·distributed·scheduler·to·write·NETCDF4·files,·it·may·be |
145 | necessary·to·set·the·environment·variableHDF5_USE_FILE_LOCKING=FALSEto·avoid | 146 | necessary·to·set·the·environment·variableHDF5_USE_FILE_LOCKING=FALSEto·avoid |
146 | competing·locks·within·the·HDF5·SWMR·file·locking·scheme.·Note·that·writing | 147 | competing·locks·within·the·HDF5·SWMR·file·locking·scheme.·Note·that·writing |
147 | netCDF·files·with·Daskâs·distributed·scheduler·is·only·supported·for | 148 | netCDF·files·with·Daskâs·distributed·scheduler·is·only·supported·for |
148 | thenetcdf4backend. | 149 | thenetcdf4backend. |
149 | A·dataset·can·also·be·converted·to·a·Dask·DataFrame·using·to_dask_dataframe(). | 150 | A·dataset·can·also·be·converted·to·a·Dask·DataFrame·using·to_dask_dataframe(). |
Offset 892, 18 lines modified | Offset 892, 18 lines modified | ||
892 | a·method·call·with·an·external·function·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">ds.pipe(func)</span></code>)·instead·of | 892 | a·method·call·with·an·external·function·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">ds.pipe(func)</span></code>)·instead·of |
893 | simply·calling·it·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">func(ds)</span></code>).·This·allows·you·to·write·pipelines·for | 893 | simply·calling·it·(e.g.,·<code·class="docutils·literal·notranslate"><span·class="pre">func(ds)</span></code>).·This·allows·you·to·write·pipelines·for |
894 | transforming·your·data·(using·“method·chaining”)·instead·of·writing·hard·to | 894 | transforming·your·data·(using·“method·chaining”)·instead·of·writing·hard·to |
895 | follow·nested·function·calls:</p> | 895 | follow·nested·function·calls:</p> |
896 | <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> | 896 | <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> |
897 | <span·class="go">#·entirely·from·left·to·right</span> | 897 | <span·class="go">#·entirely·from·left·to·right</span> |
898 | <span·class="gp">In·[60]:·</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">x</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">"y"</span><span·class="p">))</span> | 898 | <span·class="gp">In·[60]:·</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">x</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">"y"</span><span·class="p">))</span> |
899 | <span·class="gh">Out[60]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 899 | <span·class="gh">Out[60]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xa50b1fb8>]</span> |
900 | <span·class="gp">In·[61]:·</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">x</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">"y"</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> | 900 | <span·class="gp">In·[61]:·</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">x</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">"y"</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> |
901 | <span·class="gh">Out[61]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 901 | <span·class="gh">Out[61]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xa50ba370>]</span> |
902 | </pre></div> | 902 | </pre></div> |
903 | </div> | 903 | </div> |
904 | <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 | 904 | <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 |
905 | (<a·class="reference·external"·href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.pipe.html#pandas.DataFrame.pipe"·title="(in·pandas·v1.1.5)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.pipe</span></code></a>·and | 905 | (<a·class="reference·external"·href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.pipe.html#pandas.DataFrame.pipe"·title="(in·pandas·v1.1.5)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.pipe</span></code></a>·and |
906 | <a·class="reference·external"·href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.assign.html#pandas.DataFrame.assign"·title="(in·pandas·v1.1.5)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.assign</span></code></a>).</p> | 906 | <a·class="reference·external"·href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.assign.html#pandas.DataFrame.assign"·title="(in·pandas·v1.1.5)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">DataFrame.assign</span></code></a>).</p> |
907 | <p>With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if | 907 | <p>With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if |
908 | variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead | 908 | variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead |
Offset 619, 19 lines modified | Offset 619, 19 lines modified | ||
619 | There·is·also·the·pipe()·method·that·allows·you·to·use·a·method·call·with·an | 619 | There·is·also·the·pipe()·method·that·allows·you·to·use·a·method·call·with·an |
620 | external·function·(e.g.,·ds.pipe(func))·instead·of·simply·calling·it·(e.g., | 620 | external·function·(e.g.,·ds.pipe(func))·instead·of·simply·calling·it·(e.g., |
621 | func(ds)).·This·allows·you·to·write·pipelines·for·transforming·your·data·(using | 621 | func(ds)).·This·allows·you·to·write·pipelines·for·transforming·your·data·(using |
622 | âmethod·chainingâ)·instead·of·writing·hard·to·follow·nested·function·calls: | 622 | âmethod·chainingâ)·instead·of·writing·hard·to·follow·nested·function·calls: |
623 | #·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow | 623 | #·these·lines·are·equivalent,·but·with·pipe·we·can·make·the·logic·flow |
624 | #·entirely·from·left·to·right | 624 | #·entirely·from·left·to·right |
625 | In·[60]:·plt.plot((2·*·ds.temperature.sel(x=0)).mean("y")) | 625 | In·[60]:·plt.plot((2·*·ds.temperature.sel(x=0)).mean("y")) |
626 | Out[60]:·[<matplotlib.lines.Line2D·at·0x | 626 | Out[60]:·[<matplotlib.lines.Line2D·at·0xa50b1fb8>] |
627 | In·[61]:·(ds.temperature.sel(x=0).pipe(lambda·x:·2·*·x).mean("y").pipe | 627 | In·[61]:·(ds.temperature.sel(x=0).pipe(lambda·x:·2·*·x).mean("y").pipe |
628 | (plt.plot)) | 628 | (plt.plot)) |
629 | Out[61]:·[<matplotlib.lines.Line2D·at·0x | 629 | Out[61]:·[<matplotlib.lines.Line2D·at·0xa50ba370>] |
630 | Both·pipe·and·assign·replicate·the·pandas·methods·of·the·same·names | 630 | Both·pipe·and·assign·replicate·the·pandas·methods·of·the·same·names |
631 | (DataFrame.pipe·and·DataFrame.assign). | 631 | (DataFrame.pipe·and·DataFrame.assign). |
632 | With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if | 632 | With·xarray,·there·is·no·performance·penalty·for·creating·new·datasets,·even·if |
633 | variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead | 633 | variables·are·lazily·loaded·from·a·file·on·disk.·Creating·new·objects·instead |
634 | of·mutating·existing·objects·often·results·in·easier·to·understand·code,·so·we | 634 | of·mutating·existing·objects·often·results·in·easier·to·understand·code,·so·we |
635 | encourage·using·this·approach. | 635 | encourage·using·this·approach. |
636 | ****·Renaming·variables¶·**** | 636 | ****·Renaming·variables¶·**** |
Offset 523, 15 lines modified | Offset 523, 15 lines modified | ||
523 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ansi-cyan-fg">open_dataset</span><span·class="ansi-blue-fg">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> | 523 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ansi-cyan-fg">open_dataset</span><span·class="ansi-blue-fg">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> |
524 | <span·class="ansi-green-intense-fg·ansi-bold">·····76</span>·········<span·class="ansi-red-fg">#·May·want·to·add·an·option·to·remove·it.</span> | 524 | <span·class="ansi-green-intense-fg·ansi-bold">·····76</span>·········<span·class="ansi-red-fg">#·May·want·to·add·an·option·to·remove·it.</span> |
525 | <span·class="ansi-green-intense-fg·ansi-bold">·····77</span>·········<span·class="ansi-green-fg">if</span>·<span·class="ansi-green-fg">not</span>·_os<span·class="ansi-blue-fg">.</span>path<span·class="ansi-blue-fg">.</span>isdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">:</span> | 525 | <span·class="ansi-green-intense-fg·ansi-bold">·····77</span>·········<span·class="ansi-green-fg">if</span>·<span·class="ansi-green-fg">not</span>·_os<span·class="ansi-blue-fg">.</span>path<span·class="ansi-blue-fg">.</span>isdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">:</span> |
526 | <span·class="ansi-green-fg">--->·78</span><span·class="ansi-red-fg">·············</span>_os<span·class="ansi-blue-fg">.</span>mkdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span> | 526 | <span·class="ansi-green-fg">--->·78</span><span·class="ansi-red-fg">·············</span>_os<span·class="ansi-blue-fg">.</span>mkdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span> |
527 | <span·class="ansi-green-intense-fg·ansi-bold">·····79</span> | 527 | <span·class="ansi-green-intense-fg·ansi-bold">·····79</span> |
528 | <span·class="ansi-green-intense-fg·ansi-bold">·····80</span>·········url·<span·class="ansi-blue-fg">=</span>·<span·class="ansi-blue-fg">"/"</span><span·class="ansi-blue-fg">.</span>join<span·class="ansi-blue-fg">(</span><span·class="ansi-blue-fg">(</span>github_url<span·class="ansi-blue-fg">,</span>·<span·class="ansi-blue-fg">"raw"</span><span·class="ansi-blue-fg">,</span>·branch<span·class="ansi-blue-fg">,</span>·fullname<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">)</span> | 528 | <span·class="ansi-green-intense-fg·ansi-bold">·····80</span>·········url·<span·class="ansi-blue-fg">=</span>·<span·class="ansi-blue-fg">"/"</span><span·class="ansi-blue-fg">.</span>join<span·class="ansi-blue-fg">(</span><span·class="ansi-blue-fg">(</span>github_url<span·class="ansi-blue-fg">,</span>·<span·class="ansi-blue-fg">"raw"</span><span·class="ansi-blue-fg">,</span>·branch<span·class="ansi-blue-fg">,</span>·fullname<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">)</span> |
529 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 529 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data' |
530 | </pre></div></div> | 530 | </pre></div></div> |
531 | </div> | 531 | </div> |
532 | <p>Let’s·create·a·simple·plot·of·2-m·air·temperature·in·degrees·Celsius:</p> | 532 | <p>Let’s·create·a·simple·plot·of·2-m·air·temperature·in·degrees·Celsius:</p> |
533 | <div·class="nbinput·docutils·container"> | 533 | <div·class="nbinput·docutils·container"> |
534 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[3]: | 534 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[3]: |
535 | </pre></div> | 535 | </pre></div> |
536 | </div> | 536 | </div> |
Offset 84, 15 lines modified | Offset 84, 15 lines modified | ||
84 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) | 84 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) |
85 | ·····76·········#·May·want·to·add·an·option·to·remove·it. | 85 | ·····76·········#·May·want·to·add·an·option·to·remove·it. |
86 | ·····77·········if·not·_os.path.isdir(longdir): | 86 | ·····77·········if·not·_os.path.isdir(longdir): |
87 | --->·78·············_os.mkdir(longdir) | 87 | --->·78·············_os.mkdir(longdir) |
88 | ·····79 | 88 | ·····79 |
89 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) | 89 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) |
90 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 90 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
91 | build/.xarray_tutorial_data' | 91 | build/.xarray_tutorial_data' |
92 | Letâs·create·a·simple·plot·of·2-m·air·temperature·in·degrees·Celsius: | 92 | Letâs·create·a·simple·plot·of·2-m·air·temperature·in·degrees·Celsius: |
93 | [3]: | 93 | [3]: |
94 | ds·=·ds·-·273.15 | 94 | ds·=·ds·-·273.15 |
95 | ds.t2m[0].plot(cmap=plt.cm.coolwarm) | 95 | ds.t2m[0].plot(cmap=plt.cm.coolwarm) |
96 | --------------------------------------------------------------------------- | 96 | --------------------------------------------------------------------------- |
97 | NameError·································Traceback·(most·recent·call·last) | 97 | NameError·································Traceback·(most·recent·call·last) |
Offset 34, 23 lines modified | Offset 34, 23 lines modified | ||
34 | ········{ | 34 | ········{ |
35 | ············"cell_type":·"code", | 35 | ············"cell_type":·"code", |
36 | ············"execution_count":·2, | 36 | ············"execution_count":·2, |
37 | ············"metadata":·{}, | 37 | ············"metadata":·{}, |
38 | ············"outputs":·[ | 38 | ············"outputs":·[ |
39 | ················{ | 39 | ················{ |
40 | ····················"ename":·"FileNotFoundError", | 40 | ····················"ename":·"FileNotFoundError", |
41 | ····················"evalue":·"[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 41 | ····················"evalue":·"[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data'", |
42 | ····················"output_type":·"error", | 42 | ····················"output_type":·"error", |
43 | ····················"traceback":·[ | 43 | ····················"traceback":·[ |
44 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | 44 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
45 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", | 45 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", |
46 | ························"\u001b[0;32m<ipython-input-2-783584127f97>\u001b[0m·in·\u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m---->·1\u001b[0;31m·\u001b[0mds\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'era5-2mt-2019-03-uk.grib'\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mengine\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'cfgrib'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", | 46 | ························"\u001b[0;32m<ipython-input-2-783584127f97>\u001b[0m·in·\u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m---->·1\u001b[0;31m·\u001b[0mds\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'era5-2mt-2019-03-uk.grib'\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mengine\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'cfgrib'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", |
47 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····111\u001b[0m·····\u001b[0mopen_dataset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····112\u001b[0m·····\"\"\"\n\u001b[0;32m-->·113\u001b[0;31m·····\u001b[0;32mwith\u001b[0m·\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m·\u001b[0;32mas\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m····114\u001b[0m·········\u001b[0;32mreturn\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····115\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n", | 47 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····111\u001b[0m·····\u001b[0mopen_dataset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····112\u001b[0m·····\"\"\"\n\u001b[0;32m-->·113\u001b[0;31m·····\u001b[0;32mwith\u001b[0m·\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m·\u001b[0;32mas\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m····114\u001b[0m·········\u001b[0;32mreturn\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····115\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n", |
48 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·github_url,·branch,·**kws)\u001b[0m\n\u001b[1;32m·····76\u001b[0m·········\u001b[0;31m#·May·want·to·add·an·option·to·remove·it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····77\u001b[0m·········\u001b[0;32mif\u001b[0m·\u001b[0;32mnot\u001b[0m·\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·78\u001b[0;31m·············\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····79\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····80\u001b[0m·········\u001b[0murl\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 48 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·github_url,·branch,·**kws)\u001b[0m\n\u001b[1;32m·····76\u001b[0m·········\u001b[0;31m#·May·want·to·add·an·option·to·remove·it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····77\u001b[0m·········\u001b[0;32mif\u001b[0m·\u001b[0;32mnot\u001b[0m·\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·78\u001b[0;31m·············\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····79\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····80\u001b[0m·········\u001b[0murl\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
49 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 49 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data'" |
50 | ····················] | 50 | ····················] |
51 | ················} | 51 | ················} |
52 | ············], | 52 | ············], |
53 | ············"source":·[ | 53 | ············"source":·[ |
54 | ················"ds·=·xr.tutorial.load_dataset('era5-2mt-2019-03-uk.grib',·engine='cfgrib')" | 54 | ················"ds·=·xr.tutorial.load_dataset('era5-2mt-2019-03-uk.grib',·engine='cfgrib')" |
55 | ············] | 55 | ············] |
56 | ········}, | 56 | ········}, |
Offset 561, 15 lines modified | Offset 561, 15 lines modified | ||
561 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ansi-cyan-fg">open_dataset</span><span·class="ansi-blue-fg">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> | 561 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ansi-cyan-fg">open_dataset</span><span·class="ansi-blue-fg">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> |
562 | <span·class="ansi-green-intense-fg·ansi-bold">·····76</span>·········<span·class="ansi-red-fg">#·May·want·to·add·an·option·to·remove·it.</span> | 562 | <span·class="ansi-green-intense-fg·ansi-bold">·····76</span>·········<span·class="ansi-red-fg">#·May·want·to·add·an·option·to·remove·it.</span> |
563 | <span·class="ansi-green-intense-fg·ansi-bold">·····77</span>·········<span·class="ansi-green-fg">if</span>·<span·class="ansi-green-fg">not</span>·_os<span·class="ansi-blue-fg">.</span>path<span·class="ansi-blue-fg">.</span>isdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">:</span> | 563 | <span·class="ansi-green-intense-fg·ansi-bold">·····77</span>·········<span·class="ansi-green-fg">if</span>·<span·class="ansi-green-fg">not</span>·_os<span·class="ansi-blue-fg">.</span>path<span·class="ansi-blue-fg">.</span>isdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">:</span> |
564 | <span·class="ansi-green-fg">--->·78</span><span·class="ansi-red-fg">·············</span>_os<span·class="ansi-blue-fg">.</span>mkdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span> | 564 | <span·class="ansi-green-fg">--->·78</span><span·class="ansi-red-fg">·············</span>_os<span·class="ansi-blue-fg">.</span>mkdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span> |
565 | <span·class="ansi-green-intense-fg·ansi-bold">·····79</span> | 565 | <span·class="ansi-green-intense-fg·ansi-bold">·····79</span> |
566 | <span·class="ansi-green-intense-fg·ansi-bold">·····80</span>·········url·<span·class="ansi-blue-fg">=</span>·<span·class="ansi-blue-fg">"/"</span><span·class="ansi-blue-fg">.</span>join<span·class="ansi-blue-fg">(</span><span·class="ansi-blue-fg">(</span>github_url<span·class="ansi-blue-fg">,</span>·<span·class="ansi-blue-fg">"raw"</span><span·class="ansi-blue-fg">,</span>·branch<span·class="ansi-blue-fg">,</span>·fullname<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">)</span> | 566 | <span·class="ansi-green-intense-fg·ansi-bold">·····80</span>·········url·<span·class="ansi-blue-fg">=</span>·<span·class="ansi-blue-fg">"/"</span><span·class="ansi-blue-fg">.</span>join<span·class="ansi-blue-fg">(</span><span·class="ansi-blue-fg">(</span>github_url<span·class="ansi-blue-fg">,</span>·<span·class="ansi-blue-fg">"raw"</span><span·class="ansi-blue-fg">,</span>·branch<span·class="ansi-blue-fg">,</span>·fullname<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">)</span> |
567 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 567 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data' |
568 | </pre></div></div> | 568 | </pre></div></div> |
569 | </div> | 569 | </div> |
570 | </div> | 570 | </div> |
571 | <div·class="section"·id="Add-a-lazilly-calculated-vertical-coordinates"> | 571 | <div·class="section"·id="Add-a-lazilly-calculated-vertical-coordinates"> |
572 | <h2>Add·a·lazilly·calculated·vertical·coordinates<a·class="headerlink"·href="#Add-a-lazilly-calculated-vertical-coordinates"·title="Permalink·to·this·headline">¶</a></h2> | 572 | <h2>Add·a·lazilly·calculated·vertical·coordinates<a·class="headerlink"·href="#Add-a-lazilly-calculated-vertical-coordinates"·title="Permalink·to·this·headline">¶</a></h2> |
573 | <p>Write·equations·to·calculate·the·vertical·coordinate.·These·will·be·only·evaluated·when·data·is·requested.·Information·about·the·ROMS·vertical·coordinate·can·be·found·(here)[<a·class="reference·external"·href="https://www.myroms.org/wiki/Vertical_S-coordinate">https://www.myroms.org/wiki/Vertical_S-coordinate</a>]</p> | 573 | <p>Write·equations·to·calculate·the·vertical·coordinate.·These·will·be·only·evaluated·when·data·is·requested.·Information·about·the·ROMS·vertical·coordinate·can·be·found·(here)[<a·class="reference·external"·href="https://www.myroms.org/wiki/Vertical_S-coordinate">https://www.myroms.org/wiki/Vertical_S-coordinate</a>]</p> |
574 | <p>In·short,·for·<code·class="docutils·literal·notranslate"><span·class="pre">Vtransform==2</span></code>·as·used·in·this·example,</p> | 574 | <p>In·short,·for·<code·class="docutils·literal·notranslate"><span·class="pre">Vtransform==2</span></code>·as·used·in·this·example,</p> |
Offset 125, 15 lines modified | Offset 125, 15 lines modified | ||
125 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) | 125 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) |
126 | ·····76·········#·May·want·to·add·an·option·to·remove·it. | 126 | ·····76·········#·May·want·to·add·an·option·to·remove·it. |
127 | ·····77·········if·not·_os.path.isdir(longdir): | 127 | ·····77·········if·not·_os.path.isdir(longdir): |
128 | --->·78·············_os.mkdir(longdir) | 128 | --->·78·············_os.mkdir(longdir) |
129 | ·····79 | 129 | ·····79 |
130 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) | 130 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) |
131 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 131 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
132 | build/.xarray_tutorial_data' | 132 | build/.xarray_tutorial_data' |
133 | *****·Add·a·lazilly·calculated·vertical·coordinates¶·***** | 133 | *****·Add·a·lazilly·calculated·vertical·coordinates¶·***** |
134 | Write·equations·to·calculate·the·vertical·coordinate.·These·will·be·only | 134 | Write·equations·to·calculate·the·vertical·coordinate.·These·will·be·only |
135 | evaluated·when·data·is·requested.·Information·about·the·ROMS·vertical | 135 | evaluated·when·data·is·requested.·Information·about·the·ROMS·vertical |
136 | coordinate·can·be·found·(here)[https://www.myroms.org/wiki/Vertical_S- | 136 | coordinate·can·be·found·(here)[https://www.myroms.org/wiki/Vertical_S- |
137 | coordinate] | 137 | coordinate] |
138 | In·short,·for·Vtransform==2·as·used·in·this·example, | 138 | In·short,·for·Vtransform==2·as·used·in·this·example, |
Offset 69, 22 lines modified | Offset 69, 22 lines modified | ||
69 | ········{ | 69 | ········{ |
70 | ············"cell_type":·"code", | 70 | ············"cell_type":·"code", |
71 | ············"execution_count":·2, | 71 | ············"execution_count":·2, |
72 | ············"metadata":·{}, | 72 | ············"metadata":·{}, |
73 | ············"outputs":·[ | 73 | ············"outputs":·[ |
74 | ················{ | 74 | ················{ |
75 | ····················"ename":·"FileNotFoundError", | 75 | ····················"ename":·"FileNotFoundError", |
76 | ····················"evalue":·"[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 76 | ····················"evalue":·"[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data'", |
77 | ····················"output_type":·"error", | 77 | ····················"output_type":·"error", |
78 | ····················"traceback":·[ | 78 | ····················"traceback":·[ |
79 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | 79 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
80 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", | 80 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", |
81 | ························"\u001b[0;32m<ipython-input-2-f6e5aae51f8e>\u001b[0m·in·\u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m······1\u001b[0m·\u001b[0;31m#·load·in·the·file\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---->·2\u001b[0;31m·\u001b[0mds\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'ROMS_example.nc'\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mchunks\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m'ocean_time'\u001b[0m\u001b[0;34m:\u001b[0m·\u001b[0;36m1\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m······3\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m······4\u001b[0m·\u001b[0;31m#·This·is·a·way·to·turn·on·chunking·and·lazy·evaluation.·Opening·with·mfdataset,·or\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m······5\u001b[0m·\u001b[0;31m#·setting·the·chunking·in·the·open_dataset·would·also·achive·this.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 81 | ························"\u001b[0;32m<ipython-input-2-f6e5aae51f8e>\u001b[0m·in·\u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m······1\u001b[0m·\u001b[0;31m#·load·in·the·file\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---->·2\u001b[0;31m·\u001b[0mds\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'ROMS_example.nc'\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mchunks\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m'ocean_time'\u001b[0m\u001b[0;34m:\u001b[0m·\u001b[0;36m1\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m······3\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m······4\u001b[0m·\u001b[0;31m#·This·is·a·way·to·turn·on·chunking·and·lazy·evaluation.·Opening·with·mfdataset,·or\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m······5\u001b[0m·\u001b[0;31m#·setting·the·chunking·in·the·open_dataset·would·also·achive·this.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
82 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·github_url,·branch,·**kws)\u001b[0m\n\u001b[1;32m·····76\u001b[0m·········\u001b[0;31m#·May·want·to·add·an·option·to·remove·it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····77\u001b[0m·········\u001b[0;32mif\u001b[0m·\u001b[0;32mnot\u001b[0m·\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·78\u001b[0;31m·············\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····79\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····80\u001b[0m·········\u001b[0murl\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 82 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·github_url,·branch,·**kws)\u001b[0m\n\u001b[1;32m·····76\u001b[0m·········\u001b[0;31m#·May·want·to·add·an·option·to·remove·it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····77\u001b[0m·········\u001b[0;32mif\u001b[0m·\u001b[0;32mnot\u001b[0m·\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·78\u001b[0;31m·············\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····79\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····80\u001b[0m·········\u001b[0murl\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
83 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 83 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data'" |
84 | ····················] | 84 | ····················] |
85 | ················} | 85 | ················} |
86 | ············], | 86 | ············], |
87 | ············"source":·[ | 87 | ············"source":·[ |
88 | ················"#·load·in·the·file\n", | 88 | ················"#·load·in·the·file\n", |
89 | ················"ds·=·xr.tutorial.open_dataset('ROMS_example.nc',·chunks={'ocean_time':·1})\n", | 89 | ················"ds·=·xr.tutorial.open_dataset('ROMS_example.nc',·chunks={'ocean_time':·1})\n", |
90 | ················"\n", | 90 | ················"\n", |
Offset 555, 15 lines modified | Offset 555, 15 lines modified | ||
555 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ansi-cyan-fg">open_dataset</span><span·class="ansi-blue-fg">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> | 555 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ansi-cyan-fg">open_dataset</span><span·class="ansi-blue-fg">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> |
556 | <span·class="ansi-green-intense-fg·ansi-bold">·····76</span>·········<span·class="ansi-red-fg">#·May·want·to·add·an·option·to·remove·it.</span> | 556 | <span·class="ansi-green-intense-fg·ansi-bold">·····76</span>·········<span·class="ansi-red-fg">#·May·want·to·add·an·option·to·remove·it.</span> |
557 | <span·class="ansi-green-intense-fg·ansi-bold">·····77</span>·········<span·class="ansi-green-fg">if</span>·<span·class="ansi-green-fg">not</span>·_os<span·class="ansi-blue-fg">.</span>path<span·class="ansi-blue-fg">.</span>isdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">:</span> | 557 | <span·class="ansi-green-intense-fg·ansi-bold">·····77</span>·········<span·class="ansi-green-fg">if</span>·<span·class="ansi-green-fg">not</span>·_os<span·class="ansi-blue-fg">.</span>path<span·class="ansi-blue-fg">.</span>isdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">:</span> |
558 | <span·class="ansi-green-fg">--->·78</span><span·class="ansi-red-fg">·············</span>_os<span·class="ansi-blue-fg">.</span>mkdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span> | 558 | <span·class="ansi-green-fg">--->·78</span><span·class="ansi-red-fg">·············</span>_os<span·class="ansi-blue-fg">.</span>mkdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span> |
559 | <span·class="ansi-green-intense-fg·ansi-bold">·····79</span> | 559 | <span·class="ansi-green-intense-fg·ansi-bold">·····79</span> |
560 | <span·class="ansi-green-intense-fg·ansi-bold">·····80</span>·········url·<span·class="ansi-blue-fg">=</span>·<span·class="ansi-blue-fg">"/"</span><span·class="ansi-blue-fg">.</span>join<span·class="ansi-blue-fg">(</span><span·class="ansi-blue-fg">(</span>github_url<span·class="ansi-blue-fg">,</span>·<span·class="ansi-blue-fg">"raw"</span><span·class="ansi-blue-fg">,</span>·branch<span·class="ansi-blue-fg">,</span>·fullname<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">)</span> | 560 | <span·class="ansi-green-intense-fg·ansi-bold">·····80</span>·········url·<span·class="ansi-blue-fg">=</span>·<span·class="ansi-blue-fg">"/"</span><span·class="ansi-blue-fg">.</span>join<span·class="ansi-blue-fg">(</span><span·class="ansi-blue-fg">(</span>github_url<span·class="ansi-blue-fg">,</span>·<span·class="ansi-blue-fg">"raw"</span><span·class="ansi-blue-fg">,</span>·branch<span·class="ansi-blue-fg">,</span>·fullname<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">)</span> |
561 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 561 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data' |
562 | </pre></div></div> | 562 | </pre></div></div> |
563 | </div> | 563 | </div> |
564 | <p>The·function·we·will·apply·is·<code·class="docutils·literal·notranslate"><span·class="pre">np.interp</span></code>·which·expects·1D·numpy·arrays.·This·functionality·is·already·implemented·in·xarray·so·we·use·that·capability·to·make·sure·we·are·not·making·mistakes.</p> | 564 | <p>The·function·we·will·apply·is·<code·class="docutils·literal·notranslate"><span·class="pre">np.interp</span></code>·which·expects·1D·numpy·arrays.·This·functionality·is·already·implemented·in·xarray·so·we·use·that·capability·to·make·sure·we·are·not·making·mistakes.</p> |
565 | <div·class="nbinput·docutils·container"> | 565 | <div·class="nbinput·docutils·container"> |
566 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[2]: | 566 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[2]: |
567 | </pre></div> | 567 | </pre></div> |
568 | </div> | 568 | </div> |
Offset 116, 15 lines modified | Offset 116, 15 lines modified | ||
116 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) | 116 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) |
117 | ·····76·········#·May·want·to·add·an·option·to·remove·it. | 117 | ·····76·········#·May·want·to·add·an·option·to·remove·it. |
118 | ·····77·········if·not·_os.path.isdir(longdir): | 118 | ·····77·········if·not·_os.path.isdir(longdir): |
119 | --->·78·············_os.mkdir(longdir) | 119 | --->·78·············_os.mkdir(longdir) |
120 | ·····79 | 120 | ·····79 |
121 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) | 121 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) |
122 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 122 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
123 | build/.xarray_tutorial_data' | 123 | build/.xarray_tutorial_data' |
124 | The·function·we·will·apply·is·np.interp·which·expects·1D·numpy·arrays.·This | 124 | The·function·we·will·apply·is·np.interp·which·expects·1D·numpy·arrays.·This |
125 | functionality·is·already·implemented·in·xarray·so·we·use·that·capability·to | 125 | functionality·is·already·implemented·in·xarray·so·we·use·that·capability·to |
126 | make·sure·we·are·not·making·mistakes. | 126 | make·sure·we·are·not·making·mistakes. |
127 | [2]: | 127 | [2]: |
128 | newlat·=·np.linspace(15,·75,·100) | 128 | newlat·=·np.linspace(15,·75,·100) |
129 | air.interp(lat=newlat) | 129 | air.interp(lat=newlat) |
Offset 39, 23 lines modified | Offset 39, 23 lines modified | ||
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 | ············}, | 42 | ············}, |
43 | ············"outputs":·[ | 43 | ············"outputs":·[ |
44 | ················{ | 44 | ················{ |
45 | ····················"ename":·"FileNotFoundError", | 45 | ····················"ename":·"FileNotFoundError", |
46 | ····················"evalue":·"[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 46 | ····················"evalue":·"[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data'", |
47 | ····················"output_type":·"error", | 47 | ····················"output_type":·"error", |
48 | ····················"traceback":·[ | 48 | ····················"traceback":·[ |
49 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | 49 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
50 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", | 50 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", |
51 | ························"\u001b[0;32m<ipython-input-1-5e8aec42a87b>\u001b[0m·in·\u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m······5\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m······6\u001b[0m·air·=·(\n\u001b[0;32m---->·7\u001b[0;31m·····\u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"air_temperature\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m······8\u001b[0m·····\u001b[0;34m.\u001b[0m\u001b[0mair\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msortby\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"lat\"\u001b[0m\u001b[0;34m)\u001b[0m··\u001b[0;31m#·np.interp·needs·coordinate·in·ascending·order\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m······9\u001b[0m·····\u001b[0;34m.\u001b[0m\u001b[0misel\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mslice\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mlon\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mslice\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 51 | ························"\u001b[0;32m<ipython-input-1-5e8aec42a87b>\u001b[0m·in·\u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m······5\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m······6\u001b[0m·air·=·(\n\u001b[0;32m---->·7\u001b[0;31m·····\u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"air_temperature\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m······8\u001b[0m·····\u001b[0;34m.\u001b[0m\u001b[0mair\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msortby\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"lat\"\u001b[0m\u001b[0;34m)\u001b[0m··\u001b[0;31m#·np.interp·needs·coordinate·in·ascending·order\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m······9\u001b[0m·····\u001b[0;34m.\u001b[0m\u001b[0misel\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mslice\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mlon\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mslice\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
52 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····111\u001b[0m·····\u001b[0mopen_dataset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····112\u001b[0m·····\"\"\"\n\u001b[0;32m-->·113\u001b[0;31m·····\u001b[0;32mwith\u001b[0m·\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m·\u001b[0;32mas\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m····114\u001b[0m·········\u001b[0;32mreturn\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····115\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n", | 52 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····111\u001b[0m·····\u001b[0mopen_dataset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····112\u001b[0m·····\"\"\"\n\u001b[0;32m-->·113\u001b[0;31m·····\u001b[0;32mwith\u001b[0m·\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m·\u001b[0;32mas\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m····114\u001b[0m·········\u001b[0;32mreturn\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····115\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n", |
53 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·github_url,·branch,·**kws)\u001b[0m\n\u001b[1;32m·····76\u001b[0m·········\u001b[0;31m#·May·want·to·add·an·option·to·remove·it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····77\u001b[0m·········\u001b[0;32mif\u001b[0m·\u001b[0;32mnot\u001b[0m·\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·78\u001b[0;31m·············\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····79\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····80\u001b[0m·········\u001b[0murl\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 53 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·github_url,·branch,·**kws)\u001b[0m\n\u001b[1;32m·····76\u001b[0m·········\u001b[0;31m#·May·want·to·add·an·option·to·remove·it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····77\u001b[0m·········\u001b[0;32mif\u001b[0m·\u001b[0;32mnot\u001b[0m·\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·78\u001b[0;31m·············\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····79\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····80\u001b[0m·········\u001b[0murl\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
54 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 54 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data'" |
55 | ····················] | 55 | ····················] |
56 | ················} | 56 | ················} |
57 | ············], | 57 | ············], |
58 | ············"source":·[ | 58 | ············"source":·[ |
59 | ················"import·xarray·as·xr\n", | 59 | ················"import·xarray·as·xr\n", |
60 | ················"import·numpy·as·np\n", | 60 | ················"import·numpy·as·np\n", |
61 | ················"\n", | 61 | ················"\n", |
Offset 555, 15 lines modified | Offset 555, 15 lines modified | ||
555 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ansi-cyan-fg">open_dataset</span><span·class="ansi-blue-fg">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> | 555 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ansi-cyan-fg">open_dataset</span><span·class="ansi-blue-fg">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> |
556 | <span·class="ansi-green-intense-fg·ansi-bold">·····76</span>·········<span·class="ansi-red-fg">#·May·want·to·add·an·option·to·remove·it.</span> | 556 | <span·class="ansi-green-intense-fg·ansi-bold">·····76</span>·········<span·class="ansi-red-fg">#·May·want·to·add·an·option·to·remove·it.</span> |
557 | <span·class="ansi-green-intense-fg·ansi-bold">·····77</span>·········<span·class="ansi-green-fg">if</span>·<span·class="ansi-green-fg">not</span>·_os<span·class="ansi-blue-fg">.</span>path<span·class="ansi-blue-fg">.</span>isdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">:</span> | 557 | <span·class="ansi-green-intense-fg·ansi-bold">·····77</span>·········<span·class="ansi-green-fg">if</span>·<span·class="ansi-green-fg">not</span>·_os<span·class="ansi-blue-fg">.</span>path<span·class="ansi-blue-fg">.</span>isdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">:</span> |
558 | <span·class="ansi-green-fg">--->·78</span><span·class="ansi-red-fg">·············</span>_os<span·class="ansi-blue-fg">.</span>mkdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span> | 558 | <span·class="ansi-green-fg">--->·78</span><span·class="ansi-red-fg">·············</span>_os<span·class="ansi-blue-fg">.</span>mkdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span> |
559 | <span·class="ansi-green-intense-fg·ansi-bold">·····79</span> | 559 | <span·class="ansi-green-intense-fg·ansi-bold">·····79</span> |
560 | <span·class="ansi-green-intense-fg·ansi-bold">·····80</span>·········url·<span·class="ansi-blue-fg">=</span>·<span·class="ansi-blue-fg">"/"</span><span·class="ansi-blue-fg">.</span>join<span·class="ansi-blue-fg">(</span><span·class="ansi-blue-fg">(</span>github_url<span·class="ansi-blue-fg">,</span>·<span·class="ansi-blue-fg">"raw"</span><span·class="ansi-blue-fg">,</span>·branch<span·class="ansi-blue-fg">,</span>·fullname<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">)</span> | 560 | <span·class="ansi-green-intense-fg·ansi-bold">·····80</span>·········url·<span·class="ansi-blue-fg">=</span>·<span·class="ansi-blue-fg">"/"</span><span·class="ansi-blue-fg">.</span>join<span·class="ansi-blue-fg">(</span><span·class="ansi-blue-fg">(</span>github_url<span·class="ansi-blue-fg">,</span>·<span·class="ansi-blue-fg">"raw"</span><span·class="ansi-blue-fg">,</span>·branch<span·class="ansi-blue-fg">,</span>·fullname<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">)</span> |
561 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 561 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data' |
562 | </pre></div></div> | 562 | </pre></div></div> |
563 | </div> | 563 | </div> |
564 | <p>Plot·the·first·timestep:</p> | 564 | <p>Plot·the·first·timestep:</p> |
565 | <div·class="nbinput·docutils·container"> | 565 | <div·class="nbinput·docutils·container"> |
566 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[3]: | 566 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[3]: |
567 | </pre></div> | 567 | </pre></div> |
568 | </div> | 568 | </div> |
Offset 113, 15 lines modified | Offset 113, 15 lines modified | ||
113 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) | 113 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) |
114 | ·····76·········#·May·want·to·add·an·option·to·remove·it. | 114 | ·····76·········#·May·want·to·add·an·option·to·remove·it. |
115 | ·····77·········if·not·_os.path.isdir(longdir): | 115 | ·····77·········if·not·_os.path.isdir(longdir): |
116 | --->·78·············_os.mkdir(longdir) | 116 | --->·78·············_os.mkdir(longdir) |
117 | ·····79 | 117 | ·····79 |
118 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) | 118 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) |
119 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 119 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
120 | build/.xarray_tutorial_data' | 120 | build/.xarray_tutorial_data' |
121 | Plot·the·first·timestep: | 121 | Plot·the·first·timestep: |
122 | [3]: | 122 | [3]: |
123 | projection·=·ccrs.LambertConformal(central_longitude=-95,·central_latitude=45) | 123 | projection·=·ccrs.LambertConformal(central_longitude=-95,·central_latitude=45) |
124 | f,·ax·=·plt.subplots(subplot_kw=dict(projection=projection)) | 124 | f,·ax·=·plt.subplots(subplot_kw=dict(projection=projection)) |
Offset 60, 23 lines modified | Offset 60, 23 lines modified | ||
60 | ····················"end_time":·"2020-03-17T14:43:57.831734Z", | 60 | ····················"end_time":·"2020-03-17T14:43:57.831734Z", |
61 | ····················"start_time":·"2020-03-17T14:43:57.651845Z" | 61 | ····················"start_time":·"2020-03-17T14:43:57.651845Z" |
62 | ················} | 62 | ················} |
63 | ············}, | 63 | ············}, |
64 | ············"outputs":·[ | 64 | ············"outputs":·[ |
65 | ················{ | 65 | ················{ |
66 | ····················"ename":·"FileNotFoundError", | 66 | ····················"ename":·"FileNotFoundError", |
67 | ····················"evalue":·"[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 67 | ····················"evalue":·"[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data'", |
68 | ····················"output_type":·"error", | 68 | ····················"output_type":·"error", |
69 | ····················"traceback":·[ | 69 | ····················"traceback":·[ |
70 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | 70 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
71 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", | 71 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", |
72 | ························"\u001b[0;32m<ipython-input-2-91cf2eecbfdd>\u001b[0m·in·\u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m---->·1\u001b[0;31m·\u001b[0mds\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"air_temperature\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m······2\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m······3\u001b[0m·\u001b[0;31m#·to·celsius\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m······4\u001b[0m·\u001b[0mair\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mair\u001b[0m·\u001b[0;34m-\u001b[0m·\u001b[0;36m273.15\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m······5\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n", | 72 | ························"\u001b[0;32m<ipython-input-2-91cf2eecbfdd>\u001b[0m·in·\u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m---->·1\u001b[0;31m·\u001b[0mds\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"air_temperature\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m······2\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m······3\u001b[0m·\u001b[0;31m#·to·celsius\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m······4\u001b[0m·\u001b[0mair\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mair\u001b[0m·\u001b[0;34m-\u001b[0m·\u001b[0;36m273.15\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m······5\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n", |
73 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····111\u001b[0m·····\u001b[0mopen_dataset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····112\u001b[0m·····\"\"\"\n\u001b[0;32m-->·113\u001b[0;31m·····\u001b[0;32mwith\u001b[0m·\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m·\u001b[0;32mas\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m····114\u001b[0m·········\u001b[0;32mreturn\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····115\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n", | 73 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····111\u001b[0m·····\u001b[0mopen_dataset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····112\u001b[0m·····\"\"\"\n\u001b[0;32m-->·113\u001b[0;31m·····\u001b[0;32mwith\u001b[0m·\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m·\u001b[0;32mas\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m····114\u001b[0m·········\u001b[0;32mreturn\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····115\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n", |
74 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·github_url,·branch,·**kws)\u001b[0m\n\u001b[1;32m·····76\u001b[0m·········\u001b[0;31m#·May·want·to·add·an·option·to·remove·it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····77\u001b[0m·········\u001b[0;32mif\u001b[0m·\u001b[0;32mnot\u001b[0m·\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·78\u001b[0;31m·············\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····79\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····80\u001b[0m·········\u001b[0murl\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 74 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·github_url,·branch,·**kws)\u001b[0m\n\u001b[1;32m·····76\u001b[0m·········\u001b[0;31m#·May·want·to·add·an·option·to·remove·it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····77\u001b[0m·········\u001b[0;32mif\u001b[0m·\u001b[0;32mnot\u001b[0m·\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·78\u001b[0;31m·············\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····79\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····80\u001b[0m·········\u001b[0murl\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
75 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 75 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data'" |
76 | ····················] | 76 | ····················] |
77 | ················} | 77 | ················} |
78 | ············], | 78 | ············], |
79 | ············"source":·[ | 79 | ············"source":·[ |
80 | ················"ds·=·xr.tutorial.load_dataset(\"air_temperature\")\n", | 80 | ················"ds·=·xr.tutorial.load_dataset(\"air_temperature\")\n", |
81 | ················"\n", | 81 | ················"\n", |
82 | ················"#·to·celsius\n", | 82 | ················"#·to·celsius\n", |
Offset 528, 15 lines modified | Offset 528, 15 lines modified | ||
528 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ansi-cyan-fg">open_dataset</span><span·class="ansi-blue-fg">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> | 528 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ansi-cyan-fg">open_dataset</span><span·class="ansi-blue-fg">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> |
529 | <span·class="ansi-green-intense-fg·ansi-bold">·····76</span>·········<span·class="ansi-red-fg">#·May·want·to·add·an·option·to·remove·it.</span> | 529 | <span·class="ansi-green-intense-fg·ansi-bold">·····76</span>·········<span·class="ansi-red-fg">#·May·want·to·add·an·option·to·remove·it.</span> |
530 | <span·class="ansi-green-intense-fg·ansi-bold">·····77</span>·········<span·class="ansi-green-fg">if</span>·<span·class="ansi-green-fg">not</span>·_os<span·class="ansi-blue-fg">.</span>path<span·class="ansi-blue-fg">.</span>isdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">:</span> | 530 | <span·class="ansi-green-intense-fg·ansi-bold">·····77</span>·········<span·class="ansi-green-fg">if</span>·<span·class="ansi-green-fg">not</span>·_os<span·class="ansi-blue-fg">.</span>path<span·class="ansi-blue-fg">.</span>isdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">:</span> |
531 | <span·class="ansi-green-fg">--->·78</span><span·class="ansi-red-fg">·············</span>_os<span·class="ansi-blue-fg">.</span>mkdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span> | 531 | <span·class="ansi-green-fg">--->·78</span><span·class="ansi-red-fg">·············</span>_os<span·class="ansi-blue-fg">.</span>mkdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span> |
532 | <span·class="ansi-green-intense-fg·ansi-bold">·····79</span> | 532 | <span·class="ansi-green-intense-fg·ansi-bold">·····79</span> |
533 | <span·class="ansi-green-intense-fg·ansi-bold">·····80</span>·········url·<span·class="ansi-blue-fg">=</span>·<span·class="ansi-blue-fg">"/"</span><span·class="ansi-blue-fg">.</span>join<span·class="ansi-blue-fg">(</span><span·class="ansi-blue-fg">(</span>github_url<span·class="ansi-blue-fg">,</span>·<span·class="ansi-blue-fg">"raw"</span><span·class="ansi-blue-fg">,</span>·branch<span·class="ansi-blue-fg">,</span>·fullname<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">)</span> | 533 | <span·class="ansi-green-intense-fg·ansi-bold">·····80</span>·········url·<span·class="ansi-blue-fg">=</span>·<span·class="ansi-blue-fg">"/"</span><span·class="ansi-blue-fg">.</span>join<span·class="ansi-blue-fg">(</span><span·class="ansi-blue-fg">(</span>github_url<span·class="ansi-blue-fg">,</span>·<span·class="ansi-blue-fg">"raw"</span><span·class="ansi-blue-fg">,</span>·branch<span·class="ansi-blue-fg">,</span>·fullname<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">)</span> |
534 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 534 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data' |
535 | </pre></div></div> | 535 | </pre></div></div> |
536 | </div> | 536 | </div> |
537 | </div> | 537 | </div> |
538 | <div·class="section"·id="Now-for-the-heavy-lifting:"> | 538 | <div·class="section"·id="Now-for-the-heavy-lifting:"> |
539 | <h2>Now·for·the·heavy·lifting:<a·class="headerlink"·href="#Now-for-the-heavy-lifting:"·title="Permalink·to·this·headline">¶</a></h2> | 539 | <h2>Now·for·the·heavy·lifting:<a·class="headerlink"·href="#Now-for-the-heavy-lifting:"·title="Permalink·to·this·headline">¶</a></h2> |
540 | <p>We·first·have·to·come·up·with·the·weights,·-·calculate·the·month·lengths·for·each·monthly·data·record·-·calculate·weights·using·<code·class="docutils·literal·notranslate"><span·class="pre">groupby('time.season')</span></code></p> | 540 | <p>We·first·have·to·come·up·with·the·weights,·-·calculate·the·month·lengths·for·each·monthly·data·record·-·calculate·weights·using·<code·class="docutils·literal·notranslate"><span·class="pre">groupby('time.season')</span></code></p> |
541 | <p>Finally,·we·just·need·to·multiply·our·weights·by·the·<code·class="docutils·literal·notranslate"><span·class="pre">Dataset</span></code>·and·sum·allong·the·time·dimension.·Creating·a·<code·class="docutils·literal·notranslate"><span·class="pre">DataArray</span></code>·for·the·month·length·is·as·easy·as·using·the·<code·class="docutils·literal·notranslate"><span·class="pre">days_in_month</span></code>·accessor·on·the·time·coordinate.·The·calendar·type,·in·this·case·<code·class="docutils·literal·notranslate"><span·class="pre">'noleap'</span></code>,·is·automatically·considered·in·this·operation.</p> | 541 | <p>Finally,·we·just·need·to·multiply·our·weights·by·the·<code·class="docutils·literal·notranslate"><span·class="pre">Dataset</span></code>·and·sum·allong·the·time·dimension.·Creating·a·<code·class="docutils·literal·notranslate"><span·class="pre">DataArray</span></code>·for·the·month·length·is·as·easy·as·using·the·<code·class="docutils·literal·notranslate"><span·class="pre">days_in_month</span></code>·accessor·on·the·time·coordinate.·The·calendar·type,·in·this·case·<code·class="docutils·literal·notranslate"><span·class="pre">'noleap'</span></code>,·is·automatically·considered·in·this·operation.</p> |
Offset 85, 15 lines modified | Offset 85, 15 lines modified | ||
85 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) | 85 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) |
86 | ·····76·········#·May·want·to·add·an·option·to·remove·it. | 86 | ·····76·········#·May·want·to·add·an·option·to·remove·it. |
87 | ·····77·········if·not·_os.path.isdir(longdir): | 87 | ·····77·········if·not·_os.path.isdir(longdir): |
88 | --->·78·············_os.mkdir(longdir) | 88 | --->·78·············_os.mkdir(longdir) |
89 | ·····79 | 89 | ·····79 |
90 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) | 90 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) |
91 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 91 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
92 | build/.xarray_tutorial_data' | 92 | build/.xarray_tutorial_data' |
93 | *****·Now·for·the·heavy·lifting:¶·***** | 93 | *****·Now·for·the·heavy·lifting:¶·***** |
94 | We·first·have·to·come·up·with·the·weights,·-·calculate·the·month·lengths·for | 94 | We·first·have·to·come·up·with·the·weights,·-·calculate·the·month·lengths·for |
95 | each·monthly·data·record·-·calculate·weights·using·groupby('time.season') | 95 | each·monthly·data·record·-·calculate·weights·using·groupby('time.season') |
96 | Finally,·we·just·need·to·multiply·our·weights·by·the·Dataset·and·sum·allong·the | 96 | Finally,·we·just·need·to·multiply·our·weights·by·the·Dataset·and·sum·allong·the |
97 | time·dimension.·Creating·a·DataArray·for·the·month·length·is·as·easy·as·using | 97 | time·dimension.·Creating·a·DataArray·for·the·month·length·is·as·easy·as·using |
98 | the·days_in_month·accessor·on·the·time·coordinate.·The·calendar·type,·in·this | 98 | the·days_in_month·accessor·on·the·time·coordinate.·The·calendar·type,·in·this |
Offset 47, 22 lines modified | Offset 47, 22 lines modified | ||
47 | ····················"end_time":·"2018-11-28T20:51:36.072316Z", | 47 | ····················"end_time":·"2018-11-28T20:51:36.072316Z", |
48 | ····················"start_time":·"2018-11-28T20:51:36.016594Z" | 48 | ····················"start_time":·"2018-11-28T20:51:36.016594Z" |
49 | ················} | 49 | ················} |
50 | ············}, | 50 | ············}, |
51 | ············"outputs":·[ | 51 | ············"outputs":·[ |
52 | ················{ | 52 | ················{ |
53 | ····················"ename":·"FileNotFoundError", | 53 | ····················"ename":·"FileNotFoundError", |
54 | ····················"evalue":·"[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 54 | ····················"evalue":·"[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data'", |
55 | ····················"output_type":·"error", | 55 | ····················"output_type":·"error", |
56 | ····················"traceback":·[ | 56 | ····················"traceback":·[ |
57 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | 57 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
58 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", | 58 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", |
59 | ························"\u001b[0;32m<ipython-input-2-0eb806e38f7f>\u001b[0m·in·\u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m---->·1\u001b[0;31m·\u001b[0mds\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'rasm'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m······2\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 59 | ························"\u001b[0;32m<ipython-input-2-0eb806e38f7f>\u001b[0m·in·\u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m---->·1\u001b[0;31m·\u001b[0mds\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'rasm'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m······2\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
60 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·github_url,·branch,·**kws)\u001b[0m\n\u001b[1;32m·····76\u001b[0m·········\u001b[0;31m#·May·want·to·add·an·option·to·remove·it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····77\u001b[0m·········\u001b[0;32mif\u001b[0m·\u001b[0;32mnot\u001b[0m·\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·78\u001b[0;31m·············\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····79\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····80\u001b[0m·········\u001b[0murl\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 60 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·github_url,·branch,·**kws)\u001b[0m\n\u001b[1;32m·····76\u001b[0m·········\u001b[0;31m#·May·want·to·add·an·option·to·remove·it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····77\u001b[0m·········\u001b[0;32mif\u001b[0m·\u001b[0;32mnot\u001b[0m·\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·78\u001b[0;31m·············\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····79\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····80\u001b[0m·········\u001b[0murl\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
61 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 61 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data'" |
62 | ····················] | 62 | ····················] |
63 | ················} | 63 | ················} |
64 | ············], | 64 | ············], |
65 | ············"source":·[ | 65 | ············"source":·[ |
66 | ················"ds·=·xr.tutorial.open_dataset('rasm').load()\n", | 66 | ················"ds·=·xr.tutorial.open_dataset('rasm').load()\n", |
67 | ················"ds" | 67 | ················"ds" |
68 | ············] | 68 | ············] |
Offset 527, 15 lines modified | Offset 527, 15 lines modified | ||
527 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ansi-cyan-fg">open_dataset</span><span·class="ansi-blue-fg">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> | 527 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ansi-cyan-fg">open_dataset</span><span·class="ansi-blue-fg">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> |
528 | <span·class="ansi-green-intense-fg·ansi-bold">·····76</span>·········<span·class="ansi-red-fg">#·May·want·to·add·an·option·to·remove·it.</span> | 528 | <span·class="ansi-green-intense-fg·ansi-bold">·····76</span>·········<span·class="ansi-red-fg">#·May·want·to·add·an·option·to·remove·it.</span> |
529 | <span·class="ansi-green-intense-fg·ansi-bold">·····77</span>·········<span·class="ansi-green-fg">if</span>·<span·class="ansi-green-fg">not</span>·_os<span·class="ansi-blue-fg">.</span>path<span·class="ansi-blue-fg">.</span>isdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">:</span> | 529 | <span·class="ansi-green-intense-fg·ansi-bold">·····77</span>·········<span·class="ansi-green-fg">if</span>·<span·class="ansi-green-fg">not</span>·_os<span·class="ansi-blue-fg">.</span>path<span·class="ansi-blue-fg">.</span>isdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">:</span> |
530 | <span·class="ansi-green-fg">--->·78</span><span·class="ansi-red-fg">·············</span>_os<span·class="ansi-blue-fg">.</span>mkdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span> | 530 | <span·class="ansi-green-fg">--->·78</span><span·class="ansi-red-fg">·············</span>_os<span·class="ansi-blue-fg">.</span>mkdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span> |
531 | <span·class="ansi-green-intense-fg·ansi-bold">·····79</span> | 531 | <span·class="ansi-green-intense-fg·ansi-bold">·····79</span> |
532 | <span·class="ansi-green-intense-fg·ansi-bold">·····80</span>·········url·<span·class="ansi-blue-fg">=</span>·<span·class="ansi-blue-fg">"/"</span><span·class="ansi-blue-fg">.</span>join<span·class="ansi-blue-fg">(</span><span·class="ansi-blue-fg">(</span>github_url<span·class="ansi-blue-fg">,</span>·<span·class="ansi-blue-fg">"raw"</span><span·class="ansi-blue-fg">,</span>·branch<span·class="ansi-blue-fg">,</span>·fullname<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">)</span> | 532 | <span·class="ansi-green-intense-fg·ansi-bold">·····80</span>·········url·<span·class="ansi-blue-fg">=</span>·<span·class="ansi-blue-fg">"/"</span><span·class="ansi-blue-fg">.</span>join<span·class="ansi-blue-fg">(</span><span·class="ansi-blue-fg">(</span>github_url<span·class="ansi-blue-fg">,</span>·<span·class="ansi-blue-fg">"raw"</span><span·class="ansi-blue-fg">,</span>·branch<span·class="ansi-blue-fg">,</span>·fullname<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">)</span> |
533 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 533 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data' |
534 | </pre></div></div> | 534 | </pre></div></div> |
535 | </div> | 535 | </div> |
536 | <p>In·this·example,·the·<em>logical·coordinates</em>·are·<code·class="docutils·literal·notranslate"><span·class="pre">x</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">y</span></code>,·while·the·<em>physical·coordinates</em>·are·<code·class="docutils·literal·notranslate"><span·class="pre">xc</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">yc</span></code>,·which·represent·the·latitudes·and·longitude·of·the·data.</p> | 536 | <p>In·this·example,·the·<em>logical·coordinates</em>·are·<code·class="docutils·literal·notranslate"><span·class="pre">x</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">y</span></code>,·while·the·<em>physical·coordinates</em>·are·<code·class="docutils·literal·notranslate"><span·class="pre">xc</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">yc</span></code>,·which·represent·the·latitudes·and·longitude·of·the·data.</p> |
537 | <div·class="nbinput·docutils·container"> | 537 | <div·class="nbinput·docutils·container"> |
538 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[3]: | 538 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[3]: |
539 | </pre></div> | 539 | </pre></div> |
540 | </div> | 540 | </div> |
Offset 83, 15 lines modified | Offset 83, 15 lines modified | ||
83 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) | 83 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) |
84 | ·····76·········#·May·want·to·add·an·option·to·remove·it. | 84 | ·····76·········#·May·want·to·add·an·option·to·remove·it. |
85 | ·····77·········if·not·_os.path.isdir(longdir): | 85 | ·····77·········if·not·_os.path.isdir(longdir): |
86 | --->·78·············_os.mkdir(longdir) | 86 | --->·78·············_os.mkdir(longdir) |
87 | ·····79 | 87 | ·····79 |
88 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) | 88 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) |
89 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 89 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
90 | build/.xarray_tutorial_data' | 90 | build/.xarray_tutorial_data' |
91 | In·this·example,·the·logical·coordinates·are·x·and·y,·while·the·physical | 91 | In·this·example,·the·logical·coordinates·are·x·and·y,·while·the·physical |
92 | coordinates·are·xc·and·yc,·which·represent·the·latitudes·and·longitude·of·the | 92 | coordinates·are·xc·and·yc,·which·represent·the·latitudes·and·longitude·of·the |
93 | data. | 93 | data. |
94 | [3]: | 94 | [3]: |
95 | print(ds.xc.attrs) | 95 | print(ds.xc.attrs) |
96 | print(ds.yc.attrs) | 96 | print(ds.yc.attrs) |
Offset 45, 22 lines modified | Offset 45, 22 lines modified | ||
45 | ····················"end_time":·"2018-11-28T20:50:13.629720Z", | 45 | ····················"end_time":·"2018-11-28T20:50:13.629720Z", |
46 | ····················"start_time":·"2018-11-28T20:50:13.484542Z" | 46 | ····················"start_time":·"2018-11-28T20:50:13.484542Z" |
47 | ················} | 47 | ················} |
48 | ············}, | 48 | ············}, |
49 | ············"outputs":·[ | 49 | ············"outputs":·[ |
50 | ················{ | 50 | ················{ |
51 | ····················"ename":·"FileNotFoundError", | 51 | ····················"ename":·"FileNotFoundError", |
52 | ····················"evalue":·"[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 52 | ····················"evalue":·"[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data'", |
53 | ····················"output_type":·"error", | 53 | ····················"output_type":·"error", |
54 | ····················"traceback":·[ | 54 | ····················"traceback":·[ |
55 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | 55 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
56 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", | 56 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", |
57 | ························"\u001b[0;32m<ipython-input-2-0eb806e38f7f>\u001b[0m·in·\u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m---->·1\u001b[0;31m·\u001b[0mds\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'rasm'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m······2\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 57 | ························"\u001b[0;32m<ipython-input-2-0eb806e38f7f>\u001b[0m·in·\u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m---->·1\u001b[0;31m·\u001b[0mds\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'rasm'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m······2\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
58 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·github_url,·branch,·**kws)\u001b[0m\n\u001b[1;32m·····76\u001b[0m·········\u001b[0;31m#·May·want·to·add·an·option·to·remove·it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····77\u001b[0m·········\u001b[0;32mif\u001b[0m·\u001b[0;32mnot\u001b[0m·\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·78\u001b[0;31m·············\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····79\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····80\u001b[0m·········\u001b[0murl\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 58 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·github_url,·branch,·**kws)\u001b[0m\n\u001b[1;32m·····76\u001b[0m·········\u001b[0;31m#·May·want·to·add·an·option·to·remove·it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····77\u001b[0m·········\u001b[0;32mif\u001b[0m·\u001b[0;32mnot\u001b[0m·\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·78\u001b[0;31m·············\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····79\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····80\u001b[0m·········\u001b[0murl\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
59 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 59 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data'" |
60 | ····················] | 60 | ····················] |
61 | ················} | 61 | ················} |
62 | ············], | 62 | ············], |
63 | ············"source":·[ | 63 | ············"source":·[ |
64 | ················"ds·=·xr.tutorial.open_dataset('rasm').load()\n", | 64 | ················"ds·=·xr.tutorial.open_dataset('rasm').load()\n", |
65 | ················"ds" | 65 | ················"ds" |
66 | ············] | 66 | ············] |
Offset 533, 15 lines modified | Offset 533, 15 lines modified | ||
533 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ansi-cyan-fg">open_dataset</span><span·class="ansi-blue-fg">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> | 533 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ansi-cyan-fg">open_dataset</span><span·class="ansi-blue-fg">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> |
534 | <span·class="ansi-green-intense-fg·ansi-bold">·····76</span>·········<span·class="ansi-red-fg">#·May·want·to·add·an·option·to·remove·it.</span> | 534 | <span·class="ansi-green-intense-fg·ansi-bold">·····76</span>·········<span·class="ansi-red-fg">#·May·want·to·add·an·option·to·remove·it.</span> |
535 | <span·class="ansi-green-intense-fg·ansi-bold">·····77</span>·········<span·class="ansi-green-fg">if</span>·<span·class="ansi-green-fg">not</span>·_os<span·class="ansi-blue-fg">.</span>path<span·class="ansi-blue-fg">.</span>isdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">:</span> | 535 | <span·class="ansi-green-intense-fg·ansi-bold">·····77</span>·········<span·class="ansi-green-fg">if</span>·<span·class="ansi-green-fg">not</span>·_os<span·class="ansi-blue-fg">.</span>path<span·class="ansi-blue-fg">.</span>isdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">:</span> |
536 | <span·class="ansi-green-fg">--->·78</span><span·class="ansi-red-fg">·············</span>_os<span·class="ansi-blue-fg">.</span>mkdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span> | 536 | <span·class="ansi-green-fg">--->·78</span><span·class="ansi-red-fg">·············</span>_os<span·class="ansi-blue-fg">.</span>mkdir<span·class="ansi-blue-fg">(</span>longdir<span·class="ansi-blue-fg">)</span> |
537 | <span·class="ansi-green-intense-fg·ansi-bold">·····79</span> | 537 | <span·class="ansi-green-intense-fg·ansi-bold">·····79</span> |
538 | <span·class="ansi-green-intense-fg·ansi-bold">·····80</span>·········url·<span·class="ansi-blue-fg">=</span>·<span·class="ansi-blue-fg">"/"</span><span·class="ansi-blue-fg">.</span>join<span·class="ansi-blue-fg">(</span><span·class="ansi-blue-fg">(</span>github_url<span·class="ansi-blue-fg">,</span>·<span·class="ansi-blue-fg">"raw"</span><span·class="ansi-blue-fg">,</span>·branch<span·class="ansi-blue-fg">,</span>·fullname<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">)</span> | 538 | <span·class="ansi-green-intense-fg·ansi-bold">·····80</span>·········url·<span·class="ansi-blue-fg">=</span>·<span·class="ansi-blue-fg">"/"</span><span·class="ansi-blue-fg">.</span>join<span·class="ansi-blue-fg">(</span><span·class="ansi-blue-fg">(</span>github_url<span·class="ansi-blue-fg">,</span>·<span·class="ansi-blue-fg">"raw"</span><span·class="ansi-blue-fg">,</span>·branch<span·class="ansi-blue-fg">,</span>·fullname<span·class="ansi-blue-fg">)</span><span·class="ansi-blue-fg">)</span> |
539 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 539 | <span·class="ansi-red-fg">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data' |
540 | </pre></div></div> | 540 | </pre></div></div> |
541 | </div> | 541 | </div> |
542 | <div·class="section"·id="Multiple-plots-and-map-projections"> | 542 | <div·class="section"·id="Multiple-plots-and-map-projections"> |
543 | <h2>Multiple·plots·and·map·projections<a·class="headerlink"·href="#Multiple-plots-and-map-projections"·title="Permalink·to·this·headline">¶</a></h2> | 543 | <h2>Multiple·plots·and·map·projections<a·class="headerlink"·href="#Multiple-plots-and-map-projections"·title="Permalink·to·this·headline">¶</a></h2> |
544 | <p>Control·the·map·projection·parameters·on·multiple·axes</p> | 544 | <p>Control·the·map·projection·parameters·on·multiple·axes</p> |
545 | <p>This·example·illustrates·how·to·plot·multiple·maps·and·control·their·extent·and·aspect·ratio.</p> | 545 | <p>This·example·illustrates·how·to·plot·multiple·maps·and·control·their·extent·and·aspect·ratio.</p> |
546 | <p>For·more·details·see·<a·class="reference·external"·href="https://github.com/pydata/xarray/issues/1397#issuecomment-299190567">this·discussion</a>·on·github.</p> | 546 | <p>For·more·details·see·<a·class="reference·external"·href="https://github.com/pydata/xarray/issues/1397#issuecomment-299190567">this·discussion</a>·on·github.</p> |
Offset 770, 15 lines modified | Offset 770, 15 lines modified | ||
770 | <span·class="ansi-green-intense-fg·ansi-bold">····200</span>·············<span·class="ansi-green-fg">except</span>·KeyError<span·class="ansi-blue-fg">:</span> | 770 | <span·class="ansi-green-intense-fg·ansi-bold">····200</span>·············<span·class="ansi-green-fg">except</span>·KeyError<span·class="ansi-blue-fg">:</span> |
771 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py</span>·in·<span·class="ansi-cyan-fg">__getitem__</span><span·class="ansi-blue-fg">(self,·key)</span> | 771 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py</span>·in·<span·class="ansi-cyan-fg">__getitem__</span><span·class="ansi-blue-fg">(self,·key)</span> |
772 | <span·class="ansi-green-intense-fg·ansi-bold">·····52</span>·········<span·class="ansi-green-fg">with</span>·self<span·class="ansi-blue-fg">.</span>_lock<span·class="ansi-blue-fg">:</span> | 772 | <span·class="ansi-green-intense-fg·ansi-bold">·····52</span>·········<span·class="ansi-green-fg">with</span>·self<span·class="ansi-blue-fg">.</span>_lock<span·class="ansi-blue-fg">:</span> |
773 | <span·class="ansi-green-fg">--->·53</span><span·class="ansi-red-fg">·············</span>value·<span·class="ansi-blue-fg">=</span>·self<span·class="ansi-blue-fg">.</span>_cache<span·class="ansi-blue-fg">[</span>key<span·class="ansi-blue-fg">]</span> | 773 | <span·class="ansi-green-fg">--->·53</span><span·class="ansi-red-fg">·············</span>value·<span·class="ansi-blue-fg">=</span>·self<span·class="ansi-blue-fg">.</span>_cache<span·class="ansi-blue-fg">[</span>key<span·class="ansi-blue-fg">]</span> |
774 | <span·class="ansi-green-intense-fg·ansi-bold">·····54</span>·············self<span·class="ansi-blue-fg">.</span>_cache<span·class="ansi-blue-fg">.</span>move_to_end<span·class="ansi-blue-fg">(</span>key<span·class="ansi-blue-fg">)</span> | 774 | <span·class="ansi-green-intense-fg·ansi-bold">·····54</span>·············self<span·class="ansi-blue-fg">.</span>_cache<span·class="ansi-blue-fg">.</span>move_to_end<span·class="ansi-blue-fg">(</span>key<span·class="ansi-blue-fg">)</span> |
775 | <span·class="ansi-red-fg">KeyError</span>:·[<function·open·at·0x | 775 | <span·class="ansi-red-fg">KeyError</span>:·[<function·open·at·0xa83ffbf8>,·('https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif',),·'r',·()] |
776 | During·handling·of·the·above·exception,·another·exception·occurred: | 776 | During·handling·of·the·above·exception,·another·exception·occurred: |
777 | <span·class="ansi-red-fg">CPLE_HttpResponseError</span>····················Traceback·(most·recent·call·last) | 777 | <span·class="ansi-red-fg">CPLE_HttpResponseError</span>····················Traceback·(most·recent·call·last) |
778 | <span·class="ansi-green-fg">rasterio/_base.pyx</span>·in·<span·class="ansi-cyan-fg">rasterio._base.DatasetBase.__init__</span><span·class="ansi-blue-fg">()</span> | 778 | <span·class="ansi-green-fg">rasterio/_base.pyx</span>·in·<span·class="ansi-cyan-fg">rasterio._base.DatasetBase.__init__</span><span·class="ansi-blue-fg">()</span> |
779 | <span·class="ansi-green-fg">rasterio/_shim.pyx</span>·in·<span·class="ansi-cyan-fg">rasterio._shim.open_dataset</span><span·class="ansi-blue-fg">()</span> | 779 | <span·class="ansi-green-fg">rasterio/_shim.pyx</span>·in·<span·class="ansi-cyan-fg">rasterio._shim.open_dataset</span><span·class="ansi-blue-fg">()</span> |
Offset 889, 15 lines modified | Offset 889, 15 lines modified | ||
889 | <span·class="ansi-green-intense-fg·ansi-bold">····200</span>·············<span·class="ansi-green-fg">except</span>·KeyError<span·class="ansi-blue-fg">:</span> | 889 | <span·class="ansi-green-intense-fg·ansi-bold">····200</span>·············<span·class="ansi-green-fg">except</span>·KeyError<span·class="ansi-blue-fg">:</span> |
890 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py</span>·in·<span·class="ansi-cyan-fg">__getitem__</span><span·class="ansi-blue-fg">(self,·key)</span> | 890 | <span·class="ansi-green-fg">/build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py</span>·in·<span·class="ansi-cyan-fg">__getitem__</span><span·class="ansi-blue-fg">(self,·key)</span> |
891 | <span·class="ansi-green-intense-fg·ansi-bold">·····52</span>·········<span·class="ansi-green-fg">with</span>·self<span·class="ansi-blue-fg">.</span>_lock<span·class="ansi-blue-fg">:</span> | 891 | <span·class="ansi-green-intense-fg·ansi-bold">·····52</span>·········<span·class="ansi-green-fg">with</span>·self<span·class="ansi-blue-fg">.</span>_lock<span·class="ansi-blue-fg">:</span> |
892 | <span·class="ansi-green-fg">--->·53</span><span·class="ansi-red-fg">·············</span>value·<span·class="ansi-blue-fg">=</span>·self<span·class="ansi-blue-fg">.</span>_cache<span·class="ansi-blue-fg">[</span>key<span·class="ansi-blue-fg">]</span> | 892 | <span·class="ansi-green-fg">--->·53</span><span·class="ansi-red-fg">·············</span>value·<span·class="ansi-blue-fg">=</span>·self<span·class="ansi-blue-fg">.</span>_cache<span·class="ansi-blue-fg">[</span>key<span·class="ansi-blue-fg">]</span> |
893 | <span·class="ansi-green-intense-fg·ansi-bold">·····54</span>·············self<span·class="ansi-blue-fg">.</span>_cache<span·class="ansi-blue-fg">.</span>move_to_end<span·class="ansi-blue-fg">(</span>key<span·class="ansi-blue-fg">)</span> | 893 | <span·class="ansi-green-intense-fg·ansi-bold">·····54</span>·············self<span·class="ansi-blue-fg">.</span>_cache<span·class="ansi-blue-fg">.</span>move_to_end<span·class="ansi-blue-fg">(</span>key<span·class="ansi-blue-fg">)</span> |
894 | <span·class="ansi-red-fg">KeyError</span>:·[<function·open·at·0x | 894 | <span·class="ansi-red-fg">KeyError</span>:·[<function·open·at·0xa83ffbf8>,·('https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif',),·'r',·()] |
895 | During·handling·of·the·above·exception,·another·exception·occurred: | 895 | During·handling·of·the·above·exception,·another·exception·occurred: |
896 | <span·class="ansi-red-fg">CPLE_OpenFailedError</span>······················Traceback·(most·recent·call·last) | 896 | <span·class="ansi-red-fg">CPLE_OpenFailedError</span>······················Traceback·(most·recent·call·last) |
897 | <span·class="ansi-green-fg">rasterio/_base.pyx</span>·in·<span·class="ansi-cyan-fg">rasterio._base.DatasetBase.__init__</span><span·class="ansi-blue-fg">()</span> | 897 | <span·class="ansi-green-fg">rasterio/_base.pyx</span>·in·<span·class="ansi-cyan-fg">rasterio._base.DatasetBase.__init__</span><span·class="ansi-blue-fg">()</span> |
898 | <span·class="ansi-green-fg">rasterio/_shim.pyx</span>·in·<span·class="ansi-cyan-fg">rasterio._shim.open_dataset</span><span·class="ansi-blue-fg">()</span> | 898 | <span·class="ansi-green-fg">rasterio/_shim.pyx</span>·in·<span·class="ansi-cyan-fg">rasterio._shim.open_dataset</span><span·class="ansi-blue-fg">()</span> |
Offset 89, 15 lines modified | Offset 89, 15 lines modified | ||
89 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) | 89 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) |
90 | ·····76·········#·May·want·to·add·an·option·to·remove·it. | 90 | ·····76·········#·May·want·to·add·an·option·to·remove·it. |
91 | ·····77·········if·not·_os.path.isdir(longdir): | 91 | ·····77·········if·not·_os.path.isdir(longdir): |
92 | --->·78·············_os.mkdir(longdir) | 92 | --->·78·············_os.mkdir(longdir) |
93 | ·····79 | 93 | ·····79 |
94 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) | 94 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) |
95 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 95 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
96 | build/.xarray_tutorial_data' | 96 | build/.xarray_tutorial_data' |
97 | *****·Multiple·plots·and·map·projections¶·***** | 97 | *****·Multiple·plots·and·map·projections¶·***** |
98 | Control·the·map·projection·parameters·on·multiple·axes | 98 | Control·the·map·projection·parameters·on·multiple·axes |
99 | This·example·illustrates·how·to·plot·multiple·maps·and·control·their·extent·and | 99 | This·example·illustrates·how·to·plot·multiple·maps·and·control·their·extent·and |
100 | aspect·ratio. | 100 | aspect·ratio. |
101 | For·more·details·see·this_discussion·on·github. | 101 | For·more·details·see·this_discussion·on·github. |
102 | [3]: | 102 | [3]: |
Offset 255, 15 lines modified | Offset 255, 15 lines modified | ||
255 | /build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py·in | 255 | /build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py·in |
256 | __getitem__(self,·key) | 256 | __getitem__(self,·key) |
257 | ·····52·········with·self._lock: | 257 | ·····52·········with·self._lock: |
258 | --->·53·············value·=·self._cache[key] | 258 | --->·53·············value·=·self._cache[key] |
259 | ·····54·············self._cache.move_to_end(key) | 259 | ·····54·············self._cache.move_to_end(key) |
260 | KeyError:·[<function·open·at·0x | 260 | KeyError:·[<function·open·at·0xa83ffbf8>,·('https://github.com/mapbox/rasterio/ |
261 | raw/master/tests/data/RGB.byte.tif',),·'r',·()] | 261 | raw/master/tests/data/RGB.byte.tif',),·'r',·()] |
262 | During·handling·of·the·above·exception,·another·exception·occurred: | 262 | During·handling·of·the·above·exception,·another·exception·occurred: |
263 | CPLE_HttpResponseError····················Traceback·(most·recent·call·last) | 263 | CPLE_HttpResponseError····················Traceback·(most·recent·call·last) |
264 | rasterio/_base.pyx·in·rasterio._base.DatasetBase.__init__() | 264 | rasterio/_base.pyx·in·rasterio._base.DatasetBase.__init__() |
Offset 374, 15 lines modified | Offset 374, 15 lines modified | ||
374 | /build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py·in | 374 | /build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py·in |
375 | __getitem__(self,·key) | 375 | __getitem__(self,·key) |
376 | ·····52·········with·self._lock: | 376 | ·····52·········with·self._lock: |
377 | --->·53·············value·=·self._cache[key] | 377 | --->·53·············value·=·self._cache[key] |
378 | ·····54·············self._cache.move_to_end(key) | 378 | ·····54·············self._cache.move_to_end(key) |
379 | KeyError:·[<function·open·at·0x | 379 | KeyError:·[<function·open·at·0xa83ffbf8>,·('https://github.com/mapbox/rasterio/ |
380 | raw/master/tests/data/RGB.byte.tif',),·'r',·()] | 380 | raw/master/tests/data/RGB.byte.tif',),·'r',·()] |
381 | During·handling·of·the·above·exception,·another·exception·occurred: | 381 | During·handling·of·the·above·exception,·another·exception·occurred: |
382 | CPLE_OpenFailedError······················Traceback·(most·recent·call·last) | 382 | CPLE_OpenFailedError······················Traceback·(most·recent·call·last) |
383 | rasterio/_base.pyx·in·rasterio._base.DatasetBase.__init__() | 383 | rasterio/_base.pyx·in·rasterio._base.DatasetBase.__init__() |
Offset 31, 23 lines modified | Offset 31, 23 lines modified | ||
31 | ········{ | 31 | ········{ |
32 | ············"cell_type":·"code", | 32 | ············"cell_type":·"code", |
33 | ············"execution_count":·2, | 33 | ············"execution_count":·2, |
34 | ············"metadata":·{}, | 34 | ············"metadata":·{}, |
35 | ············"outputs":·[ | 35 | ············"outputs":·[ |
36 | ················{ | 36 | ················{ |
37 | ····················"ename":·"FileNotFoundError", | 37 | ····················"ename":·"FileNotFoundError", |
38 | ····················"evalue":·"[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 38 | ····················"evalue":·"[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data'", |
39 | ····················"output_type":·"error", | 39 | ····················"output_type":·"error", |
40 | ····················"traceback":·[ | 40 | ····················"traceback":·[ |
41 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | 41 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
42 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", | 42 | ························"\u001b[0;31mFileNotFoundError\u001b[0m·························Traceback·(most·recent·call·last)", |
43 | ························"\u001b[0;32m<ipython-input-2-15c698672cac>\u001b[0m·in·\u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m---->·1\u001b[0;31m·\u001b[0mds\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'air_temperature'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", | 43 | ························"\u001b[0;32m<ipython-input-2-15c698672cac>\u001b[0m·in·\u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m---->·1\u001b[0;31m·\u001b[0mds\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mxr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtutorial\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'air_temperature'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", |
44 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····111\u001b[0m·····\u001b[0mopen_dataset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····112\u001b[0m·····\"\"\"\n\u001b[0;32m-->·113\u001b[0;31m·····\u001b[0;32mwith\u001b[0m·\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m·\u001b[0;32mas\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m····114\u001b[0m·········\u001b[0;32mreturn\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····115\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n", | 44 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mload_dataset\u001b[0;34m(*args,·**kwargs)\u001b[0m\n\u001b[1;32m····111\u001b[0m·····\u001b[0mopen_dataset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····112\u001b[0m·····\"\"\"\n\u001b[0;32m-->·113\u001b[0;31m·····\u001b[0;32mwith\u001b[0m·\u001b[0mopen_dataset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m·\u001b[0;32mas\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m····114\u001b[0m·········\u001b[0;32mreturn\u001b[0m·\u001b[0mds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m····115\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n", |
45 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·github_url,·branch,·**kws)\u001b[0m\n\u001b[1;32m·····76\u001b[0m·········\u001b[0;31m#·May·want·to·add·an·option·to·remove·it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····77\u001b[0m·········\u001b[0;32mif\u001b[0m·\u001b[0;32mnot\u001b[0m·\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·78\u001b[0;31m·············\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····79\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····80\u001b[0m·········\u001b[0murl\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 45 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py\u001b[0m·in·\u001b[0;36mopen_dataset\u001b[0;34m(name,·cache,·cache_dir,·github_url,·branch,·**kws)\u001b[0m\n\u001b[1;32m·····76\u001b[0m·········\u001b[0;31m#·May·want·to·add·an·option·to·remove·it.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····77\u001b[0m·········\u001b[0;32mif\u001b[0m·\u001b[0;32mnot\u001b[0m·\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·78\u001b[0;31m·············\u001b[0m_os\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmkdir\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlongdir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····79\u001b[0m·\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m·····80\u001b[0m·········\u001b[0murl\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0;34m\"/\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgithub_url\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0;34m\"raw\"\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mbranch\u001b[0m\u001b[0;34m,\u001b[0m·\u001b[0mfullname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
46 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 46 | ························"\u001b[0;31mFileNotFoundError\u001b[0m:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data'" |
47 | ····················] | 47 | ····················] |
48 | ················} | 48 | ················} |
49 | ············], | 49 | ············], |
50 | ············"source":·[ | 50 | ············"source":·[ |
51 | ················"ds·=·xr.tutorial.load_dataset('air_temperature')" | 51 | ················"ds·=·xr.tutorial.load_dataset('air_temperature')" |
52 | ············] | 52 | ············] |
53 | ········}, | 53 | ········}, |
Offset 275, 15 lines modified | Offset 275, 15 lines modified | ||
275 | ····················"evalue":·"CURL·error:·Could·not·resolve·host:·github.com", | 275 | ····················"evalue":·"CURL·error:·Could·not·resolve·host:·github.com", |
276 | ····················"output_type":·"error", | 276 | ····················"output_type":·"error", |
277 | ····················"traceback":·[ | 277 | ····················"traceback":·[ |
278 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | 278 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
279 | ························"\u001b[0;31mKeyError\u001b[0m··································Traceback·(most·recent·call·last)", | 279 | ························"\u001b[0;31mKeyError\u001b[0m··································Traceback·(most·recent·call·last)", |
280 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/backends/file_manager.py\u001b[0m·in·\u001b[0;36m_acquire_with_cache_info\u001b[0;34m(self,·needs_lock)\u001b[0m\n\u001b[1;32m····198\u001b[0m·············\u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-->·199\u001b[0;31m·················\u001b[0mfile\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_key\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m····200\u001b[0m·············\u001b[0;32mexcept\u001b[0m·\u001b[0mKeyError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 280 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/backends/file_manager.py\u001b[0m·in·\u001b[0;36m_acquire_with_cache_info\u001b[0;34m(self,·needs_lock)\u001b[0m\n\u001b[1;32m····198\u001b[0m·············\u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-->·199\u001b[0;31m·················\u001b[0mfile\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_key\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m····200\u001b[0m·············\u001b[0;32mexcept\u001b[0m·\u001b[0mKeyError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
281 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py\u001b[0m·in·\u001b[0;36m__getitem__\u001b[0;34m(self,·key)\u001b[0m\n\u001b[1;32m·····52\u001b[0m·········\u001b[0;32mwith\u001b[0m·\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_lock\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·53\u001b[0;31m·············\u001b[0mvalue\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····54\u001b[0m·············\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmove_to_end\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 281 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py\u001b[0m·in·\u001b[0;36m__getitem__\u001b[0;34m(self,·key)\u001b[0m\n\u001b[1;32m·····52\u001b[0m·········\u001b[0;32mwith\u001b[0m·\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_lock\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·53\u001b[0;31m·············\u001b[0mvalue\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····54\u001b[0m·············\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmove_to_end\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
282 | ························"\u001b[0;31mKeyError\u001b[0m:·[<function·open·at·0x | 282 | ························"\u001b[0;31mKeyError\u001b[0m:·[<function·open·at·0xa83ffbf8>,·('https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif',),·'r',·()]", |
283 | ························"\nDuring·handling·of·the·above·exception,·another·exception·occurred:\n", | 283 | ························"\nDuring·handling·of·the·above·exception,·another·exception·occurred:\n", |
284 | ························"\u001b[0;31mCPLE_HttpResponseError\u001b[0m····················Traceback·(most·recent·call·last)", | 284 | ························"\u001b[0;31mCPLE_HttpResponseError\u001b[0m····················Traceback·(most·recent·call·last)", |
285 | ························"\u001b[0;32mrasterio/_base.pyx\u001b[0m·in·\u001b[0;36mrasterio._base.DatasetBase.__init__\u001b[0;34m()\u001b[0m\n", | 285 | ························"\u001b[0;32mrasterio/_base.pyx\u001b[0m·in·\u001b[0;36mrasterio._base.DatasetBase.__init__\u001b[0;34m()\u001b[0m\n", |
286 | ························"\u001b[0;32mrasterio/_shim.pyx\u001b[0m·in·\u001b[0;36mrasterio._shim.open_dataset\u001b[0;34m()\u001b[0m\n", | 286 | ························"\u001b[0;32mrasterio/_shim.pyx\u001b[0m·in·\u001b[0;36mrasterio._shim.open_dataset\u001b[0;34m()\u001b[0m\n", |
287 | ························"\u001b[0;32mrasterio/_err.pyx\u001b[0m·in·\u001b[0;36mrasterio._err.exc_wrap_pointer\u001b[0;34m()\u001b[0m\n", | 287 | ························"\u001b[0;32mrasterio/_err.pyx\u001b[0m·in·\u001b[0;36mrasterio._err.exc_wrap_pointer\u001b[0;34m()\u001b[0m\n", |
288 | ························"\u001b[0;31mCPLE_HttpResponseError\u001b[0m:·CURL·error:·Could·not·resolve·host:·github.com", | 288 | ························"\u001b[0;31mCPLE_HttpResponseError\u001b[0m:·CURL·error:·Could·not·resolve·host:·github.com", |
289 | ························"\nDuring·handling·of·the·above·exception,·another·exception·occurred:\n", | 289 | ························"\nDuring·handling·of·the·above·exception,·another·exception·occurred:\n", |
Offset 338, 15 lines modified | Offset 338, 15 lines modified | ||
338 | ····················"evalue":·"'/vsicurl/https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif'·does·not·exist·in·the·file·system,·and·is·not·recognized·as·a·supported·dataset·name.", | 338 | ····················"evalue":·"'/vsicurl/https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif'·does·not·exist·in·the·file·system,·and·is·not·recognized·as·a·supported·dataset·name.", |
339 | ····················"output_type":·"error", | 339 | ····················"output_type":·"error", |
340 | ····················"traceback":·[ | 340 | ····················"traceback":·[ |
341 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | 341 | ························"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
342 | ························"\u001b[0;31mKeyError\u001b[0m··································Traceback·(most·recent·call·last)", | 342 | ························"\u001b[0;31mKeyError\u001b[0m··································Traceback·(most·recent·call·last)", |
343 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/backends/file_manager.py\u001b[0m·in·\u001b[0;36m_acquire_with_cache_info\u001b[0;34m(self,·needs_lock)\u001b[0m\n\u001b[1;32m····198\u001b[0m·············\u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-->·199\u001b[0;31m·················\u001b[0mfile\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_key\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m····200\u001b[0m·············\u001b[0;32mexcept\u001b[0m·\u001b[0mKeyError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 343 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/backends/file_manager.py\u001b[0m·in·\u001b[0;36m_acquire_with_cache_info\u001b[0;34m(self,·needs_lock)\u001b[0m\n\u001b[1;32m····198\u001b[0m·············\u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-->·199\u001b[0;31m·················\u001b[0mfile\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_key\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m····200\u001b[0m·············\u001b[0;32mexcept\u001b[0m·\u001b[0mKeyError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
344 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py\u001b[0m·in·\u001b[0;36m__getitem__\u001b[0;34m(self,·key)\u001b[0m\n\u001b[1;32m·····52\u001b[0m·········\u001b[0;32mwith\u001b[0m·\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_lock\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·53\u001b[0;31m·············\u001b[0mvalue\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····54\u001b[0m·············\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmove_to_end\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | 344 | ························"\u001b[0;32m/build/reproducible-path/python-xarray-0.16.2/xarray/backends/lru_cache.py\u001b[0m·in·\u001b[0;36m__getitem__\u001b[0;34m(self,·key)\u001b[0m\n\u001b[1;32m·····52\u001b[0m·········\u001b[0;32mwith\u001b[0m·\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_lock\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--->·53\u001b[0;31m·············\u001b[0mvalue\u001b[0m·\u001b[0;34m=\u001b[0m·\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m·····54\u001b[0m·············\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cache\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmove_to_end\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
345 | ························"\u001b[0;31mKeyError\u001b[0m:·[<function·open·at·0x | 345 | ························"\u001b[0;31mKeyError\u001b[0m:·[<function·open·at·0xa83ffbf8>,·('https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif',),·'r',·()]", |
346 | ························"\nDuring·handling·of·the·above·exception,·another·exception·occurred:\n", | 346 | ························"\nDuring·handling·of·the·above·exception,·another·exception·occurred:\n", |
347 | ························"\u001b[0;31mCPLE_OpenFailedError\u001b[0m······················Traceback·(most·recent·call·last)", | 347 | ························"\u001b[0;31mCPLE_OpenFailedError\u001b[0m······················Traceback·(most·recent·call·last)", |
348 | ························"\u001b[0;32mrasterio/_base.pyx\u001b[0m·in·\u001b[0;36mrasterio._base.DatasetBase.__init__\u001b[0;34m()\u001b[0m\n", | 348 | ························"\u001b[0;32mrasterio/_base.pyx\u001b[0m·in·\u001b[0;36mrasterio._base.DatasetBase.__init__\u001b[0;34m()\u001b[0m\n", |
349 | ························"\u001b[0;32mrasterio/_shim.pyx\u001b[0m·in·\u001b[0;36mrasterio._shim.open_dataset\u001b[0;34m()\u001b[0m\n", | 349 | ························"\u001b[0;32mrasterio/_shim.pyx\u001b[0m·in·\u001b[0;36mrasterio._shim.open_dataset\u001b[0;34m()\u001b[0m\n", |
350 | ························"\u001b[0;32mrasterio/_err.pyx\u001b[0m·in·\u001b[0;36mrasterio._err.exc_wrap_pointer\u001b[0;34m()\u001b[0m\n", | 350 | ························"\u001b[0;32mrasterio/_err.pyx\u001b[0m·in·\u001b[0;36mrasterio._err.exc_wrap_pointer\u001b[0;34m()\u001b[0m\n", |
351 | ························"\u001b[0;31mCPLE_OpenFailedError\u001b[0m:·'/vsicurl/https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif'·does·not·exist·in·the·file·system,·and·is·not·recognized·as·a·supported·dataset·name.", | 351 | ························"\u001b[0;31mCPLE_OpenFailedError\u001b[0m:·'/vsicurl/https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif'·does·not·exist·in·the·file·system,·and·is·not·recognized·as·a·supported·dataset·name.", |
352 | ························"\nDuring·handling·of·the·above·exception,·another·exception·occurred:\n", | 352 | ························"\nDuring·handling·of·the·above·exception,·another·exception·occurred:\n", |
Offset 889, 30 lines modified | Offset 889, 30 lines modified | ||
889 | </style><pre·class='xr-text-repr-fallback'><xarray.Dataset> | 889 | </style><pre·class='xr-text-repr-fallback'><xarray.Dataset> |
890 | Dimensions:···(location:·3,·time:·731) | 890 | Dimensions:···(location:·3,·time:·731) |
891 | Coordinates: | 891 | Coordinates: |
892 | ··*·time······(time)·datetime64[ns]·2000-01-01·2000-01-02·...·2001-12-31 | 892 | ··*·time······(time)·datetime64[ns]·2000-01-01·2000-01-02·...·2001-12-31 |
893 | ··*·location··(location)·<U2·'IA'·'IN'·'IL' | 893 | ··*·location··(location)·<U2·'IA'·'IN'·'IL' |
894 | Data·variables: | 894 | Data·variables: |
895 | ····tmin······(time,·location)·float64·-8.037·-1.788·-3.932·...·-1.346·-4.544 | 895 | ····tmin······(time,·location)·float64·-8.037·-1.788·-3.932·...·-1.346·-4.544 |
896 | ····tmax······(time,·location)·float64·12.98·3.31·6.779·...·6.636·3.343·3.805</pre><div·class='xr-wrap'·hidden><div·class='xr-header'><div·class='xr-obj-type'>xarray.Dataset</div></div><ul·class='xr-sections'><li·class='xr-section-item'><input·id='section- | 896 | ····tmax······(time,·location)·float64·12.98·3.31·6.779·...·6.636·3.343·3.805</pre><div·class='xr-wrap'·hidden><div·class='xr-header'><div·class='xr-obj-type'>xarray.Dataset</div></div><ul·class='xr-sections'><li·class='xr-section-item'><input·id='section-58df5acd-d33b-4d0b-b6ef-4679d537348b'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-58df5acd-d33b-4d0b-b6ef-4679d537348b'·class='xr-section-summary'··title='Expand/collapse·section'>Dimensions:</label><div·class='xr-section-in[·...·truncated·by·diffoscope;·len:·1235,·SHA:·5f7d10d91a93c261d1a5fce06604872a1b1189209a46a589eddf78d3b2e501b5·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array(['2000-01-01T00:00:00.000000000',·'2000-01-02T00:00:00.000000000', |
897 | ·······'2000-01-03T00:00:00.000000000',·...,·'2001-12-29T00:00:00.000000000', | 897 | ·······'2000-01-03T00:00:00.000000000',·...,·'2001-12-29T00:00:00.000000000', |
898 | ·······'2001-12-30T00:00:00.000000000',·'2001-12-31T00:00:00.000000000'], | 898 | ·······'2001-12-30T00:00:00.000000000',·'2001-12-31T00:00:00.000000000'], |
899 | ······dtype='datetime64[ns]')</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span·class='xr-has-index'>location</span></div><div·class='xr-var-dims'>(location)</div><div·class='xr-var-dtype'><U2</div><div·class='xr-var-preview·xr-preview'>'IA'·'IN'·'IL'</div><input·id='attrs- | 899 | ······dtype='datetime64[ns]')</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span·class='xr-has-index'>location</span></div><div·class='xr-var-dims'>(location)</div><div·class='xr-var-dtype'><U2</div><div·class='xr-var-preview·xr-preview'>'IA'·'IN'·'IL'</div><input·id='attrs-ab901c40-395c-4078-b7e4-f0a5cadfec25'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-ab901c40-395c-4078-b7e4-f0a5cadfec25'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·1502,·SHA:·48d5b51e132b42c185176dd45a5603a51661c04919e45eaeac61b8cde2dfdf30·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[·-8.03736932,··-1.78844117,··-3.93154201], |
900 | ·······[·-9.34115662,··-6.55807323,···0.13203714], | 900 | ·······[·-9.34115662,··-6.55807323,···0.13203714], |
901 | ·······[-12.13971902,··-6.14641918,··-1.06187252], | 901 | ·······[-12.13971902,··-6.14641918,··-1.06187252], |
902 | ·······..., | 902 | ·······..., |
903 | ·······[·-5.34723825,·-13.37459826,··-4.93221199], | 903 | ·······[·-5.34723825,·-13.37459826,··-4.93221199], |
904 | ·······[·-2.67283594,··-5.18072141,··-4.11567869], | 904 | ·······[·-2.67283594,··-5.18072141,··-4.11567869], |
905 | ·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span>tmax</span></div><div·class='xr-var-dims'>(time,·location)</div><div·class='xr-var-dtype'>float64</div><div·class='xr-var-preview·xr-preview'>12.98·3.31·6.779·...·3.343·3.805</div><input·id='attrs- | 905 | ·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span>tmax</span></div><div·class='xr-var-dims'>(time,·location)</div><div·class='xr-var-dtype'>float64</div><div·class='xr-var-preview·xr-preview'>12.98·3.31·6.779·...·3.343·3.805</div><input·id='attrs-4997a151-e624-4104-bb9f-9fb4e117d5ec'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-4997a151-e624-4104-bb9f-9fb4e117d5ec'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·154,·SHA:·22d89c7dade2a0128018df796692d6816ae9929270423891cf06282def6a0589·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[12.98054898,··3.31040942,··6.77855382], |
906 | ·······[·0.44785582,··6.37271154,··4.8434966·], | 906 | ·······[·0.44785582,··6.37271154,··4.8434966·], |
907 | ·······[·5.32269851,··6.25176289,··5.98033045], | 907 | ·······[·5.32269851,··6.25176289,··5.98033045], |
908 | ·······..., | 908 | ·······..., |
909 | ·······[·6.73078492,··7.74795302,··8.04569651], | 909 | ·······[·6.73078492,··7.74795302,··8.04569651], |
910 | ·······[·6.46376911,··6.31695352,··1.55799171], | 910 | ·······[·6.46376911,··6.31695352,··1.55799171], |
911 | ·······[·6.63593435,··3.34271537,··3.80527925]])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section- | 911 | ·······[·6.63593435,··3.34271537,··3.80527925]])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-d82c4026-a29d-44d0-8a86-3485fbad7a90'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-d82c4026-a29d-44d0-8a86-3485fbad7a90'·class='xr-section-summary'··title='Expand/collapse·section'>Attributes:·<span>(0)</span></label><div·class='xr-section-inline-details'></div><div·class='xr-section-details'><dl·class='xr-attrs'></dl></div></li></ul></div></div></div> |
912 | </div> | 912 | </div> |
913 | <div·class="section"·id="Examine-a-dataset-with-pandas-and-seaborn"> | 913 | <div·class="section"·id="Examine-a-dataset-with-pandas-and-seaborn"> |
914 | <h2>Examine·a·dataset·with·pandas·and·seaborn<a·class="headerlink"·href="#Examine-a-dataset-with-pandas-and-seaborn"·title="Permalink·to·this·headline">¶</a></h2> | 914 | <h2>Examine·a·dataset·with·pandas·and·seaborn<a·class="headerlink"·href="#Examine-a-dataset-with-pandas-and-seaborn"·title="Permalink·to·this·headline">¶</a></h2> |
915 | <div·class="section"·id="Convert-to-a-pandas-DataFrame"> | 915 | <div·class="section"·id="Convert-to-a-pandas-DataFrame"> |
916 | <h3>Convert·to·a·pandas·DataFrame<a·class="headerlink"·href="#Convert-to-a-pandas-DataFrame"·title="Permalink·to·this·headline">¶</a></h3> | 916 | <h3>Convert·to·a·pandas·DataFrame<a·class="headerlink"·href="#Convert-to-a-pandas-DataFrame"·title="Permalink·to·this·headline">¶</a></h3> |
917 | <div·class="nbinput·docutils·container"> | 917 | <div·class="nbinput·docutils·container"> |
918 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[2]: | 918 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[2]: |
Offset 1112, 15 lines modified | Offset 1112, 15 lines modified | ||
1112 | </div> | 1112 | </div> |
1113 | <div·class="nboutput·docutils·container"> | 1113 | <div·class="nboutput·docutils·container"> |
1114 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[5]: | 1114 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[5]: |
1115 | </pre></div> | 1115 | </pre></div> |
1116 | </div> | 1116 | </div> |
1117 | <div·class="output_area·docutils·container"> | 1117 | <div·class="output_area·docutils·container"> |
1118 | <div·class="highlight"><pre> | 1118 | <div·class="highlight"><pre> |
1119 | <seaborn.axisgrid.PairGrid·at·0x | 1119 | <seaborn.axisgrid.PairGrid·at·0xb41db820> |
1120 | </pre></div></div> | 1120 | </pre></div></div> |
1121 | </div> | 1121 | </div> |
1122 | <div·class="nboutput·nblast·docutils·container"> | 1122 | <div·class="nboutput·nblast·docutils·container"> |
1123 | <div·class="prompt·empty·docutils·container"> | 1123 | <div·class="prompt·empty·docutils·container"> |
1124 | </div> | 1124 | </div> |
1125 | <div·class="output_area·docutils·container"> | 1125 | <div·class="output_area·docutils·container"> |
1126 | <img·alt="../_images/examples_weather-data_9_1.png"·src="../_images/examples_weather-data_9_1.png"·/> | 1126 | <img·alt="../_images/examples_weather-data_9_1.png"·src="../_images/examples_weather-data_9_1.png"·/> |
Offset 1507, 26 lines modified | Offset 1507, 26 lines modified | ||
1507 | ·······[0.········,·0.········,·0.········], | 1507 | ·······[0.········,·0.········,·0.········], |
1508 | ·······[0.········,·0.········,·0.········], | 1508 | ·······[0.········,·0.········,·0.········], |
1509 | ·······[0.········,·0.01612903,·0.········], | 1509 | ·······[0.········,·0.01612903,·0.········], |
1510 | ·······[0.33333333,·0.35······,·0.23333333], | 1510 | ·······[0.33333333,·0.35······,·0.23333333], |
1511 | ·······[0.93548387,·0.85483871,·0.82258065]]) | 1511 | ·······[0.93548387,·0.85483871,·0.82258065]]) |
1512 | Coordinates: | 1512 | Coordinates: |
1513 | ··*·location··(location)·<U2·'IA'·'IN'·'IL' | 1513 | ··*·location··(location)·<U2·'IA'·'IN'·'IL' |
1514 | ··*·month·····(month)·int64·1·2·3·4·5·6·7·8·9·10·11·12</pre><div·class='xr-wrap'·hidden><div·class='xr-header'><div·class='xr-obj-type'>xarray.DataArray</div><div·class='xr-array-name'>'tmin'</div><ul·class='xr-dim-list'><li><span·class='xr-has-index'>month</span>:·12</li><li><span·class='xr-has-index'>location</span>:·3</li></ul></div><ul·class='xr-sections'><li·class='xr-section-item'><div·class='xr-array-wrap'><input·id='section- | 1514 | ··*·month·····(month)·int64·1·2·3·4·5·6·7·8·9·10·11·12</pre><div·class='xr-wrap'·hidden><div·class='xr-header'><div·class='xr-obj-type'>xarray.DataArray</div><div·class='xr-array-name'>'tmin'</div><ul·class='xr-dim-list'><li><span·class='xr-has-index'>month</span>:·12</li><li><span·class='xr-has-index'>location</span>:·3</li></ul></div><ul·class='xr-sections'><li·class='xr-section-item'><div·class='xr-array-wrap'><input·id='section-b43cc503-c49c-454c-8656-5ef7fcd35d73'·class='xr-array-in'·type='checkbox'·checked><label·for='section-b43cc503-c49c-454c-8656-5ef7fcd35d73'·title='Show/hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-array-preview·xr-preview'><span>0.9516·0.8871·0.9355·0.8421·0.7193·...·0.2333·0.9355·0.8548·0.8226</span></div><div·class='xr-array-data'><pre>array([[0.9516129·,·0.88709677,·0.93548387], |
1515 | ·······[0.84210526,·0.71929825,·0.77192982], | 1515 | ·······[0.84210526,·0.71929825,·0.77192982], |
1516 | ·······[0.24193548,·0.12903226,·0.16129032], | 1516 | ·······[0.24193548,·0.12903226,·0.16129032], |
1517 | ·······[0.········,·0.········,·0.········], | 1517 | ·······[0.········,·0.········,·0.········], |
1518 | ·······[0.········,·0.········,·0.········], | 1518 | ·······[0.········,·0.········,·0.········], |
1519 | ·······[0.········,·0.········,·0.········], | 1519 | ·······[0.········,·0.········,·0.········], |
1520 | ·······[0.········,·0.········,·0.········], | 1520 | ·······[0.········,·0.········,·0.········], |
1521 | ·······[0.········,·0.········,·0.········], | 1521 | ·······[0.········,·0.········,·0.········], |
1522 | ·······[0.········,·0.········,·0.········], | 1522 | ·······[0.········,·0.········,·0.········], |
1523 | ·······[0.········,·0.01612903,·0.········], | 1523 | ·······[0.········,·0.01612903,·0.········], |
1524 | ·······[0.33333333,·0.35······,·0.23333333], | 1524 | ·······[0.33333333,·0.35······,·0.23333333], |
1525 | ·······[0.93548387,·0.85483871,·0.82258065]])</pre></div></div></li><li·class='xr-section-item'><input·id='section-5 | 1525 | ·······[0.93548387,·0.85483871,·0.82258065]])</pre></div></div></li><li·class='xr-section-item'><input·id='section-5cedaeb2-9dc6-43ec-8927-46f43ce0c59d'·class='xr-section-summary-in'·type='checkbox'··checked><label·for='section-5cedaeb2-9dc6-43ec-8927-46f43ce0c59d'·class='xr-section-summary'·>Coordinates:·<span>(2)</span></label><div·class='xr-section-inline-details'></[·...·truncated·by·diffoscope;·len:·2227,·SHA:·14775e0e01456cb18cf66340aca57c6d8a6303cd52b91677ac0c22342ff76d1c·...·]'·class='xr-section-summary'··title='Expand/collapse·section'>Attributes:·<span>(0)</span></label><div·class='xr-section-inline-details'></div><div·class='xr-section-details'><dl·class='xr-attrs'></dl></div></li></ul></div></div></div> |
1526 | </div> | 1526 | </div> |
1527 | <div·class="nbinput·docutils·container"> | 1527 | <div·class="nbinput·docutils·container"> |
1528 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[7]: | 1528 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[7]: |
1529 | </pre></div> | 1529 | </pre></div> |
1530 | </div> | 1530 | </div> |
1531 | <div·class="input_area·highlight-ipython3·notranslate"><div·class="highlight"><pre> | 1531 | <div·class="input_area·highlight-ipython3·notranslate"><div·class="highlight"><pre> |
1532 | <span></span><span·class="n">freeze</span><span·class="o">.</span><span·class="n">to_pandas</span><span·class="p">()</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span> | 1532 | <span></span><span·class="n">freeze</span><span·class="o">.</span><span·class="n">to_pandas</span><span·class="p">()</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span> |
Offset 2025, 18 lines modified | Offset 2025, 18 lines modified | ||
2025 | Dimensions:·······(location:·3,·time:·731) | 2025 | Dimensions:·······(location:·3,·time:·731) |
2026 | Coordinates: | 2026 | Coordinates: |
2027 | ··*·time··········(time)·datetime64[ns]·2000-01-01·2000-01-02·...·2001-12-31 | 2027 | ··*·time··········(time)·datetime64[ns]·2000-01-01·2000-01-02·...·2001-12-31 |
2028 | ··*·location······(location)·object·'IA'·'IN'·'IL' | 2028 | ··*·location······(location)·object·'IA'·'IN'·'IL' |
2029 | ····month·········(time)·int64·1·1·1·1·1·1·1·1·1·...·12·12·12·12·12·12·12·12·12 | 2029 | ····month·········(time)·int64·1·1·1·1·1·1·1·1·1·...·12·12·12·12·12·12·12·12·12 |
2030 | Data·variables: | 2030 | Data·variables: |
2031 | ····some_missing··(time,·location)·float64·nan·nan·nan·...·2.063·-1.346·-4.544 | 2031 | ····some_missing··(time,·location)·float64·nan·nan·nan·...·2.063·-1.346·-4.544 |
2032 | ····filled········(time,·location)·float64·-5.163·-4.216·...·-1.346·-4.544</pre><div·class='xr-wrap'·hidden><div·class='xr-header'><div·class='xr-obj-type'>xarray.Dataset</div></div><ul·class='xr-sections'><li·class='xr-section-item'><input·id='section- | 2032 | ····filled········(time,·location)·float64·-5.163·-4.216·...·-1.346·-4.544</pre><div·class='xr-wrap'·hidden><div·class='xr-header'><div·class='xr-obj-type'>xarray.Dataset</div></div><ul·class='xr-sections'><li·class='xr-section-item'><input·id='section-89886bb4-bdff-4bec-b6aa-c635060891eb'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-89886bb4-bdff-4bec-b6aa-c635060891eb'·class='xr-section-summary'··title='Expand/collapse·section'>Dimensions:</label><div·class='xr-section-in[·...·truncated·by·diffoscope;·len:·1235,·SHA:·8f8a457050f163f1d66a6e5dff45ee0e03b651b3a040689e8e87759a9ddbd9ab·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array(['2000-01-01T00:00:00.000000000',·'2000-01-02T00:00:00.000000000', |
2033 | ·······'2000-01-03T00:00:00.000000000',·...,·'2001-12-29T00:00:00.000000000', | 2033 | ·······'2000-01-03T00:00:00.000000000',·...,·'2001-12-29T00:00:00.000000000', |
2034 | ·······'2001-12-30T00:00:00.000000000',·'2001-12-31T00:00:00.000000000'], | 2034 | ·······'2001-12-30T00:00:00.000000000',·'2001-12-31T00:00:00.000000000'], |
2035 | ······dtype='datetime64[ns]')</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span·class='xr-has-index'>location</span></div><div·class='xr-var-dims'>(location)</div><div·class='xr-var-dtype'>object</div><div·class='xr-var-preview·xr-preview'>'IA'·'IN'·'IL'</div><input·id='attrs- | 2035 | ······dtype='datetime64[ns]')</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span·class='xr-has-index'>location</span></div><div·class='xr-var-dims'>(location)</div><div·class='xr-var-dtype'>object</div><div·class='xr-var-preview·xr-preview'>'IA'·'IN'·'IL'</div><input·id='attrs-f87fe62f-f172-4b63-91d3-68948dc40dc1'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-f87fe62f-f172-4b63-91d3-68948dc40dc1'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·1100,·SHA:·f324ba45d723c4a958879036c35af9a3b2b73b3a9f44fd2ed90596975b475783·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([·1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1, |
2036 | ········1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··2,··2,··2, | 2036 | ········1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··2,··2,··2, |
2037 | ········2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2, | 2037 | ········2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2, |
2038 | ········2,··2,··2,··2,··2,··2,··2,··2,··2,··3,··3,··3,··3,··3,··3,··3,··3, | 2038 | ········2,··2,··2,··2,··2,··2,··2,··2,··2,··3,··3,··3,··3,··3,··3,··3,··3, |
2039 | ········3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3, | 2039 | ········3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3, |
2040 | ········3,··3,··3,··3,··3,··3,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4, | 2040 | ········3,··3,··3,··3,··3,··3,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4, |
2041 | ········4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4, | 2041 | ········4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4, |
2042 | ········4,··4,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5, | 2042 | ········4,··4,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5, |
Offset 2068, 27 lines modified | Offset 2068, 27 lines modified | ||
2068 | ········9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9, | 2068 | ········9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9, |
2069 | ········9,··9,··9,··9,··9,··9,··9,··9,··9,··9,·10,·10,·10,·10,·10,·10,·10, | 2069 | ········9,··9,··9,··9,··9,··9,··9,··9,··9,··9,·10,·10,·10,·10,·10,·10,·10, |
2070 | ·······10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10, | 2070 | ·······10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10, |
2071 | ·······10,·10,·10,·10,·10,·10,·10,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11, | 2071 | ·······10,·10,·10,·10,·10,·10,·10,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11, |
2072 | ·······11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11, | 2072 | ·······11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11, |
2073 | ·······11,·11,·11,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12, | 2073 | ·······11,·11,·11,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12, |
2074 | ·······12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12], | 2074 | ·······12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12], |
2075 | ······dtype=int64)</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section- | 2075 | ······dtype=int64)</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-34f693d7-ceb8-49a3-a804-cb8545b93f14'·class='xr-section-summary-in'·type='checkbox'··checked><label·for='section-34f693d7-ceb8-49a3-a804-cb8545b93f14'·class='xr-section-summary'·>Data·variables:·<span>(2)</span></label><div·class='xr-section-inline-details[·...·truncated·by·diffoscope;·len:·737,·SHA:·dc2ec05af8304e27e402e341b721c9c50265af24d78fab43f2699b433fc2c796·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[·········nan,··········nan,··········nan], |
2076 | ·······[·········nan,··········nan,··········nan], | 2076 | ·······[·········nan,··········nan,··········nan], |
2077 | ·······[·········nan,··········nan,··········nan], | 2077 | ·······[·········nan,··········nan,··········nan], |
2078 | ·······..., | 2078 | ·······..., |
2079 | ·······[·-5.34723825,·-13.37459826,··-4.93221199], | 2079 | ·······[·-5.34723825,·-13.37459826,··-4.93221199], |
2080 | ·······[·-2.67283594,··-5.18072141,··-4.11567869], | 2080 | ·······[·-2.67283594,··-5.18072141,··-4.11567869], |
2081 | ·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span>filled</span></div><div·class='xr-var-dims'>(time,·location)</div><div·class='xr-var-dtype'>float64</div><div·class='xr-var-preview·xr-preview'>-5.163·-4.216·...·-1.346·-4.544</div><input·id='attrs- | 2081 | ·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span>filled</span></div><div·class='xr-var-dims'>(time,·location)</div><div·class='xr-var-dtype'>float64</div><div·class='xr-var-preview·xr-preview'>-5.163·-4.216·...·-1.346·-4.544</div><input·id='attrs-ab4e4fb2-28d8-4812-b4c4-c17fc06b862e'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-ab4e4fb2-28d8-4812-b4c4-c17fc06b862e'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·154,·SHA:·5a58adfc52d921344686719325071f3b46c1ccb345b91ba69f2fb673652fcf9f·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[·-5.16274935,··-4.21616663,··-4.68137385], |
2082 | ·······[·-5.16274935,··-4.21616663,··-4.68137385], | 2082 | ·······[·-5.16274935,··-4.21616663,··-4.68137385], |
2083 | ·······[·-5.16274935,··-4.21616663,··-4.68137385], | 2083 | ·······[·-5.16274935,··-4.21616663,··-4.68137385], |
2084 | ·······..., | 2084 | ·······..., |
2085 | ·······[·-5.34723825,·-13.37459826,··-4.93221199], | 2085 | ·······[·-5.34723825,·-13.37459826,··-4.93221199], |
2086 | ·······[·-2.67283594,··-5.18072141,··-4.11567869], | 2086 | ·······[·-2.67283594,··-5.18072141,··-4.11567869], |
2087 | ·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section- | 2087 | ·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-fadc5bf1-0165-49be-b3f9-8e2a8d29f3c7'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-fadc5bf1-0165-49be-b3f9-8e2a8d29f3c7'·class='xr-section-summary'··title='Expand/collapse·section'>Attributes:·<span>(0)</span></label><div·class='xr-section-inline-details'></div><div·class='xr-section-details'><dl·class='xr-attrs'></dl></div></li></ul></div></div></div> |
2088 | </div> | 2088 | </div> |
2089 | <div·class="nbinput·docutils·container"> | 2089 | <div·class="nbinput·docutils·container"> |
2090 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[12]: | 2090 | <div·class="prompt·highlight-none·notranslate"><div·class="highlight"><pre><span></span>[12]: |
2091 | </pre></div> | 2091 | </pre></div> |
2092 | </div> | 2092 | </div> |
2093 | <div·class="input_area·highlight-ipython3·notranslate"><div·class="highlight"><pre> | 2093 | <div·class="input_area·highlight-ipython3·notranslate"><div·class="highlight"><pre> |
2094 | <span></span><span·class="n">df</span>·<span·class="o">=</span>·<span·class="n">both</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="s2">"2000"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"location"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">reset_coords</span><span·class="p">(</span><span·class="n">drop</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)</span><span·class="o">.</span><span·class="n">to_dataframe</span><span·class="p">()</span> | 2094 | <span></span><span·class="n">df</span>·<span·class="o">=</span>·<span·class="n">both</span><span·class="o">.</span><span·class="n">sel</span><span·class="p">(</span><span·class="n">time</span><span·class="o">=</span><span·class="s2">"2000"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">mean</span><span·class="p">(</span><span·class="s2">"location"</span><span·class="p">)</span><span·class="o">.</span><span·class="n">reset_coords</span><span·class="p">(</span><span·class="n">drop</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)</span><span·class="o">.</span><span·class="n">to_dataframe</span><span·class="p">()</span> |
Offset 188, 15 lines modified | Offset 188, 15 lines modified | ||
188 | [4]: | 188 | [4]: |
189 | <AxesSubplot:xlabel='time'> | 189 | <AxesSubplot:xlabel='time'> |
190 | [../_images/examples_weather-data_7_1.png] | 190 | [../_images/examples_weather-data_7_1.png] |
191 | ****·Visualize·using·seaborn¶·**** | 191 | ****·Visualize·using·seaborn¶·**** |
192 | [5]: | 192 | [5]: |
193 | sns.pairplot(df.reset_index(),·vars=ds.data_vars) | 193 | sns.pairplot(df.reset_index(),·vars=ds.data_vars) |
194 | [5]: | 194 | [5]: |
195 | <seaborn.axisgrid.PairGrid·at·0x | 195 | <seaborn.axisgrid.PairGrid·at·0xb41db820> |
196 | [../_images/examples_weather-data_9_1.png] | 196 | [../_images/examples_weather-data_9_1.png] |
197 | *****·Probability·of·freeze·by·calendar·month¶·***** | 197 | *****·Probability·of·freeze·by·calendar·month¶·***** |
198 | [6]: | 198 | [6]: |
199 | freeze·=·(ds["tmin"]·<=·0).groupby("time.month").mean("time") | 199 | freeze·=·(ds["tmin"]·<=·0).groupby("time.month").mean("time") |
200 | freeze | 200 | freeze |
201 | [6]: | 201 | [6]: |
Offset 377, 30 lines modified | Offset 377, 30 lines modified | ||
377 | ····························"</style><pre·class='xr-text-repr-fallback'><xarray.Dataset>\n", | 377 | ····························"</style><pre·class='xr-text-repr-fallback'><xarray.Dataset>\n", |
378 | ····························"Dimensions:···(location:·3,·time:·731)\n", | 378 | ····························"Dimensions:···(location:·3,·time:·731)\n", |
379 | ····························"Coordinates:\n", | 379 | ····························"Coordinates:\n", |
380 | ····························"··*·time······(time)·datetime64[ns]·2000-01-01·2000-01-02·...·2001-12-31\n", | 380 | ····························"··*·time······(time)·datetime64[ns]·2000-01-01·2000-01-02·...·2001-12-31\n", |
381 | ····························"··*·location··(location)·<U2·'IA'·'IN'·'IL'\n", | 381 | ····························"··*·location··(location)·<U2·'IA'·'IN'·'IL'\n", |
382 | ····························"Data·variables:\n", | 382 | ····························"Data·variables:\n", |
383 | ····························"····tmin······(time,·location)·float64·-8.037·-1.788·-3.932·...·-1.346·-4.544\n", | 383 | ····························"····tmin······(time,·location)·float64·-8.037·-1.788·-3.932·...·-1.346·-4.544\n", |
384 | ····························"····tmax······(time,·location)·float64·12.98·3.31·6.779·...·6.636·3.343·3.805</pre><div·class='xr-wrap'·hidden><div·class='xr-header'><div·class='xr-obj-type'>xarray.Dataset</div></div><ul·class='xr-sections'><li·class='xr-section-item'><input·id='section- | 384 | ····························"····tmax······(time,·location)·float64·12.98·3.31·6.779·...·6.636·3.343·3.805</pre><div·class='xr-wrap'·hidden><div·class='xr-header'><div·class='xr-obj-type'>xarray.Dataset</div></div><ul·class='xr-sections'><li·class='xr-section-item'><input·id='section-58df5acd-d33b-4d0b-b6ef-4679d537348b'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-58df5acd-d33b-4d0b-b6ef-4679d537348b'·class='xr-section-summary'··title='Expand/collapse·section'>Dimensions:</label><div·class='xr-section-in[·...·truncated·by·diffoscope;·len:·1235,·SHA:·5f7d10d91a93c261d1a5fce06604872a1b1189209a46a589eddf78d3b2e501b5·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array(['2000-01-01T00:00:00.000000000',·'2000-01-02T00:00:00.000000000',\n", |
385 | ····························"·······'2000-01-03T00:00:00.000000000',·...,·'2001-12-29T00:00:00.000000000',\n", | 385 | ····························"·······'2000-01-03T00:00:00.000000000',·...,·'2001-12-29T00:00:00.000000000',\n", |
386 | ····························"·······'2001-12-30T00:00:00.000000000',·'2001-12-31T00:00:00.000000000'],\n", | 386 | ····························"·······'2001-12-30T00:00:00.000000000',·'2001-12-31T00:00:00.000000000'],\n", |
387 | ····························"······dtype='datetime64[ns]')</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span·class='xr-has-index'>location</span></div><div·class='xr-var-dims'>(location)</div><div·class='xr-var-dtype'><U2</div><div·class='xr-var-preview·xr-preview'>'IA'·'IN'·'IL'</div><input·id='attrs- | 387 | ····························"······dtype='datetime64[ns]')</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span·class='xr-has-index'>location</span></div><div·class='xr-var-dims'>(location)</div><div·class='xr-var-dtype'><U2</div><div·class='xr-var-preview·xr-preview'>'IA'·'IN'·'IL'</div><input·id='attrs-ab901c40-395c-4078-b7e4-f0a5cadfec25'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-ab901c40-395c-4078-b7e4-f0a5cadfec25'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·1502,·SHA:·48d5b51e132b42c185176dd45a5603a51661c04919e45eaeac61b8cde2dfdf30·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[·-8.03736932,··-1.78844117,··-3.93154201],\n", |
388 | ····························"·······[·-9.34115662,··-6.55807323,···0.13203714],\n", | 388 | ····························"·······[·-9.34115662,··-6.55807323,···0.13203714],\n", |
389 | ····························"·······[-12.13971902,··-6.14641918,··-1.06187252],\n", | 389 | ····························"·······[-12.13971902,··-6.14641918,··-1.06187252],\n", |
390 | ····························"·······...,\n", | 390 | ····························"·······...,\n", |
391 | ····························"·······[·-5.34723825,·-13.37459826,··-4.93221199],\n", | 391 | ····························"·······[·-5.34723825,·-13.37459826,··-4.93221199],\n", |
392 | ····························"·······[·-2.67283594,··-5.18072141,··-4.11567869],\n", | 392 | ····························"·······[·-2.67283594,··-5.18072141,··-4.11567869],\n", |
393 | ····························"·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span>tmax</span></div><div·class='xr-var-dims'>(time,·location)</div><div·class='xr-var-dtype'>float64</div><div·class='xr-var-preview·xr-preview'>12.98·3.31·6.779·...·3.343·3.805</div><input·id='attrs- | 393 | ····························"·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span>tmax</span></div><div·class='xr-var-dims'>(time,·location)</div><div·class='xr-var-dtype'>float64</div><div·class='xr-var-preview·xr-preview'>12.98·3.31·6.779·...·3.343·3.805</div><input·id='attrs-4997a151-e624-4104-bb9f-9fb4e117d5ec'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-4997a151-e624-4104-bb9f-9fb4e117d5ec'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·154,·SHA:·22d89c7dade2a0128018df796692d6816ae9929270423891cf06282def6a0589·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[12.98054898,··3.31040942,··6.77855382],\n", |
394 | ····························"·······[·0.44785582,··6.37271154,··4.8434966·],\n", | 394 | ····························"·······[·0.44785582,··6.37271154,··4.8434966·],\n", |
395 | ····························"·······[·5.32269851,··6.25176289,··5.98033045],\n", | 395 | ····························"·······[·5.32269851,··6.25176289,··5.98033045],\n", |
396 | ····························"·······...,\n", | 396 | ····························"·······...,\n", |
397 | ····························"·······[·6.73078492,··7.74795302,··8.04569651],\n", | 397 | ····························"·······[·6.73078492,··7.74795302,··8.04569651],\n", |
398 | ····························"·······[·6.46376911,··6.31695352,··1.55799171],\n", | 398 | ····························"·······[·6.46376911,··6.31695352,··1.55799171],\n", |
399 | ····························"·······[·6.63593435,··3.34271537,··3.80527925]])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section- | 399 | ····························"·······[·6.63593435,··3.34271537,··3.80527925]])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-d82c4026-a29d-44d0-8a86-3485fbad7a90'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-d82c4026-a29d-44d0-8a86-3485fbad7a90'·class='xr-section-summary'··title='Expand/collapse·section'>Attributes:·<span>(0)</span></label><div·class='xr-section-inline-details'></div><div·class='xr-section-details'><dl·class='xr-attrs'></dl></div></li></ul></div></div>" |
400 | ························], | 400 | ························], |
401 | ························"text/plain":·[ | 401 | ························"text/plain":·[ |
402 | ····························"<xarray.Dataset>\n", | 402 | ····························"<xarray.Dataset>\n", |
403 | ····························"Dimensions:···(location:·3,·time:·731)\n", | 403 | ····························"Dimensions:···(location:·3,·time:·731)\n", |
404 | ····························"Coordinates:\n", | 404 | ····························"Coordinates:\n", |
405 | ····························"··*·time······(time)·datetime64[ns]·2000-01-01·2000-01-02·...·2001-12-31\n", | 405 | ····························"··*·time······(time)·datetime64[ns]·2000-01-01·2000-01-02·...·2001-12-31\n", |
406 | ····························"··*·location··(location)·<U2·'IA'·'IN'·'IL'\n", | 406 | ····························"··*·location··(location)·<U2·'IA'·'IN'·'IL'\n", |
Offset 711, 15 lines modified | Offset 711, 15 lines modified | ||
711 | ····················"start_time":·"2020-01-27T15:47:37.202479Z" | 711 | ····················"start_time":·"2020-01-27T15:47:37.202479Z" |
712 | ················} | 712 | ················} |
713 | ············}, | 713 | ············}, |
714 | ············"outputs":·[ | 714 | ············"outputs":·[ |
715 | ················{ | 715 | ················{ |
716 | ····················"data":·{ | 716 | ····················"data":·{ |
717 | ························"text/plain":·[ | 717 | ························"text/plain":·[ |
718 | ····························"<seaborn.axisgrid.PairGrid·at·0x | 718 | ····························"<seaborn.axisgrid.PairGrid·at·0xb41db820>" |
719 | ························] | 719 | ························] |
720 | ····················}, | 720 | ····················}, |
721 | ····················"execution_count":·5, | 721 | ····················"execution_count":·5, |
722 | ····················"metadata":·{}, | 722 | ····················"metadata":·{}, |
723 | ····················"output_type":·"execute_result" | 723 | ····················"output_type":·"execute_result" |
724 | ················}, | 724 | ················}, |
725 | ················{ | 725 | ················{ |
Offset 1121, 26 lines modified | Offset 1121, 26 lines modified | ||
1121 | ····························"·······[0.········,·0.········,·0.········],\n", | 1121 | ····························"·······[0.········,·0.········,·0.········],\n", |
1122 | ····························"·······[0.········,·0.········,·0.········],\n", | 1122 | ····························"·······[0.········,·0.········,·0.········],\n", |
1123 | ····························"·······[0.········,·0.01612903,·0.········],\n", | 1123 | ····························"·······[0.········,·0.01612903,·0.········],\n", |
1124 | ····························"·······[0.33333333,·0.35······,·0.23333333],\n", | 1124 | ····························"·······[0.33333333,·0.35······,·0.23333333],\n", |
1125 | ····························"·······[0.93548387,·0.85483871,·0.82258065]])\n", | 1125 | ····························"·······[0.93548387,·0.85483871,·0.82258065]])\n", |
1126 | ····························"Coordinates:\n", | 1126 | ····························"Coordinates:\n", |
1127 | ····························"··*·location··(location)·<U2·'IA'·'IN'·'IL'\n", | 1127 | ····························"··*·location··(location)·<U2·'IA'·'IN'·'IL'\n", |
1128 | ····························"··*·month·····(month)·int64·1·2·3·4·5·6·7·8·9·10·11·12</pre><div·class='xr-wrap'·hidden><div·class='xr-header'><div·class='xr-obj-type'>xarray.DataArray</div><div·class='xr-array-name'>'tmin'</div><ul·class='xr-dim-list'><li><span·class='xr-has-index'>month</span>:·12</li><li><span·class='xr-has-index'>location</span>:·3</li></ul></div><ul·class='xr-sections'><li·class='xr-section-item'><div·class='xr-array-wrap'><input·id='section- | 1128 | ····························"··*·month·····(month)·int64·1·2·3·4·5·6·7·8·9·10·11·12</pre><div·class='xr-wrap'·hidden><div·class='xr-header'><div·class='xr-obj-type'>xarray.DataArray</div><div·class='xr-array-name'>'tmin'</div><ul·class='xr-dim-list'><li><span·class='xr-has-index'>month</span>:·12</li><li><span·class='xr-has-index'>location</span>:·3</li></ul></div><ul·class='xr-sections'><li·class='xr-section-item'><div·class='xr-array-wrap'><input·id='section-b43cc503-c49c-454c-8656-5ef7fcd35d73'·class='xr-array-in'·type='checkbox'·checked><label·for='section-b43cc503-c49c-454c-8656-5ef7fcd35d73'·title='Show/hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-array-preview·xr-preview'><span>0.9516·0.8871·0.9355·0.8421·0.7193·...·0.2333·0.9355·0.8548·0.8226</span></div><div·class='xr-array-data'><pre>array([[0.9516129·,·0.88709677,·0.93548387],\n", |
1129 | ····························"·······[0.84210526,·0.71929825,·0.77192982],\n", | 1129 | ····························"·······[0.84210526,·0.71929825,·0.77192982],\n", |
1130 | ····························"·······[0.24193548,·0.12903226,·0.16129032],\n", | 1130 | ····························"·······[0.24193548,·0.12903226,·0.16129032],\n", |
1131 | ····························"·······[0.········,·0.········,·0.········],\n", | 1131 | ····························"·······[0.········,·0.········,·0.········],\n", |
1132 | ····························"·······[0.········,·0.········,·0.········],\n", | 1132 | ····························"·······[0.········,·0.········,·0.········],\n", |
1133 | ····························"·······[0.········,·0.········,·0.········],\n", | 1133 | ····························"·······[0.········,·0.········,·0.········],\n", |
1134 | ····························"·······[0.········,·0.········,·0.········],\n", | 1134 | ····························"·······[0.········,·0.········,·0.········],\n", |
1135 | ····························"·······[0.········,·0.········,·0.········],\n", | 1135 | ····························"·······[0.········,·0.········,·0.········],\n", |
1136 | ····························"·······[0.········,·0.········,·0.········],\n", | 1136 | ····························"·······[0.········,·0.········,·0.········],\n", |
1137 | ····························"·······[0.········,·0.01612903,·0.········],\n", | 1137 | ····························"·······[0.········,·0.01612903,·0.········],\n", |
1138 | ····························"·······[0.33333333,·0.35······,·0.23333333],\n", | 1138 | ····························"·······[0.33333333,·0.35······,·0.23333333],\n", |
1139 | ····························"·······[0.93548387,·0.85483871,·0.82258065]])</pre></div></div></li><li·class='xr-section-item'><input·id='section-5 | 1139 | ····························"·······[0.93548387,·0.85483871,·0.82258065]])</pre></div></div></li><li·class='xr-section-item'><input·id='section-5cedaeb2-9dc6-43ec-8927-46f43ce0c59d'·class='xr-section-summary-in'·type='checkbox'··checked><label·for='section-5cedaeb2-9dc6-43ec-8927-46f43ce0c59d'·class='xr-section-summary'·>Coordinates:·<span>(2)</span></label><div·class='xr-section-inline-details'></[·...·truncated·by·diffoscope;·len:·2227,·SHA:·14775e0e01456cb18cf66340aca57c6d8a6303cd52b91677ac0c22342ff76d1c·...·]'·class='xr-section-summary'··title='Expand/collapse·section'>Attributes:·<span>(0)</span></label><div·class='xr-section-inline-details'></div><div·class='xr-section-details'><dl·class='xr-attrs'></dl></div></li></ul></div></div>" |
1140 | ························], | 1140 | ························], |
1141 | ························"text/plain":·[ | 1141 | ························"text/plain":·[ |
1142 | ····························"<xarray.DataArray·'tmin'·(month:·12,·location:·3)>\n", | 1142 | ····························"<xarray.DataArray·'tmin'·(month:·12,·location:·3)>\n", |
1143 | ····························"array([[0.9516129·,·0.88709677,·0.93548387],\n", | 1143 | ····························"array([[0.9516129·,·0.88709677,·0.93548387],\n", |
1144 | ····························"·······[0.84210526,·0.71929825,·0.77192982],\n", | 1144 | ····························"·······[0.84210526,·0.71929825,·0.77192982],\n", |
1145 | ····························"·······[0.24193548,·0.12903226,·0.16129032],\n", | 1145 | ····························"·······[0.24193548,·0.12903226,·0.16129032],\n", |
1146 | ····························"·······[0.········,·0.········,·0.········],\n", | 1146 | ····························"·······[0.········,·0.········,·0.········],\n", |
Offset 1760, 18 lines modified | Offset 1760, 18 lines modified | ||
1760 | ····························"Dimensions:·······(location:·3,·time:·731)\n", | 1760 | ····························"Dimensions:·······(location:·3,·time:·731)\n", |
1761 | ····························"Coordinates:\n", | 1761 | ····························"Coordinates:\n", |
1762 | ····························"··*·time··········(time)·datetime64[ns]·2000-01-01·2000-01-02·...·2001-12-31\n", | 1762 | ····························"··*·time··········(time)·datetime64[ns]·2000-01-01·2000-01-02·...·2001-12-31\n", |
1763 | ····························"··*·location······(location)·object·'IA'·'IN'·'IL'\n", | 1763 | ····························"··*·location······(location)·object·'IA'·'IN'·'IL'\n", |
1764 | ····························"····month·········(time)·int64·1·1·1·1·1·1·1·1·1·...·12·12·12·12·12·12·12·12·12\n", | 1764 | ····························"····month·········(time)·int64·1·1·1·1·1·1·1·1·1·...·12·12·12·12·12·12·12·12·12\n", |
1765 | ····························"Data·variables:\n", | 1765 | ····························"Data·variables:\n", |
1766 | ····························"····some_missing··(time,·location)·float64·nan·nan·nan·...·2.063·-1.346·-4.544\n", | 1766 | ····························"····some_missing··(time,·location)·float64·nan·nan·nan·...·2.063·-1.346·-4.544\n", |
1767 | ····························"····filled········(time,·location)·float64·-5.163·-4.216·...·-1.346·-4.544</pre><div·class='xr-wrap'·hidden><div·class='xr-header'><div·class='xr-obj-type'>xarray.Dataset</div></div><ul·class='xr-sections'><li·class='xr-section-item'><input·id='section- | 1767 | ····························"····filled········(time,·location)·float64·-5.163·-4.216·...·-1.346·-4.544</pre><div·class='xr-wrap'·hidden><div·class='xr-header'><div·class='xr-obj-type'>xarray.Dataset</div></div><ul·class='xr-sections'><li·class='xr-section-item'><input·id='section-89886bb4-bdff-4bec-b6aa-c635060891eb'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-89886bb4-bdff-4bec-b6aa-c635060891eb'·class='xr-section-summary'··title='Expand/collapse·section'>Dimensions:</label><div·class='xr-section-in[·...·truncated·by·diffoscope;·len:·1235,·SHA:·8f8a457050f163f1d66a6e5dff45ee0e03b651b3a040689e8e87759a9ddbd9ab·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array(['2000-01-01T00:00:00.000000000',·'2000-01-02T00:00:00.000000000',\n", |
1768 | ····························"·······'2000-01-03T00:00:00.000000000',·...,·'2001-12-29T00:00:00.000000000',\n", | 1768 | ····························"·······'2000-01-03T00:00:00.000000000',·...,·'2001-12-29T00:00:00.000000000',\n", |
1769 | ····························"·······'2001-12-30T00:00:00.000000000',·'2001-12-31T00:00:00.000000000'],\n", | 1769 | ····························"·······'2001-12-30T00:00:00.000000000',·'2001-12-31T00:00:00.000000000'],\n", |
1770 | ····························"······dtype='datetime64[ns]')</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span·class='xr-has-index'>location</span></div><div·class='xr-var-dims'>(location)</div><div·class='xr-var-dtype'>object</div><div·class='xr-var-preview·xr-preview'>'IA'·'IN'·'IL'</div><input·id='attrs- | 1770 | ····························"······dtype='datetime64[ns]')</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span·class='xr-has-index'>location</span></div><div·class='xr-var-dims'>(location)</div><div·class='xr-var-dtype'>object</div><div·class='xr-var-preview·xr-preview'>'IA'·'IN'·'IL'</div><input·id='attrs-f87fe62f-f172-4b63-91d3-68948dc40dc1'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-f87fe62f-f172-4b63-91d3-68948dc40dc1'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·1100,·SHA:·f324ba45d723c4a958879036c35af9a3b2b73b3a9f44fd2ed90596975b475783·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([·1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,\n", |
1771 | ····························"········1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··2,··2,··2,\n", | 1771 | ····························"········1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··1,··2,··2,··2,\n", |
1772 | ····························"········2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,\n", | 1772 | ····························"········2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,··2,\n", |
1773 | ····························"········2,··2,··2,··2,··2,··2,··2,··2,··2,··3,··3,··3,··3,··3,··3,··3,··3,\n", | 1773 | ····························"········2,··2,··2,··2,··2,··2,··2,··2,··2,··3,··3,··3,··3,··3,··3,··3,··3,\n", |
1774 | ····························"········3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,\n", | 1774 | ····························"········3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,··3,\n", |
1775 | ····························"········3,··3,··3,··3,··3,··3,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,\n", | 1775 | ····························"········3,··3,··3,··3,··3,··3,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,\n", |
1776 | ····························"········4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,\n", | 1776 | ····························"········4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,··4,\n", |
1777 | ····························"········4,··4,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,\n", | 1777 | ····························"········4,··4,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,··5,\n", |
Offset 1803, 27 lines modified | Offset 1803, 27 lines modified | ||
1803 | ····························"········9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,\n", | 1803 | ····························"········9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,··9,\n", |
1804 | ····························"········9,··9,··9,··9,··9,··9,··9,··9,··9,··9,·10,·10,·10,·10,·10,·10,·10,\n", | 1804 | ····························"········9,··9,··9,··9,··9,··9,··9,··9,··9,··9,·10,·10,·10,·10,·10,·10,·10,\n", |
1805 | ····························"·······10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,\n", | 1805 | ····························"·······10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,·10,\n", |
1806 | ····························"·······10,·10,·10,·10,·10,·10,·10,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,\n", | 1806 | ····························"·······10,·10,·10,·10,·10,·10,·10,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,\n", |
1807 | ····························"·······11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,\n", | 1807 | ····························"·······11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,·11,\n", |
1808 | ····························"·······11,·11,·11,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,\n", | 1808 | ····························"·······11,·11,·11,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,\n", |
1809 | ····························"·······12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12],\n", | 1809 | ····························"·······12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12,·12],\n", |
1810 | ····························"······dtype=int64)</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section- | 1810 | ····························"······dtype=int64)</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-34f693d7-ceb8-49a3-a804-cb8545b93f14'·class='xr-section-summary-in'·type='checkbox'··checked><label·for='section-34f693d7-ceb8-49a3-a804-cb8545b93f14'·class='xr-section-summary'·>Data·variables:·<span>(2)</span></label><div·class='xr-section-inline-details[·...·truncated·by·diffoscope;·len:·737,·SHA:·dc2ec05af8304e27e402e341b721c9c50265af24d78fab43f2699b433fc2c796·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[·········nan,··········nan,··········nan],\n", |
1811 | ····························"·······[·········nan,··········nan,··········nan],\n", | 1811 | ····························"·······[·········nan,··········nan,··········nan],\n", |
1812 | ····························"·······[·········nan,··········nan,··········nan],\n", | 1812 | ····························"·······[·········nan,··········nan,··········nan],\n", |
1813 | ····························"·······...,\n", | 1813 | ····························"·······...,\n", |
1814 | ····························"·······[·-5.34723825,·-13.37459826,··-4.93221199],\n", | 1814 | ····························"·······[·-5.34723825,·-13.37459826,··-4.93221199],\n", |
1815 | ····························"·······[·-2.67283594,··-5.18072141,··-4.11567869],\n", | 1815 | ····························"·······[·-2.67283594,··-5.18072141,··-4.11567869],\n", |
1816 | ····························"·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span>filled</span></div><div·class='xr-var-dims'>(time,·location)</div><div·class='xr-var-dtype'>float64</div><div·class='xr-var-preview·xr-preview'>-5.163·-4.216·...·-1.346·-4.544</div><input·id='attrs- | 1816 | ····························"·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li><li·class='xr-var-item'><div·class='xr-var-name'><span>filled</span></div><div·class='xr-var-dims'>(time,·location)</div><div·class='xr-var-dtype'>float64</div><div·class='xr-var-preview·xr-preview'>-5.163·-4.216·...·-1.346·-4.544</div><input·id='attrs-ab4e4fb2-28d8-4812-b4c4-c17fc06b862e'·class='xr-var-attrs-in'·type='checkbox'·disabled><label·for='attrs-ab4e4fb2-28d8-4812-b4c4-c17fc06b862e'·title='Show/Hide·attributes'><svg·class='icon·xr-icon-file-text2'><use·xlink:href='#icon-file-text2'></use></svg>[·...·truncated·by·diffoscope;·len:·154,·SHA:·5a58adfc52d921344686719325071f3b46c1ccb345b91ba69f2fb673652fcf9f·...·]'·title='Show/Hide·data·repr'><svg·class='icon·xr-icon-database'><use·xlink:href='#icon-database'></use></svg></label><div·class='xr-var-attrs'><dl·class='xr-attrs'></dl></div><div·class='xr-var-data'><pre>array([[·-5.16274935,··-4.21616663,··-4.68137385],\n", |
1817 | ····························"·······[·-5.16274935,··-4.21616663,··-4.68137385],\n", | 1817 | ····························"·······[·-5.16274935,··-4.21616663,··-4.68137385],\n", |
1818 | ····························"·······[·-5.16274935,··-4.21616663,··-4.68137385],\n", | 1818 | ····························"·······[·-5.16274935,··-4.21616663,··-4.68137385],\n", |
1819 | ····························"·······...,\n", | 1819 | ····························"·······...,\n", |
1820 | ····························"·······[·-5.34723825,·-13.37459826,··-4.93221199],\n", | 1820 | ····························"·······[·-5.34723825,·-13.37459826,··-4.93221199],\n", |
1821 | ····························"·······[·-2.67283594,··-5.18072141,··-4.11567869],\n", | 1821 | ····························"·······[·-2.67283594,··-5.18072141,··-4.11567869],\n", |
1822 | ····························"·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section- | 1822 | ····························"·······[··2.06327582,··-1.34576404,··-4.54392729]])</pre></div></li></ul></div></li><li·class='xr-section-item'><input·id='section-fadc5bf1-0165-49be-b3f9-8e2a8d29f3c7'·class='xr-section-summary-in'·type='checkbox'·disabled·><label·for='section-fadc5bf1-0165-49be-b3f9-8e2a8d29f3c7'·class='xr-section-summary'··title='Expand/collapse·section'>Attributes:·<span>(0)</span></label><div·class='xr-section-inline-details'></div><div·class='xr-section-details'><dl·class='xr-attrs'></dl></div></li></ul></div></div>" |
1823 | ························], | 1823 | ························], |
1824 | ························"text/plain":·[ | 1824 | ························"text/plain":·[ |
1825 | ····························"<xarray.Dataset>\n", | 1825 | ····························"<xarray.Dataset>\n", |
1826 | ····························"Dimensions:·······(location:·3,·time:·731)\n", | 1826 | ····························"Dimensions:·······(location:·3,·time:·731)\n", |
1827 | ····························"Coordinates:\n", | 1827 | ····························"Coordinates:\n", |
1828 | ····························"··*·time··········(time)·datetime64[ns]·2000-01-01·2000-01-02·...·2001-12-31\n", | 1828 | ····························"··*·time··········(time)·datetime64[ns]·2000-01-01·2000-01-02·...·2001-12-31\n", |
1829 | ····························"··*·location······(location)·object·'IA'·'IN'·'IL'\n", | 1829 | ····························"··*·location······(location)·object·'IA'·'IN'·'IL'\n", |
Offset 875, 15 lines modified | Offset 875, 15 lines modified | ||
875 | <span·class="nn">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ni">open_dataset</span><span·class="nt">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> | 875 | <span·class="nn">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ni">open_dataset</span><span·class="nt">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> |
876 | <span·class="g·g-Whitespace">·····</span><span·class="mi">76</span>·········<span·class="c1">#·May·want·to·add·an·option·to·remove·it.</span> | 876 | <span·class="g·g-Whitespace">·····</span><span·class="mi">76</span>·········<span·class="c1">#·May·want·to·add·an·option·to·remove·it.</span> |
877 | <span·class="g·g-Whitespace">·····</span><span·class="mi">77</span>·········<span·class="k">if</span>·<span·class="ow">not</span>·<span·class="n">_os</span><span·class="o">.</span><span·class="n">path</span><span·class="o">.</span><span·class="n">isdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">):</span> | 877 | <span·class="g·g-Whitespace">·····</span><span·class="mi">77</span>·········<span·class="k">if</span>·<span·class="ow">not</span>·<span·class="n">_os</span><span·class="o">.</span><span·class="n">path</span><span·class="o">.</span><span·class="n">isdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">):</span> |
878 | <span·class="ne">--->·</span><span·class="mi">78</span>·············<span·class="n">_os</span><span·class="o">.</span><span·class="n">mkdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">)</span> | 878 | <span·class="ne">--->·</span><span·class="mi">78</span>·············<span·class="n">_os</span><span·class="o">.</span><span·class="n">mkdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">)</span> |
879 | <span·class="g·g-Whitespace">·····</span><span·class="mi">79</span>· | 879 | <span·class="g·g-Whitespace">·····</span><span·class="mi">79</span>· |
880 | <span·class="g·g-Whitespace">·····</span><span·class="mi">80</span>·········<span·class="n">url</span>·<span·class="o">=</span>·<span·class="s2">"/"</span><span·class="o">.</span><span·class="n">join</span><span·class="p">((</span><span·class="n">github_url</span><span·class="p">,</span>·<span·class="s2">"raw"</span><span·class="p">,</span>·<span·class="n">branch</span><span·class="p">,</span>·<span·class="n">fullname</span><span·class="p">))</span> | 880 | <span·class="g·g-Whitespace">·····</span><span·class="mi">80</span>·········<span·class="n">url</span>·<span·class="o">=</span>·<span·class="s2">"/"</span><span·class="o">.</span><span·class="n">join</span><span·class="p">((</span><span·class="n">github_url</span><span·class="p">,</span>·<span·class="s2">"raw"</span><span·class="p">,</span>·<span·class="n">branch</span><span·class="p">,</span>·<span·class="n">fullname</span><span·class="p">))</span> |
881 | <span·class="ne">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 881 | <span·class="ne">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data' |
882 | <span·class="c1">#·add·an·empty·2D·dataarray</span> | 882 | <span·class="c1">#·add·an·empty·2D·dataarray</span> |
883 | <span·class="gp">In·[54]:·</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> | 883 | <span·class="gp">In·[54]:·</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> |
884 | <span·class="gt">---------------------------------------------------------------------------</span> | 884 | <span·class="gt">---------------------------------------------------------------------------</span> |
885 | <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last) | 885 | <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last) |
886 | <span·class="o"><</span><span·class="n">ipython</span><span·class="o">-</span><span·class="nb">input</span><span·class="o">-</span><span·class="mi">54</span><span·class="o">-</span><span·class="mi">6709</span><span·class="n">edaff03d</span><span·class="o">></span>·<span·class="ow">in</span>·<span·class="o"><</span><span·class="n">module</span><span·class="o">></span> | 886 | <span·class="o"><</span><span·class="n">ipython</span><span·class="o">-</span><span·class="nb">input</span><span·class="o">-</span><span·class="mi">54</span><span·class="o">-</span><span·class="mi">6709</span><span·class="n">edaff03d</span><span·class="o">></span>·<span·class="ow">in</span>·<span·class="o"><</span><span·class="n">module</span><span·class="o">></span> |
887 | <span·class="ne">---->·</span><span·class="mi">1</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> | 887 | <span·class="ne">---->·</span><span·class="mi">1</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> |
Offset 563, 15 lines modified | Offset 563, 15 lines modified | ||
563 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) | 563 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) |
564 | ·····76·········#·May·want·to·add·an·option·to·remove·it. | 564 | ·····76·········#·May·want·to·add·an·option·to·remove·it. |
565 | ·····77·········if·not·_os.path.isdir(longdir): | 565 | ·····77·········if·not·_os.path.isdir(longdir): |
566 | --->·78·············_os.mkdir(longdir) | 566 | --->·78·············_os.mkdir(longdir) |
567 | ·····79 | 567 | ·····79 |
568 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) | 568 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) |
569 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 569 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
570 | build/.xarray_tutorial_data' | 570 | build/.xarray_tutorial_data' |
571 | #·add·an·empty·2D·dataarray | 571 | #·add·an·empty·2D·dataarray |
572 | In·[54]:·ds["empty"]·=·xr.full_like(ds.air.mean("time"),·fill_value=0) | 572 | In·[54]:·ds["empty"]·=·xr.full_like(ds.air.mean("time"),·fill_value=0) |
573 | --------------------------------------------------------------------------- | 573 | --------------------------------------------------------------------------- |
574 | AttributeError····························Traceback·(most·recent·call·last) | 574 | AttributeError····························Traceback·(most·recent·call·last) |
575 | <ipython-input-54-6709edaff03d>·in·<module> | 575 | <ipython-input-54-6709edaff03d>·in·<module> |
Offset 431, 18 lines modified | Offset 431, 18 lines modified | ||
431 | <span·class="nn">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ni">open_dataset</span><span·class="nt">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> | 431 | <span·class="nn">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ni">open_dataset</span><span·class="nt">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> |
432 | <span·class="g·g-Whitespace">·····</span><span·class="mi">76</span><span·class="s2">·········#·May·want·to·add·an·option·to·remove·it.</span> | 432 | <span·class="g·g-Whitespace">·····</span><span·class="mi">76</span><span·class="s2">·········#·May·want·to·add·an·option·to·remove·it.</span> |
433 | <span·class="g·g-Whitespace">·····</span><span·class="mi">77</span><span·class="s2">·········if·not·_os.path.isdir(longdir):</span> | 433 | <span·class="g·g-Whitespace">·····</span><span·class="mi">77</span><span·class="s2">·········if·not·_os.path.isdir(longdir):</span> |
434 | <span·class="ne">--->·</span><span·class="mi">78</span><span·class="s2">·············_os.mkdir(longdir)</span> | 434 | <span·class="ne">--->·</span><span·class="mi">78</span><span·class="s2">·············_os.mkdir(longdir)</span> |
435 | <span·class="g·g-Whitespace">·····</span><span·class="mi">79</span><span·class="s2">·</span> | 435 | <span·class="g·g-Whitespace">·····</span><span·class="mi">79</span><span·class="s2">·</span> |
436 | <span·class="g·g-Whitespace">·····</span><span·class="mi">80</span><span·class="s2">·········url·=·"/".join((github_url,·"raw",·branch,·fullname))</span> | 436 | <span·class="g·g-Whitespace">·····</span><span·class="mi">80</span><span·class="s2">·········url·=·"/".join((github_url,·"raw",·branch,·fullname))</span> |
437 | <span·class="ne">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 437 | <span·class="ne">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data' |
438 | <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> | 438 | <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> |
439 | <span·class="gh">Out[5]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 439 | <span·class="gh">Out[5]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xa4bc6ce8></span> |
440 | <span·class="gp">In·[6]:·</span><span·class="kn">import</span>·<span·class="nn">zarr</span> | 440 | <span·class="gp">In·[6]:·</span><span·class="kn">import</span>·<span·class="nn">zarr</span> |
441 | <span·class="gp">In·[7]:·</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> | 441 | <span·class="gp">In·[7]:·</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> |
442 | <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> | 442 | <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> |
443 | <span·class="go">/</span> | 443 | <span·class="go">/</span> |
Offset 225, 19 lines modified | Offset 225, 19 lines modified | ||
225 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) | 225 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) |
226 | ·····76·········#·May·want·to·add·an·option·to·remove·it. | 226 | ·····76·········#·May·want·to·add·an·option·to·remove·it. |
227 | ·····77·········if·not·_os.path.isdir(longdir): | 227 | ·····77·········if·not·_os.path.isdir(longdir): |
228 | --->·78·············_os.mkdir(longdir) | 228 | --->·78·············_os.mkdir(longdir) |
229 | ·····79 | 229 | ·····79 |
230 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) | 230 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) |
231 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 231 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
232 | build/.xarray_tutorial_data' | 232 | build/.xarray_tutorial_data' |
233 | In·[5]:·ds.to_zarr("rasm.zarr",·mode="w") | 233 | In·[5]:·ds.to_zarr("rasm.zarr",·mode="w") |
234 | Out[5]:·<xarray.backends.zarr.ZarrStore·at·0x | 234 | Out[5]:·<xarray.backends.zarr.ZarrStore·at·0xa4bc6ce8> |
235 | In·[6]:·import·zarr | 235 | In·[6]:·import·zarr |
236 | In·[7]:·zgroup·=·zarr.open("rasm.zarr") | 236 | In·[7]:·zgroup·=·zarr.open("rasm.zarr") |
237 | In·[8]:·print(zgroup.tree()) | 237 | In·[8]:·print(zgroup.tree()) |
238 | / | 238 | / |
Offset 408, 24 lines modified | Offset 408, 24 lines modified | ||
408 | <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> | 408 | <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> |
409 | <span·class="gp">···....:·</span>····<span·class="n">dims</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span> | 409 | <span·class="gp">···....:·</span>····<span·class="n">dims</span><span·class="o">=</span><span·class="s2">"x"</span><span·class="p">,</span> |
410 | <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> | 410 | <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> |
411 | <span·class="gp">···....:·</span><span·class="p">)</span> | 411 | <span·class="gp">···....:·</span><span·class="p">)</span> |
412 | <span·class="gp">···....:·</span> | 412 | <span·class="gp">···....:·</span> |
413 | <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> | 413 | <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> |
414 | <span·class="gh">Out[17]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 414 | <span·class="gh">Out[17]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xa8148eb0>]</span> |
415 | <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> | 415 | <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> |
416 | <span·class="gh">Out[18]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 416 | <span·class="gh">Out[18]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xa48afd30>]</span> |
417 | <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> | 417 | <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> |
418 | <span·class="gh">Out[19]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 418 | <span·class="gh">Out[19]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xa48afe38>]</span> |
419 | <span·class="gp">In·[20]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">legend</span><span·class="p">()</span> | 419 | <span·class="gp">In·[20]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">legend</span><span·class="p">()</span> |
420 | <span·class="gh">Out[20]:·</span><span·class="go"><matplotlib.legend.Legend·at·0x | 420 | <span·class="gh">Out[20]:·</span><span·class="go"><matplotlib.legend.Legend·at·0xa26bae50></span> |
421 | </pre></div> | 421 | </pre></div> |
422 | </div> | 422 | </div> |
423 | <a·class="reference·internal·image-reference"·href="_images/interpolation_sample1.png"><img·alt="_images/interpolation_sample1.png"·src="_images/interpolation_sample1.png"·style="width:·4in;"·/></a> | 423 | <a·class="reference·internal·image-reference"·href="_images/interpolation_sample1.png"><img·alt="_images/interpolation_sample1.png"·src="_images/interpolation_sample1.png"·style="width:·4in;"·/></a> |
424 | <p>Additional·keyword·arguments·can·be·passed·to·scipy’s·functions.</p> | 424 | <p>Additional·keyword·arguments·can·be·passed·to·scipy’s·functions.</p> |
425 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·fill·0·for·the·outside·of·the·original·coordinates.</span> | 425 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="go">#·fill·0·for·the·outside·of·the·original·coordinates.</span> |
426 | <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> | 426 | <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> |
427 | <span·class="gh">Out[21]:·</span><span·class="go"></span> | 427 | <span·class="gh">Out[21]:·</span><span·class="go"></span> |
Offset 611, 15 lines modified | Offset 611, 15 lines modified | ||
611 | <span·class="nn">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ni">open_dataset</span><span·class="nt">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> | 611 | <span·class="nn">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ni">open_dataset</span><span·class="nt">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> |
612 | <span·class="g·g-Whitespace">·····</span><span·class="mi">76</span>·········<span·class="c1">#·May·want·to·add·an·option·to·remove·it.</span> | 612 | <span·class="g·g-Whitespace">·····</span><span·class="mi">76</span>·········<span·class="c1">#·May·want·to·add·an·option·to·remove·it.</span> |
613 | <span·class="g·g-Whitespace">·····</span><span·class="mi">77</span>·········<span·class="k">if</span>·<span·class="ow">not</span>·<span·class="n">_os</span><span·class="o">.</span><span·class="n">path</span><span·class="o">.</span><span·class="n">isdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">):</span> | 613 | <span·class="g·g-Whitespace">·····</span><span·class="mi">77</span>·········<span·class="k">if</span>·<span·class="ow">not</span>·<span·class="n">_os</span><span·class="o">.</span><span·class="n">path</span><span·class="o">.</span><span·class="n">isdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">):</span> |
614 | <span·class="ne">--->·</span><span·class="mi">78</span>·············<span·class="n">_os</span><span·class="o">.</span><span·class="n">mkdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">)</span> | 614 | <span·class="ne">--->·</span><span·class="mi">78</span>·············<span·class="n">_os</span><span·class="o">.</span><span·class="n">mkdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">)</span> |
615 | <span·class="g·g-Whitespace">·····</span><span·class="mi">79</span>· | 615 | <span·class="g·g-Whitespace">·····</span><span·class="mi">79</span>· |
616 | <span·class="g·g-Whitespace">·····</span><span·class="mi">80</span>·········<span·class="n">url</span>·<span·class="o">=</span>·<span·class="s2">"/"</span><span·class="o">.</span><span·class="n">join</span><span·class="p">((</span><span·class="n">github_url</span><span·class="p">,</span>·<span·class="s2">"raw"</span><span·class="p">,</span>·<span·class="n">branch</span><span·class="p">,</span>·<span·class="n">fullname</span><span·class="p">))</span> | 616 | <span·class="g·g-Whitespace">·····</span><span·class="mi">80</span>·········<span·class="n">url</span>·<span·class="o">=</span>·<span·class="s2">"/"</span><span·class="o">.</span><span·class="n">join</span><span·class="p">((</span><span·class="n">github_url</span><span·class="p">,</span>·<span·class="s2">"raw"</span><span·class="p">,</span>·<span·class="n">branch</span><span·class="p">,</span>·<span·class="n">fullname</span><span·class="p">))</span> |
617 | <span·class="ne">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 617 | <span·class="ne">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data' |
618 | <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> | 618 | <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> |
619 | <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> | 619 | <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> |
620 | <span·class="gt">---------------------------------------------------------------------------</span> | 620 | <span·class="gt">---------------------------------------------------------------------------</span> |
621 | <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last) | 621 | <span·class="ne">AttributeError</span><span·class="g·g-Whitespace">····························</span>Traceback·(most·recent·call·last) |
622 | <span·class="o"><</span><span·class="n">ipython</span><span·class="o">-</span><span·class="nb">input</span><span·class="o">-</span><span·class="mi">46</span><span·class="o">-</span><span·class="n">cb8f083667be</span><span·class="o">></span>·<span·class="ow">in</span>·<span·class="o"><</span><span·class="n">module</span><span·class="o">></span> | 622 | <span·class="o"><</span><span·class="n">ipython</span><span·class="o">-</span><span·class="nb">input</span><span·class="o">-</span><span·class="mi">46</span><span·class="o">-</span><span·class="n">cb8f083667be</span><span·class="o">></span>·<span·class="ow">in</span>·<span·class="o"><</span><span·class="n">module</span><span·class="o">></span> |
Offset 202, 26 lines modified | Offset 202, 26 lines modified | ||
202 | ···....:·····np.sin(np.linspace(0,·2·*·np.pi,·10)), | 202 | ···....:·····np.sin(np.linspace(0,·2·*·np.pi,·10)), |
203 | ···....:·····dims="x", | 203 | ···....:·····dims="x", |
204 | ···....:·····coords={"x":·np.linspace(0,·1,·10)}, | 204 | ···....:·····coords={"x":·np.linspace(0,·1,·10)}, |
205 | ···....:·) | 205 | ···....:·) |
206 | ···....: | 206 | ···....: |
207 | In·[17]:·da.plot.line("o",·label="original") | 207 | In·[17]:·da.plot.line("o",·label="original") |
208 | Out[17]:·[<matplotlib.lines.Line2D·at·0x | 208 | Out[17]:·[<matplotlib.lines.Line2D·at·0xa8148eb0>] |
209 | In·[18]:·da.interp(x=np.linspace(0,·1,·100)).plot.line(label="linear | 209 | In·[18]:·da.interp(x=np.linspace(0,·1,·100)).plot.line(label="linear |
210 | (default)") | 210 | (default)") |
211 | Out[18]:·[<matplotlib.lines.Line2D·at·0x | 211 | Out[18]:·[<matplotlib.lines.Line2D·at·0xa48afd30>] |
212 | In·[19]:·da.interp(x=np.linspace(0,·1,·100),·method="cubic").plot.line | 212 | In·[19]:·da.interp(x=np.linspace(0,·1,·100),·method="cubic").plot.line |
213 | (label="cubic") | 213 | (label="cubic") |
214 | Out[19]:·[<matplotlib.lines.Line2D·at·0x | 214 | Out[19]:·[<matplotlib.lines.Line2D·at·0xa48afe38>] |
215 | In·[20]:·plt.legend() | 215 | In·[20]:·plt.legend() |
216 | Out[20]:·<matplotlib.legend.Legend·at·0x | 216 | Out[20]:·<matplotlib.legend.Legend·at·0xa26bae50> |
217 | [_images/interpolation_sample1.png] | 217 | [_images/interpolation_sample1.png] |
218 | Additional·keyword·arguments·can·be·passed·to·scipyâs·functions. | 218 | Additional·keyword·arguments·can·be·passed·to·scipyâs·functions. |
219 | #·fill·0·for·the·outside·of·the·original·coordinates. | 219 | #·fill·0·for·the·outside·of·the·original·coordinates. |
220 | In·[21]:·da.interp(x=np.linspace(-0.5,·1.5,·10),·kwargs={"fill_value":·0.0}) | 220 | In·[21]:·da.interp(x=np.linspace(-0.5,·1.5,·10),·kwargs={"fill_value":·0.0}) |
221 | Out[21]: | 221 | Out[21]: |
222 | <xarray.DataArray·(x:·10)> | 222 | <xarray.DataArray·(x:·10)> |
223 | array([·0.···,··0.···,··0.···,··0.814,··0.604,·-0.604,·-0.814,··0.···,··0.···, | 223 | array([·0.···,··0.···,··0.···,··0.814,··0.604,·-0.604,·-0.814,··0.···,··0.···, |
Offset 390, 15 lines modified | Offset 390, 15 lines modified | ||
390 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) | 390 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) |
391 | ·····76·········#·May·want·to·add·an·option·to·remove·it. | 391 | ·····76·········#·May·want·to·add·an·option·to·remove·it. |
392 | ·····77·········if·not·_os.path.isdir(longdir): | 392 | ·····77·········if·not·_os.path.isdir(longdir): |
393 | --->·78·············_os.mkdir(longdir) | 393 | --->·78·············_os.mkdir(longdir) |
394 | ·····79 | 394 | ·····79 |
395 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) | 395 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) |
396 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 396 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
397 | build/.xarray_tutorial_data' | 397 | build/.xarray_tutorial_data' |
398 | In·[45]:·fig,·axes·=·plt.subplots(ncols=2,·figsize=(10,·4)) | 398 | In·[45]:·fig,·axes·=·plt.subplots(ncols=2,·figsize=(10,·4)) |
399 | In·[46]:·ds.air.plot(ax=axes[0]) | 399 | In·[46]:·ds.air.plot(ax=axes[0]) |
400 | --------------------------------------------------------------------------- | 400 | --------------------------------------------------------------------------- |
401 | AttributeError····························Traceback·(most·recent·call·last) | 401 | AttributeError····························Traceback·(most·recent·call·last) |
Offset 1059, 15 lines modified | Offset 1059, 15 lines modified | ||
1059 | <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> | 1059 | <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> |
1060 | <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> | 1060 | <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> |
1061 | <span·class="gp">···....:·</span>····<span·class="p">},</span> | 1061 | <span·class="gp">···....:·</span>····<span·class="p">},</span> |
1062 | <span·class="gp">···....:·</span><span·class="p">)</span> | 1062 | <span·class="gp">···....:·</span><span·class="p">)</span> |
1063 | <span·class="gp">···....:·</span> | 1063 | <span·class="gp">···....:·</span> |
1064 | <span·class="gp">In·[39]:·</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> | 1064 | <span·class="gp">In·[39]:·</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> |
1065 | <span·class="gh">Out[39]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 1065 | <span·class="gh">Out[39]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xa1f0f9e8></span> |
1066 | </pre></div> | 1066 | </pre></div> |
1067 | </div> | 1067 | </div> |
1068 | <p>(The·suffix·<code·class="docutils·literal·notranslate"><span·class="pre">.zarr</span></code>·is·optional–just·a·reminder·that·a·zarr·store·lives | 1068 | <p>(The·suffix·<code·class="docutils·literal·notranslate"><span·class="pre">.zarr</span></code>·is·optional–just·a·reminder·that·a·zarr·store·lives |
1069 | there.)·If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr | 1069 | there.)·If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr |
1070 | store·is·already·present·at·that·path,·an·error·will·be·raised,·preventing·it | 1070 | store·is·already·present·at·that·path,·an·error·will·be·raised,·preventing·it |
1071 | from·being·overwritten.·To·override·this·behavior·and·overwrite·an·existing | 1071 | from·being·overwritten.·To·override·this·behavior·and·overwrite·an·existing |
1072 | 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> | 1072 | 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 1113, 15 lines modified | Offset 1113, 15 lines modified | ||
1113 | These·options·can·be·passed·to·the·<code·class="docutils·literal·notranslate"><span·class="pre">to_zarr</span></code>·method·as·variable·encoding. | 1113 | These·options·can·be·passed·to·the·<code·class="docutils·literal·notranslate"><span·class="pre">to_zarr</span></code>·method·as·variable·encoding. |
1114 | For·example:</p> | 1114 | For·example:</p> |
1115 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[42]:·</span><span·class="kn">import</span>·<span·class="nn">zarr</span> | 1115 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[42]:·</span><span·class="kn">import</span>·<span·class="nn">zarr</span> |
1116 | <span·class="gp">In·[43]:·</span><span·class="n">compressor</span>·<span·class="o">=</span>·<span·class="n">zarr</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> | 1116 | <span·class="gp">In·[43]:·</span><span·class="n">compressor</span>·<span·class="o">=</span>·<span·class="n">zarr</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> |
1117 | <span·class="gp">In·[44]:·</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> | 1117 | <span·class="gp">In·[44]:·</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> |
1118 | <span·class="gh">Out[44]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 1118 | <span·class="gh">Out[44]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xa1f21298></span> |
1119 | </pre></div> | 1119 | </pre></div> |
1120 | </div> | 1120 | </div> |
1121 | <div·class="admonition·note"> | 1121 | <div·class="admonition·note"> |
1122 | <p·class="admonition-title">Note</p> | 1122 | <p·class="admonition-title">Note</p> |
1123 | <p>Not·all·native·zarr·compression·and·filtering·options·have·been·tested·with | 1123 | <p>Not·all·native·zarr·compression·and·filtering·options·have·been·tested·with |
1124 | xarray.</p> | 1124 | xarray.</p> |
1125 | </div> | 1125 | </div> |
Offset 1182, 28 lines modified | Offset 1182, 28 lines modified | ||
1182 | <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> | 1182 | <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> |
1183 | <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> | 1183 | <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> |
1184 | <span·class="gp">···....:·</span>····<span·class="p">},</span> | 1184 | <span·class="gp">···....:·</span>····<span·class="p">},</span> |
1185 | <span·class="gp">···....:·</span><span·class="p">)</span> | 1185 | <span·class="gp">···....:·</span><span·class="p">)</span> |
1186 | <span·class="gp">···....:·</span> | 1186 | <span·class="gp">···....:·</span> |
1187 | <span·class="gp">In·[46]:·</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> | 1187 | <span·class="gp">In·[46]:·</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> |
1188 | <span·class="gh">Out[46]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 1188 | <span·class="gh">Out[46]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xa1f214d8></span> |
1189 | <span·class="gp">In·[47]:·</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> | 1189 | <span·class="gp">In·[47]:·</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> |
1190 | <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> | 1190 | <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> |
1191 | <span·class="gp">···....:·</span>····<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span> | 1191 | <span·class="gp">···....:·</span>····<span·class="n">coords</span><span·class="o">=</span><span·class="p">{</span> |
1192 | <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> | 1192 | <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> |
1193 | <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> | 1193 | <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> |
1194 | <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> | 1194 | <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> |
1195 | <span·class="gp">···....:·</span>····<span·class="p">},</span> | 1195 | <span·class="gp">···....:·</span>····<span·class="p">},</span> |
1196 | <span·class="gp">···....:·</span><span·class="p">)</span> | 1196 | <span·class="gp">···....:·</span><span·class="p">)</span> |
1197 | <span·class="gp">···....:·</span> | 1197 | <span·class="gp">···....:·</span> |
1198 | <span·class="gp">In·[48]:·</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> | 1198 | <span·class="gp">In·[48]:·</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> |
1199 | <span·class="gh">Out[48]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 1199 | <span·class="gh">Out[48]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xa1f21958></span> |
1200 | </pre></div> | 1200 | </pre></div> |
1201 | </div> | 1201 | </div> |
1202 | <p>Finally,·you·can·use·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·to·write·to·limited·regions·of·existing·arrays | 1202 | <p>Finally,·you·can·use·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·to·write·to·limited·regions·of·existing·arrays |
1203 | in·an·existing·Zarr·store.·This·is·a·good·option·for·writing·data·in·parallel | 1203 | in·an·existing·Zarr·store.·This·is·a·good·option·for·writing·data·in·parallel |
1204 | from·independent·processes.</p> | 1204 | from·independent·processes.</p> |
1205 | <p>To·scale·this·up·to·writing·large·datasets,·the·first·step·is·creating·an | 1205 | <p>To·scale·this·up·to·writing·large·datasets,·the·first·step·is·creating·an |
1206 | initial·Zarr·store·without·writing·all·of·its·array·data.·This·can·be·done·by | 1206 | initial·Zarr·store·without·writing·all·of·its·array·data.·This·can·be·done·by |
Offset 1218, 33 lines modified | Offset 1218, 33 lines modified | ||
1218 | <span·class="gp">In·[51]:·</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> | 1218 | <span·class="gp">In·[51]:·</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> |
1219 | <span·class="gp">In·[52]:·</span><span·class="n">path</span>·<span·class="o">=</span>·<span·class="s2">"path/to/directory.zarr"</span> | 1219 | <span·class="gp">In·[52]:·</span><span·class="n">path</span>·<span·class="o">=</span>·<span·class="s2">"path/to/directory.zarr"</span> |
1220 | <span·class="go">#·Now·we·write·the·metadata·without·computing·any·array·values</span> | 1220 | <span·class="go">#·Now·we·write·the·metadata·without·computing·any·array·values</span> |
1221 | <span·class="gp">In·[53]:·</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>·<span·class="n">consolidated</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)</span> | 1221 | <span·class="gp">In·[53]:·</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>·<span·class="n">consolidated</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">)</span> |
1222 | <span·class="gh">Out[53]:·</span><span·class="go">Delayed('_finalize_store- | 1222 | <span·class="gh">Out[53]:·</span><span·class="go">Delayed('_finalize_store-84826c16-f21f-4c17-b8bf-0c71a9942837')</span> |
1223 | </pre></div> | 1223 | </pre></div> |
1224 | </div> | 1224 | </div> |
1225 | <p>Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that | 1225 | <p>Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that |
1226 | can·be·filled·out·by·subsequent·calls·to·<code·class="docutils·literal·notranslate"><span·class="pre">to_zarr</span></code>.·The·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·provides·a | 1226 | can·be·filled·out·by·subsequent·calls·to·<code·class="docutils·literal·notranslate"><span·class="pre">to_zarr</span></code>.·The·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·provides·a |
1227 | mapping·from·dimension·names·to·Python·<code·class="docutils·literal·notranslate"><span·class="pre">slice</span></code>·objects·indicating·where·the | 1227 | mapping·from·dimension·names·to·Python·<code·class="docutils·literal·notranslate"><span·class="pre">slice</span></code>·objects·indicating·where·the |
1228 | data·should·be·written·(in·index·space,·not·coordinate·space),·e.g.,</p> | 1228 | data·should·be·written·(in·index·space,·not·coordinate·space),·e.g.,</p> |
1229 | <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> | 1229 | <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> |
1230 | <span·class="go">#·we·would·create·them·separately,·possibly·even·from·separate·processes.</span> | 1230 | <span·class="go">#·we·would·create·them·separately,·possibly·even·from·separate·processes.</span> |
1231 | <span·class="gp">In·[54]:·</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> | 1231 | <span·class="gp">In·[54]:·</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> |
1232 | <span·class="gp">In·[55]:·</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="p">{</span><span·class="s2">"x"</span><span·class="p">:</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> | 1232 | <span·class="gp">In·[55]:·</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="p">{</span><span·class="s2">"x"</span><span·class="p">:</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> |
1233 | <span·class="gh">Out[55]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 1233 | <span·class="gh">Out[55]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xa1f219e8></span> |
1234 | <span·class="gp">In·[56]:·</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="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> | 1234 | <span·class="gp">In·[56]:·</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="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> |
1235 | <span·class="gh">Out[56]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 1235 | <span·class="gh">Out[56]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xa49351a8></span> |
1236 | <span·class="gp">In·[57]:·</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> | 1236 | <span·class="gp">In·[57]:·</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> |
1237 | <span·class="gh">Out[57]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0x | 1237 | <span·class="gh">Out[57]:·</span><span·class="go"><xarray.backends.zarr.ZarrStore·at·0xa5133c88></span> |
1238 | </pre></div> | 1238 | </pre></div> |
1239 | </div> | 1239 | </div> |
1240 | <p>Concurrent·writes·with·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·are·safe·as·long·as·they·modify·distinct | 1240 | <p>Concurrent·writes·with·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>·are·safe·as·long·as·they·modify·distinct |
1241 | chunks·in·the·underlying·Zarr·arrays·(or·use·an·appropriate·<code·class="docutils·literal·notranslate"><span·class="pre">lock</span></code>).</p> | 1241 | chunks·in·the·underlying·Zarr·arrays·(or·use·an·appropriate·<code·class="docutils·literal·notranslate"><span·class="pre">lock</span></code>).</p> |
1242 | <p>As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values, | 1242 | <p>As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values, |
1243 | 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 | 1243 | 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 |
1244 | dimensions·included·in·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>.·Other·variables·(typically·coordinates) | 1244 | dimensions·included·in·<code·class="docutils·literal·notranslate"><span·class="pre">region</span></code>.·Other·variables·(typically·coordinates) |
Offset 762, 15 lines modified | Offset 762, 15 lines modified | ||
762 | ···....:·········"y":·pd.date_range("2000-01-01",·periods=5), | 762 | ···....:·········"y":·pd.date_range("2000-01-01",·periods=5), |
763 | ···....:·········"z":·("x",·list("abcd")), | 763 | ···....:·········"z":·("x",·list("abcd")), |
764 | ···....:·····}, | 764 | ···....:·····}, |
765 | ···....:·) | 765 | ···....:·) |
766 | ···....: | 766 | ···....: |
767 | In·[39]:·ds.to_zarr("path/to/directory.zarr") | 767 | In·[39]:·ds.to_zarr("path/to/directory.zarr") |
768 | Out[39]:·<xarray.backends.zarr.ZarrStore·at·0x | 768 | Out[39]:·<xarray.backends.zarr.ZarrStore·at·0xa1f0f9e8> |
769 | (The·suffix·.zarr·is·optionalâjust·a·reminder·that·a·zarr·store·lives·there.) | 769 | (The·suffix·.zarr·is·optionalâjust·a·reminder·that·a·zarr·store·lives·there.) |
770 | If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr·store·is·already | 770 | If·the·directory·does·not·exist,·it·will·be·created.·If·a·zarr·store·is·already |
771 | present·at·that·path,·an·error·will·be·raised,·preventing·it·from·being | 771 | present·at·that·path,·an·error·will·be·raised,·preventing·it·from·being |
772 | overwritten.·To·override·this·behavior·and·overwrite·an·existing·store,·add | 772 | overwritten.·To·override·this·behavior·and·overwrite·an·existing·store,·add |
773 | mode='w'·when·invoking·to_zarr(). | 773 | mode='w'·when·invoking·to_zarr(). |
774 | To·store·variable·length·strings,·convert·them·to·object·arrays·first·with | 774 | To·store·variable·length·strings,·convert·them·to·object·arrays·first·with |
775 | dtype=object. | 775 | dtype=object. |
Offset 806, 15 lines modified | Offset 806, 15 lines modified | ||
806 | zarr.·These·are·described·in·the·zarr_documentation.·These·options·can·be | 806 | zarr.·These·are·described·in·the·zarr_documentation.·These·options·can·be |
807 | passed·to·the·to_zarr·method·as·variable·encoding.·For·example: | 807 | passed·to·the·to_zarr·method·as·variable·encoding.·For·example: |
808 | In·[42]:·import·zarr | 808 | In·[42]:·import·zarr |
809 | In·[43]:·compressor·=·zarr.Blosc(cname="zstd",·clevel=3,·shuffle=2) | 809 | In·[43]:·compressor·=·zarr.Blosc(cname="zstd",·clevel=3,·shuffle=2) |
810 | In·[44]:·ds.to_zarr("foo.zarr",·encoding={"foo":·{"compressor":·compressor}}) | 810 | In·[44]:·ds.to_zarr("foo.zarr",·encoding={"foo":·{"compressor":·compressor}}) |
811 | Out[44]:·<xarray.backends.zarr.ZarrStore·at·0x | 811 | Out[44]:·<xarray.backends.zarr.ZarrStore·at·0xa1f21298> |
812 | Note | 812 | Note |
813 | Not·all·native·zarr·compression·and·filtering·options·have·been·tested·with | 813 | Not·all·native·zarr·compression·and·filtering·options·have·been·tested·with |
814 | xarray. | 814 | xarray. |
815 | ****·Consolidated·Metadata¶·**** | 815 | ****·Consolidated·Metadata¶·**** |
816 | Xarray·needs·to·read·all·of·the·zarr·metadata·when·it·opens·a·dataset.·In·some | 816 | Xarray·needs·to·read·all·of·the·zarr·metadata·when·it·opens·a·dataset.·In·some |
817 | storage·mediums,·such·as·with·cloud·object·storage·(e.g.·amazon·S3),·this·can | 817 | storage·mediums,·such·as·with·cloud·object·storage·(e.g.·amazon·S3),·this·can |
818 | introduce·significant·overhead,·because·two·separate·HTTP·calls·to·the·object | 818 | introduce·significant·overhead,·because·two·separate·HTTP·calls·to·the·object |
Offset 854, 28 lines modified | Offset 854, 28 lines modified | ||
854 | ···....:·········"y":·[1,·2,·3,·4,·5], | 854 | ···....:·········"y":·[1,·2,·3,·4,·5], |
855 | ···....:·········"t":·pd.date_range("2001-01-01",·periods=2), | 855 | ···....:·········"t":·pd.date_range("2001-01-01",·periods=2), |
856 | ···....:·····}, | 856 | ···....:·····}, |
857 | ···....:·) | 857 | ···....:·) |
858 | ···....: | 858 | ···....: |
859 | In·[46]:·ds1.to_zarr("path/to/directory.zarr") | 859 | In·[46]:·ds1.to_zarr("path/to/directory.zarr") |
860 | Out[46]:·<xarray.backends.zarr.ZarrStore·at·0x | 860 | Out[46]:·<xarray.backends.zarr.ZarrStore·at·0xa1f214d8> |
861 | In·[47]:·ds2·=·xr.Dataset( | 861 | In·[47]:·ds2·=·xr.Dataset( |
862 | ···....:·····{"foo":·(("x",·"y",·"t"),·np.random.rand(4,·5,·2))}, | 862 | ···....:·····{"foo":·(("x",·"y",·"t"),·np.random.rand(4,·5,·2))}, |
863 | ···....:·····coords={ | 863 | ···....:·····coords={ |
864 | ···....:·········"x":·[10,·20,·30,·40], | 864 | ···....:·········"x":·[10,·20,·30,·40], |
865 | ···....:·········"y":·[1,·2,·3,·4,·5], | 865 | ···....:·········"y":·[1,·2,·3,·4,·5], |
866 | ···....:·········"t":·pd.date_range("2001-01-03",·periods=2), | 866 | ···....:·········"t":·pd.date_range("2001-01-03",·periods=2), |
867 | ···....:·····}, | 867 | ···....:·····}, |
868 | ···....:·) | 868 | ···....:·) |
869 | ···....: | 869 | ···....: |
870 | In·[48]:·ds2.to_zarr("path/to/directory.zarr",·append_dim="t") | 870 | In·[48]:·ds2.to_zarr("path/to/directory.zarr",·append_dim="t") |
871 | Out[48]:·<xarray.backends.zarr.ZarrStore·at·0x | 871 | Out[48]:·<xarray.backends.zarr.ZarrStore·at·0xa1f21958> |
872 | Finally,·you·can·use·region·to·write·to·limited·regions·of·existing·arrays·in | 872 | Finally,·you·can·use·region·to·write·to·limited·regions·of·existing·arrays·in |
873 | an·existing·Zarr·store.·This·is·a·good·option·for·writing·data·in·parallel·from | 873 | an·existing·Zarr·store.·This·is·a·good·option·for·writing·data·in·parallel·from |
874 | independent·processes. | 874 | independent·processes. |
875 | To·scale·this·up·to·writing·large·datasets,·the·first·step·is·creating·an | 875 | To·scale·this·up·to·writing·large·datasets,·the·first·step·is·creating·an |
876 | initial·Zarr·store·without·writing·all·of·its·array·data.·This·can·be·done·by | 876 | initial·Zarr·store·without·writing·all·of·its·array·data.·This·can·be·done·by |
877 | first·creating·a·Dataset·with·dummy·values·stored·in·dask,·and·then·calling | 877 | first·creating·a·Dataset·with·dummy·values·stored·in·dask,·and·then·calling |
878 | to_zarr·with·compute=False·to·write·only·metadata·(including·attrs)·to·Zarr: | 878 | to_zarr·with·compute=False·to·write·only·metadata·(including·attrs)·to·Zarr: |
Offset 887, 31 lines modified | Offset 887, 31 lines modified | ||
887 | In·[51]:·ds·=·xr.Dataset({"foo":·("x",·dummies)}) | 887 | In·[51]:·ds·=·xr.Dataset({"foo":·("x",·dummies)}) |
888 | In·[52]:·path·=·"path/to/directory.zarr" | 888 | In·[52]:·path·=·"path/to/directory.zarr" |
889 | #·Now·we·write·the·metadata·without·computing·any·array·values | 889 | #·Now·we·write·the·metadata·without·computing·any·array·values |
890 | In·[53]:·ds.to_zarr(path,·compute=False,·consolidated=True) | 890 | In·[53]:·ds.to_zarr(path,·compute=False,·consolidated=True) |
891 | Out[53]:·Delayed('_finalize_store- | 891 | Out[53]:·Delayed('_finalize_store-84826c16-f21f-4c17-b8bf-0c71a9942837') |
892 | Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that | 892 | Now,·a·Zarr·store·with·the·correct·variable·shapes·and·attributes·exists·that |
893 | can·be·filled·out·by·subsequent·calls·to·to_zarr.·The·region·provides·a·mapping | 893 | can·be·filled·out·by·subsequent·calls·to·to_zarr.·The·region·provides·a·mapping |
894 | from·dimension·names·to·Python·slice·objects·indicating·where·the·data·should | 894 | from·dimension·names·to·Python·slice·objects·indicating·where·the·data·should |
895 | be·written·(in·index·space,·not·coordinate·space),·e.g., | 895 | be·written·(in·index·space,·not·coordinate·space),·e.g., |
896 | #·For·convenience,·we'll·slice·a·single·dataset,·but·in·the·real·use-case | 896 | #·For·convenience,·we'll·slice·a·single·dataset,·but·in·the·real·use-case |
897 | #·we·would·create·them·separately,·possibly·even·from·separate·processes. | 897 | #·we·would·create·them·separately,·possibly·even·from·separate·processes. |
898 | In·[54]:·ds·=·xr.Dataset({"foo":·("x",·np.arange(30))}) | 898 | In·[54]:·ds·=·xr.Dataset({"foo":·("x",·np.arange(30))}) |
899 | In·[55]:·ds.isel(x=slice(0,·10)).to_zarr(path,·region={"x":·slice(0,·10)}) | 899 | In·[55]:·ds.isel(x=slice(0,·10)).to_zarr(path,·region={"x":·slice(0,·10)}) |
900 | Out[55]:·<xarray.backends.zarr.ZarrStore·at·0x | 900 | Out[55]:·<xarray.backends.zarr.ZarrStore·at·0xa1f219e8> |
901 | In·[56]:·ds.isel(x=slice(10,·20)).to_zarr(path,·region={"x":·slice(10,·20)}) | 901 | In·[56]:·ds.isel(x=slice(10,·20)).to_zarr(path,·region={"x":·slice(10,·20)}) |
902 | Out[56]:·<xarray.backends.zarr.ZarrStore·at·0x | 902 | Out[56]:·<xarray.backends.zarr.ZarrStore·at·0xa49351a8> |
903 | In·[57]:·ds.isel(x=slice(20,·30)).to_zarr(path,·region={"x":·slice(20,·30)}) | 903 | In·[57]:·ds.isel(x=slice(20,·30)).to_zarr(path,·region={"x":·slice(20,·30)}) |
904 | Out[57]:·<xarray.backends.zarr.ZarrStore·at·0x | 904 | Out[57]:·<xarray.backends.zarr.ZarrStore·at·0xa5133c88> |
905 | Concurrent·writes·with·region·are·safe·as·long·as·they·modify·distinct·chunks | 905 | Concurrent·writes·with·region·are·safe·as·long·as·they·modify·distinct·chunks |
906 | in·the·underlying·Zarr·arrays·(or·use·an·appropriate·lock). | 906 | in·the·underlying·Zarr·arrays·(or·use·an·appropriate·lock). |
907 | As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values, | 907 | As·a·safety·check·to·make·it·harder·to·inadvertently·override·existing·values, |
908 | if·you·set·region·then·all·variables·included·in·a·Dataset·must·have·dimensions | 908 | if·you·set·region·then·all·variables·included·in·a·Dataset·must·have·dimensions |
909 | included·in·region.·Other·variables·(typically·coordinates)·need·to·be | 909 | included·in·region.·Other·variables·(typically·coordinates)·need·to·be |
910 | explicitly·dropped·and/or·written·in·a·separate·calls·to·to_zarr·with·mode='a'. | 910 | explicitly·dropped·and/or·written·in·a·separate·calls·to·to_zarr·with·mode='a'. |
911 | *****·GRIB·format·via·cfgrib¶·***** | 911 | *****·GRIB·format·via·cfgrib¶·***** |
Offset 326, 15 lines modified | Offset 326, 15 lines modified | ||
326 | <span·class="nn">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ni">open_dataset</span><span·class="nt">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> | 326 | <span·class="nn">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ni">open_dataset</span><span·class="nt">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> |
327 | <span·class="g·g-Whitespace">·····</span><span·class="mi">76</span>·········<span·class="c1">#·May·want·to·add·an·option·to·remove·it.</span> | 327 | <span·class="g·g-Whitespace">·····</span><span·class="mi">76</span>·········<span·class="c1">#·May·want·to·add·an·option·to·remove·it.</span> |
328 | <span·class="g·g-Whitespace">·····</span><span·class="mi">77</span>·········<span·class="k">if</span>·<span·class="ow">not</span>·<span·class="n">_os</span><span·class="o">.</span><span·class="n">path</span><span·class="o">.</span><span·class="n">isdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">):</span> | 328 | <span·class="g·g-Whitespace">·····</span><span·class="mi">77</span>·········<span·class="k">if</span>·<span·class="ow">not</span>·<span·class="n">_os</span><span·class="o">.</span><span·class="n">path</span><span·class="o">.</span><span·class="n">isdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">):</span> |
329 | <span·class="ne">--->·</span><span·class="mi">78</span>·············<span·class="n">_os</span><span·class="o">.</span><span·class="n">mkdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">)</span> | 329 | <span·class="ne">--->·</span><span·class="mi">78</span>·············<span·class="n">_os</span><span·class="o">.</span><span·class="n">mkdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">)</span> |
330 | <span·class="g·g-Whitespace">·····</span><span·class="mi">79</span>· | 330 | <span·class="g·g-Whitespace">·····</span><span·class="mi">79</span>· |
331 | <span·class="g·g-Whitespace">·····</span><span·class="mi">80</span>·········<span·class="n">url</span>·<span·class="o">=</span>·<span·class="s2">"/"</span><span·class="o">.</span><span·class="n">join</span><span·class="p">((</span><span·class="n">github_url</span><span·class="p">,</span>·<span·class="s2">"raw"</span><span·class="p">,</span>·<span·class="n">branch</span><span·class="p">,</span>·<span·class="n">fullname</span><span·class="p">))</span> | 331 | <span·class="g·g-Whitespace">·····</span><span·class="mi">80</span>·········<span·class="n">url</span>·<span·class="o">=</span>·<span·class="s2">"/"</span><span·class="o">.</span><span·class="n">join</span><span·class="p">((</span><span·class="n">github_url</span><span·class="p">,</span>·<span·class="s2">"raw"</span><span·class="p">,</span>·<span·class="n">branch</span><span·class="p">,</span>·<span·class="n">fullname</span><span·class="p">))</span> |
332 | <span·class="ne">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 332 | <span·class="ne">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data' |
333 | <span·class="gp">In·[6]:·</span><span·class="n">airtemps</span> | 333 | <span·class="gp">In·[6]:·</span><span·class="n">airtemps</span> |
334 | <span·class="gt">---------------------------------------------------------------------------</span> | 334 | <span·class="gt">---------------------------------------------------------------------------</span> |
335 | <span·class="ne">NameError</span><span·class="g·g-Whitespace">·································</span>Traceback·(most·recent·call·last) | 335 | <span·class="ne">NameError</span><span·class="g·g-Whitespace">·································</span>Traceback·(most·recent·call·last) |
336 | <span·class="o"><</span><span·class="n">ipython</span><span·class="o">-</span><span·class="nb">input</span><span·class="o">-</span><span·class="mi">6</span><span·class="o">-</span><span·class="n">eb57b540ddce</span><span·class="o">></span>·<span·class="ow">in</span>·<span·class="o"><</span><span·class="n">module</span><span·class="o">></span> | 336 | <span·class="o"><</span><span·class="n">ipython</span><span·class="o">-</span><span·class="nb">input</span><span·class="o">-</span><span·class="mi">6</span><span·class="o">-</span><span·class="n">eb57b540ddce</span><span·class="o">></span>·<span·class="ow">in</span>·<span·class="o"><</span><span·class="n">module</span><span·class="o">></span> |
337 | <span·class="ne">---->·</span><span·class="mi">1</span>·<span·class="n">airtemps</span> | 337 | <span·class="ne">---->·</span><span·class="mi">1</span>·<span·class="n">airtemps</span> |
Offset 852, 15 lines modified | Offset 852, 15 lines modified | ||
852 | <span·class="ne">-->·</span><span·class="mi">171</span>·········<span·class="n">ref_var</span>·<span·class="o">=</span>·<span·class="n">variables</span><span·class="p">[</span><span·class="n">ref_name</span><span·class="p">]</span> | 852 | <span·class="ne">-->·</span><span·class="mi">171</span>·········<span·class="n">ref_var</span>·<span·class="o">=</span>·<span·class="n">variables</span><span·class="p">[</span><span·class="n">ref_name</span><span·class="p">]</span> |
853 | <span·class="g·g-Whitespace">····</span><span·class="mi">172</span>· | 853 | <span·class="g·g-Whitespace">····</span><span·class="mi">172</span>· |
854 | <span·class="g·g-Whitespace">····</span><span·class="mi">173</span>·····<span·class="k">if</span>·<span·class="n">var_name</span>·<span·class="ow">is</span>·<span·class="kc">None</span><span·class="p">:</span> | 854 | <span·class="g·g-Whitespace">····</span><span·class="mi">173</span>·····<span·class="k">if</span>·<span·class="n">var_name</span>·<span·class="ow">is</span>·<span·class="kc">None</span><span·class="p">:</span> |
855 | <span·class="ne">KeyError</span>:·'lat' | 855 | <span·class="ne">KeyError</span>:·'lat' |
856 | <span·class="gp">In·[51]:·</span><span·class="n">b</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span> | 856 | <span·class="gp">In·[51]:·</span><span·class="n">b</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">()</span> |
857 | <span·class="gh">Out[51]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 857 | <span·class="gh">Out[51]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xa1bc43e8>]</span> |
858 | </pre></div> | 858 | </pre></div> |
859 | </div> | 859 | </div> |
860 | <a·class="reference·internal·image-reference"·href="_images/plotting_nonuniform_coords.png"><img·alt="_images/plotting_nonuniform_coords.png"·src="_images/plotting_nonuniform_coords.png"·style="width:·4in;"·/></a> | 860 | <a·class="reference·internal·image-reference"·href="_images/plotting_nonuniform_coords.png"><img·alt="_images/plotting_nonuniform_coords.png"·src="_images/plotting_nonuniform_coords.png"·style="width:·4in;"·/></a> |
861 | </div> | 861 | </div> |
862 | <div·class="section"·id="calling-matplotlib"> | 862 | <div·class="section"·id="calling-matplotlib"> |
863 | <h4>Calling·Matplotlib<a·class="headerlink"·href="#calling-matplotlib"·title="Permalink·to·this·headline">¶</a></h4> | 863 | <h4>Calling·Matplotlib<a·class="headerlink"·href="#calling-matplotlib"·title="Permalink·to·this·headline">¶</a></h4> |
864 | <p>Since·this·is·a·thin·wrapper·around·matplotlib,·all·the·functionality·of | 864 | <p>Since·this·is·a·thin·wrapper·around·matplotlib,·all·the·functionality·of |
Offset 1314, 56 lines modified | Offset 1314, 56 lines modified | ||
1314 | <span·class="go">Data·variables:</span> | 1314 | <span·class="go">Data·variables:</span> |
1315 | <span·class="go">····A········(x,·y,·z,·w)·float64·-0.104·0.02719·-0.0425·...·-0.1175·-0.0183</span> | 1315 | <span·class="go">····A········(x,·y,·z,·w)·float64·-0.104·0.02719·-0.0425·...·-0.1175·-0.0183</span> |
1316 | <span·class="go">····B········(x,·y,·z,·w)·float64·0.0·0.0·0.0·0.0·...·1.369·1.408·1.387·1.417</span> | 1316 | <span·class="go">····B········(x,·y,·z,·w)·float64·0.0·0.0·0.0·0.0·...·1.369·1.408·1.387·1.417</span> |
1317 | </pre></div> | 1317 | </pre></div> |
1318 | </div> | 1318 | </div> |
1319 | <p>Suppose·we·want·to·scatter·<code·class="docutils·literal·notranslate"><span·class="pre">A</span></code>·against·<code·class="docutils·literal·notranslate"><span·class="pre">B</span></code></p> | 1319 | <p>Suppose·we·want·to·scatter·<code·class="docutils·literal·notranslate"><span·class="pre">A</span></code>·against·<code·class="docutils·literal·notranslate"><span·class="pre">B</span></code></p> |
1320 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[95]:·</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> | 1320 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[95]:·</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> |
1321 | <span·class="gh">Out[95]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0x | 1321 | <span·class="gh">Out[95]:·</span><span·class="go"><matplotlib.collections.PathCollection·at·0xa1ec6be0></span> |
1322 | </pre></div> | 1322 | </pre></div> |
1323 | </div> | 1323 | </div> |
1324 | <img·alt="_images/ds_simple_scatter.png"·src="_images/ds_simple_scatter.png"·/> | 1324 | <img·alt="_images/ds_simple_scatter.png"·src="_images/ds_simple_scatter.png"·/> |
1325 | <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">hue</span></code>·kwarg·lets·you·vary·the·color·by·variable·value</p> | 1325 | <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">hue</span></code>·kwarg·lets·you·vary·the·color·by·variable·value</p> |
1326 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[96]:·</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> | 1326 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[96]:·</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> |
1327 | <span·class="gh">Out[96]:·</span><span·class="go"></span> | 1327 | <span·class="gh">Out[96]:·</span><span·class="go"></span> |
1328 | <span·class="go">[<matplotlib.collections.PathCollection·at·0x | 1328 | <span·class="go">[<matplotlib.collections.PathCollection·at·0xa26baca0>,</span> |
1329 | <span·class="go">·<matplotlib.collections.PathCollection·at·0xe5763d60>,</span> | ||
1330 | <span·class="go">·<matplotlib.collections.PathCollection·at·0x | 1329 | <span·class="go">·<matplotlib.collections.PathCollection·at·0xa4829430>,</span> |
1330 | <span·class="go">·<matplotlib.collections.PathCollection·at·0xa497e7c0>,</span> | ||
1331 | <span·class="go">·<matplotlib.collections.PathCollection·at·0x | 1331 | <span·class="go">·<matplotlib.collections.PathCollection·at·0xa51066e8>]</span> |
1332 | </pre></div> | 1332 | </pre></div> |
1333 | </div> | 1333 | </div> |
1334 | <img·alt="_images/ds_hue_scatter.png"·src="_images/ds_hue_scatter.png"·/> | 1334 | <img·alt="_images/ds_hue_scatter.png"·src="_images/ds_hue_scatter.png"·/> |
1335 | <p>When·<code·class="docutils·literal·notranslate"><span·class="pre">hue</span></code>·is·specified,·a·colorbar·is·added·for·numeric·<code·class="docutils·literal·notranslate"><span·class="pre">hue</span></code>·DataArrays·by | 1335 | <p>When·<code·class="docutils·literal·notranslate"><span·class="pre">hue</span></code>·is·specified,·a·colorbar·is·added·for·numeric·<code·class="docutils·literal·notranslate"><span·class="pre">hue</span></code>·DataArrays·by |
1336 | default·and·a·legend·is·added·for·non-numeric·<code·class="docutils·literal·notranslate"><span·class="pre">hue</span></code>·DataArrays·(as·above). | 1336 | default·and·a·legend·is·added·for·non-numeric·<code·class="docutils·literal·notranslate"><span·class="pre">hue</span></code>·DataArrays·(as·above). |
1337 | You·can·force·a·legend·instead·of·a·colorbar·by·setting·<code·class="docutils·literal·notranslate"><span·class="pre">hue_style='discrete'</span></code>. | 1337 | You·can·force·a·legend·instead·of·a·colorbar·by·setting·<code·class="docutils·literal·notranslate"><span·class="pre">hue_style='discrete'</span></code>. |
1338 | Additionally,·the·boolean·kwarg·<code·class="docutils·literal·notranslate"><span·class="pre">add_guide</span></code>·can·be·used·to·prevent·the·display·of·a·legend·or·colorbar·(as·appropriate).</p> | 1338 | Additionally,·the·boolean·kwarg·<code·class="docutils·literal·notranslate"><span·class="pre">add_guide</span></code>·can·be·used·to·prevent·the·display·of·a·legend·or·colorbar·(as·appropriate).</p> |
1339 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[97]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">assign</span><span·class="p">(</span><span·class="n">w</span><span·class="o">=</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">5</span><span·class="p">])</span> | 1339 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[97]:·</span><span·class="n">ds</span>·<span·class="o">=</span>·<span·class="n">ds</span><span·class="o">.</span><span·class="n">assign</span><span·class="p">(</span><span·class="n">w</span><span·class="o">=</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">5</span><span·class="p">])</span> |
1340 | <span·class="gp">In·[98]:·</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">hue_style</span><span·class="o">=</span><span·class="s2">"discrete"</span><span·class="p">)</span> | 1340 | <span·class="gp">In·[98]:·</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">hue_style</span><span·class="o">=</span><span·class="s2">"discrete"</span><span·class="p">)</span> |
1341 | <span·class="gh">Out[98]:·</span><span·class="go"></span> | 1341 | <span·class="gh">Out[98]:·</span><span·class="go"></span> |
1342 | <span·class="go">[<matplotlib.collections.PathCollection·at·0x | 1342 | <span·class="go">[<matplotlib.collections.PathCollection·at·0xa1b85ca0>,</span> |
1343 | <span·class="go">·<matplotlib.collections.PathCollection·at·0xa1b8cf70>,</span> | ||
1343 | <span·class="go">·<matplotlib.collections.PathCollection·at·0x | 1344 | <span·class="go">·<matplotlib.collections.PathCollection·at·0xa1a1dbb0>,</span> |
1344 | <span·class="go">·<matplotlib.collections.PathCollection·at·0xe27abad8>,</span> | ||
1345 | <span·class="go">·<matplotlib.collections.PathCollection·at·0x | 1345 | <span·class="go">·<matplotlib.collections.PathCollection·at·0xa1a20b98>]</span> |
1346 | </pre></div> | 1346 | </pre></div> |
1347 | </div> | 1347 | </div> |
1348 | <img·alt="_images/ds_discrete_legend_hue_scatter.png"·src="_images/ds_discrete_legend_hue_scatter.png"·/> | 1348 | <img·alt="_images/ds_discrete_legend_hue_scatter.png"·src="_images/ds_discrete_legend_hue_scatter.png"·/> |
1349 | <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">markersize</span></code>·kwarg·lets·you·vary·the·point’s·size·by·variable·value.·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> | 1349 | <p>The·<code·class="docutils·literal·notranslate"><span·class="pre">markersize</span></code>·kwarg·lets·you·vary·the·point’s·size·by·variable·value.·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> |
1350 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[99]:·</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">"z"</span><span·class="p">,</span>·<span·class="n">hue_style</span><span·class="o">=</span><span·class="s2">"discrete"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">)</span> | 1350 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[99]:·</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">"z"</span><span·class="p">,</span>·<span·class="n">hue_style</span><span·class="o">=</span><span·class="s2">"discrete"</span><span·class="p">,</span>·<span·class="n">markersize</span><span·class="o">=</span><span·class="s2">"z"</span><span·class="p">)</span> |
1351 | <span·class="gh">Out[99]:·</span><span·class="go"></span> | 1351 | <span·class="gh">Out[99]:·</span><span·class="go"></span> |
1352 | <span·class="go">[<matplotlib.collections.PathCollection·at·0x | 1352 | <span·class="go">[<matplotlib.collections.PathCollection·at·0xa1a2e190>,</span> |
1353 | <span·class="go">·<matplotlib.collections.PathCollection·at·0x | 1353 | <span·class="go">·<matplotlib.collections.PathCollection·at·0xa1a20d78>,</span> |
1354 | <span·class="go">·<matplotlib.collections.PathCollection·at·0x | 1354 | <span·class="go">·<matplotlib.collections.PathCollection·at·0xa1a20f88>,</span> |
1355 | <span·class="go">·<matplotlib.collections.PathCollection·at·0x | 1355 | <span·class="go">·<matplotlib.collections.PathCollection·at·0xa1a23508>]</span> |
1356 | </pre></div> | 1356 | </pre></div> |
1357 | </div> | 1357 | </div> |
1358 | <img·alt="_images/ds_hue_size_scatter.png"·src="_images/ds_hue_size_scatter.png"·/> | 1358 | <img·alt="_images/ds_hue_size_scatter.png"·src="_images/ds_hue_size_scatter.png"·/> |
1359 | <p>Faceting·is·also·possible</p> | 1359 | <p>Faceting·is·also·possible</p> |
1360 | <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">"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">col</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">"z"</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">hue_style</span><span·class="o">=</span><span·class="s2">"discrete"</span><span·class="p">)</span> | 1360 | <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">"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">col</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">"z"</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">hue_style</span><span·class="o">=</span><span·class="s2">"discrete"</span><span·class="p">)</span> |
1361 | <span·class="gh">Out[100]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0x | 1361 | <span·class="gh">Out[100]:·</span><span·class="go"><xarray.plot.facetgrid.FacetGrid·at·0xa1b85a00></span> |
1362 | </pre></div> | 1362 | </pre></div> |
1363 | </div> | 1363 | </div> |
1364 | <img·alt="_images/ds_facet_scatter.png"·src="_images/ds_facet_scatter.png"·/> | 1364 | <img·alt="_images/ds_facet_scatter.png"·src="_images/ds_facet_scatter.png"·/> |
1365 | <p>For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data·variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities·of·<code·class="docutils·literal·notranslate"><span·class="pre">seaborn</span></code>.</p> | 1365 | <p>For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data·variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities·of·<code·class="docutils·literal·notranslate"><span·class="pre">seaborn</span></code>.</p> |
1366 | </div> | 1366 | </div> |
1367 | <div·class="section"·id="maps"> | 1367 | <div·class="section"·id="maps"> |
1368 | <span·id="plot-maps"></span><h2>Maps<a·class="headerlink"·href="#maps"·title="Permalink·to·this·headline">¶</a></h2> | 1368 | <span·id="plot-maps"></span><h2>Maps<a·class="headerlink"·href="#maps"·title="Permalink·to·this·headline">¶</a></h2> |
Offset 1380, 15 lines modified | Offset 1380, 15 lines modified | ||
1380 | <span·class="nn">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ni">open_dataset</span><span·class="nt">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> | 1380 | <span·class="nn">/build/reproducible-path/python-xarray-0.16.2/xarray/tutorial.py</span>·in·<span·class="ni">open_dataset</span><span·class="nt">(name,·cache,·cache_dir,·github_url,·branch,·**kws)</span> |
1381 | <span·class="g·g-Whitespace">·····</span><span·class="mi">76</span>·········<span·class="c1">#·May·want·to·add·an·option·to·remove·it.</span> | 1381 | <span·class="g·g-Whitespace">·····</span><span·class="mi">76</span>·········<span·class="c1">#·May·want·to·add·an·option·to·remove·it.</span> |
1382 | <span·class="g·g-Whitespace">·····</span><span·class="mi">77</span>·········<span·class="k">if</span>·<span·class="ow">not</span>·<span·class="n">_os</span><span·class="o">.</span><span·class="n">path</span><span·class="o">.</span><span·class="n">isdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">):</span> | 1382 | <span·class="g·g-Whitespace">·····</span><span·class="mi">77</span>·········<span·class="k">if</span>·<span·class="ow">not</span>·<span·class="n">_os</span><span·class="o">.</span><span·class="n">path</span><span·class="o">.</span><span·class="n">isdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">):</span> |
1383 | <span·class="ne">--->·</span><span·class="mi">78</span>·············<span·class="n">_os</span><span·class="o">.</span><span·class="n">mkdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">)</span> | 1383 | <span·class="ne">--->·</span><span·class="mi">78</span>·············<span·class="n">_os</span><span·class="o">.</span><span·class="n">mkdir</span><span·class="p">(</span><span·class="n">longdir</span><span·class="p">)</span> |
1384 | <span·class="g·g-Whitespace">·····</span><span·class="mi">79</span>· | 1384 | <span·class="g·g-Whitespace">·····</span><span·class="mi">79</span>· |
1385 | <span·class="g·g-Whitespace">·····</span><span·class="mi">80</span>·········<span·class="n">url</span>·<span·class="o">=</span>·<span·class="s2">"/"</span><span·class="o">.</span><span·class="n">join</span><span·class="p">((</span><span·class="n">github_url</span><span·class="p">,</span>·<span·class="s2">"raw"</span><span·class="p">,</span>·<span·class="n">branch</span><span·class="p">,</span>·<span·class="n">fullname</span><span·class="p">))</span> | 1385 | <span·class="g·g-Whitespace">·····</span><span·class="mi">80</span>·········<span·class="n">url</span>·<span·class="o">=</span>·<span·class="s2">"/"</span><span·class="o">.</span><span·class="n">join</span><span·class="p">((</span><span·class="n">github_url</span><span·class="p">,</span>·<span·class="s2">"raw"</span><span·class="p">,</span>·<span·class="n">branch</span><span·class="p">,</span>·<span·class="n">fullname</span><span·class="p">))</span> |
1386 | <span·class="ne">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 1386 | <span·class="ne">FileNotFoundError</span>:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second-build/.xarray_tutorial_data' |
1387 | <span·class="gp">In·[103]:·</span><span·class="n">p</span>·<span·class="o">=</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> | 1387 | <span·class="gp">In·[103]:·</span><span·class="n">p</span>·<span·class="o">=</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> |
1388 | <span·class="gp">···.....:·</span>····<span·class="n">subplot_kws</span><span·class="o">=</span><span·class="nb">dict</span><span·class="p">(</span><span·class="n">projection</span><span·class="o">=</span><span·class="n">ccrs</span><span·class="o">.</span><span·class="n">Orthographic</span><span·class="p">(</span><span·class="o">-</span><span·class="mi">80</span><span·class="p">,</span>·<span·class="mi">35</span><span·class="p">),</span>·<span·class="n">facecolor</span><span·class="o">=</span><span·class="s2">"gray"</span><span·class="p">),</span> | 1388 | <span·class="gp">···.....:·</span>····<span·class="n">subplot_kws</span><span·class="o">=</span><span·class="nb">dict</span><span·class="p">(</span><span·class="n">projection</span><span·class="o">=</span><span·class="n">ccrs</span><span·class="o">.</span><span·class="n">Orthographic</span><span·class="p">(</span><span·class="o">-</span><span·class="mi">80</span><span·class="p">,</span>·<span·class="mi">35</span><span·class="p">),</span>·<span·class="n">facecolor</span><span·class="o">=</span><span·class="s2">"gray"</span><span·class="p">),</span> |
1389 | <span·class="gp">···.....:·</span>····<span·class="n">transform</span><span·class="o">=</span><span·class="n">ccrs</span><span·class="o">.</span><span·class="n">PlateCarree</span><span·class="p">(),</span> | 1389 | <span·class="gp">···.....:·</span>····<span·class="n">transform</span><span·class="o">=</span><span·class="n">ccrs</span><span·class="o">.</span><span·class="n">PlateCarree</span><span·class="p">(),</span> |
1390 | <span·class="gp">···.....:·</span><span·class="p">)</span> | 1390 | <span·class="gp">···.....:·</span><span·class="p">)</span> |
1391 | <span·class="gp">···.....:·</span> | 1391 | <span·class="gp">···.....:·</span> |
1392 | <span·class="gt">---------------------------------------------------------------------------</span> | 1392 | <span·class="gt">---------------------------------------------------------------------------</span> |
Offset 1472, 24 lines modified | Offset 1472, 24 lines modified | ||
1472 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[109]:·</span><span·class="kn">import</span>·<span·class="nn">xarray.plot</span>·<span·class="k">as</span>·<span·class="nn">xplt</span> | 1472 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[109]:·</span><span·class="kn">import</span>·<span·class="nn">xarray.plot</span>·<span·class="k">as</span>·<span·class="nn">xplt</span> |
1473 | <span·class="gp">In·[110]:·</span><span·class="n">da</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="nb">range</span><span·class="p">(</span><span·class="mi">5</span><span·class="p">))</span> | 1473 | <span·class="gp">In·[110]:·</span><span·class="n">da</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="nb">range</span><span·class="p">(</span><span·class="mi">5</span><span·class="p">))</span> |
1474 | <span·class="gp">In·[111]:·</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">nrows</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">)</span> | 1474 | <span·class="gp">In·[111]:·</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">nrows</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">)</span> |
1475 | <span·class="gp">In·[112]:·</span><span·class="n">da</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>·<span·class="mi">0</span><span·class="p">])</span> | 1475 | <span·class="gp">In·[112]:·</span><span·class="n">da</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>·<span·class="mi">0</span><span·class="p">])</span> |
1476 | <span·class="gh">Out[112]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 1476 | <span·class="gh">Out[112]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xa11bfd78>]</span> |
1477 | <span·class="gp">In·[113]:·</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="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>·<span·class="mi">1</span><span·class="p">])</span> | 1477 | <span·class="gp">In·[113]:·</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="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>·<span·class="mi">1</span><span·class="p">])</span> |
1478 | <span·class="gh">Out[113]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 1478 | <span·class="gh">Out[113]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xb305b9a0>]</span> |
1479 | <span·class="gp">In·[114]:·</span><span·class="n">xplt</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">da</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>·<span·class="mi">0</span><span·class="p">])</span> | 1479 | <span·class="gp">In·[114]:·</span><span·class="n">xplt</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span><span·class="n">da</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>·<span·class="mi">0</span><span·class="p">])</span> |
1480 | <span·class="gh">Out[114]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 1480 | <span·class="gh">Out[114]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xb3024688>]</span> |
1481 | <span·class="gp">In·[115]:·</span><span·class="n">xplt</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="n">da</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>·<span·class="mi">1</span><span·class="p">])</span> | 1481 | <span·class="gp">In·[115]:·</span><span·class="n">xplt</span><span·class="o">.</span><span·class="n">line</span><span·class="p">(</span><span·class="n">da</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>·<span·class="mi">1</span><span·class="p">])</span> |
1482 | <span·class="gh">Out[115]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0x | 1482 | <span·class="gh">Out[115]:·</span><span·class="go">[<matplotlib.lines.Line2D·at·0xb3075f88>]</span> |
1483 | <span·class="gp">In·[116]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">tight_layout</span><span·class="p">()</span> | 1483 | <span·class="gp">In·[116]:·</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">tight_layout</span><span·class="p">()</span> |
Max diff block lines reached; 13957/34144 bytes (40.88%) of diff not shown. |
Offset 121, 15 lines modified | Offset 121, 15 lines modified | ||
121 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) | 121 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) |
122 | ·····76·········#·May·want·to·add·an·option·to·remove·it. | 122 | ·····76·········#·May·want·to·add·an·option·to·remove·it. |
123 | ·····77·········if·not·_os.path.isdir(longdir): | 123 | ·····77·········if·not·_os.path.isdir(longdir): |
124 | --->·78·············_os.mkdir(longdir) | 124 | --->·78·············_os.mkdir(longdir) |
125 | ·····79 | 125 | ·····79 |
126 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) | 126 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) |
127 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 127 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
128 | build/.xarray_tutorial_data' | 128 | build/.xarray_tutorial_data' |
129 | In·[6]:·airtemps | 129 | In·[6]:·airtemps |
130 | --------------------------------------------------------------------------- | 130 | --------------------------------------------------------------------------- |
131 | NameError·································Traceback·(most·recent·call·last) | 131 | NameError·································Traceback·(most·recent·call·last) |
132 | <ipython-input-6-eb57b540ddce>·in·<module> | 132 | <ipython-input-6-eb57b540ddce>·in·<module> |
133 | ---->·1·airtemps | 133 | ---->·1·airtemps |
Offset 588, 15 lines modified | Offset 588, 15 lines modified | ||
588 | -->·171·········ref_var·=·variables[ref_name] | 588 | -->·171·········ref_var·=·variables[ref_name] |
589 | ····172 | 589 | ····172 |
590 | ····173·····if·var_name·is·None: | 590 | ····173·····if·var_name·is·None: |
591 | KeyError:·'lat' | 591 | KeyError:·'lat' |
592 | In·[51]:·b.plot() | 592 | In·[51]:·b.plot() |
593 | Out[51]:·[<matplotlib.lines.Line2D·at·0x | 593 | Out[51]:·[<matplotlib.lines.Line2D·at·0xa1bc43e8>] |
594 | [_images/plotting_nonuniform_coords.png] | 594 | [_images/plotting_nonuniform_coords.png] |
595 | ***·Calling·Matplotlib¶·*** | 595 | ***·Calling·Matplotlib¶·*** |
596 | Since·this·is·a·thin·wrapper·around·matplotlib,·all·the·functionality·of | 596 | Since·this·is·a·thin·wrapper·around·matplotlib,·all·the·functionality·of |
597 | matplotlib·is·available. | 597 | matplotlib·is·available. |
598 | In·[52]:·air2d.plot(cmap=plt.cm.Blues) | 598 | In·[52]:·air2d.plot(cmap=plt.cm.Blues) |
599 | --------------------------------------------------------------------------- | 599 | --------------------------------------------------------------------------- |
600 | NameError·································Traceback·(most·recent·call·last) | 600 | NameError·································Traceback·(most·recent·call·last) |
Offset 984, 53 lines modified | Offset 984, 53 lines modified | ||
984 | ··*·z········(z)·int32·0·1·2·3 | 984 | ··*·z········(z)·int32·0·1·2·3 |
985 | ··*·w········(w)·<U5·'one'·'two'·'three'·'five' | 985 | ··*·w········(w)·<U5·'one'·'two'·'three'·'five' |
986 | Data·variables: | 986 | Data·variables: |
987 | ····A········(x,·y,·z,·w)·float64·-0.104·0.02719·-0.0425·...·-0.1175·-0.0183 | 987 | ····A········(x,·y,·z,·w)·float64·-0.104·0.02719·-0.0425·...·-0.1175·-0.0183 |
988 | ····B········(x,·y,·z,·w)·float64·0.0·0.0·0.0·0.0·...·1.369·1.408·1.387·1.417 | 988 | ····B········(x,·y,·z,·w)·float64·0.0·0.0·0.0·0.0·...·1.369·1.408·1.387·1.417 |
989 | Suppose·we·want·to·scatter·A·against·B | 989 | Suppose·we·want·to·scatter·A·against·B |
990 | In·[95]:·ds.plot.scatter(x="A",·y="B") | 990 | In·[95]:·ds.plot.scatter(x="A",·y="B") |
991 | Out[95]:·<matplotlib.collections.PathCollection·at·0x | 991 | Out[95]:·<matplotlib.collections.PathCollection·at·0xa1ec6be0> |
992 | [_images/ds_simple_scatter.png] | 992 | [_images/ds_simple_scatter.png] |
993 | The·hue·kwarg·lets·you·vary·the·color·by·variable·value | 993 | The·hue·kwarg·lets·you·vary·the·color·by·variable·value |
994 | In·[96]:·ds.plot.scatter(x="A",·y="B",·hue="w") | 994 | In·[96]:·ds.plot.scatter(x="A",·y="B",·hue="w") |
995 | Out[96]: | 995 | Out[96]: |
996 | [<matplotlib.collections.PathCollection·at·0x | 996 | [<matplotlib.collections.PathCollection·at·0xa26baca0>, |
997 | ·<matplotlib.collections.PathCollection·at·0xe5763d60>, | ||
998 | ·<matplotlib.collections.PathCollection·at·0x | 997 | ·<matplotlib.collections.PathCollection·at·0xa4829430>, |
998 | ·<matplotlib.collections.PathCollection·at·0xa497e7c0>, | ||
999 | ·<matplotlib.collections.PathCollection·at·0x | 999 | ·<matplotlib.collections.PathCollection·at·0xa51066e8>] |
1000 | [_images/ds_hue_scatter.png] | 1000 | [_images/ds_hue_scatter.png] |
1001 | When·hue·is·specified,·a·colorbar·is·added·for·numeric·hue·DataArrays·by | 1001 | When·hue·is·specified,·a·colorbar·is·added·for·numeric·hue·DataArrays·by |
1002 | default·and·a·legend·is·added·for·non-numeric·hue·DataArrays·(as·above).·You | 1002 | default·and·a·legend·is·added·for·non-numeric·hue·DataArrays·(as·above).·You |
1003 | can·force·a·legend·instead·of·a·colorbar·by·setting·hue_style='discrete'. | 1003 | can·force·a·legend·instead·of·a·colorbar·by·setting·hue_style='discrete'. |
1004 | Additionally,·the·boolean·kwarg·add_guide·can·be·used·to·prevent·the·display·of | 1004 | Additionally,·the·boolean·kwarg·add_guide·can·be·used·to·prevent·the·display·of |
1005 | a·legend·or·colorbar·(as·appropriate). | 1005 | a·legend·or·colorbar·(as·appropriate). |
1006 | In·[97]:·ds·=·ds.assign(w=[1,·2,·3,·5]) | 1006 | In·[97]:·ds·=·ds.assign(w=[1,·2,·3,·5]) |
1007 | In·[98]:·ds.plot.scatter(x="A",·y="B",·hue="w",·hue_style="discrete") | 1007 | In·[98]:·ds.plot.scatter(x="A",·y="B",·hue="w",·hue_style="discrete") |
1008 | Out[98]: | 1008 | Out[98]: |
1009 | [<matplotlib.collections.PathCollection·at·0x | 1009 | [<matplotlib.collections.PathCollection·at·0xa1b85ca0>, |
1010 | ·<matplotlib.collections.PathCollection·at·0xa1b8cf70>, | ||
1010 | ·<matplotlib.collections.PathCollection·at·0x | 1011 | ·<matplotlib.collections.PathCollection·at·0xa1a1dbb0>, |
1011 | ·<matplotlib.collections.PathCollection·at·0xe27abad8>, | ||
1012 | ·<matplotlib.collections.PathCollection·at·0x | 1012 | ·<matplotlib.collections.PathCollection·at·0xa1a20b98>] |
1013 | [_images/ds_discrete_legend_hue_scatter.png] | 1013 | [_images/ds_discrete_legend_hue_scatter.png] |
1014 | The·markersize·kwarg·lets·you·vary·the·pointâs·size·by·variable·value.·You | 1014 | The·markersize·kwarg·lets·you·vary·the·pointâs·size·by·variable·value.·You |
1015 | can·additionally·pass·size_norm·to·control·how·the·variableâs·values·are | 1015 | can·additionally·pass·size_norm·to·control·how·the·variableâs·values·are |
1016 | mapped·to·point·sizes. | 1016 | mapped·to·point·sizes. |
1017 | In·[99]:·ds.plot.scatter(x="A",·y="B",·hue="z",·hue_style="discrete", | 1017 | In·[99]:·ds.plot.scatter(x="A",·y="B",·hue="z",·hue_style="discrete", |
1018 | markersize="z") | 1018 | markersize="z") |
1019 | Out[99]: | 1019 | Out[99]: |
1020 | [<matplotlib.collections.PathCollection·at·0x | 1020 | [<matplotlib.collections.PathCollection·at·0xa1a2e190>, |
1021 | ·<matplotlib.collections.PathCollection·at·0x | 1021 | ·<matplotlib.collections.PathCollection·at·0xa1a20d78>, |
1022 | ·<matplotlib.collections.PathCollection·at·0x | 1022 | ·<matplotlib.collections.PathCollection·at·0xa1a20f88>, |
1023 | ·<matplotlib.collections.PathCollection·at·0x | 1023 | ·<matplotlib.collections.PathCollection·at·0xa1a23508>] |
1024 | [_images/ds_hue_size_scatter.png] | 1024 | [_images/ds_hue_size_scatter.png] |
1025 | Faceting·is·also·possible | 1025 | Faceting·is·also·possible |
1026 | In·[100]:·ds.plot.scatter(x="A",·y="B",·col="x",·row="z",·hue="w", | 1026 | In·[100]:·ds.plot.scatter(x="A",·y="B",·col="x",·row="z",·hue="w", |
1027 | hue_style="discrete") | 1027 | hue_style="discrete") |
1028 | Out[100]:·<xarray.plot.facetgrid.FacetGrid·at·0x | 1028 | Out[100]:·<xarray.plot.facetgrid.FacetGrid·at·0xa1b85a00> |
1029 | [_images/ds_facet_scatter.png] | 1029 | [_images/ds_facet_scatter.png] |
1030 | For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data | 1030 | For·more·advanced·scatter·plots,·we·recommend·converting·the·relevant·data |
1031 | variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities | 1031 | variables·to·a·pandas·DataFrame·and·using·the·extensive·plotting·capabilities |
1032 | of·seaborn. | 1032 | of·seaborn. |
1033 | *****·Maps¶·***** | 1033 | *****·Maps¶·***** |
1034 | To·follow·this·section·youâll·need·to·have·Cartopy·installed·and·working. | 1034 | To·follow·this·section·youâll·need·to·have·Cartopy·installed·and·working. |
1035 | This·script·will·plot·the·air·temperature·on·a·map. | 1035 | This·script·will·plot·the·air·temperature·on·a·map. |
Offset 1046, 15 lines modified | Offset 1046, 15 lines modified | ||
1046 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) | 1046 | open_dataset(name,·cache,·cache_dir,·github_url,·branch,·**kws) |
1047 | ·····76·········#·May·want·to·add·an·option·to·remove·it. | 1047 | ·····76·········#·May·want·to·add·an·option·to·remove·it. |
1048 | ·····77·········if·not·_os.path.isdir(longdir): | 1048 | ·····77·········if·not·_os.path.isdir(longdir): |
1049 | --->·78·············_os.mkdir(longdir) | 1049 | --->·78·············_os.mkdir(longdir) |
1050 | ·····79 | 1050 | ·····79 |
1051 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) | 1051 | ·····80·········url·=·"/".join((github_url,·"raw",·branch,·fullname)) |
1052 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/ | 1052 | FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'/nonexistent/second- |
1053 | build/.xarray_tutorial_data' | 1053 | build/.xarray_tutorial_data' |
1054 | In·[103]:·p·=·air.isel(time=0).plot( | 1054 | In·[103]:·p·=·air.isel(time=0).plot( |
1055 | ···.....:·····subplot_kws=dict(projection=ccrs.Orthographic(-80,·35), | 1055 | ···.....:·····subplot_kws=dict(projection=ccrs.Orthographic(-80,·35), |
1056 | facecolor="gray"), | 1056 | facecolor="gray"), |
1057 | ···.....:·····transform=ccrs.PlateCarree(), | 1057 | ···.....:·····transform=ccrs.PlateCarree(), |
1058 | ···.....:·) | 1058 | ···.....:·) |
Offset 1131, 24 lines modified | Offset 1131, 24 lines modified | ||
1131 | In·[109]:·import·xarray.plot·as·xplt | 1131 | In·[109]:·import·xarray.plot·as·xplt |
1132 | In·[110]:·da·=·xr.DataArray(range(5)) | 1132 | In·[110]:·da·=·xr.DataArray(range(5)) |
1133 | In·[111]:·fig,·axes·=·plt.subplots(ncols=2,·nrows=2) | 1133 | In·[111]:·fig,·axes·=·plt.subplots(ncols=2,·nrows=2) |
1134 | In·[112]:·da.plot(ax=axes[0,·0]) | 1134 | In·[112]:·da.plot(ax=axes[0,·0]) |
1135 | Out[112]:·[<matplotlib.lines.Line2D·at·0x | 1135 | Out[112]:·[<matplotlib.lines.Line2D·at·0xa11bfd78>] |
1136 | In·[113]:·da.plot.line(ax=axes[0,·1]) | 1136 | In·[113]:·da.plot.line(ax=axes[0,·1]) |
1137 | Out[113]:·[<matplotlib.lines.Line2D·at·0x | 1137 | Out[113]:·[<matplotlib.lines.Line2D·at·0xb305b9a0>] |
1138 | In·[114]:·xplt.plot(da,·ax=axes[1,·0]) | 1138 | In·[114]:·xplt.plot(da,·ax=axes[1,·0]) |
1139 | Out[114]:·[<matplotlib.lines.Line2D·at·0x | 1139 | Out[114]:·[<matplotlib.lines.Line2D·at·0xb3024688>] |
1140 | In·[115]:·xplt.line(da,·ax=axes[1,·1]) | 1140 | In·[115]:·xplt.line(da,·ax=axes[1,·1]) |
1141 | Out[115]:·[<matplotlib.lines.Line2D·at·0x | 1141 | Out[115]:·[<matplotlib.lines.Line2D·at·0xb3075f88>] |
1142 | In·[116]:·plt.tight_layout() | 1142 | In·[116]:·plt.tight_layout() |
1143 | In·[117]:·plt.draw() | 1143 | In·[117]:·plt.draw() |
1144 | [_images/plotting_ways_to_use.png] | 1144 | [_images/plotting_ways_to_use.png] |
1145 | Here·the·output·is·the·same.·Since·the·data·is·1·dimensional·the·line·plot·was | 1145 | Here·the·output·is·the·same.·Since·the·data·is·1·dimensional·the·line·plot·was |
Max diff block lines reached; 4951/11378 bytes (43.51%) of diff not shown. |
Offset 498, 15 lines modified | Offset 498, 15 lines modified | ||
498 | </pre></div> | 498 | </pre></div> |
499 | </div> | 499 | </div> |
500 | </div> | 500 | </div> |
501 | <div·class="section"·id="plotting"> | 501 | <div·class="section"·id="plotting"> |
502 | <h2>Plotting<a·class="headerlink"·href="#plotting"·title="Permalink·to·this·headline">¶</a></h2> | 502 | <h2>Plotting<a·class="headerlink"·href="#plotting"·title="Permalink·to·this·headline">¶</a></h2> |
503 | <p>Visualizing·your·datasets·is·quick·and·convenient:</p> | 503 | <p>Visualizing·your·datasets·is·quick·and·convenient:</p> |
504 | <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> | 504 | <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> |
505 | <span·class="gh">Out[37]:·</span><span·class="go"><matplotlib.collections.QuadMesh·at·0x | 505 | <span·class="gh">Out[37]:·</span><span·class="go"><matplotlib.collections.QuadMesh·at·0xa129be68></span> |
506 | </pre></div> | 506 | </pre></div> |
507 | </div> | 507 | </div> |
508 | <img·alt="_images/plotting_quick_overview.png"·src="_images/plotting_quick_overview.png"·/> | 508 | <img·alt="_images/plotting_quick_overview.png"·src="_images/plotting_quick_overview.png"·/> |
509 | <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="plotting.html#plotting"><span·class="std·std-ref">Plotting</span></a>.</p> | 509 | <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="plotting.html#plotting"><span·class="std·std-ref">Plotting</span></a>.</p> |
510 | </div> | 510 | </div> |
511 | <div·class="section"·id="pandas"> | 511 | <div·class="section"·id="pandas"> |
512 | <h2>pandas<a·class="headerlink"·href="#pandas"·title="Permalink·to·this·headline">¶</a></h2> | 512 | <h2>pandas<a·class="headerlink"·href="#pandas"·title="Permalink·to·this·headline">¶</a></h2> |
Offset 304, 15 lines modified | Offset 304, 15 lines modified | ||
304 | ·······[0.787,·0.···,·1.199]]) | 304 | ·······[0.787,·0.···,·1.199]]) |
305 | Coordinates: | 305 | Coordinates: |
306 | ··*·x········(x)·int32·10·20 | 306 | ··*·x········(x)·int32·10·20 |
307 | Dimensions·without·coordinates:·y | 307 | Dimensions·without·coordinates:·y |
308 | *****·Plotting¶·***** | 308 | *****·Plotting¶·***** |
309 | Visualizing·your·datasets·is·quick·and·convenient: | 309 | Visualizing·your·datasets·is·quick·and·convenient: |
310 | In·[37]:·data.plot() | 310 | In·[37]:·data.plot() |
311 | Out[37]:·<matplotlib.collections.QuadMesh·at·0x | 311 | Out[37]:·<matplotlib.collections.QuadMesh·at·0xa129be68> |
312 | [_images/plotting_quick_overview.png] | 312 | [_images/plotting_quick_overview.png] |
313 | Note·the·automatic·labeling·with·names·and·units.·Our·effort·in·adding·metadata | 313 | Note·the·automatic·labeling·with·names·and·units.·Our·effort·in·adding·metadata |
314 | attributes·has·paid·off!·Many·aspects·of·these·figures·are·customizable:·see | 314 | attributes·has·paid·off!·Many·aspects·of·these·figures·are·customizable:·see |
315 | Plotting. | 315 | Plotting. |
316 | *****·pandas¶·***** | 316 | *****·pandas¶·***** |
317 | Xarray·objects·can·be·easily·converted·to·and·from·pandas·objects·using·the | 317 | Xarray·objects·can·be·easily·converted·to·and·from·pandas·objects·using·the |
318 | to_series(),·to_dataframe()·and·to_xarray()·methods: | 318 | to_series(),·to_dataframe()·and·to_xarray()·methods: |
Offset 146, 75 lines modified | Offset 146, 76 lines modified | ||
146 | ········"09038344":·4, | 146 | ········"09038344":·4, |
147 | ········"094":·22, | 147 | ········"094":·22, |
148 | ········"096":·22, | 148 | ········"096":·22, |
149 | ········"09705329":·4, | 149 | ········"09705329":·4, |
150 | ········"09t00":·6, | 150 | ········"09t00":·6, |
151 | ········"0alpha10":·36, | 151 | ········"0alpha10":·36, |
152 | ········"0c0dc80c25a9":·6, | 152 | ········"0c0dc80c25a9":·6, |
153 | ········"0c71a9942837":·26, | ||
153 | ········"0e8985178ccc":·26, | 154 | ········"0e8985178ccc":·26, |
154 | ········"0eb806e38f7f":·[14,·15], | 155 | ········"0eb806e38f7f":·[14,·15], |
155 | ········"0f41191e8013":·28, | 156 | ········"0f41191e8013":·28, |
156 | ········"0th":·[6,·22], | 157 | ········"0th":·[6,·22], |
157 | ········"0x0l":·36, | 158 | ········"0x0l":·36, |
158 | ········"0x | 159 | ········"0xa0551ad8":·36, |
159 | ········"0xe1ee2c88":·28, | ||
160 | ········"0x | 160 | ········"0xa0c16dc0":·28, |
161 | ········"0x | 161 | ········"0xa0c16ec8":·28, |
162 | ········"0x | 162 | ········"0xa11bfd78":·28, |
163 | ········"0x | 163 | ········"0xa129be68":·29, |
164 | ········"0xa1319a18":·28, | ||
165 | ········"0xa1319a48":·28, | ||
166 | ········"0xa1319a78":·28, | ||
167 | ········"0xa1319ad8":·28, | ||
168 | ········"0xa1319b38":·28, | ||
169 | ········"0xa13bf418":·28, | ||
170 | ········"0xa14d7970":·28, | ||
171 | ········"0xa14d7a18":·28, | ||
172 | ········"0xa14d7a30":·28, | ||
173 | ········"0xa152c2b0":·28, | ||
174 | ········"0xa1534a00":·28, | ||
175 | ········"0xa1534cb8":·28, | ||
176 | ········"0xa1542a30":·28, | ||
177 | ········"0xa1548568":·28, | ||
178 | ········"0xa1548688":·28, | ||
179 | ········"0xa16abfd0":·28, | ||
180 | ········"0xa1a1dbb0":·28, | ||
164 | ········"0x | 181 | ········"0xa1a20b98":·28, |
165 | ········"0x | 182 | ········"0xa1a20d78":·28, |
166 | ········"0x | 183 | ········"0xa1a20f88":·28, |
167 | ········"0xe209f9e8":·28, | ||
168 | ········"0xe209fa48":·28, | ||
169 | ········"0xe2148328":·28, | ||
170 | ········"0xe2148d00":·28, | ||
171 | ········"0xe2254478":·28, | ||
172 | ········"0xe2254598":·28, | ||
173 | ········"0xe22615c8":·28, | ||
174 | ········"0xe2261838":·28, | ||
175 | ········"0xe22618f8":·28, | ||
176 | ········"0xe2298ce8":·28, | ||
177 | ········"0xe22b31c0":·28, | ||
178 | ········"0xe22bebc8":·28, | ||
179 | ········"0xe22bef10":·28, | ||
180 | ········"0xe22cecb8":·28, | ||
181 | ········"0x | 184 | ········"0xa1a23508":·28, |
182 | ········"0x | 185 | ········"0xa1a2e190":·28, |
183 | ········"0x | 186 | ········"0xa1b85a00":·28, |
184 | ········"0x | 187 | ········"0xa1b85ca0":·28, |
188 | ········"0xa1b8cf70":·28, | ||
185 | ········"0x | 189 | ········"0xa1bc43e8":·28, |
186 | ········"0xe27b6cd0":·28, | ||
187 | ········"0xe2915610":·28, | ||
188 | ········"0xe291de50":·28, | ||
189 | ········"0xe291dec8":·28, | ||
190 | ········"0xe29532b0":·28, | ||
191 | ········"0x | 190 | ········"0xa1ec6be0":·28, |
191 | ········"0xa1f0f9e8":·26, | ||
192 | ········"0xa1f21298":·26, | ||
193 | ········"0xa1f214d8":·26, | ||
194 | ········"0xa1f21958":·26, | ||
192 | ········"0x | 195 | ········"0xa1f219e8":·26, |
196 | ········"0xa1f34910":·28, | ||
193 | ········"0xe2cb7418":·26, | ||
194 | ········"0xe2cb7538":·26, | ||
195 | ········"0xe2cb7928":·26, | ||
196 | ········"0xe2cb7a78":·26, | ||
197 | ········"0x | 197 | ········"0xa26baca0":·28, |
198 | ········"0xa26bae50":·25, | ||
199 | ········"0xa4829430":·28, | ||
200 | ········"0xa48afd30":·25, | ||
201 | ········"0xa48afe38":·25, | ||
202 | ········"0xa49351a8":·26, | ||
203 | ········"0xa497e7c0":·28, | ||
204 | ········"0xa4bc6ce8":·24, | ||
205 | ········"0xa50b1fb8":·7, | ||
206 | ········"0xa50ba370":·7, | ||
198 | ········"0x | 207 | ········"0xa51066e8":·28, |
199 | ········"0xe55b30b8":·28, | ||
200 | ········"0xe55b8b68":·25, | ||
201 | ········"0xe55b8c10":·25, | ||
202 | ········"0xe55e2ce8":·24, | ||
203 | ········"0xe5763d60":·28, | ||
204 | ········"0xe5863070":·28, | ||
205 | ········"0xe7fb1250":·28, | ||
206 | ········"0xe7fb6ef8":·7, | ||
207 | ········"0xe7fbd2b0":·7, | ||
208 | ········"0x | 208 | ········"0xa5133c88":·26, |
209 | ········"0x | 209 | ········"0xa8148eb0":·25, |
210 | ········"0xe865f7f0":·25, | ||
211 | ········"0xe8774418":·26, | ||
212 | ········"0x | 210 | ········"0xa83ffbf8":·16, |
211 | ········"0xb3024688":·28, | ||
212 | ········"0xb305b9a0":·28, | ||
213 | ········"0xb3075f88":·28, | ||
213 | ········"0x | 214 | ········"0xb41db820":·17, |
214 | ········"100":·[3,·4,·6,·11,·12,·22,·25,·26,·28,·31,·36], | 215 | ········"100":·[3,·4,·6,·11,·12,·22,·25,·26,·28,·31,·36], |
215 | ········"1000":·[6,·36], | 216 | ········"1000":·[6,·36], |
216 | ········"100000":·6, | 217 | ········"100000":·6, |
217 | ········"1000x1000":·6, | 218 | ········"1000x1000":·6, |
218 | ········"1003":·4, | 219 | ········"1003":·4, |
219 | ········"101":·[4,·22,·28,·36], | 220 | ········"101":·[4,·22,·28,·36], |
220 | ········"101985":·26, | 221 | ········"101985":·26, |
Offset 399, 15 lines modified | Offset 400, 14 lines modified | ||
399 | ········"1970":·[32,·36], | 400 | ········"1970":·[32,·36], |
400 | ········"198":·16, | 401 | ········"198":·16, |
401 | ········"199":·[16,·29], | 402 | ········"199":·[16,·29], |
402 | ········"1991":·36, | 403 | ········"1991":·36, |
403 | ········"1999":·4, | 404 | ········"1999":·4, |
404 | ········"19t00":·6, | 405 | ········"19t00":·6, |
405 | ········"1MS":·17, | 406 | ········"1MS":·17, |
406 | ········"1a13d624":·26, | ||
407 | ········"1c96aded89da":·10, | 407 | ········"1c96aded89da":·10, |
408 | ········"1d37fb2cd247":·24, | 408 | ········"1d37fb2cd247":·24, |
409 | ········"1d727aa86050":·28, | 409 | ········"1d727aa86050":·28, |
410 | ········"1e6":·4, | 410 | ········"1e6":·4, |
411 | ········"1st":·22, | 411 | ········"1st":·22, |
412 | ········"200":·[4,·16,·28,·31], | 412 | ········"200":·[4,·16,·28,·31], |
413 | ········"2000":·[4,·7,·17,·18,·22,·25,·26,·27,·34,·35,·36], | 413 | ········"2000":·[4,·7,·17,·18,·22,·25,·26,·27,·34,·35,·36], |
Max diff block lines reached; 4951/8975 bytes (55.16%) of diff not shown. |
Offset 4447, 15 lines modified | Offset 4447, 15 lines modified | ||
4447 | <li><p>New·<code·class="docutils·literal·notranslate"><span·class="pre">xray.Dataset.where</span></code>·method·for·masking·xray·objects·according | 4447 | <li><p>New·<code·class="docutils·literal·notranslate"><span·class="pre">xray.Dataset.where</span></code>·method·for·masking·xray·objects·according |
4448 | to·some·criteria.·This·works·particularly·well·with·multi-dimensional·data:</p> | 4448 | to·some·criteria.·This·works·particularly·well·with·multi-dimensional·data:</p> |
4449 | <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> | 4449 | <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> |
4450 | <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> | 4450 | <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> |
4451 | <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> | 4451 | <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> |
4452 | <span·class="gh">Out[46]:·</span><span·class="go"><matplotlib.collections.QuadMesh·at·0x | 4452 | <span·class="gh">Out[46]:·</span><span·class="go"><matplotlib.collections.QuadMesh·at·0xa0551ad8></span> |
4453 | </pre></div> | 4453 | </pre></div> |
4454 | </div> | 4454 | </div> |
4455 | <a·class="reference·internal·image-reference"·href="_images/where_example.png"><img·alt="_images/where_example.png"·src="_images/where_example.png"·style="width:·4in;·height:·4in;"·/></a> | 4455 | <a·class="reference·internal·image-reference"·href="_images/where_example.png"><img·alt="_images/where_example.png"·src="_images/where_example.png"·style="width:·4in;·height:·4in;"·/></a> |
4456 | </li> | 4456 | </li> |
4457 | <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> | 4457 | <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> |
4458 | for·finite·difference·calculations·along·a·given·axis.</p></li> | 4458 | for·finite·difference·calculations·along·a·given·axis.</p></li> |
4459 | <li><p>New·<code·class="docutils·literal·notranslate"><span·class="pre">xray.DataArray.to_masked_array</span></code>·convenience·method·for | 4459 | <li><p>New·<code·class="docutils·literal·notranslate"><span·class="pre">xray.DataArray.to_masked_array</span></code>·convenience·method·for |
Offset 2957, 15 lines modified | Offset 2957, 15 lines modified | ||
2957 | ····*·New·xray.Dataset.where·method·for·masking·xray·objects·according·to·some | 2957 | ····*·New·xray.Dataset.where·method·for·masking·xray·objects·according·to·some |
2958 | ······criteria.·This·works·particularly·well·with·multi-dimensional·data: | 2958 | ······criteria.·This·works·particularly·well·with·multi-dimensional·data: |
2959 | ······In·[44]:·ds·=·xray.Dataset(coords={"x":·range(100),·"y":·range(100)}) | 2959 | ······In·[44]:·ds·=·xray.Dataset(coords={"x":·range(100),·"y":·range(100)}) |
2960 | ······In·[45]:·ds["distance"]·=·np.sqrt(ds.x·**·2·+·ds.y·**·2) | 2960 | ······In·[45]:·ds["distance"]·=·np.sqrt(ds.x·**·2·+·ds.y·**·2) |
2961 | ······In·[46]:·ds.distance.where(ds.distance·<·100).plot() | 2961 | ······In·[46]:·ds.distance.where(ds.distance·<·100).plot() |
2962 | ······Out[46]:·<matplotlib.collections.QuadMesh·at·0x | 2962 | ······Out[46]:·<matplotlib.collections.QuadMesh·at·0xa0551ad8> |
2963 | ······[_images/where_example.png] | 2963 | ······[_images/where_example.png] |
2964 | ····*·Added·new·methods·xray.DataArray.diff·and·xray.Dataset.diff·for·finite | 2964 | ····*·Added·new·methods·xray.DataArray.diff·and·xray.Dataset.diff·for·finite |
2965 | ······difference·calculations·along·a·given·axis. | 2965 | ······difference·calculations·along·a·given·axis. |
2966 | ····*·New·xray.DataArray.to_masked_array·convenience·method·for·returning·a | 2966 | ····*·New·xray.DataArray.to_masked_array·convenience·method·for·returning·a |
2967 | ······numpy.ma.MaskedArray. | 2967 | ······numpy.ma.MaskedArray. |
2968 | ······In·[47]:·da·=·xray.DataArray(np.random.random_sample(size=(5,·4))) | 2968 | ······In·[47]:·da·=·xray.DataArray(np.random.random_sample(size=(5,·4))) |