smash.save_model#
- smash.save_model(model, path)[source]#
Save Model object.
- Parameters:
- modelModel
The Model object to be saved to HDF5 file.
- pathstr
The file path. If the path not end with
.hdf5, the extension is automatically added to the file path.
See also
read_modelRead Model object.
ModelPrimary data structure of the hydrological model
smash.
Examples
>>> setup, mesh = smash.load_dataset("cance") >>> model = smash.Model(setup, mesh) >>> model Structure: 'gr-a' Spatio-Temporal dimension: (x: 28, y: 28, time: 1440) Last update: Initialization
Save Model
>>> smash.save_model(model, "model.hdf5")
Read Model
>>> model_rld = smash.read_model("model.hdf5") >>> model_rld Structure: 'gr-a' Spatio-Temporal dimension: (x: 28, y: 28, time: 1440) Last update: Initialization