-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pint parses "celsius" but not "Celsius" #1081
Comments
Hmm, very interesting. From udunits, the following are allowed: From pint, the following are allowed: It looks like It also looks like MetPy will be parsing fewer CF-compliant files unless we enhance pint to include all the udunits, right @dopplershift ? |
Uppercase https://www.nist.gov/pml/weights-and-measures/writing-metric-units |
@rsignell-usgs udunits also lists "degree_kelvin" and friends, which is an abomination against nature. 😉 But yes, there does seem to be quite a bit of departure between Pint and udunits; we'll want to do something about that in MetPy, but we don't need to belabor that here. Just one point I want to throw out is that literally every mention in the NIST docs says "degrees Celsius"--never "celsius" by itself (or "Celsius temperature"). I'm not convinced that NIST would even sanction leaving off the degrees. Just food for thought (which wouldn't help fix my problem). Regardless, the question of whether the lack of "Celsius" is an omission or otherwise a bug has been answered as definitively no. |
Just as a historical note, let me say that I think that adhering strictly (or at least as strictly as I could) to NIST and BIPM instead of making it straight forward for every community to use pint without changes was one of the best decisions that we took. I have seem people adapting their code to follow BIPM guidelines to use Pint resulting in a more interoperable ecosystem. It is worth noting that we provide a flexible definition file and hackable preprocessor list. So we propose doing it the right way, but we also provide a way for user who cannot adapt. |
So this works:
but the following:
gives:
that seems wrong. At the very least I would expect "Celsius" to be the one that works if only one of them works.
The text was updated successfully, but these errors were encountered: