-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure consistent percentiles from EMOS if no coefficients provided #1615
Ensure consistent percentiles from EMOS if no coefficients provided #1615
Conversation
Codecov Report
@@ Coverage Diff @@
## Hotfix_branch_1.0.2 #1615 +/- ##
====================================================
Coverage 98.07% 98.07%
====================================================
Files 110 110
Lines 10003 10003
====================================================
Hits 9810 9810
Misses 193 193 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of small comments Gavin.
@@ -157,6 +157,31 @@ def process( | |||
warnings.warn(msg) | |||
return prob_template | |||
|
|||
if percentiles: | |||
percentiles = [np.float32(p) for p in percentiles] | |||
constr = iris.Constraint(percentile=percentiles) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably needs to be a lambda function to handle float comparisons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For robustness, I've altered this to be use a lambda function for the float comparison.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny things... but...
…ded but a list of desired percentiles are provided.
…within the input forecast.
a11b3fe
to
0ee3863
Compare
…etoppv#1615) * Add ability to subset the input forecast if no coefficients are provided but a list of desired percentiles are provided. * Modifications to raise an error if the percentiles requested are not within the input forecast. * Updates following review comments. * Update checksums by branching from 1.0.1 tag.
Related to https://github.com/metoppv/mo-blue-team/issues/108
Description
This PR ensures that if a list of desired percentiles are provided, then the forecast resulting from the apply-emos-coefficients CLI will have these desired percentiles whether or not the coefficients are provided.
Further information is available in this comment.
Testing: