pyopmspe11.visualization.data module#

Generate SPE11 benchmark CSV data from OPM Flow results.

The module reads INIT, UNRST, EGRID, SMSPEC, and INFOSTEP data and supports four outputs: performance time series, sparse benchmark quantities, dense spatial maps, and spatial performance metrics. Simulation cells are mapped to the regular benchmark reporting grid by aligned-grid or polygon-intersection methods.

class DataConfig(outfol, case, mode, lower, deckfol, flowfol, where, nxyz, dims, denset, sparset, nocellsrepgrid)[source]#

Bases: object

Paths and benchmark settings used to generate CSV output.

Attributes:
outfol

Base directory containing the generated deck and Flow results.

case

SPE11 case identifier.

mode

Requested combination of dense, sparse, and performance outputs.

lower

Whether processing is restricted to the lower neighbourhood.

deckfol, flowfol, where

Directories containing the deck, Flow results, and generated CSV files.

nxyz

Reporting-grid cell counts along x, y, and z.

dims

Physical reporting-grid dimensions.

denset

Simulation times requested for dense output, in seconds.

sparset

Sparse and performance sampling interval, in seconds.

nocellsrepgrid

Total number of cells in the benchmark reporting grid.

Parameters:
  • outfol (str)

  • case (str)

  • mode (str)

  • lower (bool)

  • deckfol (str)

  • flowfol (str)

  • where (str)

  • nxyz (NDArray)

  • dims (list)

  • denset (NDArray)

  • sparset (float)

  • nocellsrepgrid (int)

outfol: str#
case: str#
mode: str#
lower: bool#
deckfol: str#
flowfol: str#
where: str#
nxyz: NDArray#
dims: list#
denset: NDArray#
sparset: float#
nocellsrepgrid: int#
class SimulationData(simres, unrst, init, egrid, smspec, times, timesumary, timeini, noskiprst, norst, porv, porva, actind, immiscible, isothermal, cornpoint, nocellst, nocellsa, dof, nocellsxz, simdim)[source]#

Bases: object

OPM readers and derived metadata for one simulation result set.

Arrays in global order contain all grid cells. Active arrays follow the indexing used by INIT and UNRST properties.

Attributes:
simres

Common path stem of the simulation result files.

unrst, init, egrid, smspec

OPM readers for restart, initialization, grid, and summary data.

times

Restart times measured from the detected injection start.

timesumary

Summary times measured from the same injection start.

timeini

Absolute simulation time at the detected injection start.

noskiprst

Restart index immediately before or at the injection start.

norst

Number of restart report steps.

porv, porva

Pore volume in global and active-cell order.

actind

Global indices of active cells.

immiscible, isothermal

Whether dissolved components or thermal variables are absent.

cornpoint

Whether the simulation uses the corner-point grid layout handled here.

nocellst, nocellsa, nocellsxz

Total, active, and x-z plane cell counts.

dof

Number of primary degrees of freedom per active cell.

simdim

Simulation-grid dimensions along x, y, and z.

Parameters:
  • simres (str)

  • unrst (ERst)

  • init (EclFile)

  • egrid (EGrid)

  • smspec (ESmry)

  • times (list)

  • timesumary (list)

  • timeini (float)

  • noskiprst (int)

  • norst (int)

  • porv (NDArray)

  • porva (NDArray)

  • actind (list)

  • immiscible (bool)

  • isothermal (bool)

  • cornpoint (bool)

  • nocellst (int)

  • nocellsa (int)

  • dof (int)

  • nocellsxz (int)

  • simdim (list)

simres: str#
unrst: ERst#
init: EclFile#
egrid: EGrid#
smspec: ESmry#
times: list#
timesumary: list#
timeini: float#
noskiprst: int#
norst: int#
porv: NDArray#
porva: NDArray#
actind: list#
immiscible: bool#
isothermal: bool#
cornpoint: bool#
nocellst: int#
nocellsa: int#
dof: int#
nocellsxz: int#
simdim: list#
generate_data(cmdargs)[source]#

Generate the requested SPE11 benchmark CSV files.

The function initializes readers once and dispatches performance, sparse, dense, and performance-spatial processing according to the selected mode.

Parameters:
cmdargsdict

Parsed data-generation arguments.

Returns:
list[str]

Names of the generated benchmark CSV files.

Parameters:

cmdargs (dict)

Return type:

list[str]

build_config_from_args(cmdargs)[source]#

Build data-generation settings from parsed arguments.

Parameters:
cmdargsdict

Parsed data-generation arguments.

Returns:
DataConfig

Initialized benchmark data settings.

Parameters:

