equinor / webviz-subsurface

Webviz-config plugins for subsurface data.
https://github.com/orgs/equinor/projects/24
GNU General Public License v3.0
55 stars 59 forks source link

Metadata support when using aggregated time series data #402

Open asnyv opened 4 years ago

asnyv commented 4 years ago

Simulation time series metadata is used for several functionalities, including the coming average rates and interval cumulatives.

323 added support to utilize fmu-ensemble / libecl for metadata of simulated time series data (Eclipse format), but did not handle the scenario of aggregated/csv exported data.

Necessary to make the assumption that all ensembles and realizations share the same metadata (e.g. that there are not inconsistencies in units and etc, was also done in #323, and it is something we do when we allow co-plotting of ensembles anyways.)

fmu-ensemble stores the metadata as a dict when running ScratchEnsemble.get_smry_meta() (unfortunately no support for EnsembleSet as far as I know), which would be the natural way to make this for a user. In Webviz we currently iterate over these dicts (one for each ensemble) and store the union of them in a multiindex pandas.DataFrame, that is storable as a parquet file (for portable), but is not ideal for csv as the multiindex behavior is lost.

Alternatives:

In all cases I think it would be useful to have a similar get_smry_meta() functionality for EnsembleSet's in fmu-ensemble, so that the behavior is well defined outside upstream of Webviz (e.g. a user might have different wells/wellnames in different ensembles, but we would like a unified metadata set).

jorgenherje commented 2 years ago

@asnyv and @anders-kiaer

Is this covered by vector_metadata() in EnsembleSummaryProvider, or is there a need for special handling of metadata for a ProviderSet - equivalent to EnsembleSet mentioned above?

Example of a ProviderSet in SimulationTimeSeries-plugin: https://github.com/equinor/webviz-subsurface/blob/master/webviz_subsurface/plugins/_simulation_time_series/types/provider_set.py

ProviderSet could be of interest for more developers and can be revisited and moved to a common utils-folder if needed.