grids.mixins.chunking.GridChunkingMixin.compute_chunk_edges#
- GridChunkingMixin.compute_chunk_edges(chunks: ChunkIndexInput, axes: AxesInput | None = None, include_ghosts: bool = False, halo_offsets: HaloOffsetInput | None = None, oob_behavior: str = 'raise', __validate__: bool = True) List[ndarray] [source]#
Return coordinate edge arrays for a specific chunk along the selected axes.
If the grid is vertex-centered, the coordinates are already edges and are returned directly. If the grid is cell-centered, edges are computed from the center coordinates and the chunk-local bounding box.
- Parameters:
chunks (
ChunkIndexInput
) – The chunk index specification (int, tuple, slice, or sequence of those).axes (
str
orlist
ofstr
, optional) – Axes to include. If None, all axes are included.include_ghosts (
bool
, defaultFalse
) – Whether to include ghost zones when computing chunk extent.halo_offsets (
int
,sequence[int]
, ornp.ndarray
, optional) – Extra ghost-cell-padding to apply on top of the standard ghost zones.oob_behavior (
{"raise", "clip"}
, default"raise"
) – What to do if the computed chunk region would go out of bounds.__validate__ (
bool
, defaultTrue
) – Whether to validate inputs (axes, shapes, etc).
- Returns:
One coordinate array per axis, with length = n+1 (edge-aligned).
- Return type:
list
ofnp.ndarray