webviz-subsurface 0.2.36__py3-none-any.whl → 0.2.38__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. webviz_subsurface/__init__.py +1 -1
  2. webviz_subsurface/_components/color_picker.py +1 -1
  3. webviz_subsurface/_datainput/well_completions.py +2 -1
  4. webviz_subsurface/_providers/ensemble_polygon_provider/__init__.py +3 -0
  5. webviz_subsurface/_providers/ensemble_polygon_provider/_polygon_discovery.py +97 -0
  6. webviz_subsurface/_providers/ensemble_polygon_provider/_provider_impl_file.py +226 -0
  7. webviz_subsurface/_providers/ensemble_polygon_provider/ensemble_polygon_provider.py +53 -0
  8. webviz_subsurface/_providers/ensemble_polygon_provider/ensemble_polygon_provider_factory.py +99 -0
  9. webviz_subsurface/_providers/ensemble_polygon_provider/polygon_server.py +125 -0
  10. webviz_subsurface/plugins/_co2_leakage/_plugin.py +577 -293
  11. webviz_subsurface/plugins/_co2_leakage/_types.py +7 -0
  12. webviz_subsurface/plugins/_co2_leakage/_utilities/_misc.py +9 -0
  13. webviz_subsurface/plugins/_co2_leakage/_utilities/callbacks.py +226 -186
  14. webviz_subsurface/plugins/_co2_leakage/_utilities/co2volume.py +591 -128
  15. webviz_subsurface/plugins/_co2_leakage/_utilities/containment_data_provider.py +147 -0
  16. webviz_subsurface/plugins/_co2_leakage/_utilities/containment_info.py +31 -0
  17. webviz_subsurface/plugins/_co2_leakage/_utilities/ensemble_well_picks.py +105 -0
  18. webviz_subsurface/plugins/_co2_leakage/_utilities/generic.py +170 -2
  19. webviz_subsurface/plugins/_co2_leakage/_utilities/initialization.py +199 -97
  20. webviz_subsurface/plugins/_co2_leakage/_utilities/polygon_handler.py +60 -0
  21. webviz_subsurface/plugins/_co2_leakage/_utilities/summary_graphs.py +77 -173
  22. webviz_subsurface/plugins/_co2_leakage/_utilities/surface_publishing.py +122 -21
  23. webviz_subsurface/plugins/_co2_leakage/_utilities/unsmry_data_provider.py +108 -0
  24. webviz_subsurface/plugins/_co2_leakage/views/mainview/mainview.py +44 -19
  25. webviz_subsurface/plugins/_co2_leakage/views/mainview/settings.py +944 -359
  26. {webviz_subsurface-0.2.36.dist-info → webviz_subsurface-0.2.38.dist-info}/METADATA +2 -2
  27. {webviz_subsurface-0.2.36.dist-info → webviz_subsurface-0.2.38.dist-info}/RECORD +33 -20
  28. {webviz_subsurface-0.2.36.dist-info → webviz_subsurface-0.2.38.dist-info}/WHEEL +1 -1
  29. /webviz_subsurface/plugins/_co2_leakage/_utilities/{fault_polygons.py → fault_polygons_handler.py} +0 -0
  30. {webviz_subsurface-0.2.36.dist-info → webviz_subsurface-0.2.38.dist-info}/LICENSE +0 -0
  31. {webviz_subsurface-0.2.36.dist-info → webviz_subsurface-0.2.38.dist-info}/LICENSE.chromedriver +0 -0
  32. {webviz_subsurface-0.2.36.dist-info → webviz_subsurface-0.2.38.dist-info}/entry_points.txt +0 -0
  33. {webviz_subsurface-0.2.36.dist-info → webviz_subsurface-0.2.38.dist-info}/top_level.txt +0 -0
@@ -2,20 +2,22 @@ from typing import Any, Dict, List
2
2
 
3
3
  import plotly.graph_objects as go
4
4
  import webviz_core_components as wcc
5
- from dash import html
5
+ from dash import dcc, html
6
6
  from dash.development.base_component import Component
7
7
  from webviz_config.utils import StrEnum
8
8
  from webviz_config.webviz_plugin_subclasses import ViewABC, ViewElementABC
9
9
  from webviz_subsurface_components import SubsurfaceViewer
10
10
 
11
+ from webviz_subsurface.plugins._co2_leakage._types import LegendData
12
+
11
13
 
12
14
  class MainView(ViewABC):
13
15
  class Ids(StrEnum):
14
16
  MAIN_ELEMENT = "main-element"
15
17
 
16
- def __init__(self, color_scales: List[Dict[str, Any]]):
18
+ def __init__(self, color_scales: List[Dict[str, Any]], content: Dict[str, bool]):
17
19
  super().__init__("Main View")
18
- self._view_element = MapViewElement(color_scales)
20
+ self._view_element = MapViewElement(color_scales, content)
19
21
  self.add_view_element(self._view_element, self.Ids.MAIN_ELEMENT)
20
22
 
21
23
 
@@ -26,20 +28,25 @@ class MapViewElement(ViewElementABC):
26
28
  DATE_WRAPPER = "date-wrapper"
