Quantiles are not computed for fields containing NaN#129
Open
evenmn wants to merge 1 commit intoWFRT:masterfrom
Open
Quantiles are not computed for fields containing NaN#129evenmn wants to merge 1 commit intoWFRT:masterfrom
evenmn wants to merge 1 commit intoWFRT:masterfrom
Conversation
…n the fly from raw ensemble data Signed-off-by: evenmn <evenmn@mn.uio.no>
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.
Hi
I detected a bug when computing quantiles on the fly for raw ensemble data. When there are NaN values in the ensemble data, the quantiles automatically becomes NaN, and plotting spread, spreadskill etc.. does not work.
By replacing np.quantiles with np.nanquantiles, things seem to work properly, but it makes the code extremely slow. It would be nice with a fast version of np.nanquantile, but at least a slow version is better than a non-functioning one.