pisces.geometry.grids.base.Grid.to_hdf5#

Grid.to_hdf5(filename: str | Path, group: str = 'grid', overwrite: bool = False)[source]#

Save the grid to an HDF5 file.

Parameters:
  • filename (str or Path) – Path to the HDF5 file.

  • group (str, default = "grid") – Name of the group within the file to store the grid.

  • overwrite (bool, default = False) – Whether to overwrite the group if it already exists.

Raises:

ValueError – If the group already exists and overwrite is False.