Running Steel Model Simulations Locally¶
This guide explains how to run the steel model simulation during local development and how to integrate new data sources into the simulation pipeline.
Quick Start (CLI)¶
After installing the Steel Model package, run a simulation from the command line:
run_simulation --start-year 2025 --end-year 2030
Common options:
--start-year/--end-year: define the scenario horizon.--master-excel: the master input workbook to prepare and run against (default: the packaged one, downloaded if needed).--log-level: control verbosity (INFO,DEBUG, etc.).--demand-scenario/--scrap-scenario: pick theScenariorows of the master Excel “Demand and scrap availability” sheet used for steel demand and for scrap availability (both default toBAU;--scrap-scenariofalls back to the demand scenario). Both are picked at run time from the workbook’s one preparation, which holds every scenario of the sheet; a name it lacks stops the run before it starts, with the names it holds.--run-name: human-readable run name shown in the interactive viewer titles (default: thesim_<timestamp>output directory name); a name that a run under the output directory already holds gets_2,_3and so on. The viewers themselves are described in Outputs and postprocessing.--enable-capacity-policy: switch on China’s capacity-replacement policy, which gates Chinese replacements and new builds on a national pool of retirement credits (off by default; needs the threeCapacity pool - …sheets in the master Excel).--credit-validity-years Ncaps how long a banked credit stays spendable (default: no expiry). Policy runs additionally writedata/policy/CSVs andplots/capacity_pool/charts, described in Outputs and postprocessing.--cbam-rebate: rebate the carbon already paid on exports leaving a carbon border region, mirroring the import charge (off by default; see Export rebates).
Each run writes its plots, CSVs and logs to a fresh sim_<timestamp>/ directory under --output-dir (default $STEELO_HOME/output), also linked as $STEELO_HOME/output_latest, and ends by writing the viewer/ files that the Scenario Viewer reads: open the run with steelo-viewer <run folder>. Review the Configuration guide for a comprehensive list of parameters and environment variables.
Custom Data Overview¶
To experiment with bespoke datasets:
Prepare files that conform to the schemas referenced in the configuration guide.
Point the CLI at your customised master Excel, for example:
run_simulation --master-excel ./my_data/master_input.xlsx
Inspect the generated outputs (plots, CSVs, logs) under the run’s
sim_<timestamp>directory, or open the run in the Scenario Viewer withsteelo-viewer.
Rerunning BOA for Baseload Power Prices¶
The model prices baseload power with LCOE files from BOA, the Baseload Optimisation Atlas. Without --boa-run it reads the default files that geo-data ships. To price power from a BOA run of your own, for example with another cost workbook or coverage, produce the run with steelo-boa-run and pass its name to run_simulation --boa-run.
steelo-boa-run runs BOA’s boa-lcoe command at the BOA release this version of steel-iq pins, in an environment of its own that uvx builds, so BOA’s dependencies never mix with steel-iq’s. It needs uv, which provides uvx; without it, the command stops and says how to install it. Every argument goes to boa-lcoe unchanged, and steelo-boa-run --help lists them.
# One BOA run per coverage
steelo-boa-run --coverage 0.85 0.95
# A custom cost workbook, under a cost-set name of its own
steelo-boa-run --input-file costs.xlsx --scenario my_costs --coverage 0.85
# Rerun the run behind the prepared data's default LCOE file, with its settings, under a new run label
steelo-boa-run --like $STEELO_HOME/data/outputs/GEO/baseload_lcoe/optimal_lcoe_wy2024_01MWkm2_cov0p85_2025_2060.nc --run default_rerun
# Check the arguments against the BOA data on disk, without preparing or computing anything
steelo-boa-run --coverage 0.85 --dry-run
The command relays BOA’s output and, unless it was a dry run, ends with the line to run next:
BOA_RUN=my_costs_<hash>
BOA_RUN_DIR=<BOA data root>/lcoe-only/my_costs_<hash>
Run the steel simulation with: run_simulation --boa-run my_costs_<hash>
Custom cost workbook:
--input-fileneeds a--scenarioname of its own, or the command stops, so the default cost data on this machine is never replaced. Later runs of that cost set can leave out--input-file: BOA keeps its prepared workbook. A cost set not prepared on this machine needs--input-file.Rerunning a promoted file:
--liketakes the cost set, weather year, coverage, load density, years and run name from the file; options given on the command line take precedence. It stops when the cost workbook on this machine is not the one the file was produced with; pass that workbook with--input-file. A file from another BOA version, such as geo-data’s default files, may need a new--run, as in the example.Run folders: BOA refuses, before any step, a run folder made by another BOA version, for another cost set, on another weather year or from another cost workbook; pass a new
--run.Dry run:
--dry-runprints each BOA step and checks the arguments against the BOA data on disk, without preparing data or computing, and names no run to simulate with.Where results go: under
$BOA_DATA_ROOT, else~/.boa.run_simulation --boa-run <name>looks the name up underlcoe-only/in the same root, so set$BOA_DATA_ROOTthe same way for both commands, or not at all.Disk and time: a full run from 2025 to 2060 takes about 75 minutes per coverage, and one weather year with five coverages needs about 60 GB under the BOA data root, of which the steel simulation reads only the promoted files, about 25 MB per coverage. Where the BOA data comes from says what the rest holds, what can be deleted, and why a run with other cost assumptions is faster. The first run also downloads BOA and its input data; later runs reuse what BOA has already prepared.
Years after the cost data: BOA holds a cost workbook’s last CAPEX year flat for any later investment year. The default cost data’s year columns run to 2100 but keep their 2050 CAPEX in every later year BOA covers, so its LCOE from 2051 on equals 2050’s. A custom workbook sets its own CAPEX for those years.
Client data: a custom cost workbook stays on this machine. Never upload or share it, and do not publish a promoted file built from it.
Running your own BOA scenario¶
Get the default cost workbook. Download
boa-cost-data-v0.1.zipand unzip it, or, after a firststeelo-boa-run, copyboa-cost-data-v0.1.xlsxfrom<BOA data root>/data/boa-cost-data/.Edit a copy, keeping every sheet and column name, since BOA reads them as they are. BOA’s cost data guide lists the sheets, their units and the checks BOA runs on them. The edited workbook stays on this machine.
Run BOA on it, under a cost-set name of its own:
steelo-boa-run --input-file my_costs.xlsx --scenario my_costs --coverage 0.85 0.9
Run the steel simulation with the run name the command prints, at a power mix whose coverage the BOA run includes:
run_simulation --boa-run my_costs_<hash> --power-mix "90% baseload + 10% grid"
Two points to keep in mind:
Coverage: the simulation reads the BOA run’s file for the coverage of its power mix, 85% unless
--power-mixnames another, so the BOA run must include that coverage.Command line only: the web interface does not take a BOA run yet; its runs price baseload power from geo-data’s default files.