Pure Python generation of ICON-style triangular grids
Project description
ICON Grid Generator
Pure Python generation of ICON-style triangular grids.
The package provides spherical RxxByy grids, planar doubly periodic torus grids, limited-area grids extracted from generated global grids, and optional NetCDF export. It has no dependency on model runtimes or stencil frameworks.
Installation
From a local checkout:
python -m pip install -e .
Install optional NetCDF and xarray support with:
python -m pip install -e ".[netcdf,xarray]"
Usage
Generate a global spherical grid:
from grid_generator import GlobalGridSpec, generate_grid
grid = generate_grid(GlobalGridSpec(root=2, bisections=3))
print(grid.dims)
Generate a planar torus grid:
from grid_generator import TorusGridSpec, generate_grid
grid = generate_grid(TorusGridSpec(nx=32, ny=16, edge_length=1_000.0))
print(grid.metadata["grid_geometry"])
Extract a limited-area grid from a generated global parent:
from grid_generator import LimitedAreaGridSpec, generate_grid
spec = LimitedAreaGridSpec(
"R02B03",
lon_min=-20.0,
lon_max=20.0,
lat_min=35.0,
lat_max=60.0,
boundary_depth=2,
)
grid = generate_grid(spec, options={"max_cells": None})
For global grids, the compact RxxByy string remains available as shorthand:
grid = generate_grid("R02B03")
Write an ICON-style NetCDF file:
grid.to_netcdf("grid.nc")
NetCDF export requires the netcdf optional extra.
Release History
See CHANGELOG.md.
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
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.1.0.tar.gz.
File metadata
- Download URL: icon_grid_generator-0.1.0.tar.gz
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2dd6d1120ff7381638388caaec169c7eea87fb42bf52d7d0c2bd98c666d75ef
|
|
| MD5 |
b4c914f5277701c419f33b99717c23aa
|
|
| BLAKE2b-256 |
ec60447c256907f80c8c832fceadb2ffb528b0c8c2a4dab8df80b0f15a90d767
|
Provenance
The following attestation bundles were made for icon_grid_generator-0.1.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.1.0.tar.gz -
Subject digest:
b2dd6d1120ff7381638388caaec169c7eea87fb42bf52d7d0c2bd98c666d75ef - Sigstore transparency entry: 2071963284
- Sigstore integration time:
-
Permalink:
ofuhrer/icon-grid-generator@5533505e9d8119a93d0d228480007e749f94be96 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ofuhrer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5533505e9d8119a93d0d228480007e749f94be96 -
Trigger Event:
push
-
Statement type:
File details
Details for the file icon_grid_generator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: icon_grid_generator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bde18984b1f679dd63a69a0e9149f4cd39cde3f87ef48db44f8831e4ed359bae
|
|
| MD5 |
ed9a17a34ebc32293f8de44b599d91f1
|
|
| BLAKE2b-256 |
80d6904dcd141b53796ac261ce0d0e31d4e4dc4e27ffb4eca4608714f34e0b4a
|
Provenance
The following attestation bundles were made for icon_grid_generator-0.1.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.1.0-py3-none-any.whl -
Subject digest:
bde18984b1f679dd63a69a0e9149f4cd39cde3f87ef48db44f8831e4ed359bae - Sigstore transparency entry: 2071963332
- Sigstore integration time:
-
Permalink:
ofuhrer/icon-grid-generator@5533505e9d8119a93d0d228480007e749f94be96 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ofuhrer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5533505e9d8119a93d0d228480007e749f94be96 -
Trigger Event:
push
-
Statement type: