Skip to main content

model driver for Python ICON port

icon4py_driver.py contains a simple python program to run the experimental ICON python port. So far the code mostly draws on serialized ICON data until we increasingly can initialize and run the model independently.

Currently, users need serialized data of the pre-computed metric and interpolation coefficients and grid to run the driver.

Currently, it does only diffusion and solve_nonhydro (dry atmosphere with no physics). The configuration for the granules and driver is hardcoded in icon4py_configuration.py. Time step, total integration time, number of substeps, and etc. can be configured there.

The code is meant to be changed and enlarged as we port new parts of the model.

It runs single node or parallel versions. For parallel runs the domain has to be decomposed previously through a full ICON run that generates the necessary serialized data. Test data for runs with 1, 2, 4 nodes are available.

Installation

See the general instructions in the README.md in the base folder of the repository.

Usage

export ICON4PY_ROOT=<path to the icon4py clone>
icon4py_driver $ICON4PY_ROOT/testdata/ser_icondata/mpitask1/mch_ch_r04b09_dsl/ser_data --run_path=$ICON4PY_ROOT/output

The driver code runs in parallel, in order to do this you need to install the optional communication libraries with:

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

then run

mpirun -np 2 icon4py_driver $ICON4PY_ROOT/testdata/ser_icondata/mpitask2/mch_ch_r04b09_dsl/ser_data --mpi=True --run_path=$ICON4PY_ROOT/output --grid_root=4 --grid_level=9 --experiment_type=any

Remarks

  • First (required) arg is the folder where the serialized input data is stored. In the example above, the path is where the data is put when downloaded via the unit tests (the url can be found in datatest_utils.py. You can also generate your own serialized data and put it in an arbitrary folder.
  • Parallel runs are possible if corresponding data is provided, which is currently available for test with 2 or 4 MPI processes: check datatest_fixtures.py for download urls. However, parallel runs are not yet fully tested.
  • Please use the command icon4py_driver --help for information on the remaining optional arguments,.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

icon4py_driver-0.3.0.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

icon4py_driver-0.3.0-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file icon4py_driver-0.3.0.tar.gz.

File metadata

  • Download URL: icon4py_driver-0.3.0.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for icon4py_driver-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ff8e94d4e1a6b1ee93ff8220545e754e797701dada42f94c77ad68f2f7aca565
MD5 e4cd95caca47a52c3f55daa2d7d4a989
BLAKE2b-256 edd2a664ddbdd7a9722a26f38c85ada396a86a4070cf39fd4d7b8ffa859365cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for icon4py_driver-0.3.0.tar.gz:

Publisher: pypi-deploy.yml on C2SM/icon4py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file icon4py_driver-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: icon4py_driver-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for icon4py_driver-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0925da5339a218ed355f3a35896dc66704bf33c6abacaf20bd1a6a886111970b
MD5 69524bffc9461a7946c761a4fb5a92eb
BLAKE2b-256 626f7053ac27eb38fd0904da803a93dc141128dc00aace476ab522850c2cac5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for icon4py_driver-0.3.0-py3-none-any.whl:

Publisher: pypi-deploy.yml on C2SM/icon4py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page