bird-house/finch

dap_subset.ipynb broken with upcoming Jupyter env on PAVICS

Closed this issue · 1 comments

tlvu commented

Description

Upcoming Jupyter env is the beta env on PAVICS.

AttributeError: module 'xarray.core.coordinates' has no attribute 'remap_label_indexers'

Environment

  • Finch version used, if any: current latest 0.9.3
  • Python version, if any:
  • Operating System:

Steps to Reproduce

http://jenkins.ouranos.ca/job/PAVICS-e2e-workflow-tests/job/new-docker-build/80/console

22:12:46  _________ finch-master/docs/source/notebooks/dap_subset.ipynb::Cell 2 __________
22:12:46  Notebook cell execution failed
22:12:46  Cell 2: Cell execution caused an exception
22:12:46  
22:12:46  Input:
22:12:46  # Use the `remap_label_indexers` function to convert coordinates to *positional* indexes.
22:12:46  import datetime as dt
22:12:46  coords = dict(lat=45, lon=290)
22:12:46  index, _ = xr.core.coordinates.remap_label_indexers(ds, coords, method="nearest")
22:12:46  
22:12:46  # The `nearest` method cannot be used with slices, so we do another call for the time period.
22:12:46  ti, _ = xr.core.coordinates.remap_label_indexers(ds, dict(time=slice("2060-01-01", "2064-12-30")))
22:12:46  
22:12:46  # Merge the spatial and temporal indices
22:12:46  index.update(ti)
22:12:46  index
22:12:46  
22:12:46  Traceback:
22:12:46  
22:12:46  ---------------------------------------------------------------------------
22:12:46  AttributeError                            Traceback (most recent call last)
22:12:46  Input In [3], in <cell line: 4>()
22:12:46        2 import datetime as dt
22:12:46        3 coords = dict(lat=45, lon=290)
22:12:46  ----> 4 index, _ = xr.core.coordinates.remap_label_indexers(ds, coords, method="nearest")
22:12:46        6 # The `nearest` method cannot be used with slices, so we do another call for the time period.
22:12:46        7 ti, _ = xr.core.coordinates.remap_label_indexers(ds, dict(time=slice("2060-01-01", "2064-12-30")))
22:12:46  
22:12:46  AttributeError: module 'xarray.core.coordinates' has no attribute 'remap_label_indexers'

Additional Information

Links to other issues or sources.

Addressed in #258