From ed46f2f4cde4f9497a8fffd36ffe274493b0465b Mon Sep 17 00:00:00 2001 From: David Landa Marban Date: Mon, 4 Nov 2024 12:19:59 +0100 Subject: [PATCH] More options for how to show wells/faults --- README.md | 5 ++ docs/_sources/introduction.rst.txt | 1 + docs/introduction.html | 3 ++ docs/searchindex.js | 2 +- docs/text/introduction.rst | 1 + src/plopm/core/plopm.py | 8 +++ src/plopm/utils/initialization.py | 1 + src/plopm/utils/readers.py | 78 +++++++++++++++++++++++++----- src/plopm/utils/write.py | 2 +- 9 files changed, 87 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 2446ac4..b5fe323 100755 --- a/README.md +++ b/README.md @@ -48,6 +48,11 @@ Run `plopm --help` to see all possible command line argument options. ## Getting started See the [_examples_](https://cssr-tools.github.io/plopm/examples.html) in the [_documentation_](https://cssr-tools.github.io/plopm/introduction.html). +## Citing +If you would like to cite this repository: + +* Landa-Marbán, D. 2024. plopm: Quick generation of PNGs, GIFs, and VTKs from a OPM Flow type model. V2024.04. https://doi.org/10.5281/zenodo.13332415. + ## About plopm The _plopm_ package is being funded by the [_HPC Simulation Software for the Gigatonne Storage Challenge project_](https://www.norceresearch.no/en/projects/hpc-simulation-software-for-the-gigatonne-storage-challenge) [project number 622059] and [_Center for Sustainable Subsurface Resources (CSSR)_](https://cssr.no) [project no. 331841]. diff --git a/docs/_sources/introduction.rst.txt b/docs/_sources/introduction.rst.txt index 24a9021..2820dc8 100644 --- a/docs/_sources/introduction.rst.txt +++ b/docs/_sources/introduction.rst.txt @@ -72,6 +72,7 @@ where -rotate Grades to rotate the grid in the 2D maps ('0' by default). -translate Translate the grid in the 2D maps x,y directions ('[0,0]' by default). -global Min and max in the colorbars from the current 2D slide values (0) or whole 3D model '1' ('0' by default). +-how Show the cells for the wells/faults when at least one cell contains them ('min') or when all cells are part of the given slides range ('max') ('min' by default). -ncolor Color for the inactive cells in the 2D maps ('w' by default, i.e., white). -lw Line width separated by commas if more than one ('1' by default). -subfigs Generate separated or a single Figure (e.g., '2,2' for four subfigures) ('' by default, i.e., separate figures). diff --git a/docs/introduction.html b/docs/introduction.html index 07f5994..00d0341 100644 --- a/docs/introduction.html +++ b/docs/introduction.html @@ -230,6 +230,9 @@

Concept
-global

Min and max in the colorbars from the current 2D slide values (0) or whole 3D model ‘1’ (‘0’ by default).

+
-how
+

Show the cells for the wells/faults when at least one cell contains them (‘min’) or when all cells are part of the given slides range (‘max’) (‘min’ by default).

+
-ncolor

Color for the inactive cells in the 2D maps (‘w’ by default, i.e., white).

