plopm.utils.readers module
Utility 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, NDArray]
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, NDArray]
Get the required variables from the simulation files
- plopm.utils.readers.get_csvs(cfg: ConfigPlopm, deck: str, n: int) tuple[NDArray, NDArray, 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
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]
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, NDArray]
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, NDArray]
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, NDArray]
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, str]
Compute quantities related to the caprock integrity
- plopm.utils.readers.handle_filter(porvs: NDArray, quan1: NDArray, oper: str, value: float) NDArray
Apply the requested filter
- plopm.utils.readers.handle_mass(read: ReadData, name: str, nrst: int) NDArray
Compute the mass (intensive quantities)
- plopm.utils.readers.handle_saturation(unrst: ERst, name: str, nrst: int) NDArray
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[float64], quan1: NDArray[float64], oper: str) NDArray[float64]
Applied the requested operation
- plopm.utils.readers.project(var: NDArray, oper: str, porv: NDArray) NDArray
Applied the requested projection
- plopm.utils.readers.read_oned(cfg: ConfigPlopm, case: str, quan: str, tunit: str, qskl: float, n: int) tuple[NDArray, NDArray, 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, co2_d: NDArray, h2o_l: NDArray, h2o_v: NDArray, x_l_co2: NDArray, x_g_h2o: NDArray) NDArray
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