Metadata-Version: 2.1
Name: xugrid
Version: 0.1.10
Summary: Xarray extension for unstructured grids
Maintainer-email: Huite Bootsma <huite.bootsma@deltares.nl>
License: MIT
Project-URL: Home, https://github.com/deltares/xugrid
Project-URL: Code, https://github.com/deltares/xugrid
Project-URL: Issues, https://github.com/deltares/xugrid/issues
Keywords: mesh,ugrid,unstructured grid,xarray
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.7
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: pandas
Requires-Dist: numba
Requires-Dist: numba-celltree
Requires-Dist: numpy
Requires-Dist: pooch
Requires-Dist: scipy
Requires-Dist: xarray
Provides-Extra: all
Requires-Dist: geopandas ; extra == 'all'
Requires-Dist: matplotlib ; extra == 'all'
Requires-Dist: meshkernel ; extra == 'all'
Requires-Dist: netcdf4 ; extra == 'all'
Requires-Dist: pooch ; extra == 'all'
Requires-Dist: pygeos ; extra == 'all'
Requires-Dist: pyproj ; extra == 'all'
Requires-Dist: zarr ; extra == 'all'
Provides-Extra: docs
Requires-Dist: geopandas ; extra == 'docs'
Requires-Dist: matplotlib ; extra == 'docs'
Requires-Dist: meshkernel ; extra == 'docs'
Requires-Dist: netcdf4 ; extra == 'docs'
Requires-Dist: pooch ; extra == 'docs'
Requires-Dist: pygeos ; extra == 'docs'
Requires-Dist: pyproj ; extra == 'docs'
Requires-Dist: zarr ; extra == 'docs'
Requires-Dist: pydata-sphinx-theme ; extra == 'docs'
Requires-Dist: sphinx ; extra == 'docs'
Requires-Dist: sphinx-gallery ; extra == 'docs'


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

Xugrid
======

.. image:: https://img.shields.io/github/workflow/status/deltares/xugrid/ci?style=flat-square
   :target: https://github.com/deltares/xugrid/actions?query=workflows%3Aci
.. image:: https://img.shields.io/codecov/c/github/deltares/xugrid.svg?style=flat-square
   :target: https://app.codecov.io/gh/deltares/xugrid
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square
   :target: https://github.com/psf/black

**This is a work in progress.** `See documentation <https://deltares.github.io/xugrid/>`_.

Xarray extension to work with 2D unstructured grids, for data and topology
stored according to `UGRID conventions
<https://ugrid-conventions.github.io/ugrid-conventions>`_.

Processing structured data with xarray is convenient and efficient. The goal of
Xugrid (pronounced "kiss you grid" by `visionaries 🗢
<https://github.com/visr>`_ ) is to extend this ease to unstructured grids.

.. code:: python

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

.. image:: https://raw.githubusercontent.com/Deltares/xugrid/main/docs/_static/xugrid-demo.png
  :target: https://github.com/deltares/xugrid

Installation
------------

Install via conda from the conda-forge channel:

.. code:: console

  conda install -c conda-forge xugrid

Or from the Python Package Index:

.. code:: console

  pip install xugrid

Documentation
-------------

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