Grib-index Command

The grib-index command is used to create an index file for GRIB files. The index file is then used by the grib-index source.

The command will recursively scan the directories provided and open all the GRIB files found. It will then create an index file for each GRIB file, which will be used to read the data.

anemoi-datasets grib-index --index index.db /path1/to/grib/files /path2/to/grib/files

See Using a flavour for more information about GRIB flavours.

usage: anemoi-datasets grib-index [-h] --index INDEX [--overwrite]
                                  [--match MATCH] [--keys KEYS]
                                  [--flavour FLAVOUR]
                                  paths [paths ...]

Positional Arguments

paths

Paths to scan

Named Arguments

--index

Path to the index file to create or update

--overwrite

Overwrite the index file if it exists (default is to update)

Default: False

--match

Give a glob pattern to match files (default: *.grib)

Default: '*.grib'

--keys

GRIB keys to add to the index, separated by commas. If the list starts with a +, the keys are added to default list.

--flavour

GRIB flavour file (yaml or json)