common-definitions icon indicating copy to clipboard operation
common-definitions copied to clipboard

Unit of temperature contains special character

Open phackstock opened this issue 1 year ago • 6 comments

When recently updating a project to common-definitions I was surprised to see that we use °C as the unit of temperature instead of Celsius. I would advocate for using Celsius since it avoids using special characters. Would love to hear your thoughts @IAMconsortium/common-definitions-coordination.

phackstock avatar May 17 '24 11:05 phackstock

Agree, °C is difficult. We could use either K or Celsius

strefler avatar May 21 '24 07:05 strefler

I don't like Celsius alone because I think degree should somehow be part of the unit, but strongly discourage using °. I would prefer K as it is clean, short, the SI unit, used by the MAGICC reporting and also not prone to error (I was recently very surprised to the Mongolia's very low warming in high emission scenarios when I realized that was just average temperature of ~0.8°C.)

orichters avatar May 21 '24 07:05 orichters

One consideration is that this unit will be used as default in visualizations like the Scenario Explorer, so I'd keep something that is as intuitive as possible for a wide user group - so not K.

There is known issue in the ixmp package which made using °C a bit cumbersome, but this will be solved as we move to ixmp4. And unicode-problems should also be not a major concern in python/R/csv...

My personal preference here would be to only make changes when there is a strong case for it (which I don't quite see).

danielhuppmann avatar May 21 '24 13:05 danielhuppmann

I remember having some issues opening IIASA csv data files in Excel if they were written by some Linux system before (the units showed as \u00B0C or one times even \u00C2\u00B0C). So that is some concern.

And we already moved away from US$2010 (AR6 unit) to USD_2010to avoid special character issues, and$` is even part of ASCII.

orichters avatar May 21 '24 13:05 orichters

I remember having some issues opening IIASA csv data files in Excel if they were written by some Linux system before (the units showed as \u00B0C or one times even \u00C2\u00B0C).

This will be fixed with migrating to the ixmp4 infrastructure.

And we already moved away from US$2010 (AR6 unit) to USD_2010to avoid special character issues, and$` is even part of ASCII.

This was specifically changed to allow unit-conversion with the iam-units package (https://github.com/IAMconsortium/units), because the underlying pint package does not allow $. But I don't see why we would convert units regarding temperature.

danielhuppmann avatar May 21 '24 15:05 danielhuppmann

This will be fixed with migrating to the ixmp4 infrastructure.

Might be, on your side, but we always had issues in our mappings of REMIND to project variables with it that needed fixing. Might be similar for other people either working with the data or preparing submissions. I would be really happy if it ° went away. We had issues if files were written in ASCII format.

orichters avatar May 23 '24 08:05 orichters