Skip to content

Commit b9e4f35

Browse files
ijkgrid parametric support
1 parent 6b4afc3 commit b9e4f35

6 files changed

Lines changed: 1059 additions & 55 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import sys
2+
from energyml.utils.epc import Epc
3+
from energyml.utils.constants import EpcExportVersion
4+
5+
6+
7+
def read_compute_and_write(epc_path: str, output_path: str, export_version: EpcExportVersion = EpcExportVersion.EXPANDED) -> None:
8+
epc = Epc.read_file(epc_path, recompute_rels=True)
9+
print("EPC content and files lists before recomputing rels:")
10+
11+
print("EPC content and files lists after recomputing rels:")
12+
epc.export_version = export_version
13+
print(f"Writing modified EPC to {output_path}...")
14+
epc.export_file(output_path)
15+
16+
17+
if __name__ == "__main__":
18+
if len(sys.argv) == 3:
19+
epc_path = sys.argv[1]
20+
output_path = sys.argv[2]
21+
else:
22+
# epc_path = "rc/epc/80wells_surf.epc"
23+
# output_path = "rc/epc/80wells_surf_modified.epc"
24+
epc_path = "D:/Geosiris/Cloud/Geo-Workflow/BRGM/BRGM_RESQML_PROJECT_2024/AVRE/exports_brgm/AVRE_COMPLETED_MARCH_2026.epc"
25+
output_path = "D:/Geosiris/Cloud/Geo-Workflow/BRGM/BRGM_RESQML_PROJECT_2024/AVRE/exports_brgm/AVRE_COMPLETED_MARCH_2026.epc_modified.epc"
26+
27+
read_compute_and_write(epc_path, output_path)

energyml-utils/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,15 @@ parquet = ["pyarrow", "numpy", "pandas"]
6262
hdf5 = ["h5py"]
6363
las = ["lasio"]
6464
segy = ["segyio"]
65+
geometry = ["scipy"]
6566

6667
[tool.poetry.dependencies]
6768
python = "^3.9"
6869
xsdata = {version = "^24.0", extras = ["cli", "lxml"]}
6970
energyml-opc = "^1.12.0"
7071
h5py = { version = "^3.11.0", optional = false }
7172
numpy = { version = "^1.16.6", optional = false }
73+
scipy = { version = ">=1.7", optional = true }
7274
pyarrow = { version = "^14.0.1", optional = true }
7375
pandas = { version = "^1.1.0", optional = true }
7476
lasio = { version = "^0.31", optional = true }

0 commit comments

Comments
 (0)