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