ICON Grid Generator
Pure Python generation of ICON-style triangular grids.
ICON Grid Generator creates spherical ICON R<n>B<k> grids, planar triangular
grids, limited-area extracts, and ICON-style NetCDF files without depending on
ICON model runtimes or stencil frameworks.
Quick Start
from grid_generator import generate_grid
grid = generate_grid("R2B4")
print(grid.name)
print(grid.dims)
grid.to_netcdf("icon_grid_R02B04.nc")
R02B04
{'cell': 20480, 'vertex': 10242, 'edge': 30720}
Global grids are optimized by default. Pass optimize_global=False only when
raw bisection geometry is required for diagnostics or comparisons.
What You Can Generate
- Global spherical ICON grids from standard
R<n>B<k>names. - Planar triangular torus, channel, parallelogram, stretched, and ragged grids.
- Limited-area grids extracted from generated global parents.
- Region-based cuts of existing spherical or planar grids.
- ICON-style NetCDF files and complete in-memory xarray datasets.
- Geometry, topology, metric, refinement, diagnostic, and visualization data.
Installation
Python 3.10 or newer is required. Install acceleration plus the common NetCDF and xarray support from PyPI with:
python -m pip install "icon-grid-generator[accelerate,netcdf,xarray]"
The base package still depends only on NumPy and can instead be installed with
python -m pip install icon-grid-generator. That path is correct and
deterministic, but its NumPy fallback is not practical for high-resolution
global grids. Install the accelerate extra to enable the measured Numba path;
accelerator="auto" selects it automatically for sufficiently large work.
Performance
Optimized global grids were measured on an exclusive dual-socket AMD EPYC 7713 node with 128 physical cores (256 hardware threads) and about 446 GiB of scheduler-visible memory. Python 3.11, NumPy 2.4.6, Numba 0.66, and 128 Numba threads were used. Times are single runs and storage is uncompressed ICON-style NetCDF; shared-filesystem write time varies with load.
| Grid | Cells | Generation | Peak RSS | Retained arrays | NetCDF storage |
|---|---|---|---|---|---|
R2B8 |
5,242,880 | 56.5 s | 4.35 GiB | 3.01 GiB | 4.09 GiB |
R2B9 |
20,971,520 | 2.02 min | 16.57 GiB | 12.03 GiB | 16.37 GiB |
R2B10 |
83,886,080 | 6.13 min | 64.85 GiB | 48.13 GiB | ~65.5 GiB |
R2B11 |
335,544,320 | 37.10 min | 255.87 GiB | 192.50 GiB | 261.88 GiB |
The R2B11 file was written and validated in another 8.52 minutes, for a
45.83-minute end-to-end run. Install accelerate, set max_cells=None, and
leave accelerator="auto" or select "numba" explicitly for this scaling
regime. See Performance and Scaling
for methodology, caveats, and the main remaining bottlenecks.
Documentation
The complete documentation is published at ofuhrer.github.io/icon-grid-generator:
Development
See CONTRIBUTING.md for setup and contribution guidance. Run the complete local check with:
python -m pip install -e ".[accelerate,test,docs,netcdf,xarray]"
make check
make perf-check
Citation
If you use ICON Grid Generator in published work, cite it using CITATION.cff.
License
ICON Grid Generator is distributed under the BSD 3-Clause License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file icon_grid_generator-0.5.0.tar.gz.
File metadata
- Download URL: icon_grid_generator-0.5.0.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32c7e205e7372ac88bfa72f04f16818b3ffae4917a76adfa306f91a3f51bba41
|
|
| MD5 |
927f1cee880bb87c9d338b95512cfdfe
|
|
| BLAKE2b-256 |
56caa1d1c8e3069050aecc210f38ceeedc19f190a978747c62a24ddddb043e22
|
Provenance
The following attestation bundles were made for icon_grid_generator-0.5.0.tar.gz:
Publisher:
release.yml on ofuhrer/icon-grid-generator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
icon_grid_generator-0.5.0.tar.gz -
Subject digest:
32c7e205e7372ac88bfa72f04f16818b3ffae4917a76adfa306f91a3f51bba41 - Sigstore transparency entry: 2389743041
- Sigstore integration time:
-
Permalink:
ofuhrer/icon-grid-generator@0343c18cae355014babeca24e49174b05c4b7319 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/ofuhrer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0343c18cae355014babeca24e49174b05c4b7319 -
Trigger Event:
push
-
Statement type:
File details
Details for the file icon_grid_generator-0.5.0-py3-none-any.whl.
File metadata
- Download URL: icon_grid_generator-0.5.0-py3-none-any.whl
- Upload date:
- Size: 74.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f11b2a0cfdf6c8b8075fe92dff61c09b64f4a6b19b90b8c814c6b8e3494dff68
|
|
| MD5 |
6b30c2295491f65b1e5ff8c94deb68b7
|
|
| BLAKE2b-256 |
fa51ab87ecd29c3bf1ffeadeae9fad5603966cb172ba70ce3588812d8f689e67
|
Provenance
The following attestation bundles were made for icon_grid_generator-0.5.0-py3-none-any.whl:
Publisher:
release.yml on ofuhrer/icon-grid-generator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
icon_grid_generator-0.5.0-py3-none-any.whl -
Subject digest:
f11b2a0cfdf6c8b8075fe92dff61c09b64f4a6b19b90b8c814c6b8e3494dff68 - Sigstore transparency entry: 2389743097
- Sigstore integration time:
-
Permalink:
ofuhrer/icon-grid-generator@0343c18cae355014babeca24e49174b05c4b7319 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/ofuhrer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0343c18cae355014babeca24e49174b05c4b7319 -
Trigger Event:
push
-
Statement type: