postgkyl.grid

postgkyl.grid(data, *, inplace=False, tag=None, label=None)

Turn a dataset’s grid into a dataset of coordinate values.

Builds a new dataset whose values, at each grid node, are the physical coordinates of data’s grid (one component per dimension). Handles uniform meshes, separable (velocity) mappings, and full curvilinear mapped grids (produced by the map verb) alike.

Parameters:
  • data – the dataset whose grid is converted to coordinate values; must be NumPy-backed.

  • inplace – mutate and return data instead of a new dataset.

  • tag – optional tag for the returned dataset.

  • label – optional label for the returned dataset.

Returns:

A dataset with one component per dimension holding the physical coordinates, on a placeholder index grid (one cell per original node).

Raises:

ValueError – if data is unevaluated modal coefficients, or its grid does not have one entry per dimension reported by num_cells.

CLI: grid