Conversation
huard
approved these changes
Nov 30, 2021
Collaborator
Author
|
Last commits went deeper and refactored
Should we remove |
huard
approved these changes
Dec 3, 2021
Collaborator
huard
left a comment
There was a problem hiding this comment.
Does it make sense to repurpose test_extrapolate_qm to test the new extrapolation code ? I know its implicitly tested elsewhere, but still.
Collaborator
Author
|
The new extrapolation code is explicitly tested in I would rather suggest to remove |
Collaborator
|
All good then. |
raquelalegre
added a commit
to UCL/xclim
that referenced
this pull request
Dec 6, 2021
…/xclim into indices/potential_evapotranspiration * 'indices/potential_evapotranspiration' of github.com:UCL/xclim: [sdba] Refactor interp_on_quantiles (Ouranosinc#941) Indices/heat index (Ouranosinc#915)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 Checklist:
number) and pull request (:pull:number) has been added.bumpversion patchhas been called on this branch.zenodo.jsonWhat kind of change does this PR introduce?
I though the changes in #914 would address a bug I saw while computing ESPO-R. However, I had forgotten about the splitting pathways for
group='time'vsgroup='time.prop'. That also meant testing was not sufficient. This PR changesxclim.sdba.utils.interp_on_quantilesso that:interp1d, has the advantage that NaNs in the new coord are not considered "out of bounds", but NaNs. They return NaN in the output, not an extrapolated value.Does this PR introduce a breaking change?
Other information:
The docstring was improved.
I realized that
method='cubic'does not respect the constant extrapolation as set byextrapolate_qm... I added a note to the doc, but I'm not sure what to do here. @huard ? The logic we used works well with 'nearest' and 'linear', but as 'cubic' fetches a third point it estimates something else.EDIT:
I compared the performance before and after the change and it is insignificant.
griddataandinterp1dare much slower than any numpy overhead I added, so I did not see any timing difference.