Skip to main content

Xarray extension for unstructured grids

Project description

https://github.com/deltares/xugrid/raw/main/docs/_static/xugrid.svg

Xugrid

https://img.shields.io/github/workflow/status/deltares/xugrid/ci?style=flat-square https://img.shields.io/codecov/c/github/deltares/xugrid.svg?style=flat-square https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square

This is a work in progress. See documentation.

Xarray extension to work with 2D unstructured grids, for data and topology stored according to UGRID conventions.

Processing structured data with xarray is convenient and efficient. The goal of Xugrid (pronounced “kiss you grid” by visionaries 🗢 ) is to extend this ease to unstructured grids.

import matplotlib.pyplot as plt
import xugrid

# Get some sample data as a xugrid UgridDataArray
uda = xugrid.data.elevation_nl()

# Get a cross-section
section_y = 475_000.0
section = uda.ugrid.sel(y=section_y)

# Plot unstructured grid and cross section
fig, (ax0, ax1) = plt.subplots(figsize=(22.6, 10), ncols=2)
uda.ugrid.plot(ax=ax0, vmin=-20, vmax=90, cmap="terrain")
ax0.axhline(y=section_y, color="red")
section.plot(ax=ax1, x="x")
https://raw.githubusercontent.com/Deltares/xugrid/main/docs/_static/xugrid-demo.png

Installation

Install via conda from the conda-forge channel:

conda install -c conda-forge xugrid

Or from the Python Package Index:

pip install xugrid

Documentation

https://img.shields.io/github/workflow/status/deltares/xugrid/ci?style=flat-square

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xugrid-0.1.4.tar.gz (65.5 kB view details)

Uploaded Source

File details

Details for the file xugrid-0.1.4.tar.gz.

File metadata

  • Download URL: xugrid-0.1.4.tar.gz
  • Upload date:
  • Size: 65.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for xugrid-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b2bbb036d3cbbdf0aca8a7e8207a1f1b400674be788eba1c9667d97059632bd2
MD5 df866bbae7437d84cda427598ce07c7f
BLAKE2b-256 78395688ceff192bd2381b3782226d67a0080332d3ae928033633cc2b876e138

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page