-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for Fahrenheit deltas, degree-days and others. (#1804)
### What kind of change does this PR introduce? * New function `ensure_absolute_temperature` that converts temperature units to their absolute counterpart _assuming_ they represented a delta. So °C becomes K and °F becomes °R. Anything else goes unmodified (including compound units like `°C m` (whatever that means)). * Use this function in `to_agg_units` to ensure a correct output for `op` "std", "var" and "integral". ### Does this PR introduce a breaking change? No. ### Other information: Pint has "delta_degC" and "delta_degF" for temperature differences, but CF does not. So this new function helps in the specific case where we know the data is delta-like, which happens for the given `op`.
- Loading branch information
Showing
3 changed files
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters