Inundation toolbox api-doc#

Arrival_times#

inundation_toolbox.arrival_times(map_data: numpy.ndarray, time_step: numpy.timedelta64, time_unit: str = 's', arrival_threshold: float = 3, event_start: Optional[numpy.timedelta64] = None) numpy.ndarray[source]#

Computes the arrival times. This is the time-index*time_step that water_height >= threshold Works with classmaps and maps, as long as arrival_threshold corresponds to waterdepth (maps) and class (classmap).

Parameters
  • map_data (np.ndarray) – map data (time, nodes)

  • time_step (np.timedelta64) – time step between two observations in classmap

  • time_unit (str) – desired output time format

  • arrival_threshold – value >= arrival_threshold there is inundation

Returns

t_arrival (np.ndarray) – arrival times

rising_speeds#

inundation_toolbox.rising_speeds(map_data: numpy.ndarray, time_step: numpy.timedelta64, time_unit: str = 's') numpy.ndarray[source]#

Computes the rising speeds. This is defined as dh/dt between two subsequent datapoints

Parameters
  • map_data (np.ndarray) – filled classmap data (time, nodes)

  • time_step (np.timedelta64) – time step between two observations in classmap

Returns

dh_dt (np.ndarray) – rising_speeds

height_of_mrs#

inundation_toolbox.height_of_mrs(map_data: numpy.ndarray, dh_dt: numpy.ndarray) numpy.ndarray[source]#

Computes the water depth at maximum rising speed.

Usage example of take_along_axis and argmax. The following prints zero:

max_rs_ix = np.argmax(dh_dt, axis=0) max_rs = np.take_along_axis(dh_dt, max_rs_ix[np.newaxis, :], axis=0) print(np.sum(max_rs - np.amax(dh_dt, axis=0, keepdims=True)))

Parameters
  • map_data (np.ndarray) – filled classmap data (time, nodes)

  • dh_dt (np.ndarray) – rising_speeds

Returns

h_mrs (np.ndarray) – gevaarhoogte. water depth at maximum rising speed