cmdargs (dict)

Return type:

DataConfig

read_simulations(cfg)[source]#

Open OPM result files and derive shared simulation metadata.

Parameters:
cfgDataConfig

Initialized runtime configuration.

Returns:
SimulationData

Loaded OPM readers and derived simulation metadata.

Parameters:

cfg (DataConfig)

Return type:

SimulationData

generate_performance_data(cfg, sim)[source]#

Generate regular and detailed performance CSV data.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

Parameters:
Return type:

None

read_infostep_data(cfg, sim)[source]#

Read solver-step records from the INFOSTEP file.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

Returns:
tagslist[str]

Column names read from the INFOSTEP header.

infostepsNDArray

Numeric INFOSTEP rows at or after the selected simulation start.

Parameters:
Return type:

tuple[list, NDArray]

build_performance_data(cfg, sim)[source]#

Build regular and detailed performance-series records.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

Returns:
dict[str, list[str]]

Regular and detailed performance CSV rows keyed by series and detailed.

Parameters:
Return type:

dict

extract_solver_metrics(infosteps, tags)[source]#

Extract solver metrics from INFOSTEP columns.

Parameters:
infostepsNDArray

Numeric INFOSTEP records.

tagslist

INFOSTEP column names.

Returns:
dict[str, NDArray]

Convergence flags, iteration counts, time-step sizes, and solver times extracted from the INFOSTEP columns.

Parameters:
  • infosteps (NDArray)

  • tags (list)

Return type:

dict

compute_cpu_times(cfg, sim, times_det)[source]#

Align CPU-time increments with performance output intervals.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

times_detNDArray

Detailed output times.

Returns:
cpu_timesNDArray

CPU-time increments for the detailed output intervals.

map_summaryNDArray

Sparse-output interval associated with each detailed interval.

summary_timesNDArray

Summary-vector times relative to the simulation start.

Parameters:
Return type:

tuple[list, NDArray, NDArray]

build_time_series(sim, times_data, metrics, map_info, map_summary, interp_fgmip, cpu)[source]#

Build regular performance time-series rows.

Parameters:
simSimulationData

Loaded simulation readers and metadata.

times_dataNDArray

Requested output times.

metricsdict

Extracted solver metrics.

map_infoNDArray

Mapping from INFOSTEP rows to output intervals.

map_summaryNDArray

Mapping from detailed intervals to summary records.

interp_fgmipinterp1d

Interpolated field gas mass in place.

cpulist

CPU-time increments.

Returns:
list[str]

Header and rows for the regularly sampled performance CSV file.

Parameters:
  • sim (SimulationData)

  • times_data (NDArray)

  • metrics (dict)

  • map_info (NDArray)

  • map_summary (NDArray)

  • interp_fgmip (interp1d)

  • cpu (list)

Return type:

list

build_detailed_series(sim, metrics, detail_info, infotimes, interp_fgmip, cpu)[source]#

Build detailed performance time-series rows.

Parameters:
simSimulationData

Loaded simulation readers and metadata.

metricsdict

Extracted solver metrics.

detail_infoNDArray

Detail info.

infotimesNDArray

Infotimes.

interp_fgmipinterp1d

Interpolated field gas mass in place.

cpulist

CPU-time increments.

Returns:
list[str]

Header and rows for the detailed performance CSV file.

Parameters:
  • sim (SimulationData)

  • metrics (dict)

  • detail_info (NDArray)

  • infotimes (NDArray)

  • interp_fgmip (interp1d)

  • cpu (list)

Return type:

list

write_performance_csv(cfg, perf)[source]#

Write regular and detailed performance CSV files.

Parameters:
cfgDataConfig

Initialized runtime configuration.

perfdict

Perf.

Parameters:
Return type:

None

generate_sparse_data(cfg, sim)[source]#

Generate sparse benchmark time-series data.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

Parameters:
Return type:

None

build_sparse_data(cfg, sim)[source]#

Build and interpolate sparse benchmark quantities.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

Returns:
dict[str, NDArray]

Sparse benchmark quantities interpolated to the requested output times.

Parameters:
Return type:

dict

get_fip_groups(cfg)[source]#

Return FIPNUM groups used by sparse benchmark quantities.

Parameters:
cfgDataConfig

Initialized runtime configuration.

Returns:
dict[str, list[int]]

FIPNUM values contributing to dissolved, sealing, and boundary quantities.

Parameters:

cfg (DataConfig)

Return type:

dict

build_summary_data(cfg, sim, fipnum, groups)[source]#

Build sparse quantities from OPM summary vectors.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

fipnumlist

FIPNUM values in global cell order.

