gempy.load_model

gempy.load_model(path: str) GeoModel[source]

Load a GemPy geological model from a .gempy file.

The function reconstructs the saved GeoModel, including its structural data, model configuration, and grid information. Computed model solutions are not restored and need to be recomputed with gempy.compute_model().

Parameters:

path (str) – Path to the .gempy model file. Unlike save_model(), the .gempy extension must be included explicitly.

Returns:

The reconstructed geological model.

Return type:

GeoModel

Raises:
  • ValueError – If path does not have the .gempy extension.

  • FileNotFoundError – If the specified file does not exist.

Notes

Model serialization is currently under active development and the .gempy format may change in future versions. Files written by current GemPy versions include serialization metadata with the GemPy package version and serialization format version used to write the model.

Examples using gempy.load_model

Basics: Data Classes and Modeling API

Basics: Data Classes and Modeling API

Saving and Loading gempy Models

Saving and Loading gempy Models