0 votes
33 views

Dear GD-Team,

I have noticed a discrepancy when calculating impacts via the openLCA Python IPC compared to the GUI, if the product system’s reference flow is in kWh in the GUI.

When running an LCIA in the GUI, results are scaled according to the reference flow unit (e.g. 1 kWh). However, when calling the calculation via the Python IPC, the results are returned in MJ (the internal ecoinvent energy unit) and are not automatically converted to kWh, even though the product system’s reference flow unit is set to kWh in the GUI.

Steps to reproduce:

Expected behavior:
When calculating via IPC, the impacts should be automatically normalized to the reference flow unit defined in the product system (kWh in this case), matching the GUI output.

Actual behavior:
Results are based on the internal MJ unit and are not scaled to the reference flow unit, causing differences of factor 3.6 for electricity datasets.

Workaround:
Manually multiply the IPC results by the MJ→kWh factor (3.6), or change the product system’s reference unit to MJ in the GUI before calculation.

Environment:

Would it be possible to ensure that IPC calculations respect the reference flow unit defined in the product system, so that results match the GUI without manual scaling?

Thanks in advance!

Alex

  1. Open a product system in the GUI that has a reference flow of 1 kWh (e.g. “market for electricity, medium voltage | DE” from ecoinvent).

  2. Calculate an LCIA result in the GUI – note the values (e.g. Climate change ≈ 0.41918 kg CO₂-eq).

  3. Run the same LCIA via the Python IPC:

  4. Compare results – IPC values are ≈ 3.6× smaller (MJ basis), even though the reference flow is 1 kWh in the GUI.

    • openLCA version: 2.5

    • Database: ecoinvent 3.11

ago in openLCA by (120 points)

1 Answer

+1 vote
ago by (2.7k points)
You probably need to assign the flow_property and unit in CalculationSetup otherwise it will use the default unit (MJ).
...