diff --git a/docs/searchindex.js b/docs/searchindex.js index d5363bc..586d326 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"alltitles": {"About plopm": [[0, null]], "Concept": [[5, "concept"]], "Convert to VTK": [[2, "convert-to-vtk"]], "Different input files": [[2, "different-input-files"]], "Examples": [[2, null]], "GIF and mask": [[2, "gif-and-mask"]], "Generic deck": [[2, "generic-deck"]], "Indices and tables": [[3, "indices-and-tables"]], "Installation": [[4, null]], "Introduction": [[5, null]], "Module contents": [[7, "module-plopm"], [8, "module-plopm.core"]], "OPM Flow": [[4, "opm-flow"]], "Overview": [[5, "overview"]], "Python package": [[4, "python-package"]], "Related": [[10, null]], "Rotation, translation, and zoom": [[2, "rotation-translation-and-zoom"]], "SPE11B": [[2, "spe11b"]], "Source build in Linux/Windows": [[4, "source-build-in-linux-windows"]], "Source build in macOS": [[4, "source-build-in-macos"]], "Submodules": [[8, "submodules"]], "Subpackages": [[7, "subpackages"]], "Welcome to plopm\u2019s documentation!": [[3, null]], "ad-micp": [[10, "ad-micp"]], "expreccs": [[10, "expreccs"]], "plopm": [[1, "plopm"], [6, null]], "plopm Python API": [[1, null]], "plopm package": [[7, null]], "plopm.core package": [[8, null]], "plopm.core.plopm module": [[9, null]], "pycopm": [[10, "pycopm"]], "pymm": [[10, "pymm"]], "pyopmnearwell": [[10, "pyopmnearwell"]], "pyopmspe11": [[10, "pyopmspe11"]]}, "docnames": ["about", "api", "examples", "index", "installation", "introduction", "modules", "plopm", "plopm.core", "plopm.core.plopm", "related"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["about.rst", "api.rst", "examples.rst", "index.rst", "installation.rst", "introduction.rst", "modules.rst", "plopm.rst", "plopm.core.rst", "plopm.core.plopm.rst", "related.rst"], "indexentries": {"load_parser() (in module plopm.core.plopm)": [[9, "plopm.core.plopm.load_parser", false]], "main() (in module plopm.core.plopm)": [[9, "plopm.core.plopm.main", false]], "module": [[7, "module-plopm", false], [8, "module-plopm.core", false], [9, "module-plopm.core.plopm", false]], "plopm": [[7, "module-plopm", false]], "plopm() (in module plopm.core.plopm)": [[9, "plopm.core.plopm.plopm", false]], "plopm.core": [[8, "module-plopm.core", false]], "plopm.core.plopm": [[9, "module-plopm.core.plopm", false]]}, "objects": {"": [[7, 0, 0, "-", "plopm"]], "plopm": [[8, 0, 0, "-", "core"]], "plopm.core": [[9, 0, 0, "-", "plopm"]], "plopm.core.plopm": [[9, 1, 1, "", "load_parser"], [9, 1, 1, "", "main"], [9, 1, 1, "", "plopm"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"]}, "objtypes": {"0": "py:module", "1": "py:function"}, "terms": {"": [2, 4, 5], "0": [2, 4, 5], "01": [2, 5], "02": [2, 5], "04": 4, "1": [2, 4, 5], "10": [2, 4, 5], "100": 5, "1000": [2, 5], "11": 5, "12": [2, 5], "1200": 5, "14": 2, "16": [2, 5], "1e": [2, 5], "1e3": 2, "1f": 5, "2": [2, 5], "200": 5, "2024": 4, "22": 2, "25": 2, "2d": [5, 9], "2e": 5, "2f": [2, 5], "3": [2, 4, 5], "30": 2, "300": 5, "331841": 0, "3476500": 2, "3d": 5, "4": [2, 5], "40": 5, "5": [2, 5], "5600": 2, "6": 2, "622059": 0, "6456335": 2, "65": 2, "7": 2, "7600": 2, "8": [2, 5], "8800": 2, "9": [2, 4, 5], "A": 10, "For": [0, 2, 4, 5], "If": [2, 4], "In": [2, 4, 5], "It": 2, "ON": 4, "The": [1, 2, 5], "Then": [2, 4], "To": [2, 4], "_of_input_fil": 5, "_z": 2, "abel": 5, "about": 3, "acecolor": 5, "achiev": [2, 4], "activ": [2, 4], "ad": [2, 3, 4], "addit": [2, 4, 5], "after": [2, 4], "ahiev": 2, "align": 5, "all": [1, 2, 5], "allow": 5, "along": [2, 5], "also": [2, 4, 5], "an": [0, 2, 4, 10], "ani": [2, 5], "api": 3, "approach": [0, 5], "apt": 4, "ar": [0, 2, 4, 10], "argument": [2, 5, 9], "ask": 5, "askthr": 5, "assum": 2, "av": 5, "avaiabl": 5, "avail": [2, 4], "axi": [2, 5], "b": [2, 5], "background": 5, "bar": 5, "base": [5, 10], "been": 2, "being": 0, "below": 10, "benchmark": 10, "best": 5, "between": [2, 5], "bin": [4, 5], "binari": 4, "both": 2, "bottom": 5, "bound": [2, 5], "branch": 4, "brew": 4, "bsfax": 5, "build": [2, 3, 5], "build_opm_mpi": 4, "built": 4, "c": [2, 5], "calcit": 10, "call": 2, "can": [2, 4, 5], "case": [2, 5], "cbsfax": 2, "cd": 4, "cell": [2, 5], "center": [0, 2], "centimet": 5, "cfd": 10, "cformat": 2, "challeng": 0, "chang": 2, "changu": 2, "check": 10, "ci": 4, "clone": 4, "cm": [4, 5], "cmake": 4, "cnum": 2, "co2": [2, 5, 10], "co2m": [2, 5], "coarsen": 10, "code": 4, "color": [2, 5], "colorbar": [2, 5], "colormap": [2, 5], "com": [4, 5], "comma": 5, "command": 4, "common": 4, "compar": 2, "comparison": 2, "compon": 2, "concept": 3, "configur": 2, "connect": 2, "contain": 1, "content": [1, 3, 6], "contribut": [0, 4], "convert": [3, 4, 5], "copi": 4, "core": [1, 4, 6, 7], "correspond": 5, "could": 4, "creat": [2, 4], "csp": 10, "cssr": [0, 4, 5], "cubehelix": 2, "current": [4, 5], "current_directori": 4, "d": [2, 5], "dai": 5, "dash": 2, "date": [2, 5], "dcmake_build_typ": 4, "dcmake_disable_find_package_mpi": 4, "dcmake_prefix_path": 4, "deactiv": 4, "decim": 5, "deck": 3, "default": [2, 5], "definit": 2, "delax": 2, "delet": [2, 5], "depend": 4, "describ": 5, "dev": 4, "diff": 2, "differ": [1, 3, 5], "dimens": [2, 5], "direct": [2, 5], "directli": 2, "dism": 5, "divid": 2, "do": 4, "document": 5, "done": 4, "dopm_enable_python": 4, "dot": [2, 5], "download": 2, "dpi": 2, "dpython_execut": 4, "dune": 4, "dunecontrol": 4, "duse_mpi": 4, "dvipng": 4, "dwith_ndebug": 4, "dynam": [2, 5, 10], "e": [2, 4, 5], "each": 5, "echo": 4, "egrid": [2, 4], "elax": 5, "emov": 5, "empti": 2, "enabl": 2, "entri": [2, 5], "environ": 4, "equal": 4, "exampl": 3, "execut": [1, 2, 4, 5, 9], "exist": 4, "expans": 10, "exponenti": 5, "export": 4, "exprecc": 3, "extens": 5, "extra": 4, "f": [2, 5], "faster": 4, "fault": 2, "featur": 0, "fgip": [2, 5], "fgipm": [2, 5], "field": [2, 5], "figur": [2, 4, 5], "file": [3, 4, 5], "final": 5, "fipnum": [2, 5], "first": [2, 4], "flag": [2, 4], "flexibl": [5, 10], "float": 2, "float32": [2, 5], "float64": [2, 5], "flore": 2, "flow": [2, 3, 5, 9, 10], "fluid": 5, "folder": [1, 2, 4, 5], "follow": [2, 4, 5], "font": [2, 4, 5], "fork": 0, "format": [2, 4, 5], "forth": 2, "found": 4, "four": 5, "fraction": 2, "frame": 5, "framework": [5, 10], "from": [2, 4, 5], "full": 5, "function": 9, "fund": 0, "fwcdm": 5, "g": [2, 4, 5], "ga": [2, 5], "gasm": 5, "gener": [3, 5], "geolog": [5, 9, 10], "geometri": 4, "get": 4, "gif": [3, 5], "gigatonn": 0, "git": 4, "github": [4, 5], "gitlab": 4, "give": 2, "given": [2, 5], "global": [2, 5], "grade": 5, "grid": [2, 4, 5], "h": [2, 5], "h2o": 2, "h2om": 5, "ha": 2, "half": 2, "handl": 1, "have": 2, "help": 2, "here": 2, "higher": 4, "home": 5, "horda": 10, "host": 5, "hour": 5, "howev": 2, "hpc": 0, "http": [4, 5], "i": [0, 1, 2, 4, 5], "iff": 5, "imag": 10, "implement": 5, "inact": 5, "inch": 5, "includ": [2, 4], "increas": 2, "index": 3, "induc": 10, "infin": 5, "inform": 2, "init": [2, 4], "initi": [2, 5], "inject": 2, "input": [3, 5], "insid": [2, 4], "inspect": 5, "instal": [2, 3], "instead": 4, "interest": [4, 10], "interv": 2, "introduct": 3, "issu": 0, "istl": 4, "j": 5, "j5": 4, "jet": 5, "just": 2, "k": [2, 5], "kilo": 2, "kilomet": 5, "km": [2, 5], "l": 5, "label": [2, 5], "larg": 4, "larger": 2, "last": 5, "layer": 2, "leakag": 10, "least": 2, "left": [2, 5], "legend": 5, "let": 2, "librari": [4, 5], "limit": 2, "line": [2, 4, 5], "linestyl": 5, "lint": 4, "linux": 3, "liqm": 5, "liquid": 2, "lnum": 5, "load_pars": [7, 8, 9], "lobal": 5, "loc": 2, "locat": [1, 2, 5], "log": [2, 5], "look": 2, "loop": [2, 5], "lower": [2, 5], "lw": 2, "m": [2, 4, 5], "maco": 3, "macport": 4, "main": [1, 7, 8, 9], "make": 4, "manual": 2, "map": [2, 5, 9], "mask": [3, 5], "mass": [2, 5], "master": 4, "max": 5, "maximum": 5, "meter": 5, "method": 1, "micp": 3, "microbi": 10, "microsystem": 10, "middl": 5, "might": [4, 10], "milimet": 5, "milli": 5, "min": 5, "minimum": 5, "minut": 5, "mkdir": 4, "mm": 5, "model": [2, 5, 9, 10], "modifi": 4, "modul": [1, 3, 4, 6, 10], "more": [0, 2, 5], "mpi": 4, "mt": 5, "must": 2, "n": 5, "name": 5, "need": 4, "new": 0, "nice": 5, "norne_atw2013": 2, "notat": 5, "nterval": 5, "num": 5, "number": [0, 2, 5], "o": 5, "oc": 5, "og": 5, "one": [2, 5], "ones": 2, "onli": [2, 4], "oop": 5, "open": 10, "opm": [2, 3, 5, 9, 10], "option": [2, 5, 9], "order": 2, "org": 4, "otat": 5, "other": 5, "otherwis": [4, 5], "out": 10, "output": [2, 4, 5], "outsid": [2, 5], "overview": [2, 3, 4], "p": 5, "packag": [1, 3, 6], "page": 3, "paper": 5, "paraview": [2, 5], "part": 5, "path": [2, 5], "per": 5, "perfor": 2, "permeabl": 2, "permx": 5, "permz": [2, 5], "phase": 2, "pi": 5, "pip": 4, "place": [2, 5], "plane": [2, 5], "platform": 10, "pleas": 0, "plopm": [2, 4, 5], "plot": [1, 2, 5, 9], "png": 5, "pore": 5, "poro": 5, "poros": 5, "porv": 5, "posit": 5, "possibl": [2, 4], "postprocess": 5, "precipit": 10, "prerequisit": 4, "present": 5, "pressur": 5, "previou": 4, "print": 5, "printv": 2, "progress": 0, "project": [0, 4, 10], "properti": [2, 5], "pull": 0, "pwd": 4, "py": 2, "pycopm": 3, "pymm": 3, "pyopmnearwel": 3, "pyopmspe11": [2, 3], "pyproject": 4, "python": [3, 5, 10], "python3": 4, "pythonpath": 4, "quantiti": [2, 5], "quick": 5, "r": [2, 4, 5], "rais": 0, "ranslat": 5, "rate": 2, "read": 4, "recommend": 4, "reduc": 2, "regard": 4, "region": 2, "relat": 3, "releas": 4, "reli": 2, "remedi": 10, "remov": [2, 4, 5], "repo": 4, "report": 2, "repositori": 4, "request": 0, "requir": 4, "resdata": [4, 5], "reservoir": 5, "resourc": [0, 10], "restar": 2, "restart": [2, 5], "result": [2, 5], "rgip": 2, "rintv": 5, "rock": 2, "rotat": [3, 5], "run": [2, 4], "same": 5, "satnum": [2, 5], "satur": [2, 5], "save": 2, "scale": [2, 5], "script": [1, 4, 9], "search": 3, "second": [2, 5], "see": [2, 4], "seem": 4, "separ": [2, 5], "set": [2, 4, 5], "setuptool": 4, "sga": 2, "sh": 4, "should": [2, 4], "show": [2, 5], "shown": 2, "simplifi": [5, 10], "simul": [0, 2, 4, 5, 10], "singl": 5, "size": [2, 5], "slide": [2, 5], "so": 4, "softwar": 0, "solid": [2, 5], "some": [2, 10], "sourc": [2, 3, 10], "space": 2, "spatial": 5, "spe10_model2": 2, "spe11": 10, "spe11b": [3, 5], "spe11b_larger_inj": 2, "spe11b_tun": 5, "special": 5, "specifi": [2, 5], "static": 5, "step": 2, "storag": [0, 10], "studi": 10, "style": 2, "subfig": 2, "subfigur": 5, "submodul": [1, 6, 7], "subpackag": [1, 3, 6], "subplot": [2, 5], "substract": 5, "subsurfac": 0, "subsystem": 4, "succe": 2, "sudo": 4, "summari": [2, 5], "super": 4, "support": [2, 4, 5], "surfac": 5, "sustain": 0, "t": [2, 5], "tab20c_r": 2, "temp": 2, "temperatur": 2, "termin": [2, 4, 5], "test": [2, 4], "test_generic_deck": 2, "texliv": 4, "text": 5, "than": [0, 2, 4, 5], "thei": 2, "them": [0, 5, 10], "thi": [0, 2, 4, 5], "threshold": 5, "tick": 2, "time": [2, 5], "titl": [2, 5], "tkformat": 5, "tkname": 5, "toml": 4, "ton": 2, "tool": [2, 4, 5, 10], "top": 2, "total": 2, "translat": [3, 5], "true": [2, 5], "try": 4, "tunit": 2, "turn": 4, "two": [2, 5], "txt": 4, "type": [2, 5], "u": [2, 4, 5], "ubfig": 5, "uint16": [2, 5], "unit": [2, 5], "unrst": [2, 4], "upgrad": 4, "upper": [2, 5], "uptitl": 5, "us": [0, 2, 4, 5, 10], "user": [4, 5], "util": 1, "v": [2, 5], "v2": 4, "vairabl": 5, "valu": 5, "vapm": 5, "variabl": [2, 5], "vector": [2, 5], "venv": 4, "version": 4, "via": 2, "view": 2, "virtual": 4, "visual": [2, 5], "volum": 5, "vplopm": 4, "vtk": [3, 4, 5], "vtkformat": 2, "w": [2, 5], "we": 2, "week": [2, 5], "welcom": 0, "well": [2, 4, 5, 10], "were": 2, "wheel": 4, "when": [2, 4], "where": [2, 5], "which": [4, 5], "while": 2, "white": [2, 5], "whole": 5, "width": [2, 5], "window": 3, "work": 0, "would": 2, "write": [2, 5], "written": [2, 5], "x": [2, 5], "xco2l": [2, 5], "xco2v": 5, "xgrid": 5, "xh2ol": 5, "xh2ov": 5, "xlnum": 2, "xunit": 2, "xy": 5, "xz": [2, 5], "y": [2, 5], "year": [2, 5], "yformat": 2, "yml": 4, "you": [2, 4], "yunit": 2, "z": [2, 5], "zoom": 3}, "titles": ["About plopm", "plopm Python API", "Examples", "Welcome to plopm\u2019s documentation!", "Installation", "Introduction", "plopm", "plopm package", "plopm.core package", "plopm.core.plopm module", "Related"], "titleterms": {"": 3, "about": 0, "ad": 10, "api": 1, "build": 4, "concept": 5, "content": [7, 8], "convert": 2, "core": [8, 9], "deck": 2, "differ": 2, "document": 3, "exampl": 2, "exprecc": 10, "file": 2, "flow": 4, "gener": 2, "gif": 2, "indic": 3, "input": 2, "instal": 4, "introduct": 5, "linux": 4, "maco": 4, "mask": 2, "micp": 10, "modul": [7, 8, 9], "opm": 4, "overview": 5, "packag": [4, 7, 8], "plopm": [0, 1, 3, 6, 7, 8, 9], "pycopm": 10, "pymm": 10, "pyopmnearwel": 10, "pyopmspe11": 10, "python": [1, 4], "relat": 10, "rotat": 2, "sourc": 4, "spe11b": 2, "submodul": 8, "subpackag": 7, "tabl": 3, "translat": 2, "vtk": 2, "welcom": 3, "window": 4, "zoom": 2}}) \ No newline at end of file +Search.setIndex({"alltitles": {"About plopm": [[0, null]], "Concept": [[5, "concept"]], "Convert to VTK": [[2, "convert-to-vtk"]], "Different input files": [[2, "different-input-files"]], "Examples": [[2, null]], "GIF and mask": [[2, "gif-and-mask"]], "Generic deck": [[2, "generic-deck"]], "Indices and tables": [[3, "indices-and-tables"]], "Installation": [[4, null]], "Introduction": [[5, null]], "Module contents": [[7, "module-plopm"], [8, "module-plopm.core"]], "OPM Flow": [[4, "opm-flow"]], "Overview": [[5, "overview"]], "Python package": [[4, "python-package"]], "Related": [[10, null]], "Rotation, translation, and zoom": [[2, "rotation-translation-and-zoom"]], "SPE11B": [[2, "spe11b"]], "Source build in Linux/Windows": [[4, "source-build-in-linux-windows"]], "Source build in macOS": [[4, "source-build-in-macos"]], "Submodules": [[8, "submodules"]], "Subpackages": [[7, "subpackages"]], "Welcome to plopm\u2019s documentation!": [[3, null]], "ad-micp": [[10, "ad-micp"]], "expreccs": [[10, "expreccs"]], "plopm": [[1, "plopm"], [6, null]], "plopm Python API": [[1, null]], "plopm package": [[7, null]], "plopm.core package": [[8, null]], "plopm.core.plopm module": [[9, null]], "pycopm": [[10, "pycopm"]], "pymm": [[10, "pymm"]], "pyopmnearwell": [[10, "pyopmnearwell"]], "pyopmspe11": [[10, "pyopmspe11"]]}, "docnames": ["about", "api", "examples", "index", "installation", "introduction", "modules", "plopm", "plopm.core", "plopm.core.plopm", "related"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["about.rst", "api.rst", "examples.rst", "index.rst", "installation.rst", "introduction.rst", "modules.rst", "plopm.rst", "plopm.core.rst", "plopm.core.plopm.rst", "related.rst"], "indexentries": {"load_parser() (in module plopm.core.plopm)": [[9, "plopm.core.plopm.load_parser", false]], "main() (in module plopm.core.plopm)": [[9, "plopm.core.plopm.main", false]], "module": [[7, "module-plopm", false], [8, "module-plopm.core", false], [9, "module-plopm.core.plopm", false]], "plopm": [[7, "module-plopm", false]], "plopm() (in module plopm.core.plopm)": [[9, "plopm.core.plopm.plopm", false]], "plopm.core": [[8, "module-plopm.core", false]], "plopm.core.plopm": [[9, "module-plopm.core.plopm", false]]}, "objects": {"": [[7, 0, 0, "-", "plopm"]], "plopm": [[8, 0, 0, "-", "core"]], "plopm.core": [[9, 0, 0, "-", "plopm"]], "plopm.core.plopm": [[9, 1, 1, "", "load_parser"], [9, 1, 1, "", "main"], [9, 1, 1, "", "plopm"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"]}, "objtypes": {"0": "py:module", "1": "py:function"}, "terms": {"": [2, 4, 5], "0": [2, 4, 5], "01": [2, 5], "02": [2, 5], "04": 4, "1": [2, 4, 5], "10": [2, 4, 5], "100": 5, "1000": [2, 5], "11": 5, "12": [2, 5], "1200": 5, "14": 2, "16": [2, 5], "1e": [2, 5], "1e3": 2, "1f": 5, "2": [2, 5], "200": 5, "2024": 4, "22": 2, "25": 2, "2d": [5, 9], "2e": 5, "2f": [2, 5], "3": [2, 4, 5], "30": 2, "300": 5, "331841": 0, "3476500": 2, "3d": 5, "4": [2, 5], "40": 5, "5": [2, 5], "5600": 2, "6": 2, "622059": 0, "6456335": 2, "65": 2, "7": 2, "7600": 2, "8": [2, 5], "8800": 2, "9": [2, 4, 5], "A": 10, "For": [0, 2, 4, 5], "If": [2, 4], "In": [2, 4, 5], "It": 2, "ON": 4, "The": [1, 2, 5], "Then": [2, 4], "To": [2, 4], "_of_input_fil": 5, "_z": 2, "abel": 5, "about": 3, "acecolor": 5, "achiev": [2, 4], "activ": [2, 4], "ad": [2, 3, 4], "addit": [2, 4, 5], "after": [2, 4], "ahiev": 2, "align": 5, "all": [1, 2, 5], "allow": 5, "along": [2, 5], "also": [2, 4, 5], "an": [0, 2, 4, 10], "ani": [2, 5], "api": 3, "approach": [0, 5], "apt": 4, "ar": [0, 2, 4, 5, 10], "argument": [2, 5, 9], "ask": 5, "askthr": 5, "assum": 2, "av": 5, "avaiabl": 5, "avail": [2, 4], "axi": [2, 5], "b": [2, 5], "background": 5, "bar": 5, "base": [5, 10], "been": 2, "being": 0, "below": 10, "benchmark": 10, "best": 5, "between": [2, 5], "bin": [4, 5], "binari": 4, "both": 2, "bottom": 5, "bound": [2, 5], "branch": 4, "brew": 4, "bsfax": 5, "build": [2, 3, 5], "build_opm_mpi": 4, "built": 4, "c": [2, 5], "calcit": 10, "call": 2, "can": [2, 4, 5], "case": [2, 5], "cbsfax": 2, "cd": 4, "cell": [2, 5], "center": [0, 2], "centimet": 5, "cfd": 10, "cformat": 2, "challeng": 0, "chang": 2, "changu": 2, "check": 10, "ci": 4, "clone": 4, "cm": [4, 5], "cmake": 4, "cnum": 2, "co2": [2, 5, 10], "co2m": [2, 5], "coarsen": 10, "code": 4, "color": [2, 5], "colorbar": [2, 5], "colormap": [2, 5], "com": [4, 5], "comma": 5, "command": 4, "common": 4, "compar": 2, "comparison": 2, "compon": 2, "concept": 3, "configur": 2, "connect": 2, "contain": [1, 5], "content": [1, 3, 6], "contribut": [0, 4], "convert": [3, 4, 5], "copi": 4, "core": [1, 4, 6, 7], "correspond": 5, "could": 4, "creat": [2, 4], "csp": 10, "cssr": [0, 4, 5], "cubehelix": 2, "current": [4, 5], "current_directori": 4, "d": [2, 5], "dai": 5, "dash": 2, "date": [2, 5], "dcmake_build_typ": 4, "dcmake_disable_find_package_mpi": 4, "dcmake_prefix_path": 4, "deactiv": 4, "decim": 5, "deck": 3, "default": [2, 5], "definit": 2, "delax": 2, "delet": [2, 5], "depend": 4, "describ": 5, "dev": 4, "diff": 2, "differ": [1, 3, 5], "dimens": [2, 5], "direct": [2, 5], "directli": 2, "dism": 5, "divid": 2, "do": 4, "document": 5, "done": 4, "dopm_enable_python": 4, "dot": [2, 5], "download": 2, "dpi": 2, "dpython_execut": 4, "dune": 4, "dunecontrol": 4, "duse_mpi": 4, "dvipng": 4, "dwith_ndebug": 4, "dynam": [2, 5, 10], "e": [2, 4, 5], "each": 5, "echo": 4, "egrid": [2, 4], "elax": 5, "emov": 5, "empti": 2, "enabl": 2, "entri": [2, 5], "environ": 4, "equal": 4, "exampl": 3, "execut": [1, 2, 4, 5, 9], "exist": 4, "expans": 10, "exponenti": 5, "export": 4, "exprecc": 3, "extens": 5, "extra": 4, "f": [2, 5], "faster": 4, "fault": [2, 5], "featur": 0, "fgip": [2, 5], "fgipm": [2, 5], "field": [2, 5], "figur": [2, 4, 5], "file": [3, 4, 5], "final": 5, "fipnum": [2, 5], "first": [2, 4], "flag": [2, 4], "flexibl": [5, 10], "float": 2, "float32": [2, 5], "float64": [2, 5], "flore": 2, "flow": [2, 3, 5, 9, 10], "fluid": 5, "folder": [1, 2, 4, 5], "follow": [2, 4, 5], "font": [2, 4, 5], "fork": 0, "format": [2, 4, 5], "forth": 2, "found": 4, "four": 5, "fraction": 2, "frame": 5, "framework": [5, 10], "from": [2, 4, 5], "full": 5, "function": 9, "fund": 0, "fwcdm": 5, "g": [2, 4, 5], "ga": [2, 5], "gasm": 5, "gener": [3, 5], "geolog": [5, 9, 10], "geometri": 4, "get": 4, "gif": [3, 5], "gigatonn": 0, "git": 4, "github": [4, 5], "gitlab": 4, "give": 2, "given": [2, 5], "global": [2, 5], "grade": 5, "grid": [2, 4, 5], "h": [2, 5], "h2o": 2, "h2om": 5, "ha": 2, "half": 2, "handl": 1, "have": 2, "help": 2, "here": 2, "higher": 4, "home": 5, "horda": 10, "host": 5, "hour": 5, "howev": 2, "hpc": 0, "http": [4, 5], "i": [0, 1, 2, 4, 5], "iff": 5, "imag": 10, "implement": 5, "inact": 5, "inch": 5, "includ": [2, 4], "increas": 2, "index": 3, "induc": 10, "infin": 5, "inform": 2, "init": [2, 4], "initi": [2, 5], "inject": 2, "input": [3, 5], "insid": [2, 4], "inspect": 5, "instal": [2, 3], "instead": 4, "interest": [4, 10], "interv": 2, "introduct": 3, "issu": 0, "istl": 4, "j": 5, "j5": 4, "jet": 5, "just": 2, "k": [2, 5], "kilo": 2, "kilomet": 5, "km": [2, 5], "l": 5, "label": [2, 5], "larg": 4, "larger": 2, "last": 5, "layer": 2, "leakag": 10, "least": [2, 5], "left": [2, 5], "legend": 5, "let": 2, "librari": [4, 5], "limit": 2, "line": [2, 4, 5], "linestyl": 5, "lint": 4, "linux": 3, "liqm": 5, "liquid": 2, "lnum": 5, "load_pars": [7, 8, 9], "lobal": 5, "loc": 2, "locat": [1, 2, 5], "log": [2, 5], "look": 2, "loop": [2, 5], "lower": [2, 5], "lw": 2, "m": [2, 4, 5], "maco": 3, "macport": 4, "main": [1, 7, 8, 9], "make": 4, "manual": 2, "map": [2, 5, 9], "mask": [3, 5], "mass": [2, 5], "master": 4, "max": 5, "maximum": 5, "meter": 5, "method": 1, "micp": 3, "microbi": 10, "microsystem": 10, "middl": 5, "might": [4, 10], "milimet": 5, "milli": 5, "min": 5, "minimum": 5, "minut": 5, "mkdir": 4, "mm": 5, "model": [2, 5, 9, 10], "modifi": 4, "modul": [1, 3, 4, 6, 10], "more": [0, 2, 5], "mpi": 4, "mt": 5, "must": 2, "n": 5, "name": 5, "need": 4, "new": 0, "nice": 5, "norne_atw2013": 2, "notat": 5, "nterval": 5, "num": 5, "number": [0, 2, 5], "o": 5, "oc": 5, "og": 5, "one": [2, 5], "ones": 2, "onli": [2, 4], "oop": 5, "open": 10, "opm": [2, 3, 5, 9, 10], "option": [2, 5, 9], "order": 2, "org": 4, "otat": 5, "other": 5, "otherwis": [4, 5], "out": 10, "output": [2, 4, 5], "outsid": [2, 5], "overview": [2, 3, 4], "ow": 5, "p": 5, "packag": [1, 3, 6], "page": 3, "paper": 5, "paraview": [2, 5], "part": 5, "path": [2, 5], "per": 5, "perfor": 2, "permeabl": 2, "permx": 5, "permz": [2, 5], "phase": 2, "pi": 5, "pip": 4, "place": [2, 5], "plane": [2, 5], "platform": 10, "pleas": 0, "plopm": [2, 4, 5], "plot": [1, 2, 5, 9], "png": 5, "pore": 5, "poro": 5, "poros": 5, "porv": 5, "posit": 5, "possibl": [2, 4], "postprocess": 5, "precipit": 10, "prerequisit": 4, "present": 5, "pressur": 5, "previou": 4, "print": 5, "printv": 2, "progress": 0, "project": [0, 4, 10], "properti": [2, 5], "pull": 0, "pwd": 4, "py": 2, "pycopm": 3, "pymm": 3, "pyopmnearwel": 3, "pyopmspe11": [2, 3], "pyproject": 4, "python": [3, 5, 10], "python3": 4, "pythonpath": 4, "quantiti": [2, 5], "quick": 5, "r": [2, 4, 5], "rais": 0, "rang": 5, "ranslat": 5, "rate": 2, "read": 4, "recommend": 4, "reduc": 2, "regard": 4, "region": 2, "relat": 3, "releas": 4, "reli": 2, "remedi": 10, "remov": [2, 4, 5], "repo": 4, "report": 2, "repositori": 4, "request": 0, "requir": 4, "resdata": [4, 5], "reservoir": 5, "resourc": [0, 10], "restar": 2, "restart": [2, 5], "result": [2, 5], "rgip": 2, "rintv": 5, "rock": 2, "rotat": [3, 5], "run": [2, 4], "same": 5, "satnum": [2, 5], "satur": [2, 5], "save": 2, "scale": [2, 5], "script": [1, 4, 9], "search": 3, "second": [2, 5], "see": [2, 4], "seem": 4, "separ": [2, 5], "set": [2, 4, 5], "setuptool": 4, "sga": 2, "sh": 4, "should": [2, 4], "show": [2, 5], "shown": 2, "simplifi": [5, 10], "simul": [0, 2, 4, 5, 10], "singl": 5, "size": [2, 5], "slide": [2, 5], "so": 4, "softwar": 0, "solid": [2, 5], "some": [2, 10], "sourc": [2, 3, 10], "space": 2, "spatial": 5, "spe10_model2": 2, "spe11": 10, "spe11b": [3, 5], "spe11b_larger_inj": 2, "spe11b_tun": 5, "special": 5, "specifi": [2, 5], "static": 5, "step": 2, "storag": [0, 10], "studi": 10, "style": 2, "subfig": 2, "subfigur": 5, "submodul": [1, 6, 7], "subpackag": [1, 3, 6], "subplot": [2, 5], "substract": 5, "subsurfac": 0, "subsystem": 4, "succe": 2, "sudo": 4, "summari": [2, 5], "super": 4, "support": [2, 4, 5], "surfac": 5, "sustain": 0, "t": [2, 5], "tab20c_r": 2, "temp": 2, "temperatur": 2, "termin": [2, 4, 5], "test": [2, 4], "test_generic_deck": 2, "texliv": 4, "text": 5, "than": [0, 2, 4, 5], "thei": 2, "them": [0, 5, 10], "thi": [0, 2, 4, 5], "threshold": 5, "tick": 2, "time": [2, 5], "titl": [2, 5], "tkformat": 5, "tkname": 5, "toml": 4, "ton": 2, "tool": [2, 4, 5, 10], "top": 2, "total": 2, "translat": [3, 5], "true": [2, 5], "try": 4, "tunit": 2, "turn": 4, "two": [2, 5], "txt": 4, "type": [2, 5], "u": [2, 4, 5], "ubfig": 5, "uint16": [2, 5], "unit": [2, 5], "unrst": [2, 4], "upgrad": 4, "upper": [2, 5], "uptitl": 5, "us": [0, 2, 4, 5, 10], "user": [4, 5], "util": 1, "v": [2, 5], "v2": 4, "vairabl": 5, "valu": 5, "vapm": 5, "variabl": [2, 5], "vector": [2, 5], "venv": 4, "version": 4, "via": 2, "view": 2, "virtual": 4, "visual": [2, 5], "volum": 5, "vplopm": 4, "vtk": [3, 4, 5], "vtkformat": 2, "w": [2, 5], "we": 2, "week": [2, 5], "welcom": 0, "well": [2, 4, 5, 10], "were": 2, "wheel": 4, "when": [2, 4, 5], "where": [2, 5], "which": [4, 5], "while": 2, "white": [2, 5], "whole": 5, "width": [2, 5], "window": 3, "work": 0, "would": 2, "write": [2, 5], "written": [2, 5], "x": [2, 5], "xco2l": [2, 5], "xco2v": 5, "xgrid": 5, "xh2ol": 5, "xh2ov": 5, "xlnum": 2, "xunit": 2, "xy": 5, "xz": [2, 5], "y": [2, 5], "year": [2, 5], "yformat": 2, "yml": 4, "you": [2, 4], "yunit": 2, "z": [2, 5], "zoom": 3}, "titles": ["About plopm", "plopm Python API", "Examples", "Welcome to plopm\u2019s documentation!", "Installation", "Introduction", "plopm", "plopm package", "plopm.core package", "plopm.core.plopm module", "Related"], "titleterms": {"": 3, "about": 0, "ad": 10, "api": 1, "build": 4, "concept": 5, "content": [7, 8], "convert": 2, "core": [8, 9], "deck": 2, "differ": 2, "document": 3, "exampl": 2, "exprecc": 10, "file": 2, "flow": 4, "gener": 2, "gif": 2, "indic": 3, "input": 2, "instal": 4, "introduct": 5, "linux": 4, "maco": 4, "mask": 2, "micp": 10, "modul": [7, 8, 9], "opm": 4, "overview": 5, "packag": [4, 7, 8], "plopm": [0, 1, 3, 6, 7, 8, 9], "pycopm": 10, "pymm": 10, "pyopmnearwel": 10, "pyopmspe11": 10, "python": [1, 4], "relat": 10, "rotat": 2, "sourc": 4, "spe11b": 2, "submodul": 8, "subpackag": 7, "tabl": 3, "translat": 2, "vtk": 2, "welcom": 3, "window": 4, "zoom": 2}}) \ No newline at end of file diff --git a/docs/text/introduction.rst b/docs/text/introduction.rst index 24a9021..2820dc8 100644 --- a/docs/text/introduction.rst +++ b/docs/text/introduction.rst @@ -72,6 +72,7 @@ where -rotate Grades to rotate the grid in the 2D maps ('0' by default). -translate Translate the grid in the 2D maps x,y directions ('[0,0]' by default). -global Min and max in the colorbars from the current 2D slide values (0) or whole 3D model '1' ('0' by default). +-how Show the cells for the wells/faults when at least one cell contains them ('min') or when all cells are part of the given slides range ('max') ('min' by default). -ncolor Color for the inactive cells in the 2D maps ('w' by default, i.e., white). -lw Line width separated by commas if more than one ('1' by default). -subfigs Generate separated or a single Figure (e.g., '2,2' for four subfigures) ('' by default, i.e., separate figures). diff --git a/src/plopm/core/plopm.py b/src/plopm/core/plopm.py index 56b7fd6..24c808b 100755 --- a/src/plopm/core/plopm.py +++ b/src/plopm/core/plopm.py @@ -323,6 +323,14 @@ def load_parser(): help="Min and max in the colorbars from the current 2D slide values" " (0) or whole 3D model '1' ('0' by default).", ) + parser.add_argument( + "-how", + "--how", + default="min", + help="Show the cells for the wells/faults when at least one cell contains them " + "('min') or when all cells are part of the given slide/slides range ('max') " + "('min' by default).", + ) parser.add_argument( "-ncolor", "--ncolor", diff --git a/src/plopm/utils/initialization.py b/src/plopm/utils/initialization.py index 4104617..9f05183 100755 --- a/src/plopm/utils/initialization.py +++ b/src/plopm/utils/initialization.py @@ -93,6 +93,7 @@ def ini_dic(cmdargs): dic["log"] = (cmdargs["log"].strip()).split(",") dic["rotate"] = (cmdargs["rotate"].strip()).split(",") dic["global"] = int(cmdargs["global"]) + dic["how"] = cmdargs["how"].strip() dic["save"] = (cmdargs["save"].strip()).split(" ") dic["translate"] = (cmdargs["translate"]).split(" ") dic["translate"] = [var.split(",") for var in dic["translate"]] diff --git a/src/plopm/utils/readers.py b/src/plopm/utils/readers.py index 68cf5da..7415233 100644 --- a/src/plopm/utils/readers.py +++ b/src/plopm/utils/readers.py @@ -736,21 +736,48 @@ def get_wells(dic, n): if dic["slide"][n][0][0] > -1: for i, wells in enumerate(dic["wells"]): for j, well in enumerate(wells): - for sld in range(dic["slide"][n][0][0], dic["slide"][n][0][1]): - if well[0] != sld: + if dic["how"] == "min": + count = 0 + for sld in range(dic["slide"][n][0][0], dic["slide"][n][0][1]): + if well[0] == sld: + count = 1 + break + if count == 0: dic["wells"][i][j] = [] + else: + for sld in range(dic["slide"][n][0][0], dic["slide"][n][0][1]): + if well[0] != sld: + dic["wells"][i][j] = [] elif dic["slide"][n][1][0] > -1: for i, wells in enumerate(dic["wells"]): for j, well in enumerate(wells): - for sld in range(dic["slide"][n][1][0], dic["slide"][n][1][1]): - if well[1] != sld: + if dic["how"] == "min": + count = 0 + for sld in range(dic["slide"][n][1][0], dic["slide"][n][1][1]): + if well[1] == sld: + count = 1 + break + if count == 0: dic["wells"][i][j] = [] + else: + for sld in range(dic["slide"][n][1][0], dic["slide"][n][1][1]): + if well[1] != sld: + dic["wells"][i][j] = [] else: for i, wells in enumerate(dic["wells"]): for j, well in enumerate(wells): - for sld in range(dic["slide"][n][2][0], dic["slide"][n][2][1]): - if sld not in range(well[2], well[3] + 1): + if dic["how"] == "min": + count = 0 + for sld in range(dic["slide"][n][2][0], dic["slide"][n][2][1]): + if sld in range(well[2], well[3] + 1): + count = 1 + break + if count == 0: dic["wells"][i][j] = [] + else: + for sld in range(dic["slide"][n][2][0], dic["slide"][n][2][1]): + if sld not in range(well[2], well[3] + 1): + dic["wells"][i][j] = [] def get_faults(dic, n): @@ -800,18 +827,45 @@ def get_faults(dic, n): if dic["slide"][n][0][0] > -1: for i, faults in enumerate(dic["faults"]): for j, fault in enumerate(faults): - for sld in range(dic["slide"][n][0][0], dic["slide"][n][0][1]): - if fault[0] != sld: + if dic["how"] == "min": + count = 0 + for sld in range(dic["slide"][n][0][0], dic["slide"][n][0][1]): + if fault[0] == sld: + count = 1 + break + if count == 0: dic["faults"][i][j] = [] + else: + for sld in range(dic["slide"][n][0][0], dic["slide"][n][0][1]): + if fault[0] != sld: + dic["faults"][i][j] = [] elif dic["slide"][n][1][0] > -1: for i, faults in enumerate(dic["faults"]): for j, fault in enumerate(faults): - for sld in range(dic["slide"][n][1][0], dic["slide"][n][1][1]): - if fault[1] != sld: + if dic["how"] == "min": + count = 0 + for sld in range(dic["slide"][n][1][0], dic["slide"][n][1][1]): + if fault[1] == sld: + count = 1 + break + if count == 0: dic["faults"][i][j] = [] + else: + for sld in range(dic["slide"][n][1][0], dic["slide"][n][1][1]): + if fault[1] != sld: + dic["faults"][i][j] = [] else: for i, faults in enumerate(dic["faults"]): for j, fault in enumerate(faults): - for sld in range(dic["slide"][n][2][0], dic["slide"][n][2][1]): - if sld not in range(fault[2], fault[3] + 1): + if dic["how"] == "min": + count = 0 + for sld in range(dic["slide"][n][2][0], dic["slide"][n][2][1]): + if sld in range(fault[2], fault[3] + 1): + count = 1 + break + if count == 0: dic["faults"][i][j] = [] + else: + for sld in range(dic["slide"][n][2][0], dic["slide"][n][2][1]): + if sld not in range(fault[2], fault[3] + 1): + dic["faults"][i][j] = [] diff --git a/src/plopm/utils/write.py b/src/plopm/utils/write.py index 7582137..ba96fa8 100644 --- a/src/plopm/utils/write.py +++ b/src/plopm/utils/write.py @@ -1002,7 +1002,7 @@ def handle_well_or_grid_or_fault(dic, imag, divider, vect, n, var): if dic[f"n{var}"] < 70: for i, wells in enumerate(dic[f"l{var}"]): well = dic[var][dic[f"l{var}"].index(wells)] - if well[0]: + if any(well): plt.text( 0, i + 1,