intake / xrviz

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

Data disappears with `global_extents=true` #61

Closed hdsingh closed 4 years ago

hdsingh commented 4 years ago

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
hdsingh commented 4 years ago

I works fine, I think i was doing something wrong.