webviz-subsurface icon indicating copy to clipboard operation
webviz-subsurface copied to clipboard

Gracefully handle reference case not in input data

Open anders-kiaer opened this issue 3 years ago • 1 comments

image

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

anders-kiaer avatar Jun 07 '22 07:06 anders-kiaer

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.

tnatt avatar Jun 07 '22 12:06 tnatt