brightway-lca / brightway2-io

Importing and exporting for the Brightway LCA framework
BSD 3-Clause "New" or "Revised" License
26 stars 40 forks source link

Unit conversion from liters to m3 not applied #210

Closed guidoca closed 1 year ago

guidoca commented 1 year ago

I've been trying a simple example from: https://github.com/massimopizzol/advanced-lca-notebooks/blob/main/Course-material/1-Simple-LCA.ipynb

adding an ecoinvent exchange (which uses m3 as default unit) with "l" or "liter" as units. In any case, when running the LCA, it seems to not apply the conversion and assumes that the value is in m3.

Checking the units.py function, i can see that the unit conversion line from litres to cubic metre was commented out, maybe this is the problem? https://docs.brightway.dev/en/latest/_modules/bw2io/units.html

(I tried with other units as for mass, as using "t" for tons", and I noticed it still assumes everything is in "kg", same with supplying electricity production processes in MJ instead of kWh, assumes the value is in kWh)

image

cmutel commented 1 year ago

@guidoca Hi! Thanks for this helpful error report.

Currently Brightway doesn't support unit conversions. This is a lot of work to get right, and no one has volunteered to do it, so it's not there. Users need to make sure their exchange values are in the correct units. You can either do the conversion yourself, or insert a proxy process in the middle to do the unit conversion for you.