plopm.utils.mapping module#
Prepare slice geometry and map three-dimensional values to two dimensions.
The module builds labels and coordinate meshes for xy, xz, and yz slices, applies optional rotation and translation, and aggregates active-cell values through the selected grid interval.
- get_yz_slice(cfg, data, n)[source]#
Prepare geometry and labels for a yz slice.
- Parameters:
- cfgPlopmConfig
Initialized map and slice configuration.
- dataSimData
Loaded grid data.
- nint
Slice index.
- Returns:
- tuple
Coordinate meshes, display and filename slice labels, mapped grid dimensions, and coordinate-axis names.
- Parameters:
cfg (PlopmConfig)
data (SimData)
n (int)
- Return type:
- get_xz_slice(cfg, data, n)[source]#
Prepare geometry and labels for an xz slice.
- Parameters:
- cfgPlopmConfig
Initialized map and slice configuration.
- dataSimData
Loaded grid data.
- nint
Slice index.
- Returns:
- tuple
Coordinate meshes, display and filename slice labels, mapped grid dimensions, and coordinate-axis names.
- Parameters:
cfg (PlopmConfig)
data (SimData)
n (int)
- Return type:
- get_xy_slice(cfg, data, n)[source]#
Prepare geometry and labels for an xy slice.
- Parameters:
- cfgPlopmConfig
Initialized map and slice configuration.
- dataSimData
Loaded grid data.
- nint
Slice index.
- Returns:
- tuple
Coordinate meshes, display and filename slice labels, mapped grid dimensions, and coordinate-axis names.
- Parameters:
cfg (PlopmConfig)
data (SimData)
n (int)
- Return type:
- transform_grid(cfg, n, xc, yc)[source]#
Rotate and translate a two-dimensional coordinate mesh.
- Parameters:
- cfgPlopmConfig
Rotation and translation settings.
- nint
Map index.
- xc, ycnp.ndarray
Coordinate meshes to transform.
- Returns:
- tuple[np.ndarray, np.ndarray]
Transformed x- and y-coordinate meshes.
- Parameters:
cfg (PlopmConfig)
n (int)
xc (NDArray)
yc (NDArray)
- Return type:
tuple[NDArray, NDArray]
- map_xz(cfg, data, var, values, n, mx, my, features=None, feature_id=1)[source]#
Aggregate active-cell values onto an xz slice.
Values are aggregated through the selected j interval. Permeability uses arithmetic or harmonic thickness weighting according to flow direction; other properties use the configured aggregation or pore-volume weighting.
- Parameters:
- cfgPlopmConfig
Slice and aggregation configuration.
- dataSimData
Loaded grid properties and active-cell mapping.
- varstr
Variable name.
- valuesnp.ndarray
Values in active-cell order.
- nint
Map index.
- mx, myint
Mapped grid dimensions.
- featureslist, optional
Wells or faults grouped by label.
- feature_idint, default: 1
Category assigned when mapping one feature.
- Returns:
- np.ndarray
Values on the flattened xz plotting grid.
- Parameters:
- Return type:
NDArray
- map_yz(cfg, data, var, values, n, mx, my, features=None, feature_id=1)[source]#
Aggregate active-cell values onto a yz slice.
Values are aggregated through the selected i interval. Permeability uses arithmetic or harmonic thickness weighting according to flow direction; other properties use the configured aggregation or pore-volume weighting.
- Parameters:
- cfgPlopmConfig
Slice and aggregation configuration.
- dataSimData
Loaded grid properties and active-cell mapping.
- varstr
Variable name.
- valuesnp.ndarray
Values in active-cell order.
- nint
Map index.
- mx, myint
Mapped grid dimensions.
- featureslist, optional
Wells or faults grouped by label.
- feature_idint, default: 1
Category assigned when mapping one feature.
- Returns:
- np.ndarray
Values on the flattened yz plotting grid.
- Parameters:
- Return type:
NDArray
- map_xy(cfg, data, var, values, n, mx, my, features=None, feature_id=1)[source]#
Aggregate active-cell values onto an xy slice.
Values are aggregated through the selected k interval. Dual-porosity rows are included when enabled, and permeability is weighted according to the vertical flow direction.
- Parameters:
- cfgPlopmConfig
Slice, aggregation, and dual-grid configuration.
- dataSimData
Loaded grid properties and active-cell mapping.
- varstr
Variable name.
- valuesnp.ndarray
Values in active-cell order.
- nint
Map index.
- mx, myint
Mapped grid dimensions.
- featureslist, optional
Wells or faults grouped by label.
- feature_idint, default: 1
Category assigned when mapping one feature.
- Returns:
- np.ndarray
Values on the flattened xy plotting grid.
- Parameters:
- Return type:
NDArray