pofff.jobs.data module

Write benchmark time-series and spatial (dense) data from OPM simulations.

class pofff.jobs.data.SimulationContext(resolution: NDArray, dense_t: NDArray, maps: Path, where: Path = PosixPath('.'), sparse_t: float = 600.0, dims: NDArray = <factory>, sim: Path | None = None, unrst: ERst | None = None, ini: EclFile | None = None, egrid: EGrid | None = None, smspec: ESmry | None = None, times: list[float] = <factory>, times_summary: NDArray | None = None, time_initial: float = 0.0, porv: NDArray | None = None, actind: NDArray | None = None, gxyz: tuple[int, int, int] | None=None, norst: int | None = None)

Bases: object

Simulation-wide state, file handles, and grid information.

actind: NDArray | None = None
dense_t: NDArray
dims: NDArray
egrid: EGrid | None = None
gxyz: tuple[int, int, int] | None = None
ini: EclFile | None = None
maps: Path
norst: int | None = None
property nxz: NDArray

Alias for resolution to preserve original naming.

porv: NDArray | None = None
resolution: NDArray
sim: Path | None = None
smspec: ESmry | None = None
sparse_t: float = 600.0
time_initial: float = 0.0
times: list[float]
times_summary: NDArray | None = None
unrst: ERst | None = None
where: Path = PosixPath('.')
class pofff.jobs.data.SparseResults(ctx: SimulationContext, m_c_series: list[float] = <factory>, m_c: NDArray | None = None)

Bases: object

Container for sparse (time-series) benchmark quantities.

ctx: SimulationContext
dissa: NDArray
dissb: NDArray
dx: NDArray
dz: NDArray
fipnum: NDArray
imma: NDArray
immb: NDArray
m_c: NDArray | None = None
m_c_series: list[float]
moba: NDArray
mobb: NDArray
pop1: NDArray
pop2: NDArray
seala: NDArray
sealb: NDArray
sealt: NDArray
times_data: NDArray
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.