groupsdict

FIPNUM groups for sparse benchmark quantities.

Returns:
dict[str, NDArray]

Sensor pressures and mobile, immobile, dissolved, sealing, and boundary mass series.

Parameters:
Return type:

dict

extract_boundary_pressures(cfg, sim, fipnum)[source]#

Extract initial and summary pressure series at both sensors.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

fipnumlist

FIPNUM values in global cell order.

Returns:
pop1, pop2list[float]

Pressure series at the first and second benchmark sensors, in pascals.

Parameters:
Return type:

tuple[list, list]

compute_mixing_measure(cfg, sim, fipnum, dx, dy, dz)[source]#

Calculate the Box C mixing measure for each restart step.

Concentration differences are evaluated between Box C cells and valid neighboring cells without wrapping across grid boundaries.

Parameters:
cfgDataConfig

Initialized benchmark-data configuration.

simSimulationData

Loaded simulation readers and grid dimensions.

fipnumlist

FIPNUM values in global cell order.

dx, dy, dznp.ndarray

Cell dimensions in the same order as fipnum.

Returns:
list[float]

Mixing-measure values for the selected restart steps.

Parameters:
Return type:

list

interpolate_sparse_data(times_data, sim, summary, m_c)[source]#

Interpolate sparse quantities to the requested output times.

Parameters:
times_dataNDArray

Requested output times.

simSimulationData

Loaded simulation readers and metadata.

summarydict

Sparse summary quantities.

m_clist

Mixing-measure values at restart times.

Returns:
dict[str, NDArray]

Sparse quantities and output times evaluated on the requested time grid.

Parameters:
Return type:

dict

write_sparse_csv(cfg, sparse)[source]#

Write the sparse benchmark time-series CSV file.

Parameters:
cfgDataConfig

Initialized runtime configuration.

sparsedict

Sparse.

Parameters:
Return type:

None

generate_dense_data(cfg, sim)[source]#

Generate dense and performance-spatial benchmark files.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

Returns:
list[str]

Names of the generated dense and performance-spatial CSV files.

Parameters:
Return type:

list[str]

supports_fast_dense_mapping(cfg, sim, dx, dz)[source]#

Return whether aligned grids support direct dense mapping.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

dxNDArray

Cell sizes along x.

dzNDArray

Cell sizes along z.

Returns:
bool

Whether the requested condition is satisfied.

Parameters:
Return type:

bool

build_general_dense_mapping(cfg, sim, refgrid, geometry)[source]#

Map simulation cells to reporting cells by polygon intersection.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

refgridtuple[NDArray, NDArray, NDArray, NDArray, NDArray, NDArray]

Reporting-grid vertices and centers.

geometrytuple[NDArray, NDArray, list]

Simulation centers and cell polygons.

Returns:
cell_indlist[list[list[int | float]]]

Reporting-cell indices and overlap weights for each simulation cell.

cell_centNDArray

Representative simulation-cell index for each reporting cell.

Parameters:
Return type:

tuple[list[list[list[int | float]]], NDArray]

prepare_dense_mapping(cfg, sim)[source]#

Prepare static geometry and the simulation-to-report mapping.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

Returns:
rstnolist[int]

Restart indices selected for dense output.

refgridtuple[NDArray, NDArray, NDArray, NDArray, NDArray, NDArray]

Reporting-grid vertices and centers along x, y, and z.

mappingtuple[list[list[list[int | float]]], NDArray]

Weighted cell mapping and representative simulation cells.

actindrNDArray

Indices of inactive reporting-grid cells.

Parameters:
Return type:

tuple[list, tuple[NDArray, NDArray, NDArray, NDArray, NDArray, NDArray], tuple[list[list[list[int | float]]], NDArray], NDArray]

select_dense_restart_steps(cfg, sim)[source]#

Select restart indices for requested dense output times.

Each requested time must match an available restart time within floating- point precision.

Parameters:
cfgDataConfig

Initialized benchmark-data configuration.

simSimulationData

Loaded readers and timing data.

Returns:
list[int]

Restart indices corresponding to the requested dense output times.

Raises:
ValueError

If a requested time does not match an available restart time.

Parameters:
Return type:

list[int]

build_dense_reference_grid(cfg)[source]#

Build reporting-grid vertices and centers.

Parameters:
cfgDataConfig

Initialized runtime configuration.

Returns:
refxvert, refyvert, refzvertNDArray

Reporting-grid vertices along x, y, and z.

refxcent, refycent, refzcentNDArray

Reporting-grid cell centers along x, y, and z.

Parameters:

cfg (DataConfig)

