Repository navigation
Reverted conditional to hardcoded value True - #631
Conversation
…xploding rainfall values outside of radar domain. See issue #579
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Documentation build overview
22 files changed ·
|
|
Can we have a similar temporary fix to be merged into v1.x? 579-fix-for-branch-v1.x into v1.x might actually do that - to be checked: We will need to remove the |
Make comments clearer for both cases. This was the behaviour before the 2024 refactor.
|
Hi @FelixE91, I think this parameter will not be removed in v2 so the FutureWarning may not be necessary after all. As far as I know, we have not yet figured out how the different combinations (of probability matching, |
ladc
left a comment
There was a problem hiding this comment.
Looks good, for symmetry I will just also check for exploding values in the nowcast tests and set the seeds fixed.
There was a problem hiding this comment.
🟡 Changes recommended
Automatic noise adjustment can produce NaN coefficients for a radar frame with exactly one wet pixel, contaminating nowcasting and blending forecasts; a finite fallback and regression tests are needed.
1 open issue
What changed in this PR
This PR temporarily forces conditional noise-adjustment statistics in STEPS nowcasting and blending to address extreme rainfall values reported in #579.
Changes:
- Hardcodes
conditional=Truefor automatic noise adjustment in both forecast implementations. - Documents that noise adjustment ignores the user’s
conditionalsetting. - Adds precipitation-limit regression assertions and fixes random seeds for reproducibility.
| File | Description |
|---|---|
| pysteps/tests/test_nowcasts_steps.py | Returns forecast values for a precipitation-limit assertion and sets a fixed seed. |
| pysteps/tests/test_blending_steps.py | Adds low-rain-fraction cases, precipitation limits, and a fixed seed. |
| pysteps/nowcasts/steps.py | Forces conditional noise adjustment and documents the override. |
| pysteps/blending/steps.py | Restores conditional noise adjustment and documents the temporary workaround. |
Review effort: Balanced (adaptive)
Set adjustment to 1.0 in case of NaNs (e.g. single wet pixel).
|
By the way, in addition to reverting back to the previous behaviour for both blended and nonblended steps, this now also puts any NaN values in the stddev to 1.0 (e.g. in case of a single wet pixel stddev is not defined = NaN as detected by the copilot review), and this makes the code a bit more robust. |
FelixE91
left a comment
There was a problem hiding this comment.
The tests need a little bit of work (see comments).
We should also add a test for 1 wet pixel to test if it is fixed (see copilot's issue).

False would lead to exploding rainfall values outside of radar domain.
This is a temporary fix as a clear solution as not yet been decided on. See issue #579 for further discussion