Skip to content

Added pr unit conversion fallback (fixes #93)

I've copied the pr conversion utility function from climix. It is used as a fallback only if the previous unit conversion throws an exception.

Note that the new change_units function also calls the convert_units method if the unit is not a precipitation unit, which means this function could be called directly in the MIdAS code (not only as a fallback). But I've tried to add this as non-intrusively as possible for now.

The only change compared to the climix version is that the integration time is added as an argument, which should make it straight-forward to move to gordias in the future.

Merge request reports