Configuring vortex#

The default behavior of vortex can be modified by altering the configuration. The configuration is a set of sections, which themselves are sets of key=value pairs.

The configuration can be modified using two functions:

The value of a specific key can be queried using config.from_config. It is also possible to print the entire configuration using config.print_config. If the current configuration was read from a file, the corresponding path can be read from the value of config.file.

[storage]
address = "ftp.domain.com"
>>> from vortex import config
>>> config.load_config("~/.vortex.d/vortex.toml")  # The default
>>> config.file
PosixPath('/home/user/.vortex.d/vortex.toml')
>>> config.from_config("storage", "address")
"ftp.domain.com"
>>> from_config("storage", "protocol")
ConfigurationError: Missing configuration key protocol in section storage
>>> config.set_config("storage", "protocol", value="ftp")
>>> config.print_config()
Section: storage
 ADDRESS: hendrix.meteo.fr
 PROTOCOL: ftp

Default configuration#

At import time, vortex tries to read configuration from a file vortex.toml in the current working directory.

If not found, vortex reads configuration from ~/.vortex.d/vortex.toml.

If the default configuration is not found, vortex is left unconfigured.

data-tree#

rootdir

The path to the root directory for the data tree. Can be absolute or relative to the current working directory.

Type: Abritrary string.

Default value: "$HOME/.vortex.d"

op_rootdir

The path to the root directory for the additional data tree used by special experiments oper and dble. If unspecified, vortex will only lookup data files in the local data tree, and remote data trees if they are specified.

Type: Arbitrary string.

Default value: None

storage#

The storage section of the configuration is used to configure access to a remote data tree, see Remote data trees.

address

The address of the server hosting a remote data tree.

Type: Arbitrary string.

`protocol

The protocol with which to communicate with the server hosting the remote data tree

Type: Arbitrary string

rootdir

The path to the root directory for the remote data tree. Can be absolute or relative to the user’s home directory on the remote machine.

Type: Arbitrary string.

Default value: "$HOME/.vortex.d"

op_rootdir

The path to an alternative data tree specific to the oper and dble special experiments.

Type: Arbitrary string.

Default value: storage:rootdir.

export_mapping

TODO

Type: boolean

Default value: false

usejeeves

TODO

Type: boolean

Default value: false

mpitool#

mpiname

Command name for the MPI launcher to use.

Values:

  • "mpirun": Standard MPI launcher on most systems: mpirun.

  • "srun": Slum’s srun launcher.

  • "openmpi": OpenMPI’s mpirun launcher.

  • "mpiauto": mpiauto proxy launcher.

  • "srun-ddt": Slurm’s srun launcher with support for the Arm Distributed Debugging Tool.

  • "openmpi-ddt": OpenMPI’s mpirun launcher with support for the Arm Distributed Debugging Tool.

Default: "mpirun"

mpilauncher

Path to the MPI launcher executable. Must be absolute.

If unspecified, the command name is inferred form the value of mpitool:mpiname and must be found in the shell’s command path.

Type: Arbitrary string.

Optional

mpiopts

Option flags to pass the MPI launcher command.

Type: Arbitrary string

Default value: ""

slurmversion

Slurm version

Type: Integer

mpienv#

This section defines environment variables that will be exported prior to running an MPI executable.

The section keys are arbitrary, and correspond to the name of the environment variables to be exported. The associated values correspond to the value to give the environment variable.

Attention

All values are strings.

nwp-tools#

lfi

Path to a directory containing the LFI commands such as lfi_copy or lfi_merge. The path should be absolute.

Type: Arbitrary string

odb

Path to a directory containing the create and merge “ioassign” commands. The path should be absolute.

iomerge_cmd

Name of the merge command.

Type: string

Default value: "merge_ioassign"

iocreate_cmd

Name of the create command.

Type: string

Default value: "create_ioassign"

fortran#

This section defines environment variables that will be exported prior to running a NWP model executable.

The section keys are arbitrary, and correspond to the name of the environment variables to be exported. The associated values correspond to the value to give the environment variable.

Attention

All values are strings.

ssh#

Some operations carried out by vortex require establishing a SSH connection with a remote machine. A common example is sending a request to a remote server from a compute node without network access. In such a case the request would be sent from another machine, through SSH.

sshcmd

Name of the SSH client executable.

Type: string

Default value: ssh

scp

Name of the SSH copy client executable.

Type: string

Default value: scp

sshopts

Options to pass the SSH client executable

Type: string

Default value: "" (empty string)

scpopts

Options to pass the SSH copy client executable

Type: string

Default value: "" (empty string)

Value for the above configuration options can be set for specific machine by specifying the configuration key as the option name (e.g. sshopts) followed by a regular expression matching the machine’s hostname, separated by a dot. When specifying options for one or more hostname pattern, a defaut configuration value must be declared using the default keyword (e.g. sshopts.default).

Attention

According to the TOML specification , special characters used in regular expressions, such as backslashes, must be escaped.

ecflow#

clientpath

Path to the EcFlow client executable.

Type: string

Default value: ecflow_client

sshproxy_wait

Default value: 6

sshproxy_wait

Default value: 2

sshproxy_retrydelay

Default value: 1

services#

cluster_names

A list of allowed cluster names, e.g ["belenos", "taranis"]