Configuration

Specifying Config Files

Finch uses Python’s configparser library for configuration. The default configuration can be found at src/finch/data/config/default.ini. You can provide a custom configuration file named finch.ini in the current working directory. Alternatively, you can specify the location of a custom configuration file via the CONFIG environment variable. A custom configuration file will overwrite the individual configuration options from the default configuration.

Config File Content

A finch config file is a standard .ini file. You can cross-reference variables with ${section:variable}. You can reference environment variables with the % prefix, which allows for standard bash substitutions.

Configurable Values

[global]

scratch_dir
Type:

string

Default:

%SCRATCH

The location of a fast file storage system.

tmp_dir
Type:

string

Default:

${scratch_dir}/tmp

A path to a directory for temporary files

log_dir
Type:

string

Default:

${scratch_dir}/logs

A path to a directory for log files

log_level
Type:

string, optional

Default:

None

Sets the log level for finch. This can be one of the levels from python’s logging library. This defaults to WARNING if debug_mode is disabled and DEBUG otherwise.

log_format
Type:

string

Default:

"[\%(levelname)s]: (\%(name)s): \%(message)s"

The format to use for logging, as documented in python’s logging library.

debug_mode
Type:

bool

Default:

%DEBUG

Toggles debug mode for finch. This sets the default log_level to DEBUG and runs finch on a local dask cluster instead of a SLURM cluster.

[data]

grib_definition_path
Type:

string

Default:

%GRIB_DEFINITION_PATH

The path to a grib definition. Multiple paths can be passed, separated by a colon (:).

input_store
Type:

string

Default:

${global:scratch_dir}/finch_store

The path to a directory which holds the input store for finch.

[experiments]

results_dir
Type:

string

Default:

${global:tmp_dir}/results

Warning

Deprecated. Will be moved to run configurations.

Path to a directory where experiment results are stored.

scaling_timeout
Type:

int

Default:

60

The timeout for waiting for worker startup in seconds, when scaling the dask cluster.

[evaluation]

dir
Type:

string

Default:

${global:scratch_dir}/finch_eval

Warning

Deprecated. Will be moved to run configurations.

Path to a directory where evaluation results are stored.

pref_report_dir
Type:

string

Default:

${dir}

Warning

Deprecated. Will be moved to run configurations.

Path to a directory where performance reports are stored.

plot_dir
Type:

string

Default:

${dir}

Warning

Deprecated. Will be moved to run configurations.

Path to a directory where plots are stored. If this is the same as dir, the plots will be stored in a separate experiment-specific directory inside the dir directory.

config_dir
Type:

string

Default:

${dir}

Warning

Deprecated. Will be moved to run configurations.

Path to a directory where experiment configurations are stored.

config_dir
Type:

string

Default:

${dir}

Warning

Deprecated. Will be moved to run configurations.

Path to a directory where experiment results are stored.

[brn]

grib_index_dir
Type:

string

Default:

${global:tmp_dir}

The path where grib index files for BRN experiments are stored and loaded.

[run]

config_path
Type:

string

Default:

finch_run_config.yaml

The path to a custom run configuration file.

debug_config_path
Type:

string

Default:

finch_debug_config.yaml

The path to a custom debug configuration file.