Skip to content

OpenScienceComputing/hvplot-xugrid-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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")

About

Example notebooks for hvplot.xugrid trimesh plots of unstructured ocean model data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors