smash.Model.response_data#

property Model.response_data[source]#

Model response data.

Returns:
response_dataResponse_DataDT

It returns a Fortran derived type containing the variables relating to the response data.

Examples

>>> from smash.factory import load_dataset
>>> setup, mesh = load_dataset("cance")
>>> model = smash.Model(setup, mesh)

Access to Model response data

>>> model.response_data
Response_DataDT
    q: array([[ 1.237,  1.232,  1.224, ..., 22.951, 22.813, 22.691],
    [ 0.38 ,  0.382,  0.385, ...,  6.789,  6.759,  6.729],
    [ 0.094,  0.094,  0.094, ...,  1.588,  1.578,  1.568]],
    dtype=float32)

Access to a specific gauge observed discharge time serie

>>> model.mesh.code
array(['V3524010', 'V3515010', 'V3517010'], dtype='<U8')
>>> ind = np.argwhere(model.mesh.code == "V3524010").item()
>>> ind
0
>>> model.response_data.q[ind, :]
array([ 1.237,  1.232,  1.224, ..., 22.951, 22.813, 22.691], 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
model.response_data.from_handle(