otter.grid.run_grid
- otter.grid.run_grid(config: GridConfig, filename, *, workers: int = 1, resume: bool = False)[source]
Write a grid, retrying only incomplete points when resuming.
- Parameters:
config (GridConfig) – Composition, state axes, output grids and requested observables.
filename (str or pathlib.Path) – HDF5 destination. Existing files require resume=True.
workers (int, optional) – Number of simultaneous single-CPU states; default 1.
resume (bool, optional) – Retry unfinished states with identical configuration, source and numerical dependency versions. Completed states are retained.
- Returns:
dict – Counts named complete, failed and total. Only status=2 data are valid interpolation input; a partially completed file is not a dense grid.
- Raises:
ImportError – If the optional h5py dependency is unavailable.
FileExistsError – If the destination exists and resume is False.
ValueError – If worker controls or resume metadata are incompatible.