Command line API

You can run the inference from the command line using the anemoi-inference run command.

You must first create a configuration file in YAML format. The simplest configuration must contain the path to the checkpoint:

checkpoint: inference-aifs-0.2.1-anemoi.ckpt

Then you can run the inference with the following command:

anememoi-inference run aifs.yaml

The other entries in the configuration file are optional, and will be substituted by the default values if not provided.

You can also override values by providing them on the command line:

anememoi-inference run aifs.yaml date=2020-01-01

The configuration below shows how to run the inference from the data that was used to train the model, by setting dataset entry to true:

checkpoint: inference-aifs-0.2.1-anemoi.ckpt
dataset: true
date: 2021-09-01

The configuration below shows how to provide run the inference for a checkpoint that was trained with one the ICON grid:

checkpoint: icon.ckpt
icon_grid: icon_grid_0026_R03B07_G.nc

env:
  ECCODES_PYTHON_USE_FINDLIBS: 1
  ECCODES_DEFINITION_PATH: definitions.edzw-2.31.0-2

See Run configuration for more details on the configuration file.

Warning

This is still work in progress, and content of the YAML configuration files will change and the examples above may not work in the future.