hydromodpy.results.views#

Lazy catchment-scale views computed on demand from a Run.

These functions read already-persisted spatial fields (derived/ and budget/ groups in the simulation Zarr) and reduce them to scalar timeseries on the fly. Nothing is written to DuckDB: results are returned as pd.Series so that callers can plot, combine or aggregate them freely.

All functions are pure - they take a Run (or any object exposing the same field / n_timesteps / mesh API) and the reduction parameters, and return a new object. They never mutate the catalog.

Module-level functions are the canonical implementation. Run exposes thin lazy wrappers for notebook ergonomics.

Functions

catchment_mean(sim, variable, *[, name])

Arithmetic mean of variable over active catchment cells per timestep.

cell_field_active_mask(sim, *[, variable, ...])

Return a per-cell active mask view for a scalar cell field.

cell_field_active_metrics(sim, *[, ...])

Return scalar active-cell metrics for a time-varying cell field.

cell_field_active_mode_label(sim, *[, mode, ...])

Return a display label for a cell-field active mode.

cell_field_network_distance_metrics(sim, *)

Return planar bidirectional distances between active cells and a network.

cell_field_network_overlap_metrics(sim, *[, ...])

Compare active cells from any scalar field with a vector network role.

drainage_density(sim, *[, threshold])

Fraction of active catchment cells whose routed drain flux is positive.

persistence(sim, *[, variable, threshold, ...])

Per-cell fraction of timesteps where variable exceeds threshold.

recharge_forcing(sim)

Input recharge rate per stress period (from budget/recharge).

release_flux_network_distance_metrics(sim, *)

Return raw planar distances between release cells and a vector network.

release_flux_network_overlap_metrics(sim, *)

Compare direct groundwater-release cells with a vector network role.

resolve_cell_field_active_mode(sim[, mode])

Resolve how a time-varying cell field is reduced to active cells.

saturated_fraction(sim, *[, threshold])

Fraction of active catchment cells where seepage exceeds threshold.