Return type:

tuple[NDArray, NDArray, NDArray, NDArray, NDArray, NDArray]

extract_simulation_geometry(cfg, sim)[source]#

Extract simulation centers, polygons, and SATNUM values.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

Returns:
simxcent, simycent, simzcentNDArray

Simulation-cell centers along x, y, and z.

simpolylist[Polygon]

Simulation-cell polygons in the x-z plane.

satnumNDArray

Saturation-region identifiers in global cell order.

Parameters:
Return type:

tuple[NDArray, NDArray, NDArray, list, NDArray]

build_fast_dense_mapping(cfg, sim, dx, dz)[source]#

Build a direct mapping for aligned simulation and reporting grids.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

dxNDArray

Cell sizes along x.

dzNDArray

Cell sizes along z.

Returns:
cell_indlist[list[list[int | float]]]

Reporting-cell indices and overlap weights for each simulation cell.

cell_centNDArray

Representative simulation-cell index for each reporting cell.

Parameters:
Return type:

tuple[list[list[list[int | float]]], NDArray]

finalize_dense_mapping(cfg, sim, refgrid, mapping, simycent, satnum)[source]#

Apply inactive-cell and SPE11C y-axis mapping adjustments.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

refgridtuple[NDArray, NDArray, NDArray, NDArray, NDArray, NDArray]

Reporting-grid vertices and centers.

mappingtuple[list[list[list[int | float]]], NDArray]

Simulation-to-report mapping and representative cells.

simycentNDArray

Simulation-cell centers along y.

satnumNDArray

SATNUM values in global cell order.

Returns:
cell_indlist[list[list[int | float]]]

Final extensive-quantity mapping for all simulation cells.

cell_centNDArray

Final representative simulation cells for intensive quantities.

actindrNDArray

Indices of inactive reporting-grid cells.

Parameters:
Return type:

tuple[list[list[list[int | float]]], NDArray, NDArray]

build_dense_step(cfg, sim, mapping, restart_index, actindr)[source]#

Build all dense quantities for one restart step.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

mappingtuple[list[list[list[int | float]]], NDArray]

Simulation-to-report mapping and representative cells.

restart_indexint

Restart report-step index.

actindrNDArray

Inactive reporting-cell indices.

Returns:
dict[str, NDArray]

Simulation-grid and reporting-grid arrays for all dense quantities.

Parameters:
Return type:

dict

write_dense_csv(cfg, sim, refgrid, dense_step, step_index)[source]#

Write one dense spatial benchmark CSV file.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

refgridtuple[NDArray, NDArray, NDArray, NDArray, NDArray, NDArray]

Reporting-grid vertices and centers.

dense_stepdict

Dense step.

step_indexint

Selected dense output index.

Returns:
str

Generated filename or formatted text.

Parameters:
Return type:

str

handle_yaxis_mapping_extensive(cfg, sim, cell_ind, simycent, refyvert)[source]#

Extend indices for y direction (extensive).

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

cell_indlist[list[list[int | float]]]

Weighted simulation-to-report cell mapping.

simycentNDArray

Simulation-cell centers along y.

refyvertNDArray

Reporting-grid vertices along y.

Returns:
list[list[list[int | float]]]

Mapping expanded across the SPE11C y direction with overlap weights.

Parameters:
Return type:

list[list[list[int | float]]]

handle_yaxis_mapping_intensive(cfg, sim, cell_cent, refycent, simycent)[source]#

Extend representative cell indices for y direction (intensive).

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

cell_centNDArray

Representative simulation cell for each reporting cell.

refycentNDArray

Reporting-grid centers along y.

simycentNDArray

Simulation-cell centers along y.

Returns:
NDArray

Calculated numeric values.

Parameters:
Return type:

NDArray

find_inactive_report_cells(cfg, sim, cell_ind)[source]#

Find reporting cells not covered by active simulation cells.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

cell_indlist[list[list[int | float]]]

Weighted simulation-to-report cell mapping.

Returns:
NDArray

Calculated numeric values.

Parameters:
Return type:

NDArray

generate_performance_spatial_data(cfg, sim, rstno, refgrid, mapping, actindr)[source]#

Generate performance-spatial benchmark CSV files.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

rstnolist

Selected restart indices.

refgridtuple[NDArray, NDArray, NDArray, NDArray, NDArray, NDArray]

Reporting-grid vertices and centers.

mappingtuple[list, NDArray]

Simulation-to-report mapping and representative cells.

actindrNDArray

Inactive reporting-cell indices.

Returns:
list[str]

Names of the generated performance-spatial CSV files.

Parameters:
Return type:

list[str]

map_performance_to_report_grid(cfg, sim, arrays, cell_ind, delta_t, pore_volume, valid)[source]#

Map residual and mass-balance metrics to the reporting grid.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

arraysdict

Simulation-grid quantity arrays.

cell_indlist

Weighted simulation-to-report cell mapping.

delta_tfloat

Latest accepted time-step length.

pore_volumeNDArray

Accumulated pore volume per reporting cell.

validNDArray

Mask of reporting cells with positive pore volume.

Returns:
dict[str, NDArray]

Normalized residual and mass-balance quantities on the reporting grid.

Parameters:
Return type:

dict

map_static_performance_properties(cfg, sim, cell_ind, counter, pore_volume)[source]#

Map static cell-volume and aspect-ratio metrics.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

cell_indlist

Weighted simulation-to-report cell mapping.

counterNDArray

Number of simulation contributions per reporting cell.

pore_volumeNDArray

Accumulated pore volume per reporting cell.

Returns:
latest_dtslist[float]

Latest accepted time-step size for each dense output time.

cvol_refgNDArray

Average simulation-cell volume on the reporting grid.

arat_refgNDArray

Average cell aspect ratio on the reporting grid.

validNDArray

Mask of reporting cells with positive mapped pore volume.

Parameters:
Return type:

tuple[list, NDArray, NDArray, NDArray]

initialize_performance_arrays(sim, names)[source]#

Initialize global arrays for performance-spatial quantities.

Parameters:
simSimulationData

Loaded simulation readers and metadata.

namestuple[str, str, str, str]

Quantity names to initialize or populate.

Returns:
dict[str, NDArray]

Zero-filled global arrays for the requested performance quantities.

Parameters:
Return type:

dict

populate_performance_arrays(sim, arrays, step_index)[source]#

Populate performance arrays from one restart step.

Parameters:
simSimulationData

Loaded simulation readers and metadata.

arraysdict

Simulation-grid quantity arrays.

step_indexint

Selected dense output index.

Parameters:
Return type:

None

write_dense_performance_spatial(cfg, refg, cvol_refg, arat_refg, refxcent, refycent, refzcent, i)[source]#

Write one performance-spatial benchmark CSV file.

Parameters:
cfgDataConfig

Initialized runtime configuration.

refgdict

Performance quantities on the reporting grid.

cvol_refgNDArray

Cell-volume metric on the reporting grid.

arat_refgNDArray

Aspect-ratio metric on the reporting grid.

refxcentNDArray

Reporting-grid centers along x.

refycentNDArray

Reporting-grid centers along y.

refzcentNDArray

Reporting-grid centers along z.

iint

Selected record index.

Returns:
str

Generated filename or formatted text.

Parameters:
  • cfg (DataConfig)

  • refg (dict)

  • cvol_refg (NDArray)

  • arat_refg (NDArray)

  • refxcent (NDArray)

  • refycent (NDArray)

  • refzcent (NDArray)

  • i (int)

Return type:

str

generate_arrays(cfg, sim, names, restart_index, actindr)[source]#

Build simulation and reporting arrays for dense quantities.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

nameslist

Quantity names to initialize or populate.

restart_indexint

Restart report-step index.

actindrNDArray

Inactive reporting-cell indices.

Returns:
dict[str, NDArray]

Dense quantities in simulation-cell and reporting-grid order.

Parameters:
Return type:

dict

map_dense_arrays_to_report_grid(sim, mapping, arrays)[source]#

Map intensive and extensive dense quantities to the reporting grid.

Parameters:
simSimulationData

Loaded simulation readers and metadata.

mappingtuple[list[list[list[int | float]]], NDArray]

Simulation-to-report mapping and representative cells.

arraysdict

Simulation-grid quantity arrays.

Parameters:
Return type:

None

get_header(cfg, sim, i)[source]#

Build the dense CSV time label and column header.

Parameters:
cfgDataConfig

Initialized runtime configuration.

simSimulationData

Loaded simulation readers and metadata.

iint

Selected record index.

Returns:
name_tstr

Time label used in the dense spatial filename.

textlist[str]

CSV header lines for the selected SPE11 case.

Parameters:
Return type:

tuple[str, list[str]]

main(argv=None)[source]#

Run benchmark-data generation from the command line.

The function parses standalone data-processing arguments and generates the requested sparse, dense, performance, or performance-spatial CSV files from existing OPM Flow results.

Parameters:
argvlist[str], optional

Arguments to parse instead of sys.argv[1:]. This is primarily used by tests and programmatic callers.

Parameters:

argv (list[str] | None)

Return type:

None