Skip to content

Stochastic noise fallback if no precipitation - #2415

Open
gavinevans wants to merge 6 commits into
metoppv:masterfrom
gavinevans:mobt_783_dry_stochastic_noise
Open

Stochastic noise fallback if no precipitation#2415
gavinevans wants to merge 6 commits into
metoppv:masterfrom
gavinevans:mobt_783_dry_stochastic_noise

Conversation

@gavinevans

@gavinevans gavinevans commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Related issues: #2275, #2346, #2363, #2400

improver_test_data PR: metoppv/improver_test_data#142

Description
This PR is aimed at making the stochastic noise robust to the complete lack of precipitation in the domain. Currently, this results in an error arising from the Short-Space Fourier Transform code in pysteps, as there are no values greater than the minimum, as the field is a constant value. Note that fields that are completely wet (even with a constant, greather than 0 value for precipitation everywhere) are already handled, as the stochastic noise is specifically only intended for grid points that are dry. Completely dry domains therefore need to be handled in some way. This PR adopts a fallback approach where, in the case of a completely dry precipitation field, random noise will be generated. This random noise will be offset, similar to the offset currently applied to scale the FFT-based stochastic noise to be negative, so that the random noise added to a completely dry realization is negative, and broadly fits with the use of this stochastic noise plugin to provide a template for an Ensemble Copula Coupling-based process. The plugin has been constructed so that the random noise created by a dry realization will be discrete from the spatially correlated stochastic noise created for wet realizations with dry realizations having more negative values.

Testing:

  • Ran tests and they passed OK
  • Added new tests for the new feature(s)

@gavinevans
gavinevans marked this pull request as draft July 23, 2026 07:41
…s discrete from stochastic noise that is generated when a realization is wet.
@gavinevans
gavinevans marked this pull request as ready for review July 23, 2026 13:49
…h between 0 and >0 given that the units are m/s.
…all, but an error is still raised, likely due to window level degeneracy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants