plopm.utils.readers module
Utiliy functions to read the OPM Flow simulator type output files
- plopm.utils.readers.compute_distance(cfg: ConfigPlopm, read: ReadData, quans: list, n: int) tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]]]
Get the required variables from the simulation files
- plopm.utils.readers.do_read_variables(cfg: ConfigPlopm, read: ReadData, quans: list, n: int, ntot: list) tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]]]
Get the required variables from the simulation files
- plopm.utils.readers.get_csvs(cfg: ConfigPlopm, deck: str, n: int) tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]], int, int, str, str]
Read the csv quantities
- plopm.utils.readers.get_faults(cfg: ConfigPlopm, n: int) tuple[list, list]
Using the input deck (.DATA) to read the i,j fault locations
- plopm.utils.readers.get_histogram(cfg: ConfigPlopm, read: ReadData, quans: list, nrst: int) ndarray[tuple[Any, ...], dtype[_ScalarT]]
Get the required variables from the histogram
- plopm.utils.readers.get_indices(name: str, nx: int, ny: int, nz: int) list
Compute the i, j, or k indices
- plopm.utils.readers.get_quantity(deck: str, read: ReadData, name: str, nrst: int, skl: float, mass: list[str], mass_all: list[str], caprock: list[str], stress: float, filters: str, isgif: bool, vmin: str, vmax: str, cvs: list) tuple[str, ndarray[tuple[Any, ...], dtype[_ScalarT]]]
Handle the quantity from the OPM output files
- plopm.utils.readers.get_readers(deck: str, gif: bool, vtk: bool, vrs: list, restart: list, filters: list, n: int = 0) ReadData
Load the opm parsing methods
- plopm.utils.readers.get_unit(name: str) str
Get the variable unit
- plopm.utils.readers.get_wells(cfg: ConfigPlopm, n: int) tuple[list, list]
Using the input deck (.DATA) to read the i,j well locations
- plopm.utils.readers.get_xycoords(cfg: ConfigPlopm, read: ReadData, n: int) tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]]]
Handle the coordinates from the OPM Grid to the 2D xy-mesh
- plopm.utils.readers.get_xzcoords(cfg: ConfigPlopm, read: ReadData, n: int) tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]]]
Handle the coordinates from the OPM Grid to the 2D xz-mesh using opm
- plopm.utils.readers.get_yzcoords(cfg: ConfigPlopm, read: ReadData, n: int) tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]]]
Handle the coordinates from the OPM Grid to the 2D yz-mesh using opm
- plopm.utils.readers.handle_caprock(read: ReadData, name: str, nrst: int, stress: float) tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], str]
Compute quantities related to the caprock integrity
- plopm.utils.readers.handle_filter(porvs: ndarray[tuple[Any, ...], dtype[_ScalarT]], quan1: ndarray[tuple[Any, ...], dtype[_ScalarT]], oper: str, value: float) ndarray[tuple[Any, ...], dtype[_ScalarT]]
Apply the requested filter
- plopm.utils.readers.handle_mass(read: ReadData, name: str, nrst: int) ndarray[tuple[Any, ...], dtype[_ScalarT]]
Compute the mass (intensive quantities)
- plopm.utils.readers.handle_saturation(unrst: ERst, name: str, nrst: int) ndarray[tuple[Any, ...], dtype[_ScalarT]]
Compute the oil saturation
- plopm.utils.readers.initialize_time(times: str) tuple[float, str]
Handle the time units for the x axis in the summary
- plopm.utils.readers.operate(var: ndarray[tuple[Any, ...], dtype[float64]], quan1: ndarray[tuple[Any, ...], dtype[float64]], oper: str) ndarray[tuple[Any, ...], dtype[float64]]
Applied the requested operation
- plopm.utils.readers.project(var: ndarray[tuple[Any, ...], dtype[_ScalarT]], oper: str, porv: ndarray[tuple[Any, ...], dtype[_ScalarT]]) ndarray[tuple[Any, ...], dtype[_ScalarT]]
Applied the requested projection
- plopm.utils.readers.read_oned(cfg: ConfigPlopm, case: str, quan: str, tunit: str, qskl: float, n: int) tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]], str, str]
Handle the oned vectors
- plopm.utils.readers.resolve_variable(cfg: ConfigPlopm, read: ReadData, key_up: str, key_low: str, nrst: int, init: EclFile, unrst: ERst, mass_all: list, caprock_list: list)
Handle the variable
- plopm.utils.readers.type_of_mass(name: str, co2_g: ndarray[tuple[Any, ...], dtype[_ScalarT]], co2_d: ndarray[tuple[Any, ...], dtype[_ScalarT]], h2o_l: ndarray[tuple[Any, ...], dtype[_ScalarT]], h2o_v: ndarray[tuple[Any, ...], dtype[_ScalarT]], x_l_co2: ndarray[tuple[Any, ...], dtype[_ScalarT]], x_g_h2o: ndarray[tuple[Any, ...], dtype[_ScalarT]]) ndarray[tuple[Any, ...], dtype[_ScalarT]]
From the given variable return the associated mass
- plopm.utils.readers.where_at(case: str, vec: str) str
Using the input deck (.DATA) to read the i,j fault locations