brightway-lca / brightway2-data

Tools for the management of inventory databases and impact assessment methods. Part of the Brightway LCA framework.
https://docs.brightway.dev/
BSD 3-Clause "New" or "Revised" License
8 stars 21 forks source link

Not possible to change unit of input exchanges #55

Closed aleksandra-kim closed 2 years ago

aleksandra-kim commented 6 years ago

Original report by giuseppe cardellini (Bitbucket: cardosan, GitHub: cardosan).


In a custom dataset it is not possible to give a unit to the input exchanges different than the one of the Activity input.

Take this example:

chips_name='wood_chips'
new_db[(new_db_name, chips_name)]= {'code':chips_name ,
 'database': new_db_name,
 'exchanges': [  {'amount': 1/dens, #we convert kg to m3 based on the wood  density
   'input': ('ecoinvent 3.2 cutoff', 'b6ac21e223c037d9306c884ca3b6c496'),  #we take the wood chips from ecoinvent which is in kilogram
   'output': (new_db_name, chips_name),  
   'name': 'wood chips, wet, measured as dry mass',
   'type': 'technosphere',
   'unit': 'cubic meter'},
 ],
 'location': 'RER',
 'name': chips_name,
 'type': 'process',
 'unit': 'cubic meter'}

the input exchange ('ecoinvent 3.2 cutoff', 'b6ac21e223c037d9306c884ca3b6c496') is in kg and I want to convert it to m3 but:

list(get_activity((new_db_name, chips_name)).exchanges())

[ Exchange: 0.002325581395348837 kilogram 'softwood forestry, mixed species, sustainable forest management' (kilogram, CH, None) to 'wood_chips' (cubic meter, RER, None)>]

The amount is changed correctly but the unit is not. I guess this is because bw2 looks for the unit of the Activity (of ecoinvent wood chips in this case).

cmutel commented 2 years ago

@cardosan The default backend does not support unit conversions, and I doubt there will be any progress on this until Brightway 3. Marking as wontfix.