Skip to main content

Xarray extension for unstructured grids

Project description

https://img.shields.io/github/actions/workflow/status/deltares/xugrid/ci.yml https://img.shields.io/codecov/c/github/deltares/xugrid.svg https://img.shields.io/badge/code%20style-black-000000.svg https://zenodo.org/badge/DOI/10.5281/zenodo.10534099.svg

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 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="mesh2d_face_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/actions/workflow/status/deltares/xugrid/ci.yml?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.15.1.tar.gz (193.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xugrid-0.15.1-py3-none-any.whl (151.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xugrid-0.15.1.tar.gz
  • Upload date:
  • Size: 193.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for xugrid-0.15.1.tar.gz
Algorithm Hash digest
SHA256 7a8e9960f9edbc23f447f06ff71d46e4abc36f7868c3e4a398d253dcc9ed6ad1
MD5 c0f15e4651b92801a1321921e67da98d
BLAKE2b-256 b032d94efde87b42ac5eb5b6a675228184a6138a1c110b9417262f119d569e10

See more details on using hashes here.

File details

Details for the file xugrid-0.15.1-py3-none-any.whl.

File metadata

  • Download URL: xugrid-0.15.1-py3-none-any.whl
  • Upload date:
  • Size: 151.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for xugrid-0.15.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ddb69c74f3899bd2627c8248d98cf6a69b939042b88079b45fa868dd05ac4a13
MD5 c1cf2da80d9b7da740e369a5e0450136
BLAKE2b-256 e0697b1d9bc299445cf72d5abeada78a3f615f0c0e36ff0fbcceb3914dac3d73

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