See CHAIN MANUAL
The recommended approach is to clone this repository through git by running:
git clone --recurse-submodules --remote-submodules <repository-address>
When using this approach, the chaintools
repository is automatically included in the correct manner and there is no need to obtain it separately.
Alternatively, a copy of the code can be obtained by using the 'download' button.
In this case, the 'chaintools' folder is downloaded as an empty folder. This folder should be
replaced with the full chaintools
repository which has to be downloaded separately (this means that
the project should contain the folder chaintools/chaintools
, the lower of which contains an __init__.py
file).
To run the code, the user needs to set up a Python environment. We highly recommend using mamba or conda as your package manager, as this ensured that any required binaries are taken care of (this is not the case for the default Python package manager pip). Mamba and Conda also ensure that Python is available on the system, if this was not already the case.
The repository contains an environment.yml
file which can be used to set up a Python environment which contains all the relevant packages (and their correct versions) required to run
the code as intended.
To set up the virtual environment, the following command is run (conda
and mamba
may be used interchangably):
mamba env create -f <path_to_environment.yml>
The provided
environment.yml
files has references to the exact versions of packages used by the developers, which are not available under operating systems other than Ubuntu 20.04.6 LTS. In these cases, the less comprehensiveenvironment_light.yml
can be used instead. However, it should be stressed that this has not been tested extensively and may require some custom solutions.
This creates a virtual environment with the name 'seismic_source_model'.
The datafiles that are required as input into the modelchain are published at Zenodo
mamba activate seismic_source_model
python parse_input.py parser_config.yml
python calibrate_ssm.py ssm_calibration_config.yml
python forecast_ssm.py ssm_forecast_config.yml
Example config.yml
files are provided in example_configs
Licensed under the EUPL
Copyright (C) 2025 TNO