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() 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.