xrviz
xrviz copied to clipboard
Incorrect time series plot when `extract along` passed in `initial_params`
Time series extraction works fine, however upon specifying the extract along
parameter in initial_params
it produces constant straight line graph.
For temporary basis, this problem could be solved by de-selecting and re-selecting the extract along
dimension, but it would be good to have a permanent solution.
Reproducible code:
import xarray as xr
from xrviz.dashboard import Dashboard
# open remote data with xarray
url = 'http://opendap.co-ops.nos.noaa.gov/thredds/dodsC/NOAA/LOOFS/MODELS/201907/glofs.loofs.fields.forecast.20190720.t06z.nc'
data = xr.open_dataset(url)
initial_params = {# Select Variable
'Variables': 'temp',
# Set Coords
'Set Coords': ['lat', 'lon'],
# Axes
'x': 'lon',
'y': 'lat',
'sigma': 'animate',
'extract along':'time',
# Style
'height': 300,
'width': 650,
'colorbar': True,
'cmap': 'Viridis',
# Projection
'is_geo': True,
'basemap': 'OSM',
'crs': 'PlateCarree',
'projection': 'Orthographic',
'crs params': "{'central_longitude': 0.0}",
'projection params': "{'central_longitude': -78, 'central_latitude': 43, 'globe': {'ellipse':'sphere'}}"
}
dash = Dashboard(data, initial_params=initial_params)
dash.panel
This might be due to improper sequence of initialisation of relevant events (not so sure).