Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.33 KB

File metadata and controls

35 lines (24 loc) · 1.33 KB

hvplot-xugrid-examples

Example notebooks demonstrating interactive visualization of unstructured grid (UGrid) data using hvplot.xugrid — a new extension for hvPlot that adds .hvplot.trimesh() for xugrid UgridDataArray and UgridDataset objects.

Extra dimensions (time, depth layers) automatically become interactive slider widgets.

Notebooks

Notebook Description
FVCOM_xugrid.ipynb FVCOM coastal ocean model output — sea surface elevation and currents on an unstructured triangular mesh
STOFS_xugrid.ipynb STOFS (Storm Surge) model output — water levels on a large unstructured mesh with time sliders

Installation

conda env create -f environment.yml
conda activate hvplot-xugrid-examples
jupyter lab

This installs hvplot from the xugrid PR branch. Once the PR is merged, replace the pip install line with the released hvplot package.

Usage

import xugrid as xu
import hvplot.xugrid

ds = xu.open_dataset("your_ugrid_file.nc")
uda = ds["zeta"]  # UgridDataArray

# Plot with time slider
uda.hvplot.trimesh(rasterize=True, cmap="viridis", geo=True, tiles="OSM")