Xarray extension for unstructured grids
Project description
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")
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
Project details
Release history Release notifications | RSS feed
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.12.1.tar.gz
(162.2 kB
view details)
Built Distribution
xugrid-0.12.1-py3-none-any.whl
(132.5 kB
view details)
File details
Details for the file xugrid-0.12.1.tar.gz
.
File metadata
- Download URL: xugrid-0.12.1.tar.gz
- Upload date:
- Size: 162.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50b05e42dc6842a2a474cea685b04fec5a0c92fed0337fa22d4666d5e44dfb10 |
|
MD5 | 86a5656a23d053b79ca83031f3714892 |
|
BLAKE2b-256 | b76cce0746881007f244d830db55979a29a2c57764ed8b585efa429241b5ef3a |
File details
Details for the file xugrid-0.12.1-py3-none-any.whl
.
File metadata
- Download URL: xugrid-0.12.1-py3-none-any.whl
- Upload date:
- Size: 132.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 356eaf68698f0149fc44b7de6c25815cde815fecd81590db86afb9f7db6d4bcc |
|
MD5 | 61433a0bfb022523e30acb3bfbd775cc |
|
BLAKE2b-256 | 409360ebc65badf7024630d887f6aa9bd4f334716167ac6ee03a085bf936a4a1 |