Ouranosinc / xclim

Library of derived climate variables, ie climate indicators, based on xarray.
https://xclim.readthedocs.io/en/stable/
Apache License 2.0
333 stars 59 forks source link

Can't `rate2amount` with smaller-than-daily frequencies #1962

Closed aulemahal closed 1 month ago

aulemahal commented 1 month ago

The line below has not been update since we switched to pandas' new frequency strings. In v0.49.0, we removed many entries from the FREQ_UNITS dict because the pandas strings are already understandable by pint. So at the minimum we should do FREQ_UNITS.get(base, base).

https://github.com/Ouranosinc/xclim/blob/2bb20af521b7c1c553972a69a07987df8631b0ce/xclim/core/units.py#L670