If I change it to
coastline = gv.tile_sources.CartoDark(active_tools=["box_select"])
I got this image which has no map shown:
If changed to this one:
coastline = gv.tile_sources.CartoDark(active_tools=["box_select"]).opts(projection=ccrs.PlateCarree())
Similar thing:
Then, adding the selection leads to the same error:
Traceback (most recent call last):
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/backends/netCDF4_.py", line 104, in _getitem
array = getitem(original_array, key)
File "src/netCDF4/_netCDF4.pyx", line 4397, in netCDF4._netCDF4.Variable.__getitem__
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/netCDF4/utils.py", line 467, in _out_array_shape
c = count[..., i].ravel()[0] # All elements should be identical.
IndexError: index 0 is out of bounds for axis 0 with size 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/pyviz_comms/__init__.py", line 316, in _handle_msg
self._on_msg(msg)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/plotting/bokeh/callbacks.py", line 169, in on_msg
raise e
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/plotting/bokeh/callbacks.py", line 161, in on_msg
Stream.trigger(streams)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/streams.py", line 186, in trigger
subscriber(**dict(union))
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/plotting/plot.py", line 244, in refresh
raise e
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/plotting/plot.py", line 240, in refresh
self._trigger_refresh(stream_key)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/plotting/plot.py", line 257, in _trigger_refresh
self.update(key)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/plotting/plot.py", line 983, in update
item = self.__getitem__(key)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/plotting/plot.py", line 446, in __getitem__
self.update_frame(frame)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/plotting/bokeh/element.py", line 2449, in update_frame
subplot.update_frame(key, ranges, element=el)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/plotting/bokeh/element.py", line 1538, in update_frame
self._update_glyphs(element, ranges, self.style[self.cyclic_index])
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/plotting/bokeh/element.py", line 1445, in _update_glyphs
data, mapping, style = self.get_data(element, ranges, style)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/plotting/bokeh/raster.py", line 112, in get_data
img = element.dimension_values(i, flat=False)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/core/data/__init__.py", line 205, in pipelined_fn
result = method_fn(*args, **kwargs)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/core/data/__init__.py", line 1105, in dimension_values
values = self.interface.values(self, dim, expanded, flat)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/holoviews/core/data/xarray.py", line 375, in values
data = data.data
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/core/dataarray.py", line 625, in data
return self.variable.data
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/core/variable.py", line 347, in data
return self.values
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/core/variable.py", line 520, in values
return _as_array_or_item(self._data)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/core/variable.py", line 262, in _as_array_or_item
data = data.get() if isinstance(data, cupy_array_type) else np.asarray(data)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/numpy/core/_asarray.py", line 102, in asarray
return array(a, dtype, copy=False, order=order)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/core/indexing.py", line 701, in __array__
self._ensure_cached()
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/core/indexing.py", line 698, in _ensure_cached
self.array = NumpyIndexingAdapter(np.asarray(self.array))
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/numpy/core/_asarray.py", line 102, in asarray
return array(a, dtype, copy=False, order=order)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/core/indexing.py", line 671, in __array__
return np.asarray(self.array, dtype=dtype)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/numpy/core/_asarray.py", line 102, in asarray
return array(a, dtype, copy=False, order=order)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/core/indexing.py", line 572, in __array__
return np.asarray(array[self.key], dtype=None)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/numpy/core/_asarray.py", line 102, in asarray
return array(a, dtype, copy=False, order=order)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/coding/variables.py", line 70, in __array__
return self.func(self.array)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/coding/variables.py", line 217, in _scale_offset_decoding
data = np.array(data, dtype=dtype, copy=True)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/core/indexing.py", line 572, in __array__
return np.asarray(array[self.key], dtype=None)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/backends/netCDF4_.py", line 91, in __getitem__
return indexing.explicit_indexing_adapter(
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/core/indexing.py", line 863, in explicit_indexing_adapter
result = raw_indexing_method(raw_key.tuple)
File "/home/xin/miniconda3/envs/python38/lib/python3.8/site-packages/xarray/backends/netCDF4_.py", line 114, in _getitem
raise IndexError(msg)
IndexError: The indexing operation you are attempting to perform is not valid on netCDF4.Variable object. Try loading your data into memory first by calling .load().