FireWeatherIndexBase plugin - change Error to Warning for input values outside expected ranges#2301
Merged
mo-robert-purvis merged 5 commits intometoppv:masterfrom Feb 12, 2026
Conversation
ryan-cocking-mo
requested changes
Feb 11, 2026
Contributor
ryan-cocking-mo
left a comment
There was a problem hiding this comment.
This looks sensible to me.
Co-authored-by: ryan-cocking-mo <ryan.cocking@metoffice.gov.uk>
ryan-cocking-mo
previously approved these changes
Feb 11, 2026
robertplatt-mo
requested changes
Feb 11, 2026
Contributor
robertplatt-mo
left a comment
There was a problem hiding this comment.
@mo-robert-purvis Tiny nitpick on the warning being in raises rather than Warns
robertplatt-mo
approved these changes
Feb 11, 2026
Contributor
robertplatt-mo
left a comment
There was a problem hiding this comment.
Thanks! All approved
ryan-cocking-mo
approved these changes
Feb 12, 2026
…ng-for-out-of-range-inputs
gavinevans
added a commit
to gavinevans/improver
that referenced
this pull request
Mar 5, 2026
…sformation * upstream/master: EPPT3121 Add clip option to fine fuel moisture content calculation (metoppv#2317) Edit CLI docstring. (metoppv#2318) Update WeightAndBlend.process() to use *cubes and as_cubelist (metoppv#2314) Lighting in vicinity cell_method alignment for master (metoppv#2296) Add quantile mapping and associated tests (metoppv#2264) MOBT-1069: Using adjacent validity times in SAMOS (metoppv#2310) Mobt991 ApplySAMOS plugin distribution fix (metoppv#2311) Add attribute to realization clustering to record source realizations (metoppv#2305) MOBT-1070: Time-zone safe handling of time point extraction in SAMOS calibration (metoppv#2306) Set START_DATE_DICT to outside largest lag period to silence warnings (metoppv#2304) Eppt2408 implement initialisation process for fire severity iterative parameters (metoppv#2302) FireWeatherIndexBase plugin - change Error to Warning for input values outside expected ranges (metoppv#2301)
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.
Description
In the
FireWeatherIndexBasethere are value range checks made on the different components used to calculate the Fire Severity Index (FSI). It was found during testing that one of these ranges is too restrictive for real values from the data cache used for tests. The code in one place emits a warning message about this, but in another place it throws a ValueError which causes the FSI calculation to fail.Given that the warning is sufficient, and that the ranges against which the input data is checked are arbitrary, and could be changed, it is best to change the
ValueErrorinto a Warning message so that the FSI can be calculated successfully.Testing