webviz-subsurface
webviz-subsurface copied to clipboard
Gracefully handle reference case not in input data

Reported by user. Happens on in-place sensitivity and time series sensitivity. When clicking on those two pages, the user is sent to the front page, and the above is printed to terminal.
Since this is a runtime problem, we should perhaps handle it more gracefully.
Relevant code lines: https://github.com/equinor/webviz-subsurface/blob/50266076b133a671bf39f79fc46279edffe8b73d/webviz_subsurface/_components/tornado/_tornado_data.py#L44-L45
One solution could be to have a callback to update the options and value of the reference selector when the ensemble is changed. This will ensure that the reference will always be in the dataset.