Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

degree celcius unit conflict with udunits2 #40

Closed
srstsavage opened this issue Dec 12, 2013 · 1 comment
Closed

degree celcius unit conflict with udunits2 #40

srstsavage opened this issue Dec 12, 2013 · 1 comment

Comments

@srstsavage
Copy link

In ucar.units.SI, the symbol for degrees celcius is specified as "Cel":

https://github.com/Unidata/thredds/blob/master/udunits/src/main/java/ucar/units/SI.java#L520

However, in the udunits2 xml files, the symbol is specified as "°C":

http:https://www.unidata.ucar.edu/software/udunits/udunits-2/udunits2-derived.xml

In addition, there is no alias defined in SI for "°C", so trying to parse "°C" with a ucar.units.StandardUnitFormat fails.

@semmerson
Copy link

Shane,

You're right. The C-based UDUNITS-2 package is more capable than the Java-based ucar.units package.

The ucar.units package needs to be enhanced. Unfortunately, I don't have the time to do that right now.

As a workaround, I've always recommended using completely spelled-out unit names rather than symbols. Yes, it's more verbose -- but it does lead to fewer problems and less confusion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants