STEP (Short-Term Earthquake Probability) is a Java-based application that generates earthquake forecasts using catalog data. The system can be run either directly on a host machine or via Docker.
input/step_config.yaml: Main configuration file for forecast parametersSTEP/run.py: Main execution scriptSTEP/params_handler.py: Python script that updates STEP parameters from configSTEP/catalog_handler.py: Python script for processing earthquake catalogsSTEP/OpenSHA/: Core application directory containing Java classes and libraries
-
input/step_config.yaml: Contains primary settings for:- Data paths and file locations
- Catalog date ranges
- Magnitude thresholds
- Forecast parameters
- Grid specifications
-
input/defaults_template.properties: Contains default application settings, and is handled internally bySTEP/params_handler.py
The system accepts earthquake catalogs in two formats:
-
Input CSEP ascii Format:
- Columns: longitude, latitude, magnitude, origin_time, depth, cat_id(optional), event_id(optional)
- Time format: ISO format (e.g., "2023-07-03T10:25:00.000Z")
-
STEP Format (converted automatically by modify_catalog.py):
- Space-separated values
- Format: longitude latitude year month day magnitude hour minute second depth 0 0 0 publicid
- Example: 175.234 -41.123 2023 7 3 4.5 10 25 0.0 12.5 0 0 0 2023p123456
The modify_catalog.py script handles:
- Converting from CSV to STEP format
- Filtering events based on:
- Geographic bounds
- Magnitude thresholds
- Depth constraints
- Output filename format: Cat_YYYY-MM-DD-HH-MM_STEP.txt (based on latest event in catalog)
-
Install python<=3.11 and system dependencies:
sudo apt-get update && sudo apt-get install -y --no-install-recommends gmt openjdk-8-jre tcsh ant -
Setup virtual environment and install STEP package
python -m venv venv source venv/bin/activate pip install -e .
-
Configure the forecast in
step_config.yaml. Paths must be either relative to wherestep_config.ymlis located or absolute:paths: data_dir: ./ catalog_file: catalog.csep # located in ./input bg_rates: NZZeroRate05.dat # located in ./input output_dir: ../forecasts/ output_file: NGSTEP_90days.txt catalog: start_date: "2016-09-23T13:00:00" end_date: "2018-05-07T00:00:00" min_magnitude: 3.0 max_magnitude: 8.0 delta_magnitude: 0.1 forecast: length_days: 90 min_magnitude: 5.0 region_code: 90 parameters: a_value: -1.59 b_value: 1.03 p_value: 1.07 c_value: 0.04 grid: spacing: 0.05 precision: 0.01 anchor: 0.0 cutoff: 0.5 bounds: lat_min: -43.5 lat_max: -40.7 lon_min: 171.7 lon_max: 175.5
-
Execute the forecast:
run
which will use
input/step_config.yml. Alternatively, a specific configuration file can be passed as:run config.yml
Install the Docker engine for your distribution
-
Build the Docker image:
docker build \ --build-arg USER_UID=$(id -u) \ --build-arg USER_GID=$(id -g) \ -t step-model .
-
Run the container:
docker run --rm \ -u $(id -u):$(id -g) \ -v "$PWD/input:/app/input" \ -v "$PWD/forecasts:/app/forecasts" \ step-model
The system generates several output files in the forecasts/ directory:
NGSTEP_90days.txt: Main forecast output file
.
├── Dockerfile
├── runSTEP.sh
├── step_config.yaml
├── Update_parameters.py
├── ModifyCatalog.py
└── STEP/
└── OpenSHA/
├── build/
│ ├── lib/
│ └── bin/
└── config/
├── params_handler.py
├── catalog_handler.py
└── run.py
- commons-httpclient.jar
- commons-logging.jar
- commons-math-1.1.jar
- dom4j.jar
- jargs.jar
- jquakeml-1.0.1-2.0.1-RC1.jar
- log4j-1.2.4.jar
- step-aftershock.jar
- Java Runtime Environment
- Python 3.x (for parameter updates and catalog processing)
- GMT (for visualization)