Configuration¶
Eradiate’s configuration uses hierarchical settings. The settings configure various parts of the behaviour of the library, ranging from data handling to interpolation error handling. All settings have default values that can be customized by users in several ways, with descending priority:
Environment variables.
An
eradiate.tomloreradiate.ymlfile placed in the current working directory or higher.
Warning
Although it is permitted, modifying the configuration at runtime is discouraged. Settings are assumed immutable during a session and changing them might result in untested behaviour.
In addition to settings, Eradiate has a few environment configuration items that can only be set using environment variables:
ERADIATE_SOURCE_DIRIf set, this configuration item points to the directory where the local copy of the source code is cloned. In that case, Eradiate runs in development mode.
See also
The full configuration reference is available in the eradiate.config
reference documentation.
Example configuration file¶
The following example file lists all of Eradiate’s configuration variables. Note that the values used here do not necessarily correspond to the defaults.
## This is an example of configuration file for Eradiate.
## All settings below can be set using environment variables with the
## `ERADIATE_` prefix (e.g. the `progress` setting can be set with the
## `ERADIATE_PROGRESS` variable).
##
## The configuration module will look for a file named `eradiate.toml`
## in the current working directory, then walk up the file system until it finds
## one.
## -----------------------------------------------------------------------------
## CONFIGURATION STARTS HERE
## -----------------------------------------------------------------------------
## Default azimuth convention
## (see https://eradiate.readthedocs.io/en/stable/rst/user_guide/conventions.html#azimuth-definition-conventions)
azimuth_convention = "east_right"
## Progress information display
## (from least to most verbose: none, spectral_loop or kernel)
progress = "spectral_loop"
## Offline mode switch: if true, data download attempts will be suppressed
offline = false
## List of paths to always add to the file resolver
path = []
## Absolute path to downloaded data folder. The default is ~/.cache/eradiate/
data_path = "~/Downloads/eradiate/"
## Path to data registry URL
data_url = "https://eradiate-data-registry.s3.eu-west-3.amazonaws.com/registry-v1/"
[absorption_database.error_handling]
# This configuration ignores bound errors on pressure and temperature variables
# because this usually occurs at high altitude, where the absorption coefficient
# is very low and can be safely forced to 0.
p = { missing = "raise", scalar = "raise", bounds = "ignore" }
t = { missing = "raise", scalar = "raise", bounds = "ignore" }
# Ignore missing molecule coordinates, raise on bound error.
x = { missing = "ignore", scalar = "ignore", bounds = "raise" }