Skip to main content

ICON model driver.

Project description

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,.

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

icon4py_driver-0.2.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.2.0-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: icon4py_driver-0.2.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.12

File hashes

Hashes for icon4py_driver-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bd5327473ddf200a03bd45410f1d63c394098c9988887af015ba2dff3fb35d03
MD5 e439ab7823d2027dd79e32800081fc3a
BLAKE2b-256 af97d89eee6f53e25504f19a9b44f0dce3fc38c96848e723078c397086d65762

See more details on using hashes here.

Provenance

The following attestation bundles were made for icon4py_driver-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: icon4py_driver-0.2.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.12

File hashes

Hashes for icon4py_driver-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b370c4b4ec19c48ae710ded6a826d950cb2ff32f12e3aa5cae5c4d3bb77b5662
MD5 89b7603b29b19a3546b81b80a9c5f177
BLAKE2b-256 0336171205b3a11ba6c18f55f10a8d5b685b7bb7feef7413dd9d9ab1fef05123

See more details on using hashes here.

Provenance

The following attestation bundles were made for icon4py_driver-0.2.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 Pingdom Monitoring Sentry Error logging StatusPage Status page