smash.Model.physio_data#

property Model.physio_data[source]#

Model physiographic data.

Returns:
physio_dataPhysio_DataDT

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

Examples

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

Access to Model physiograhic data

>>> model.physio_data
Physio_DataDT
    descriptor: array([[[1.6998979e+00, 1.5327297e+01],
        [9.5237291e-01, 1.4062435e+01],
        ...
        [1.2933834e+00, 2.0580339e+01],
        [1.3551705e+00, 2.1825863e+01]]], dtype=float32)
    l_descriptor: array([0.       , 3.0111098], dtype=float32)
    u_descriptor: array([ 5.455888, 23.433908], dtype=float32)

Access to a specific physiographic descriptor

>>> model.setup.descriptor_name
array(['slope', 'dd'], dtype='<U5')
>>> ind = np.argwhere(model.setup.descriptor_name == "slope").item()
>>> ind
0
>>> model.physio_data.descriptor[..., ind]
array([[1.69989789e+00, 9.52372909e-01, 2.01547050e+00, 3.75710177e+00,
        3.41233420e+00, 2.92353439e+00, 2.85195327e+00, 2.82403517e+00,
        ...
        2.60070384e-01, 4.05688077e-01, 1.29338336e+00, 1.35517049e+00]],
      dtype=float32)

If you are using IPython, tab completion allows you to visualize all the attributes and methods

>>> model.physio_data.<TAB>
model.physio_data.copy()        model.physio_data.l_descriptor
model.physio_data.descriptor    model.physio_data.u_descriptor
model.physio_data.from_handle(