Metadata-Version: 2.4
Name: icon4py-common
Version: 0.2.0rc2
Summary: Shared code for the icon4py model.
Author-email: ETH Zurich <gridtools@cscs.ch>
License: BSD-3 License
Project-URL: repository, https://github.com/C2SM/icon4py
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: array-api-compat>=1.13.0
Requires-Dist: gt4py==1.1.10
Requires-Dist: packaging>=20.0
Requires-Dist: typing-extensions>=4.11.0
Requires-Dist: numpy>=1.23.3
Provides-Extra: all
Requires-Dist: icon4py-common[distributed,io]; extra == "all"
Provides-Extra: cuda12
Requires-Dist: cupy-cuda12x>=13.0; extra == "cuda12"
Requires-Dist: gt4py[cuda12]; extra == "cuda12"
Provides-Extra: cuda13
Requires-Dist: gt4py[cuda13]; extra == "cuda13"
Provides-Extra: distributed
Requires-Dist: ghex>=0.5.1; extra == "distributed"
Requires-Dist: mpi4py>=3.1.5; extra == "distributed"
Provides-Extra: io
Requires-Dist: cartopy>=0.22.0; extra == "io"
Requires-Dist: cftime>=1.6.3; extra == "io"
Requires-Dist: datashader>=0.16.1; extra == "io"
Requires-Dist: holoviews>=1.16.0; extra == "io"
Requires-Dist: netcdf4>=1.6.1; extra == "io"
Requires-Dist: numpy>=1.23.3; extra == "io"
Requires-Dist: scikit-learn>=1.4.0; extra == "io"
Requires-Dist: pymetis>2022.1; extra == "io"
Requires-Dist: uxarray==2024.3.0; extra == "io"
Requires-Dist: xarray[complete]<2026.4,>=2024.3.0; extra == "io"
Provides-Extra: rocm7
Requires-Dist: gt4py[rocm7]; extra == "rocm7"

# icon4py-common

## Description

Utilities shared by several ICON4Py components.

## Installation instructions

Check the `README.md` at the root of the `model` folder for installation instructions.

## Contents

### IO

module containing IO funcitonality for ICON4Py.

The IO module requires the installation of the `io` optional dependencies defined in [pyproject.toml](./pyproject.toml)
of the `icon4py-common` package and can be installed with the following command:

```bash
uv pip install .[io]
```

or even better by running:

```bash
uv sync --extra io  # or `uv sync --extra all` which includes everything
```

at the top-level folder of the repository, which installs all `ICON4Py` packages including the IO dependencies.

### Distributed run

The package `decomposition` contains infrastructure for parallel implementation of `icon4py/model`.
`icon4py` uses [GHEX](https://github.com/ghex-org/GHEX) for halo exchanges. In order to run in parallel
optional dependencies `mpi4py` and `ghex` need to be installed, which can be done through

```bash
uv sync --extra distributed  # or `uv sync --extra all` which includes everything
```

from the top-level folder of the repository.

### Grid

Contains basic infrastructure regarding the (unstructured) grid used in `icon4py`. There are
two implementations of the general grid a small simple grid with periodic boundaries in
[simple.py](src/icon4py/model/common/grid/simple.py) used for testing and the
ICON grid [icon.py](src/icon4py/model/common/grid/icon.py) both implement the same protocl.
The ICON grid can be initialized from an ICON grid file via the [grid_manager.py](src/icon4py/model/common/grid/grid_manager.py)
(THIS is still EXPERIMENTAL!!) or from serialized data.
The `grid_manager.py` needs netcdf as an optional dependency, which can be installed with

```bash
uv sync --extra io  # or `uv sync --extra all` which includes everything
```

from the top-level folder of the repository.

### interpolation

Contains interpolation stencils and port of interpolation fields in ICON.

### math

math utilities.

### states

contains type for the ICON prognostic state used by several packages.

### test_utils

Utilities used in tests made available here for usage in other packages
