units icon indicating copy to clipboard operation
units copied to clipboard

Add non-greenhouse gas emission species

Open danielhuppmann opened this issue 1 year ago • 1 comments

While working on some sanity-checks for the new IAMC project templates, I realized that several emissions species are relevant for IAM reporting but are not included in the list of emissions - because they are not greenhouse gases.

I suggest to add them anyway here so that pyam and a unit-validation-schema can directly build on ism-units (instead of requiring a separate solution).

I was trying to use the following line to check whether a unit like "Mt BC/yr" is valid.

iam_units.emissions.pattern.split(unit)

This fails for the following emissions species: BC, CO, NH3, NO2, OC, SO2, VOC, HFC43-10

Of course, trying to convert them using GWP should (continue to) fail.

Any objections @khaeru @phackstock?

danielhuppmann avatar Feb 15 '24 13:02 danielhuppmann

Sure, this seems safe to do. A clean way would be to extend SPECIES with:

  1. One element "\w+" that should cover most cases without the need for future fiddling.
  2. Additional elements like "HFC43-10" where they contain characters used elsewhere in the regex.

That would result in the constructed pattern looking and working something like this: https://regex101.com/r/pQ2Kf3/1

~Note that the order of (1) and (2) matters.~ Maybe it doesn't, but please check.

Please also add a comment above these two elements at the bottom of the list to explain the distinction.

khaeru avatar Feb 16 '24 12:02 khaeru