Support deterministic forecast source when clustering - #20
Open
gavinevans wants to merge 2 commits into
Open
Conversation
…ch step. Add warnings if either an input is provided but not defined in the hierarchy, or if an input is defined in the hierarchy but not provided. This should avoid the processing silently skipping inputs due to a misconfiguration of the hierarchy.
mo-jbeaver
suggested changes
Aug 3, 2026
There was a problem hiding this comment.
@gavinevans I've added a few comments for extra clarification could be added but, all the tests ran successfully.
Comment on lines
750
to
754
| @@ -723,10 +753,18 @@ def _categorise_secondary_inputs( | |||
| # all periods for this source mergeable for consistent multi-period | |||
| # matching. | |||
There was a problem hiding this comment.
Can this be updated to include the additions from the if else statements
|
|
||
| This verifies that when extra cubes are supplied with a model_id attribute value | ||
| that does not appear in the hierarchy (neither as primary_input nor as a secondary | ||
| input key), the plugin warns that those cubes will be ignored. |
There was a problem hiding this comment.
Is there a way to check, or is it important to test, that these cubes are ignored?
Owner
Author
There was a problem hiding this comment.
I've added an assertion that the unlisted_model is absent from the attributes.
Comment on lines
+3172
to
+3174
| When a secondary input cube has no realization coordinate it should be treated | ||
| as having a single realization and follow the partial-realization path, replacing | ||
| the best-matching cluster at the relevant forecast periods with its data. |
There was a problem hiding this comment.
Can something be added here to explain the primary input sections of this test a bit more.
mo-jbeaver
approved these changes
Aug 4, 2026
mo-jbeaver
left a comment
There was a problem hiding this comment.
Happy with the updates made and the tests all ran successfully.
gavinevans
requested
a lite review from Copilot
and removed request for
Copilot
August 13, 2026 09:31
2 tasks
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
This PR makes some modifications on top of metoppv#2417 to support including a truly deterministic forecast in the RealizationClusterAndMatch plugin. Some (deterministic) models are time-lagged, so still have a
realizationcoordinate and dimension when provided toRealizationClusterAndMatch. Some forecast sources are, however, truly deterministic e.g. a deterministic nowcast and therefore don't have arealizationcoordinate. This PR therefore adds handling for these deterministic inputs, so that they can be included as a secondary input in theRealizationClusterAndMatchplugin as expected.Testing: