expreccs.visualization.maps2d module#
Generate two-dimensional maps for expreccs simulation results.
The module reshapes active-cell arrays onto top-surface grids and writes final state, geological, and reference-to-site difference maps with consistent axes, color scales, labels, and progress reporting.
- reshape_to_2d(array_1d, nx, ny)[source]#
Reshape a flat cell array onto a two-dimensional grid.
- Parameters:
- array_1dAny
Flat cell-data array.
- nxAny
Number of cells in the x direction.
- nyAny
Number of cells in the y direction.
- Returns:
- np.ndarray
Array reshaped to
(ny, nx)with reversed rows.
- plot_map(x, y, data, title, filename, cmap, units=None, xticks=True, yticks=True, show_colorbar=True, difference=False)[source]#
Write one two-dimensional field map.
- Parameters:
- xAny
X coordinates.
- yAny
Y coordinates.
- dataAny
Values to plot.
- titleAny
Figure title.
- filenameAny
Output filename.
- cmapAny
Matplotlib colormap.
- unitsAny, optional
Colorbar label.
- xticksAny, optional
Whether to show x-axis ticks.
- yticksAny, optional
Whether to show y-axis ticks.
- show_colorbarAny, optional
Whether to draw a colorbar.
- differenceAny, optional
Whether to use symmetric difference limits.
- model_group(res)[source]#
Resolve a model name to its geometry group.
- Parameters:
- resAny
Reservoir case name.
- Returns:
- str
Normalized geometry-group name.
- final_time_maps(dic)[source]#
Plot final-time fields for all selected reservoirs.
- Parameters:
- dicAny
Shared mutable expreccs configuration and runtime data.