Advanced openLCA IPC workflows
Control read/write scope, provenance, comparisons, scenarios, uncertainty, contribution analysis, and result lifecycle.
Start read-only when possible
from openlca_ipc import OLCAClient
with OLCAClient(port=8080, read_only=True) as client:
...Use a write-enabled client only when the workflow intentionally creates or changes database entities.
Capture provenance before interpretation
- openLCA version and active database
- openLCA IPC package/source version
- product-system identity and reference basis
- LCIA method identity
- reference amount
- parameter/scenario settings
- timestamp and result identity
CalculationContext can help preserve this information in structured automation workflows.
Compare systems under one controlled basis
compare_systems calculates two systems using the same method/reference amount and disposes intermediate results. Before interpreting differences, independently confirm functional equivalence, symmetric boundaries, compatible allocation/substitution rules, and appropriate data/methods.
Run parameter scenarios explicitly
Preserve parameter identity/scope, baseline value, tested values, units, and rationale. A scenario label by itself is not enough to reproduce the study.
Monte Carlo does not create missing uncertainty
run_monte_carlo samples uncertainty already encoded in the model. Record iteration count and the distributions/parameters behind the run.
Bound contribution trees and Sankey views
Use depth/share/node limits so upstream interpretation remains inspectable. Unexpected hotspots should trigger checks of providers, geography, units, allocation, and database choice.
Reproducible automation sequence
record environment/database
→ resolve and verify entities
→ freeze functional basis/method/parameters
→ calculate once
→ analyze the same live result
→ consistency checks
→ export result + context
→ dispose result
→ archive evidence and limitations