pisces.models.core.utils.inspect_model_grid#
- pisces.models.core.utils.inspect_model_grid(path: str | Path, registry: Registry | None = None)[source]#
Load the grid from a model file without fully instantiating the model.
This function opens the model’s HDF5 file, navigates to the
/GRID
group, and usesload_grid()
to create and return the grid object directly.- Parameters:
- Returns:
The grid instance loaded from the model file.
- Return type:
Grid
- Raises:
FileNotFoundError – If the file does not exist or is not a file.
KeyError – If the file does not contain a
/GRID
group.