Prospective LCA models a product as it will be manufactured in the future, not as it is today. One of the biggest variables is the electricity grid. A product made in 2035 will draw on a different generation mix than one made in 2025, and that difference affects every process in the supply chain that uses electricity.
The challenge with ecoinvent is that electricity mix shares are hard-coded as fixed numeric values inside each market process. The GB high-voltage market, for example, has separate input exchanges for nuclear, gas, wind, solar, and so on, each with a fixed amount representing the current generation share. Those fixed values sit deep in the supply chain: every process that consumes electricity, and every process that feeds into those processes, carries the same base-year grid.
Changing the foreground electricity is straightforward. Changing the background is the problem. The steel your product uses was made with electricity. The chemicals in that steel were made with electricity. The transport fuels were refined with electricity. All of it uses the same fixed market processes, and there are thousands of them across the ecoinvent database.
What the script does
elec_parameterise.py opens every standard electricity market and market group process in the database (high, medium, and low voltage, but not specialist ones like aluminium production) and converts each fixed input amount into a named local parameter. The original value becomes the parameter default, so the database calculates identically until you choose to override something.
Each parameter is named by convention: market[_group]_[ISO code]_[technology]_[unit]. For example, market_gb_nuclear_pressure_water_reactor_kwh controls the nuclear share of the GB high-voltage market. The ISO country code comes from the process’s location field in the database, not from parsing the name string.
The script saves two output files: a CSV listing every parameter it created (with values, flows, and providers), and a text log of the full run.
Running the script
The script needs openLCA running with the IPC server on port 8080, and Python with olca-ipc installed.
B280_olca_elec_parameterise.py
It runs in two phases. First, it edits five processes and prints full details so you can check the parameter names look right. Then, on confirmation, it processes the rest with a progress bar. The full run takes a while on a large ecoinvent database, so give it time.
Exchanges that already have a formula are skipped, so the script is safe to re-run if it gets interrupted.
Run this on a copy of your database. The edits are irreversible through the IPC interface.
Using the parameters for prospective scenarios
Once the markets are parameterised, the output CSV gives you every parameter name and its current value. To model a future grid, create a scenario CSV with your projected generation shares for the countries relevant to your analysis, and run it with B280_olca_scenarios.py.
The scenario calculations article in this knowledge base covers the mechanics of running scenario CSVs through openLCA. The process is the same here: define the parameter values in columns, one column per scenario, and the script handles the ParameterRedef injection into CalculationSetup.
Because the parameters sit on the market processes themselves, a scenario with a decarbonised 2035 GB grid will affect every background process that draws on GB electricity, not just the foreground. That said, this adjusts the electricity generation shares in the matched market processes. The underlying provider datasets, non-electricity background technologies, and all other supply chain processes remain unchanged. For full database-level prospective transformation (updated technology efficiencies, fuel chains, and internally consistent IAM scenario assumptions), tools like premise operate at a different level. Electricity-mix parameterisation is a practical middle ground when grid decarbonisation is the dominant variable in your study.
Where the data comes from
The script parameterises the structure. It does not provide future electricity mix data. You need to source projected generation shares yourself. Common sources include national grid operators’ future energy scenarios (National Grid ESO for the UK, for example), the IEA World Energy Outlook, or academic studies projecting grid decarbonisation pathways for specific countries.
The output CSV gives you the parameter names and current values. From there, it is a data-gathering exercise to build the scenario columns for whichever future you want to model.
Source code
The script is open source on GitHub: Below280 openLCA IPC Tools
The README covers installation, the parameter naming convention in detail, and links back to the other scripts in the repository.
If you need help with prospective LCA modelling, or you are interested in our openLCA training, get in touch.
