expreccs.visualization.reading module#

Read and normalize OPM Flow output for expreccs visualization.

The module discovers model cases, loads restart, initialization, grid, and summary files, derives dates and sensor locations, and builds saturation, mass, phase, pressure, and face-flux arrays consumed by plotting workflows.

strip_trailing_digits(name)[source]#

Remove a trailing iteration suffix from a model name.

Parameters:
nameAny

Model or folder name.

Returns:
str

Name without a trailing numeric suffix.

read_simulations(dic)[source]#

Read selected OPM cases and prepare plotting arrays.

Parameters:
dicAny

Shared mutable expreccs configuration and runtime data.

read_fluxes(case)[source]#

Read directional water fluxes for back-coupling.

Parameters:
caseAny

Case.

Returns:
list[list[np.ndarray]]

Directional flux arrays by report step.

read_mask(case)[source]#

Read the site-region mask from a regional case.

Parameters:
caseAny

Case.

Returns:
np.ndarray

Boolean mask for cells in the site region.

define_cases(dic, fol, folders)[source]#

Identify site and iterative regional model folders.

Parameters:
dicAny

Shared mutable expreccs configuration and runtime data.

folAny

Output folder or model location.

foldersAny

Folders.

build_arrays(dic, fol, res)[source]#

Build dynamic and static arrays used by plotting.

Parameters:
dicAny

Shared mutable expreccs configuration and runtime data.

folAny

Output folder or model location.

resAny

Reservoir case name.

set_model_names(dic, res)[source]#

Set normalized geometry names for a reservoir case.

Parameters:
dicAny

Shared mutable expreccs configuration and runtime data.

resAny

Reservoir case name.