smash.Model.u_response_data#
- property Model.u_response_data[source]#
Model response data uncertainties.
- Returns:
- u_response_data
U_Response_DataDT
It returns a Fortran derived type containing the variables relating to the response data uncertainties.
- u_response_data
Examples
>>> from smash.factory import load_dataset >>> setup, mesh = load_dataset("cance") >>> model = smash.Model(setup, mesh)
Access to Model response data uncertainties
>>> model.u_response_data U_Response_DataDT q_stdev: array([[0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.]], dtype=float32)
Access to a specific gauge discharge uncertainties (standard deviation of independent error) time serie
>>> model.mesh.code array(['V3524010', 'V3515010', 'V3517010'], dtype='<U8') >>> ind = np.argwhere(model.mesh.code == "V3524010").item() >>> ind 0 >>> model.u_response_data.q_stdev[ind, :] array([0., 0., 0., ..., 0., 0., 0.], dtype=float32)
Set discharge uncertainties proportional to observation discharge
>>> model.u_response_data.q_stdev = model.response_data.q * 0.1 >>> model.u_response_data.q_stdev array([[0.1237, 0.1232, 0.1224, ..., 2.2951, 2.2813, 2.2691], [0.038 , 0.0382, 0.0385, ..., 0.6789, 0.6759, 0.6729], [0.0094, 0.0094, 0.0094, ..., 0.1588, 0.1578, 0.1568]], dtype=float32)
If you are using IPython, tab completion allows you to visualize all the attributes and methods
>>> model.response_data.<TAB> model.response_data.copy() model.response_data.q_stdev model.response_data.from_handle(