ert 18.0.8__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/field_utils/grdecl_io.py +26 -9
- ert/shared/version.py +3 -3
- {ert-18.0.8.dist-info → ert-18.0.9.dist-info}/METADATA +1 -1
- {ert-18.0.8.dist-info → ert-18.0.9.dist-info}/RECORD +8 -8
- {ert-18.0.8.dist-info → ert-18.0.9.dist-info}/WHEEL +1 -1
- {ert-18.0.8.dist-info → ert-18.0.9.dist-info}/entry_points.txt +0 -0
- {ert-18.0.8.dist-info → ert-18.0.9.dist-info}/licenses/COPYING +0 -0
- {ert-18.0.8.dist-info → ert-18.0.9.dist-info}/top_level.txt +0 -0
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")
|
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'
|
|
@@ -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
|
|
@@ -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
|