Configuring ESM Archive¶
When run from either the command line or in library mode (note not as an
ESM Plugin), esm_archiving
can be configured to how it looks for specific
files. The configuration file is called esm_archiving_config
, should be
written in YAML, and have the following format:
echam: # The model name
archive: # archive seperator **required**
# Frequency specification (how often
# a datestamp is generated to look for)
frequency: "1M"
# Date format specification
date_format: "%Y%m"
By default, esm_archive
looks in the following locations:
- Current working directory
- Any files in the XDG Standard:
- https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
If nothing is found, the program reverts to the hard-coded defaults, found in
esm_archiving/esm_archiving/config.py
Note
In future, it might be changed that the program will look for an experiment
specific configuration based upon the path it is given during the
create
or upload
step.
Generating a configuration¶
You can use the command line switches --write_local_config
and
--write_config
to generate configuration files either in the current
working directory, or in the global directory for your user account defined by
the XDG standard (typically ~/.config/esm_archiving):
$ esm_archive --write_local_config
Writing local (experiment) configuration...
$ esm_archive --write_config
Writing global (user) configuration...