Open gidden opened 2 years ago
I'm not sure how essential it is, but if you just compared strings in the line below rather than casting to Unit
first, the case where units are the same would just work (might cause other issues of course)
https://github.com/IAMconsortium/pyam/blob/de6b47bb1ea7e937ad32dc8a6c284beddca98685/pyam/_ops.py#L84
On the rest, having read the previous discussions, I leave this up to others
The irony of this happening today is not lost on me, but if you want an example of our non-SI shortcut falling over, have a look here (https://github.com/openscm/openscm-units/issues/36). The caveat I would put on this is that this is the first time in two years that we've been bitten by this, although our use cases are probably narrower than what you're doing.
Overview
When trying to do operations on emissions, e.g.,
we get an error as
standard unit conversion works fine, so we somehow have the capability to work with the emissions units
It seems that there was quite some discussion on
pyam
unit support in https://github.com/IAMconsortium/units/pull/19.Desired Outcome
I would argue that this is a situation where operations should "just work". In a worst case scenario, if I want to add two emissions time series with the same units, I shouldn't have to worry about units at all. In a best and ideal case scenario, we should leverage the power of pint to do the auto conversions as any other pint-dependent library.
So, I am wondering if we can lay out what are the pros and cons - and what are the options in terms of supporting such a feature.
@khaeru curious what you think as the units master =)
cc others who might be interested - @coroa @danielhuppmann @znicholls