smash.io.save_model_ddt#
- smash.io.save_model_ddt(model, path)[source]#
Save some derived data types of the Model object to HDF5.
This method is considerably lighter than
smash.io.save_model
method that saves the entire Model object. However, it is not capable of reconstructing the Model object from the saved data file.By default, the following data are stored into the HDF5 file:
snow_module
,hydrological_module
,routing_module
,serr_mu_mapping
,serr_sigma_mapping
,start_time
,end_time
,dt
,descriptor_name
fromModel.setup
xres
,yres
,xmin
,ymax
,dx
,dy
,active_cell
,gauge_pos
,code
,area
fromModel.mesh
q
fromModel.response_data
descriptor
fromModel.physio_data
mean_prcp
,mean_pet
,mean_snow
,mean_temp
fromModel.atmos_data
(mean_snow
andmean_temp
are only stored if a snow module has been selected)keys
,values
fromModel.rr_parameters
keys
,values
fromModel.rr_initial_states
keys
,values
fromModel.serr_mu_parameters
keys
,values
fromModel.serr_sigma_parameters
q
fromModel.response
keys
,values
fromModel.rr_final_states
- Parameters:
- model
Model
The Model object to save derived data types as a HDF5 file.
- pathstr
The file path.
- model
See also
read_model_ddt
Read derived data types of the Model object from HDF5.
smash.Model
Primary data structure of the hydrological model
smash
.
Examples
>>> from smash.factory import load_dataset >>> from smash.io import save_model_ddt >>> setup, mesh = load_dataset("cance") >>> model = smash.Model(setup, mesh)
Save some derived data types of the Model object to HDF5
>>> save_model_ddt(model, "model_ddt.hdf5")