bw2io.strategies.ecospold2
#
Module Contents#
Functions#
Create composite code from activity and flow names |
|
Delete exchanges that weren't linked correctly by ecoinvent. |
|
Delete technosphere which can't be linked due to ecoinvent errors. |
|
Drop biosphere exchanges which aren't used and are outdated |
|
|
If a multioutput process has one product with a non-zero amount, assign that product as reference product. |
|
Fix unreasonably high uncertainty values. |
|
|
Link internal technosphere inputs by |
|
Remove uncertainty from negative lognormal exchanges. |
|
Remove parameters which have no name. They can't be used in formulas or referenced. |
|
Remove coproducts with zero production amounts from |
|
Remove technosphere exchanges with amount of zero and no uncertainty. |
|
Make sure |
- bw2io.strategies.ecospold2.create_composite_code(db)[source]#
Create composite code from activity and flow names
- bw2io.strategies.ecospold2.delete_exchanges_missing_activity(db)[source]#
Delete exchanges that weren’t linked correctly by ecoinvent.
These exchanges are missing the “activityLinkId” attribute, and the flow they want to consume is not produced as the reference product of any activity. See the known data issues report.
- bw2io.strategies.ecospold2.delete_ghost_exchanges(db)[source]#
Delete technosphere which can’t be linked due to ecoinvent errors.
A ghost exchange is one which links to a combination of activity and flow which aren’t provided in the database.
- bw2io.strategies.ecospold2.drop_temporary_outdated_biosphere_flows(db)[source]#
Drop biosphere exchanges which aren’t used and are outdated
- bw2io.strategies.ecospold2.es2_assign_only_product_with_amount_as_reference_product(db)[source]#
If a multioutput process has one product with a non-zero amount, assign that product as reference product.
This is by default called after
remove_zero_amount_coproducts
, which will delete the zero-amount coproducts in any case. However, we still keep the zero-amount logic in case people want to keep all coproducts.
- bw2io.strategies.ecospold2.fix_unreasonably_high_lognormal_uncertainties(db, cutoff=2.5, replacement=0.25)[source]#
Fix unreasonably high uncertainty values.
With the default cutoff value of 2.5 and a median of 1, the 95% confidence interval has a high to low ratio of 20.000.
- bw2io.strategies.ecospold2.link_internal_technosphere_by_composite_code(db)[source]#
Link internal technosphere inputs by
code
.Only links to process datasets actually in the database document.
- bw2io.strategies.ecospold2.remove_uncertainty_from_negative_loss_exchanges(db)[source]#
Remove uncertainty from negative lognormal exchanges.
There are 15699 of these in ecoinvent 3.3 cutoff.
The basic uncertainty and pedigree matrix are applied rather blindly, and the can produce strange net production values. It makes much more sense to assume that these loss factors are static.
Only applies to exchanges which decrease net production.
- bw2io.strategies.ecospold2.remove_unnamed_parameters(db)[source]#
Remove parameters which have no name. They can’t be used in formulas or referenced.
- bw2io.strategies.ecospold2.remove_zero_amount_coproducts(db)[source]#
Remove coproducts with zero production amounts from
exchanges