pofff.jobs.data module
Write benchmark time-series and spatial (dense) data from OPM simulations.
- class pofff.jobs.data.SimulationContext(resolution: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy._typing._array_like._ScalarT]], dense_t: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy._typing._array_like._ScalarT]], maps: ~pathlib.Path, where: ~pathlib.Path = PosixPath('.'), sparse_t: float = 600.0, dims: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy._typing._array_like._ScalarT]] = <factory>, sim: ~pathlib.Path | None = None, unrst: ~opm.opmcommon_python.ERst | None = None, ini: ~opm.opmcommon_python.EclFile | None = None, egrid: ~opm.opmcommon_python.EGrid | None = None, smspec: ~opm.opmcommon_python.ESmry | None = None, times: list[float] = <factory>, times_summary: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy._typing._array_like._ScalarT]] | None = None, time_initial: float = 0.0, porv: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy._typing._array_like._ScalarT]] | None = None, actind: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy._typing._array_like._ScalarT]] | None = None, gxyz: tuple[int, int, int] | None = None, norst: int | None = None)
Bases:
objectSimulation-wide state, file handles, and grid information.
- actind: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None = None
- dense_t: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- dims: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- egrid: EGrid | None = None
- gxyz: tuple[int, int, int] | None = None
- ini: EclFile | None = None
- maps: Path
- norst: int | None = None
- property nxz: ndarray[tuple[Any, ...], dtype[_ScalarT]]
Alias for resolution to preserve original naming.
- porv: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None = None
- resolution: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- sim: Path | None = None
- smspec: ESmry | None = None
- sparse_t: float = 600.0
- time_initial: float = 0.0
- times: list[float]
- times_summary: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None = None
- unrst: ERst | None = None
- where: Path = PosixPath('.')
- class pofff.jobs.data.SparseResults(ctx: ~pofff.jobs.data.SimulationContext, m_c_series: list[float] = <factory>, m_c: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy._typing._array_like._ScalarT]] | None = None)
Bases:
objectContainer for sparse (time-series) benchmark quantities.
- ctx: SimulationContext
- dissa: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- dissb: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- dx: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- dz: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- fipnum: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- imma: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- immb: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- m_c: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None = None
- m_c_series: list[float]
- moba: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- mobb: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- pop1: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- pop2: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- seala: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- sealb: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- sealt: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- times_data: ndarray[tuple[Any, ...], dtype[_ScalarT]]
- pofff.jobs.data.compute_m_c(ctx: SimulationContext, res: SparseResults) None
Compute mass-center migration metric.
- pofff.jobs.data.create_from_summary(ctx: SimulationContext, res: SparseResults) None
Extract sparse quantities from OPM summary vectors.
- pofff.jobs.data.dense_data(ctx: SimulationContext) None
Write spatial maps for selected dense output times.
- pofff.jobs.data.find_simulation_base(path: Path) Path
Locate simulation base name from .UNRST file.
- pofff.jobs.data.interpolate_sparse(ctx: SimulationContext, res: SparseResults) None
Interpolate sparse quantities onto uniform time grid.
- pofff.jobs.data.main(argv=None) None
Entry point for benchmark postprocessing.
- pofff.jobs.data.read_opm(ctx: SimulationContext) None
Load OPM restart, grid, and summary data.
- pofff.jobs.data.sparse_data(ctx: SimulationContext) None
Compute and write sparse time-series benchmark data.
- pofff.jobs.data.write_dense_data(ctx: SimulationContext, refxz, sgas, cco2, hours) None
Write single spatial map CSV.
- pofff.jobs.data.write_sparse_data(res: SparseResults) None
Write sparse time-series values to CSV.