dycove.sim.simulation_data.HydrodynamicStats

class dycove.sim.simulation_data.HydrodynamicStats(n_hydro_substeps: int, n_cells: int, fl_dr: float = 0.15, h_min: ndarray | None = None, h_max: ndarray | None = None, v_maxs: ndarray | None = None, flood_counts: ndarray | None = None, bedlevel_0: ndarray | None = None, bedlevel_f: ndarray | None = None)[source]

Stores hydrodynamic model outputs used to compute vegetation responses.

Tracks water depths, velocities, and flood statistics across the computational grid.

n_hydro_substeps

Number of hydrodynamic steps per ecological step. Passed from SimulationTimeState instance.

Type:

int

n_cells

Number of grid cell areas (length of model quantity arrays)

Type:

int

fl_dr

Wet/dry threshold [m]; passed from constants.py).

Type:

float

h_min

Minimum water depth observed in each cell during the hydrodynamic interval.

Type:

numpy.ndarray

h_max

Maximum water depth observed in each cell during the hydrodynamic interval.

Type:

numpy.ndarray

v_maxs

2-D array of max velocities observed during the hydrodynamic interval (n_hydro_substeps, n_cells).

Type:

numpy.ndarray

flood_counts

Number of timesteps each cell was flooded during the hydrodynamic interval.

Type:

numpy.ndarray

bedlevel_0

Bed elevations per cell before the hydrodynamic interval.

Type:

numpy.ndarray

bedlevel_f

Bed elevations per cell after the hydrodynamic interval.

Type:

numpy.ndarray

Properties
----------
bedlevel_diff

Change in bed elevation (bedlevel_f - bedlevel_0).

Type:

numpy.ndarray

flood_frac()[source]

Compute the fraction of time each cell was flooded over n_hydro_substeps.

dry_frac()[source]

Compute the fraction of time each cell was dry over n_hydro_substeps.

v_max_95th()[source]

Compute 95th percentile of velocity at each cell across n_hydro_substeps.

reset()[source]

Initialize or reset all arrays.

update(i, vel, depth)[source]

Update minimum/maximum values and flood counts using new hydrodynamic data.

__init__(n_hydro_substeps: int, n_cells: int, fl_dr: float = 0.15, h_min: ndarray | None = None, h_max: ndarray | None = None, v_maxs: ndarray | None = None, flood_counts: ndarray | None = None, bedlevel_0: ndarray | None = None, bedlevel_f: ndarray | None = None) None

Methods

__init__(n_hydro_substeps, n_cells[, fl_dr, ...])

dry_frac()

flood_frac()

reset()

update(i, vel, depth)

v_max_95th()

Attributes

bedlevel_0

bedlevel_diff

bedlevel_f

fl_dr

flood_counts

h_max

h_min

v_maxs

n_hydro_substeps

n_cells