grids.mixins.core.GridUtilsMixin.compute_domain_centers#

GridUtilsMixin.compute_domain_centers(axes: AxesInput | None = None, origin: Literal['active', 'global'] = 'active', __validate__: bool = True)[source]#

Return coordinate center arrays along each axis.

If the grid is vertex-centered, computes centers from edges. If the grid is cell-centered, returns coordinate arrays directly.

Parameters:
  • axes (str or list of str, optional) – Axes to include. Defaults to all.

  • origin ({"active", "global"}, default "active") – Whether to include ghost zones.

  • __validate__ (bool, default True) – Whether to validate axis inputs.

Returns:

Coordinate center arrays per axis.

Return type:

list of np.ndarray