27
29
  BAR_PLOT = "bar-plot"
28
30
  TIME_PLOT = "time-plot"
29
- TIME_PLOT_ONE_REAL = "time-plot-one-realization"
31
+ STATISTICS_PLOT = "statistics-plot"
30
32
  BAR_PLOT_ORDER = "bar-plot-order"
31
33
  CONTAINMENT_COLORS = "containment-order"
32
34
  SIZE_SLIDER = "size-slider"
33
35
  TOP_ELEMENT = "top-element"
34
36
  BOTTOM_ELEMENT = "bottom-element"
37
+ LEGEND_DATA_STORE = "legend-data-store"
35
38
 
36
- def __init__(self, color_scales: List[Dict[str, Any]]) -> None:
39
+ def __init__(
40
+ self, color_scales: List[Dict[str, Any]], content: Dict[str, bool]
41
+ ) -> None:
37
42
  super().__init__()
38
43
  self._color_scales = color_scales
44
+ self._content = content
39
45
 
40
46
  def inner_layout(self) -> Component:
41
- return html.Div(
42
- [
47
+ layout_elements = []
48
+ if self._content["maps"]:
49
+ layout_elements.append(
43
50
  wcc.Frame(
44
51
  # id=self.register_component_unique_id(LayoutElements.MAP_VIEW),
45
52
  id=self.register_component_unique_id(self.Ids.TOP_ELEMENT),
@@ -78,14 +85,17 @@ class MapViewElement(ViewElementABC):
78
85
  ),
79
86
  ],
80
87
  style={
81
- "height": "43vh",
88
+ "height": "43vh" if self._content["any_table"] else "100%",
82
89
  },
83
- ),
90
+ )
91
+ )
92
+ if self._content["any_table"]:
93
+ layout_elements.append(
84
94
  wcc.Frame(
85
95
  # id=get_uuid(LayoutElements.PLOT_VIEW),
86
96
  id=self.register_component_unique_id(self.Ids.BOTTOM_ELEMENT),
87
97
  style={
88
- "height": "37vh",
98
+ "height": "37vh" if self._content["maps"] else "100%",
89
99
  },
90
100
  children=[
91
101
  html.Div(
@@ -93,12 +103,25 @@ class MapViewElement(ViewElementABC):
93
103
  self.register_component_unique_id(self.Ids.BAR_PLOT),
94
104
  self.register_component_unique_id(self.Ids.TIME_PLOT),
95
105
  self.register_component_unique_id(
96
- self.Ids.TIME_PLOT_ONE_REAL
106
+ self.Ids.STATISTICS_PLOT
97
107
  ),
98
108
  )
99
109
  ),
100
110
  ],
101
- ),
111
+ )
112
+ )
113
+ layout_elements.append(
114
+ dcc.Store(
115
+ id=self.register_component_unique_id(self.Ids.LEGEND_DATA_STORE),
116
+ data=LegendData(
117
+ bar_legendonly=None,
118
+ time_legendonly=None,
119
+ stats_legendonly=None,
120
+ ),
121
+ )
122
+ )
123
+ if self._content["maps"] and self._content["any_table"]:
124
+ layout_elements.append(
102
125
  html.Div(
103
126
  [
104
127
  wcc.Slider(
@@ -118,8 +141,10 @@ class MapViewElement(ViewElementABC):
118
141
  style={
119
142
  "width": "100%",
120
143
  },
121
- ),
122
- ],
144
+ )
145
+ )
146
+ return html.Div(
147
+ layout_elements,
123
148
  style={
124
149
  "display": "flex",
125
150
  "flexDirection": "column",
@@ -131,7 +156,7 @@ class MapViewElement(ViewElementABC):
131
156
  def _summary_graph_layout(
132
157
  bar_plot_id: str,
133
158
  time_plot_id: str,
134
- time_plot_one_realization_id: str,
159
+ statistics_plot_id: str,
135
160
  ) -> List:
136
161
  return [
137
162
  wcc.Tabs(
@@ -139,7 +164,7 @@ def _summary_graph_layout(
139
164
  value="tab-1",
140
165
  children=[
141
166
  wcc.Tab(
142
- label="End-state containment (all realizations)",
167
+ label="Containment state",
143
168
  value="tab-1",
144
169
  children=[
145
170
  html.Div(
@@ -154,7 +179,7 @@ def _summary_graph_layout(
154
179
  ],
155
180
  ),
156
181
  wcc.Tab(
157
- label="Containment over time (all realizations)",
182
+ label="Containment over time",
158
183
  value="tab-2",
159
184
  children=[
160
185
  html.Div(
@@ -169,12 +194,12 @@ def _summary_graph_layout(
169
194
  ],
170
195
  ),
171
196
  wcc.Tab(
172
- label="Containment over time (one realization)",
197
+ label="Statistics",
173
198
  value="tab-3",
174
199
  children=[
175
200
  html.Div(
176
201
  wcc.Graph(
177
- id=time_plot_one_realization_id,
202
+ id=statistics_plot_id,
178
203
  figure=go.Figure(),
179
204
  config={
180
205
  "displayModeBar": False,