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.0rc2.tar.gz (21.9 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.0rc2-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: icon4py_driver-0.2.0rc2.tar.gz
  • Upload date:
  • Size: 21.9 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.0rc2.tar.gz
Algorithm Hash digest
SHA256 eb9b2cf021d4c14cae1eec40d1233167c374aa3e3251d1fe2214a6d5559c5731
MD5 6e167bdc4aa803b7d7bc8e47a6e4e8e7
BLAKE2b-256 45f2f2a933b7f06dbb4e52713b7486828c64eac0ced544c706363f535e934b20

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for icon4py_driver-0.2.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 0ce508f4a9b13b2af5b1237bc0d36f2fdfcfd69f58d6126d648ba94e16c8162e
MD5 1b4d24ca0656293566b5384f4017e648
BLAKE2b-256 216e9cdb041b41e1804caab0ac34c3166fe47a1bfaeecebe9c2e3f7882b302f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for icon4py_driver-0.2.0rc2-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