Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request to resolve #xxx
doc/source/references/release_notes.rst
.Describe the changes you made
We will soon release xclim 0.40 in which there are some breaking changes for icclim:
One of them was brought by Multi-dimensional thresholds Ouranosinc/xclim#1236 where
PercentileDataArray
was deprecated. In this PR I simply ported the class to icclim.Another is from Explicit context information for unit conversion Ouranosinc/xclim#1227 where the "hydro" unit context was deactivated by default. This was mainly used to convert between precipitation rate ( mm /d ) and flux (kg m-2 s-1). With additions from ENH: Update convert_units_to function Ouranosinc/xclim#1206, if the inputs of the
convert_units_to
function have valid and compatible standard names, the conversion can still be made automatically, but without these CF attributes, the default is to raise an error. This can be avoided by passingcontext='infer'
orcontext='hydro'
toconvert_units_to
. With the latter, the rate-to-flux transformations are always possible, while the former only activates them when the standard name of the input refers to water.I saw the tests failures on my side, but I didn't want to apply a patch without opinions from people here.