smash.Model.rr_initial_states#
- property Model.rr_initial_states[source]#
Model rainfall-runoff initial states.
- Returns:
- rr_initial_states
RR_StatesDT
It returns a Fortran derived type containing the variables relating to the rainfall-runoff initial states.
- rr_initial_states
See also
Model.get_rr_initial_states
Get the values of a Model rainfall-runoff initial state.
Model.set_rr_initial_states
Set the values of a Model rainfall-runoff initial state.
Examples
>>> from smash.factory import load_dataset >>> setup, mesh = load_dataset("cance") >>> model = smash.Model(setup, mesh)
Access to Model rainfall-runoff initial states
>>> model.rr_initial_states RR_States keys: array(['hi', 'hp', 'ht', 'hlr'], dtype='<U3') values: array([[[1.e-02, 1.e-02, 1.e-02, 1.e-06], [1.e-02, 1.e-02, 1.e-02, 1.e-06], [1.e-02, 1.e-02, 1.e-02, 1.e-06], ... [1.e-02, 1.e-02, 1.e-02, 1.e-06]]], dtype=float32)
Access to a specific rainfall-runoff initial state grid with the getter method
get_rr_initial_states
>>> model.get_rr_initial_states("hp") array([[0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, ... 0.01, 0.01, 0.01, 0.01, 0.01, 0.01]], dtype=float32)
Set a value to a specific rainfall-runoff initial state grid with the setter method
set_rr_initial_states
>>> model.set_rr_initial_states("hp", 0.29) >>> model.get_rr_initial_states("hp") array([[0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, ... 0.29, 0.29, 0.29, 0.29, 0.29, 0.29]], dtype=float32)
If you are using IPython, tab completion allows you to visualize all the attributes and methods
>>> model.rr_initial_states.<TAB> model.rr_initial_states.copy() model.rr_initial_states.keys model.rr_initial_states.from_handle( model.rr_initial_states.values