-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When plotting time series you can get the following error:
ValueError: No overlapping times detected in input cubes.
This comes from a check in collapse.py that we have overlapping times. While this check makes sense for a difference plot, it does not make sense for other kinds of plots, such as a time series, where it is quite reasonable to have non-overlapping times.
CSET/src/CSET/operators/collapse.py
Lines 77 to 89 in 01277f2
| # Retain only common time points between different models if multiple model inputs. | |
| if isinstance(cubes, iris.cube.CubeList) and len(cubes) > 1: | |
| logging.debug( | |
| "Extracting common time points as multiple model inputs detected." | |
| ) | |
| for cube in cubes: | |
| cube.coord("forecast_reference_time").bounds = None | |
| cube.coord("forecast_period").bounds = None | |
| cubes = cubes.extract_overlapping( | |
| ["forecast_reference_time", "forecast_period"] | |
| ) | |
| if len(cubes) == 0: | |
| raise ValueError("No overlapping times detected in input cubes.") |
We should move this logic so it only applies in cases where we only want overlapping time points, such as the difference plots.
How to reproduce
Steps to reproduce the behaviour:
- Run CSET with two models over different dates.
- Try and plot a time series.
- Observe the error.
Expected behaviour
Time series plots should still work when we have non-overlapping data.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working