You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: Blending fails with 0 weight for passed data #2054
When calling improver weighted-blending via the CLI, it is possible to pass multiple cubes that all have weights of 0 (as the graph has no knowledge of the blending weights). e.g. tempmax12h, for a 24 hour leadtime being passed engluk and ecukx only.
Currently this results in blending.weights.WeightsUtilities raising ValueError("Sum of weights must be > 0.0"). It is desirable for this to be a warning so that suites can continue to cycle.
Acceptance criteria:
No change when presented with a full data set
If there is no weight to any input, raise a warning and return None
Do we know if plugins that typically run after the blend support being passed None (currently that is).
In future, it could be that a plugin determines whether the blend actually occurs at all, based not only on the presence of a new field to blend but perhaps also whether it has a non-zero weight to one or more of these fields:
Activity
cpelley commentedon Mar 18, 2025
Do we know if plugins that typically run after the blend support being passed None (currently that is).
In future, it could be that a plugin determines whether the blend actually occurs at all, based not only on the presence of a new field to blend but perhaps also whether it has a non-zero weight to one or more of these fields: