Created
July 4, 2025 08:39
-
-
Save cmutel/bc1f7258f8de6b0282b432a13cbd5488 to your computer and use it in GitHub Desktop.
Consolidate LCIA methods for multiple database versions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bw2io as bi | |
import bw2data as bd | |
import bw2calc as bc | |
impact_category_39 = ( | |
'ecoinvent-3.9.1', | |
'ReCiPe 2016 v1.03, endpoint (E) no LT', | |
'total: natural resources no LT', | |
'natural resources no LT' | |
) | |
impact_category_310 = ( | |
'ecoinvent-3.10.1', | |
'ReCiPe 2016 v1.03, endpoint (E) no LT', | |
'total: natural resources no LT', | |
'natural resources no LT' | |
) | |
assert impact_category_39 in bd.methods | |
assert impact_category_310 in bd.methods | |
consolidated_method = bd.Method(( | |
'consolidated-3.9.1-3.10.1', | |
'ReCiPe 2016 v1.03, endpoint (E) no LT', | |
'total: natural resources no LT', | |
'natural resources no LT' | |
)) | |
consolidated_method.register( | |
unit=bd.Method(impact_category_39).metadata['unit'], | |
) | |
consolidated_method.write( | |
bd.Method(impact_category_39).load() + bd.Method(impact_category_310).load() | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment