plopm.config.config module#
Configuration and simulation-data models shared across plopm workflows.
PlopmConfig stores command-line options and normalized runtime settings used to create summary plots, spatial maps, animations, and VTK output. SimData stores OPM file handles, grid dimensions, and cell data loaded for one simulation case.
Both objects are mutable because CLI values are normalized and simulation data are populated progressively during processing.
- class PlopmConfig(gif=False, csv=False, png=False, vtk=False, equal_aspect=False, remove_duplicate_labels=False, list_variables=False, gif_loop=False, step_plot=False, global_range=False, rst_range=False, sensor=False, layer=False, csv_column_summary=False, discrete=True, fontsize=0.0, mask_threshold=0.0, gif_interval=0.0, stress_coefficient=0.0, xscale=1.0, yscale=1.0, ensemble=0, ncolors=1, color_log_ticks=<factory>, case_labels=<factory>, cases=<factory>, dual_grid=<factory>, subplot_grid=<factory>, variables=<factory>, filters=<factory>, title=<factory>, clim=<factory>, figsize=<factory>, min_threshold=<factory>, max_threshold=<factory>, grid_edges=<factory>, colorbar_tick_count=<factory>, legend_labels=<factory>, hide_map_elements=<factory>, time_units=<factory>, scale_factor=<factory>, axis_grid=<factory>, dpi=<factory>, colorbar_ticks=<factory>, legend_location=<factory>, vtk_format=<factory>, vtk_names=<factory>, color_log=<factory>, rotation=<factory>, filename=<factory>, translation=<factory>, restart=<factory>, aggregation=<factory>, distance=<factory>, histogram=<factory>, xlabel=<factory>, xformat=<factory>, xtick_count=<factory>, xlog=<factory>, xlim=<factory>, ylabel=<factory>, yformat=<factory>, ytick_count=<factory>, ylog=<factory>, ylim=<factory>, vsum=<factory>, summary=<factory>, time=<factory>, wells=<factory>, faults=<factory>, slice=<factory>, csv_columns=<factory>, mass_vars=<factory>, summary_mass=<factory>, mass_fracs=<factory>, caprock_vars=<factory>, linewidth_values=<factory>, units=<factory>, cb_formats=<factory>, colormaps=<factory>, disc_colormaps=<factory>, linestyle=<factory>, linewidth=<factory>, colors=<factory>, colors_default=<factory>, linestyle_default=<factory>, colorbar_position=(-1.0, -1.0, -1.0, -1.0), difference_input='', colors_raw='', output_dir='', case='', fill_between_style='', colorbar_format='', fc='', inactive_color='', mask_variable='', suptitle='', colorbar_label='', slice_mode='', xunits='', yunits='', xunit='', yunit='')[source]#
Bases:
objectOptions and runtime settings for a plopm operation.
Most list fields contain one value per variable, case, or subplot after initialization. Values read from the CLI are normalized before plotting so downstream functions can use consistent indexing.
- Attributes:
- gif, csv, png, vtk
Whether GIF, CSV, PNG, or VTK output is active for the current run.
- equal_aspect
Whether spatial maps use the same scale along both coordinate axes.
- remove_duplicate_labels
Whether repeated axis labels are hidden in subplot layouts.
- list_variables
Whether available INIT, UNRST, and summary variables are printed.
- gif_loop
Whether generated GIF animations repeat after the final frame.
- step_plot
Whether one-dimensional series are drawn as step plots.
- global_range
Whether map limits and features are evaluated globally instead of only within the selected slice.
- rst_range
Whether PNG color limits are evaluated over the restart range.
- sensor
Whether one-dimensional values are extracted at a grid-cell sensor.
- layer
Whether one-dimensional values are extracted along a grid axis or layer.
- csv_column_summary
Whether a one-dimensional series is read from CSV columns.
- discrete
Whether the current spatial quantity uses discrete color categories.
- fontsize
Base font size used in generated figures.
- mask_threshold
Threshold applied to the selected mask variable.
- gif_interval
Delay between GIF frames.
- stress_coefficient
Vertical stress coefficient used for caprock-integrity quantities.
- xscale, yscale
Factors converting grid coordinates to the requested spatial units.
- ensemble
Ensemble mode controlling uncertainty bands and bounding members.
- ncolors
Number of case-dependent styles used for summary plots.
- color_log_ticks
Tick values used on logarithmic colorbars.
- case_labels
User-provided case names used in legends and ensemble labels.
- cases
Simulation-case paths grouped as requested by the CLI.
- dual_grid
Per-variable flags enabling dual-porosity grid handling.
- subplot_grid
Requested subplot rows and columns.
- variables
Variables or variable expressions requested for processing.
- filters
Property-filter expressions applied per case or variable.
- title
Per-plot titles.
- clim
Lower and upper color limits for spatial maps.
- figsize
Figure width and height for each generated plot.
- min_threshold, max_threshold
Limits outside which quantity values are hidden.
- grid_edges
Per-map settings controlling cell-edge drawing.
- colorbar_tick_count
Requested number of colorbar ticks.
- legend_labels
Labels for cases, variables, or ensemble bounds.
- hide_map_elements
Map components to omit, such as axes, labels, or colorbars.
- time_units
Requested time unit for each one-dimensional plot.
- scale_factor
Multipliers applied to plotted or exported quantity values.
- axis_grid
Per-plot settings controlling the Matplotlib axis grid.
- dpi
Output resolution for each generated figure.
- colorbar_ticks
Explicit colorbar tick values.
- legend_location
Per-plot legend placement.
- vtk_format
VTK data type selected for each exported variable.
- vtk_names
Variable names written to VTK cell-data arrays.
- color_log
Flags selecting logarithmic color normalization.
- rotation
Rotation angles applied to grid coordinates, in degrees.
- filename
Output filenames normalized per requested plot.
- translation
Coordinate translations applied after rotation.
- restart
Selected OPM restart report steps.
- aggregation
Aggregation method applied through a slice or selected cells.
- distance
Distance method and target, such as a sensor or model boundaries.
- histogram
Histogram settings, including the requested bins.
- xlabel, ylabel
Per-plot axis labels.
- xformat, yformat
Format strings used for axis tick labels.
- xtick_count, ytick_count
Requested numbers of major ticks.
- xlog, ylog
Flags selecting logarithmic axes.
- xlim, ylim
Per-plot axis limits.
- vsum
Summary-variable expressions prepared for plotting.
- summary
Loaded or derived summary-series values.
- time
Time coordinates associated with summary values.
- wells, faults
Parsed feature locations used in spatial maps.
- slice
Parsed i, j, and k selections used by all workflows.
- csv_columns
CSV column settings retained in parsed per-plot form.
- mass_vars
Supported component-mass quantities.
- summary_mass
Summary vectors converted from standard volume to mass.
- mass_fracs
Supported component mass-fraction quantities.
- caprock_vars
Supported caprock-integrity quantities.
- linewidth_values
Default line widths before per-variable normalization.
- units
Display units associated with requested quantities.
- cb_formats
Normalized numeric formats used for colorbar labels.
- colormaps
Colormaps assigned to spatial variables.
- disc_colormaps
Available colormaps suitable for discrete values.
- linestyle, linewidth, colors
Normalized styles used by summary plots.
- colors_default, linestyle_default
Default style sequences used when none are supplied.
- colorbar_position
Relative position and size of an explicitly placed colorbar axis.
- difference_input
Second case, folder, or file used to calculate differences.
- colors_raw
Color specification received from the CLI before normalization.
- output_dir
Directory in which generated files are written.
- case
Primary case path used for file detection and classification.
- fill_between_style
Colors and opacity values for ensemble uncertainty bands.
- colorbar_format
Colorbar format specification received from the CLI.
- fc
Figure or axes face color.
- inactive_color
Color assigned to inactive grid cells.
- mask_variable
Variable used to mask spatial-map values.
- suptitle
Figure-level title shared by all subplots.
- colorbar_label
User-provided colorbar label.
- slice_mode
Mode used when retaining wells or faults in an aggregated slice.
- xunits, yunits
Requested spatial unit codes for both coordinate axes.
- xunit, yunit
Formatted spatial unit labels shown on the axes.
- slices
Normalized half-open ranges used for spatial slice aggregation.
- csv_cols
Normalized CSV column indices used for gridded CSV data.
- Parameters:
gif (bool)
csv (bool)
png (bool)
vtk (bool)
equal_aspect (bool)
remove_duplicate_labels (bool)
list_variables (bool)
gif_loop (bool)
step_plot (bool)
global_range (bool)
rst_range (bool)
sensor (bool)
layer (bool)
csv_column_summary (bool)
discrete (bool)
fontsize (float)
mask_threshold (float)
gif_interval (float)
stress_coefficient (float)
xscale (float)
yscale (float)
ensemble (int)
ncolors (int)
color_log_ticks (list)
case_labels (list)
cases (list)
dual_grid (list)
subplot_grid (list)
variables (list)
filters (list)
title (list)
clim (list)
figsize (list)
min_threshold (list)
max_threshold (list)
grid_edges (list)
colorbar_tick_count (list)
legend_labels (list)
hide_map_elements (list)
time_units (list)
scale_factor (list)
axis_grid (list)
dpi (list)
colorbar_ticks (list)
legend_location (list)
vtk_format (list)
vtk_names (list)
color_log (list)
rotation (list)
filename (list)
translation (list)
restart (list)
aggregation (list)
distance (list)
histogram (list)
xlabel (list)
xformat (list)
xtick_count (list)
xlog (list)
xlim (list)
ylabel (list)
yformat (list)
ytick_count (list)
ylog (list)
ylim (list)
vsum (list)
summary (list)
time (list)
wells (list)
faults (list)
slice (list)
csv_columns (list)
mass_vars (list)
summary_mass (list)
mass_fracs (list)
caprock_vars (list)
linewidth_values (list)
units (list)
cb_formats (list)
colormaps (list)
disc_colormaps (list)
linestyle (list)
linewidth (list)
colors (list)
colors_default (list)
linestyle_default (list)
difference_input (str)
colors_raw (str)
output_dir (str)
case (str)
fill_between_style (str)
colorbar_format (str)
fc (str)
inactive_color (str)
mask_variable (str)
suptitle (str)
colorbar_label (str)
slice_mode (str)
xunits (str)
yunits (str)
xunit (str)
yunit (str)
- class SimData(init=None, unrst=None, grid=None, porv=<factory>, dx=<factory>, dy=<factory>, dz=<factory>, active_pv=<factory>, active_idx=<factory>, steps=<factory>, times=<factory>, ncells=0, nsteps=0, nx=0, ny=0, nz=0)[source]#
Bases:
objectOPM readers, grid properties, and selected report steps for one case.
Arrays in global cell order use the full
nx * ny * nzgrid. Arrays in active-cell order follow the indexing used by INIT and UNRST properties.- Attributes:
- init, unrst, grid
OPM readers for static properties, restart properties, and grid geometry.
- porv
Pore volume in global cell order; inactive cells are non-positive.
- dx, dy, dz
Cell dimensions in active-cell order.
- active_pv
Pore volume in active-cell order.
- active_idx
Mapping from global cell indices to active-cell indices.
- steps, times
Selected restart report steps and their simulation times.
- ncells, nsteps
Total grid-cell and available report-step counts.
- nx, ny, nz
Grid dimensions along the i, j, and k axes.
- Parameters:
- init: EclFile#
- unrst: ERst#
- grid: EGrid#
- porv: NDArray#
- dx: NDArray#
- dy: NDArray#
- dz: NDArray#
- active_pv: NDArray#
- active_idx: NDArray#