intake / xrviz

Interactive visualisation interface for Xarrays
https://xrviz.readthedocs.io
BSD 3-Clause "New" or "Revised" License
105 stars 21 forks source link

Problem with dask arrays using jupyterlab #39

Closed jbusecke closed 5 years ago

jbusecke commented 5 years ago

First of all thanks a lot for this great tool! I can see this becoming a standard tool for quick exploratoin of nc file based data for me in the future.

I am working with very large ocean model files and would like to do initial quality control using xrviz. I am however not able to produce plots when my xarray data is in a dask.array (which is absolutely essential since my files can be several TB large, prohibiting me from loading them into memory).

I am currently using xrviz in jupyterlab on a remote cluster.

Trying this example does not plot anything:

import xarray as xr
from xrviz.dashboard import Dashboard

ds = xr.tutorial.open_dataset('air_temperature',
                              chunks={'lat': 25, 'lon': 25, 'time': -1})
dash = Dashboard(ds)
dash.panel

if I add .load() (loading the data into memory)

ds = xr.tutorial.open_dataset('air_temperature',
                              chunks={'lat': 25, 'lon': 25, 'time': -1}).load()

I get the expected behaviour.

I am not sure how I could further diagnose what is going wrong. Is there something about dash.panel that would differ from panel.show in this regard?

martindurant commented 5 years ago

Are you saying that the dask version works OK for you with show()?

jbusecke commented 5 years ago

I have to apologize. I had a version conflict (where the conda version superseeded the one installed from source).

It works nicely now that I fixed the version! Closing this.