ert 18.0.7__py3-none-any.whl → 18.0.9__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.
- ert/analysis/_es_update.py +19 -6
- ert/field_utils/grdecl_io.py +26 -9
- ert/gui/simulation/experiment_panel.py +4 -0
- ert/gui/summarypanel.py +19 -0
- ert/run_models/run_model.py +1 -21
- ert/shared/version.py +3 -3
- {ert-18.0.7.dist-info → ert-18.0.9.dist-info}/METADATA +1 -1
- {ert-18.0.7.dist-info → ert-18.0.9.dist-info}/RECORD +12 -12
- {ert-18.0.7.dist-info → ert-18.0.9.dist-info}/WHEEL +1 -1
- {ert-18.0.7.dist-info → ert-18.0.9.dist-info}/entry_points.txt +0 -0
- {ert-18.0.7.dist-info → ert-18.0.9.dist-info}/licenses/COPYING +0 -0
- {ert-18.0.7.dist-info → ert-18.0.9.dist-info}/top_level.txt +0 -0
ert/analysis/_es_update.py
CHANGED
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import functools
|
|
4
4
|
import logging
|
|
5
|
+
import re
|
|
5
6
|
import time
|
|
6
7
|
import warnings
|
|
7
8
|
from collections.abc import Callable, Iterable, Sequence
|
|
@@ -441,6 +442,12 @@ def smoother_update(
|
|
|
441
442
|
with warnings.catch_warnings():
|
|
442
443
|
original_showwarning = warnings.showwarning
|
|
443
444
|
|
|
445
|
+
ILL_CONDITIONED_RE = re.compile(
|
|
446
|
+
r"^LinAlgWarning:.*ill[- ]?conditioned\s+matrix", re.IGNORECASE
|
|
447
|
+
)
|
|
448
|
+
LIMIT_ILL_CONDITIONED_WARNING = 1000
|
|
449
|
+
illconditioned_warn_counter = 0
|
|
450
|
+
|
|
444
451
|
def log_warning(
|
|
445
452
|
message: Warning | str,
|
|
446
453
|
category: type[Warning],
|
|
@@ -449,12 +456,18 @@ def smoother_update(
|
|
|
449
456
|
file: TextIO | None = None,
|
|
450
457
|
line: str | None = None,
|
|
451
458
|
) -> None:
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
)
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
459
|
+
nonlocal illconditioned_warn_counter
|
|
460
|
+
|
|
461
|
+
if ILL_CONDITIONED_RE.search(str(message)):
|
|
462
|
+
illconditioned_warn_counter += 1
|
|
463
|
+
|
|
464
|
+
if illconditioned_warn_counter < LIMIT_ILL_CONDITIONED_WARNING:
|
|
465
|
+
logger.warning(
|
|
466
|
+
f"{category.__name__}: {message} (from {filename}:{lineno})"
|
|
467
|
+
)
|
|
468
|
+
original_showwarning(
|
|
469
|
+
message, category, filename, lineno, file=file, line=line
|
|
470
|
+
)
|
|
458
471
|
|
|
459
472
|
warnings.showwarning = log_warning
|
|
460
473
|
analysis_ES(
|
ert/field_utils/grdecl_io.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import io
|
|
3
4
|
import operator
|
|
4
5
|
import os
|
|
5
6
|
from collections.abc import Iterator
|
|
@@ -257,6 +258,9 @@ def import_bgrdecl(
|
|
|
257
258
|
raise ValueError(f"Did not find field parameter {field_name} in {file_path}")
|
|
258
259
|
|
|
259
260
|
|
|
261
|
+
_BUFFER_SIZE = 2**20 # 1.04 megabytes
|
|
262
|
+
|
|
263
|
+
|
|
260
264
|
def export_grdecl(
|
|
261
265
|
values: np.ma.MaskedArray[Any, np.dtype[np.float32]] | npt.NDArray[np.float32],
|
|
262
266
|
file_path: str | os.PathLike[str],
|
|
@@ -271,12 +275,25 @@ def export_grdecl(
|
|
|
271
275
|
if binary:
|
|
272
276
|
resfo.write(file_path, [(param_name.ljust(8), values.astype(np.float32))])
|
|
273
277
|
else:
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
278
|
+
length = values.shape[0]
|
|
279
|
+
per_line = 6
|
|
280
|
+
iters = 5
|
|
281
|
+
per_iter = per_line * iters
|
|
282
|
+
fmt = " ".join(["%3e"] * per_line)
|
|
283
|
+
fmt = "\n".join([fmt] * iters) + "\n"
|
|
284
|
+
with (
|
|
285
|
+
open(file_path, "wb+", 0) as fh,
|
|
286
|
+
io.BufferedWriter(fh, _BUFFER_SIZE) as bw,
|
|
287
|
+
io.TextIOWrapper(bw, write_through=True, encoding="utf-8") as tw,
|
|
288
|
+
):
|
|
289
|
+
tw.write(param_name + "\n")
|
|
290
|
+
i = 0
|
|
291
|
+
while i + per_iter <= length:
|
|
292
|
+
tw.write(fmt % tuple(values[i : i + per_iter]))
|
|
293
|
+
i += per_iter
|
|
294
|
+
|
|
295
|
+
for j, v in enumerate(values[length - (length % per_iter) :]):
|
|
296
|
+
tw.write(f" {v:3e}")
|
|
297
|
+
if j % 6 == 5:
|
|
298
|
+
tw.write("\n")
|
|
299
|
+
tw.write(" /\n")
|
|
@@ -354,6 +354,10 @@ class ExperimentPanel(QWidget):
|
|
|
354
354
|
return
|
|
355
355
|
QApplication.restoreOverrideCursor()
|
|
356
356
|
|
|
357
|
+
self.configuration_summary.log_summary(
|
|
358
|
+
args.mode, model.get_number_of_active_realizations()
|
|
359
|
+
)
|
|
360
|
+
|
|
357
361
|
self._dialog = RunDialog(
|
|
358
362
|
f"Experiment - {self._config_file} {find_ert_info()}",
|
|
359
363
|
model.api,
|
ert/gui/summarypanel.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import logging
|
|
3
4
|
from typing import TYPE_CHECKING, Any
|
|
4
5
|
|
|
5
6
|
from PyQt6.QtCore import Qt
|
|
@@ -18,6 +19,8 @@ from ert.gui.ertwidgets import ErtSummary
|
|
|
18
19
|
if TYPE_CHECKING:
|
|
19
20
|
from ert.config import ErtConfig
|
|
20
21
|
|
|
22
|
+
logger = logging.getLogger(__name__)
|
|
23
|
+
|
|
21
24
|
|
|
22
25
|
class SummaryTemplate:
|
|
23
26
|
def __init__(self, title: str) -> None:
|
|
@@ -123,6 +126,22 @@ class SummaryPanel(QFrame):
|
|
|
123
126
|
|
|
124
127
|
self._layout.addLayout(layout)
|
|
125
128
|
|
|
129
|
+
def log_summary(self, run_model: str, num_realizations: int) -> None:
|
|
130
|
+
summary = ErtSummary(self.config)
|
|
131
|
+
|
|
132
|
+
observations = summary.getObservations()
|
|
133
|
+
observations_count = sum(e["count"] for e in observations)
|
|
134
|
+
|
|
135
|
+
_, parameter_count = summary.get_parameters()
|
|
136
|
+
|
|
137
|
+
logger.info(
|
|
138
|
+
f"Experiment summary:\n"
|
|
139
|
+
f"Runmodel: {run_model}\n"
|
|
140
|
+
f"Realizations: {num_realizations}\n"
|
|
141
|
+
f"Parameters: {parameter_count}\n"
|
|
142
|
+
f"Observations: {observations_count}"
|
|
143
|
+
)
|
|
144
|
+
|
|
126
145
|
@staticmethod
|
|
127
146
|
def _runlength_encode_list(strings: list[str]) -> list[tuple[str, int]]:
|
|
128
147
|
"""Runlength encode a list of strings.
|
ert/run_models/run_model.py
CHANGED
|
@@ -248,28 +248,8 @@ class RunModel(RunModelConfig, ABC):
|
|
|
248
248
|
for key, value in self.__dict__.items()
|
|
249
249
|
if key not in keys_to_drop
|
|
250
250
|
}
|
|
251
|
-
settings_summary = {
|
|
252
|
-
"run_model": self.name(),
|
|
253
|
-
"num_realizations": self.runpath_config.num_realizations,
|
|
254
|
-
"num_active_realizations": self.active_realizations.count(True),
|
|
255
|
-
"num_parameters": (
|
|
256
|
-
sum(
|
|
257
|
-
len(param_config.parameter_keys)
|
|
258
|
-
for param_config in self.parameter_configuration
|
|
259
|
-
)
|
|
260
|
-
if hasattr(self, "parameter_configuration")
|
|
261
|
-
else "NA"
|
|
262
|
-
),
|
|
263
|
-
"localization": getattr(
|
|
264
|
-
settings_dict.get("analysis_settings", {}), "localization", "NA"
|
|
265
|
-
),
|
|
266
|
-
}
|
|
267
251
|
|
|
268
|
-
logger.info(
|
|
269
|
-
f"Running '{self.name()}'\n\n"
|
|
270
|
-
f"Settings summary: {settings_summary}\n\n"
|
|
271
|
-
f"Settings: {settings_dict}"
|
|
272
|
-
)
|
|
252
|
+
logger.info(f"Running '{self.name()}'\n\nSettings: {settings_dict}")
|
|
273
253
|
|
|
274
254
|
@field_validator("env_vars", mode="after")
|
|
275
255
|
@classmethod
|
ert/shared/version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '18.0.
|
|
32
|
-
__version_tuple__ = version_tuple = (18, 0,
|
|
31
|
+
__version__ = version = '18.0.9'
|
|
32
|
+
__version_tuple__ = version_tuple = (18, 0, 9)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'ga202455d4'
|
|
@@ -32,7 +32,7 @@ ert/trace.py,sha256=m2ZjKd1nf7LjBM2lL0fk1cNF04HnQs8blZhQbTXgcB0,1274
|
|
|
32
32
|
ert/workflow_runner.py,sha256=veKEZBRnyMoErFpABRKLreMJvgVoN7UENbJssqmKW7w,7298
|
|
33
33
|
ert/analysis/__init__.py,sha256=NNLGQG9gex6lJ8IZjEg_tXTfSeJceRA9zjOek-UeY0Y,591
|
|
34
34
|
ert/analysis/_enif_update.py,sha256=Oh9oUiMLbBT8o3TPl9x3ZR24gqBpIn6nFPwrOjMNtnY,7654
|
|
35
|
-
ert/analysis/_es_update.py,sha256=
|
|
35
|
+
ert/analysis/_es_update.py,sha256=cKwkJu-iTeQArQcW5NrAGhSASTBQJHMCieuLj5_p9ho,17107
|
|
36
36
|
ert/analysis/_update_commons.py,sha256=y2MYW_B02TDBcnuPJBh3WWqBCUmL0f9JoZ8nB_-K0pQ,12375
|
|
37
37
|
ert/analysis/event.py,sha256=vBYqtTl5DXePPWHTLX9bROmGTD2ixcrQh4K07g-UikM,2248
|
|
38
38
|
ert/analysis/misfit_preprocessor.py,sha256=2MjlL2yIg5KQpqWiD3675-hoy_5QM49pWQ7VXK4rous,8001
|
|
@@ -152,7 +152,7 @@ ert/exceptions/_exceptions.py,sha256=dv4rs5oWe00PcelvGEsTscD3AKhI1uwwSjprMSHk4xw
|
|
|
152
152
|
ert/field_utils/__init__.py,sha256=bnjVYQq0A1lkTUSDUHU8pBtnkQmvdw-zrtFhUT41FW4,768
|
|
153
153
|
ert/field_utils/field_file_format.py,sha256=QWDQYsba2zUfbMltBxReZqAZOYWkHb8kG_xY7BvBzO0,297
|
|
154
154
|
ert/field_utils/field_utils.py,sha256=YkfFaC4wIragaZ28N892iH64mKt8OwklnOInVuQ3QQA,16807
|
|
155
|
-
ert/field_utils/grdecl_io.py,sha256=
|
|
155
|
+
ert/field_utils/grdecl_io.py,sha256=QbRbcZIfNyRliMwyFwmUnMIHc4Za9-uUSitm4l3uT0k,9521
|
|
156
156
|
ert/field_utils/roff_io.py,sha256=7gzGYKpOhSYiDVxyAndgyLGDcj1s21C7hFsO3E96poM,4030
|
|
157
157
|
ert/gui/__init__.py,sha256=AULn_ohaSWhaM-7oZuGYbagLfZ8PGL03vyiPTtSR0vk,625
|
|
158
158
|
ert/gui/about_dialog.py,sha256=H0Jfso2v9s1eONTVgghH84UcaUlwVs0Cqqbv17Hvw4g,3127
|
|
@@ -160,7 +160,7 @@ ert/gui/ertnotifier.py,sha256=u3jWGjuS75Ml7hAOT6FjBIksB3NLrWNIoH0_WLT3gCE,3031
|
|
|
160
160
|
ert/gui/find_ert_info.py,sha256=hwqiCa5rDZEL_25QVsx920d9NOaVM2PyUor89_-70-Q,301
|
|
161
161
|
ert/gui/main.py,sha256=h27FWct4C7R6uYRPa3b5stZbF1QuDr_2zXGCNjJEh4E,8980
|
|
162
162
|
ert/gui/main_window.py,sha256=ukP7OFIB23luoNIsKNTEts_yMaIlY0Qamcvn-Rfeu4E,14995
|
|
163
|
-
ert/gui/summarypanel.py,sha256=
|
|
163
|
+
ert/gui/summarypanel.py,sha256=pIMCUyEulNB-TzC1d6NBSUv4dzmM3RzDKiDRc6HuUe4,4832
|
|
164
164
|
ert/gui/ertwidgets/__init__.py,sha256=LtwHe4wpA0YpbealTrukMb7rDSSTxSyGkVaM8IvlI8A,1878
|
|
165
165
|
ert/gui/ertwidgets/analysismoduleedit.py,sha256=Ff9gzaQHrEH1yQ2tWg15fZrUN0mr_rJEUMciatOjlLc,1444
|
|
166
166
|
ert/gui/ertwidgets/analysismodulevariablespanel.py,sha256=xL_UHZsTkETF1hovkLa9ax58ofBVpa-jO0fhnL6ZyA4,4954
|
|
@@ -239,7 +239,7 @@ ert/gui/simulation/ensemble_information_filter_panel.py,sha256=GafKsROmB2AmzvuR4
|
|
|
239
239
|
ert/gui/simulation/ensemble_smoother_panel.py,sha256=kZ1i6BXQB7e1MnUp8dSmXCSPO9d_4r8_jARlDzUqVNI,6489
|
|
240
240
|
ert/gui/simulation/evaluate_ensemble_panel.py,sha256=o5enKuNViMWRKUtEtzUqumcS8FHhGNkheYF3wji5EJs,4978
|
|
241
241
|
ert/gui/simulation/experiment_config_panel.py,sha256=wDFwfJ6JtFZrQVd66qwakzsbSR3uhPOLfFszwg-bAXQ,850
|
|
242
|
-
ert/gui/simulation/experiment_panel.py,sha256=
|
|
242
|
+
ert/gui/simulation/experiment_panel.py,sha256=aJZwsUH7E-pEIGMPWFOugg4KIEP0TxSaD8Q-cfyy5wE,15247
|
|
243
243
|
ert/gui/simulation/manual_update_panel.py,sha256=mhXKnNGJqR8NtXHFvWtDHRsrDA_SCwBbRsB38kIX1OU,6955
|
|
244
244
|
ert/gui/simulation/multiple_data_assimilation_panel.py,sha256=O3sCbHFfzaVft2kSWcs3gVHeWa5DXhUvdhUBZM0xv_Y,14951
|
|
245
245
|
ert/gui/simulation/queue_emitter.py,sha256=Rse2W2mL7NQBiYM3iYunRWN7hCCD_kHb1ThuO5ixxZQ,1916
|
|
@@ -381,7 +381,7 @@ ert/run_models/manual_update.py,sha256=CjuoWjtVeyo4fT7HmKqtmiQflKJtcoQVJWrf6BXTB
|
|
|
381
381
|
ert/run_models/manual_update_enif.py,sha256=79l_hSrNN-6gvuBQBFiEYYbKOAdLLI0UwyMbzVlFSTU,995
|
|
382
382
|
ert/run_models/model_factory.py,sha256=DzRIIlSOWOn2VpUFAoThiKVDohNgT2a804qcw-RYcrY,21166
|
|
383
383
|
ert/run_models/multiple_data_assimilation.py,sha256=Mg6OoR3ncNgOm7bNeV-5FdBRRljEs7Nyef4W48yPVks,8471
|
|
384
|
-
ert/run_models/run_model.py,sha256=
|
|
384
|
+
ert/run_models/run_model.py,sha256=H9spbqINK1rbsDUpVLip-9K_jRzUsWwr75fJIlb4Q1Q,29923
|
|
385
385
|
ert/run_models/single_test_run.py,sha256=-5Z-JB_VYlR4p4PAtKTcj5QzYjdj7EFn6_6odjlPJH0,1069
|
|
386
386
|
ert/run_models/update_run_model.py,sha256=nWTnLVnXN_1Si55v_ZJaKYhDgo_G1JgZ-bz6JFjbvOg,5407
|
|
387
387
|
ert/scheduler/__init__.py,sha256=Swxw-mDWEUr6jD8LLfF2tWDJnMv3oEVSbRrOh9DtZwE,1368
|
|
@@ -400,7 +400,7 @@ ert/services/ert_server.py,sha256=geh5mkdAKqNKgG56DcwSnEpvf0wcUc7vuw4feG1ykEI,10
|
|
|
400
400
|
ert/services/webviz_ert_service.py,sha256=J5vznqb_-DjlDMOze7tdvuBE4GWEPgJ5dIIXvRLKd0Y,650
|
|
401
401
|
ert/shared/__init__.py,sha256=OwgL-31MxA0fabETJ5Svw0tqJpHi569CZDRFHdHiqA0,644
|
|
402
402
|
ert/shared/net_utils.py,sha256=DDHIZLHdBnh7ZZ--1s-FUlsoNTSJJsfHmLQE44E2JqU,5324
|
|
403
|
-
ert/shared/version.py,sha256=
|
|
403
|
+
ert/shared/version.py,sha256=TdqpcEMuSFwQqgoXMaKN6jlvyN-_bk_X3KCBppHb37g,714
|
|
404
404
|
ert/shared/_doc_utils/__init__.py,sha256=zSl-NUpWLF167PVTvfjn0T50gExjvyWPw5OGq5Bt2Dc,983
|
|
405
405
|
ert/shared/_doc_utils/ert_jobs.py,sha256=uHP8ozhKwCHG6BkyhAgCGoy59JEFb102pHKot-5ZEys,8054
|
|
406
406
|
ert/shared/_doc_utils/everest_jobs.py,sha256=uBDN7tIwlBJIZVZ6ZFL1tkewEJJGDLoeVrFIIrJznvM,2081
|
|
@@ -453,7 +453,7 @@ ert/validation/validation_status.py,sha256=f47_B7aS-9DEh6uaVzKxD97pXienkyTVVCqTy
|
|
|
453
453
|
ert/warnings/__init__.py,sha256=IBwQVkdD7Njaad9PAB-9K-kr15wnA4EBKboxyqgu9NA,214
|
|
454
454
|
ert/warnings/_warnings.py,sha256=7qhNZ0W4nnljzoOx6AXX7VlMv5pa34Ek5M5n1Ep0Kak,189
|
|
455
455
|
ert/warnings/specific_warning_handler.py,sha256=5dVXtOhzcMmtPBGx4AOddXNPfzTFOPA7RVtdH8hLv68,932
|
|
456
|
-
ert-18.0.
|
|
456
|
+
ert-18.0.9.dist-info/licenses/COPYING,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
457
457
|
everest/__init__.py,sha256=8_f50f6H3-onqaiuNCwC0Eiotdl9JuTxhwyF_54MVvU,306
|
|
458
458
|
everest/config_file_loader.py,sha256=q_rmxk778uDrNxdQQW0tBs9R3hU4az6yGCJwuY_5xww,5698
|
|
459
459
|
everest/everest_storage.py,sha256=Xg2CuRdhZOqljm0i6H5o-pejcMeCwncSGw7Q6beZRgY,42173
|
|
@@ -517,8 +517,8 @@ everest/templates/well_drill.tmpl,sha256=9iLexmBHMsMQNXyyRK4GlmVuVpVIxRcCHpy1av5
|
|
|
517
517
|
everest/templates/well_order.tmpl,sha256=XJ1eVRkeyTdLu5sLsltJSSK6BDLN7rFOAqLdM3ZZy3w,75
|
|
518
518
|
everest/util/__init__.py,sha256=xEYLz6pUtgkH8VHer1RfoCwKiO70dBnuhHonsOPaOx0,1359
|
|
519
519
|
everest/util/forward_models.py,sha256=JPxHhLI6TrmQJwW50wwGBmw57TfRd8SG2svYhXFHrc8,1617
|
|
520
|
-
ert-18.0.
|
|
521
|
-
ert-18.0.
|
|
522
|
-
ert-18.0.
|
|
523
|
-
ert-18.0.
|
|
524
|
-
ert-18.0.
|
|
520
|
+
ert-18.0.9.dist-info/METADATA,sha256=QFKkbmt0fJWm5hS1gduRIYao7JB5yDbEvtDcMDadApg,10012
|
|
521
|
+
ert-18.0.9.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
522
|
+
ert-18.0.9.dist-info/entry_points.txt,sha256=ChZ7vn8Qy9v9rT8GM2JtAvWDN3NVoy4BIcvVRtU73CM,189
|
|
523
|
+
ert-18.0.9.dist-info/top_level.txt,sha256=LRh9GfdfyDWfAGmrQgp_XdoMHA4v6aotw8xgsy5YyHE,17
|
|
524
|
+
ert-18.0.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|