discharge_evaluation#

Evaluate simulated discharge against observed gauge discharge.

The module loads model and observation time series, matches gauges to simulation outputs, optionally optimizes gauge locations with flow-accumulation data, and computes direct or bootstrapped discharge metrics with hydrograph diagnostics.

Authors#

  • Jeisson Leal

  • Simon Lüdke

Functions#

Q_data_to_xarray(model_data_path, ...[, ...])

Get observed and model Q data and save it as CSV files to be opened later.

boostap_statistics(index, id, model_da, ...)

Calculate the statistics for one boostrap selection.

evaludate_discharge_data(model_data_path, ...)

Compare simulated with observed discharge directly or via bootstrapping.

filter_ids_by_observed_years(valid_ids, ...)

Filter ids by minimum observed years while preserving input order.

flatten_list(nested_list)

Flatten a list.

gen_list_of_result_dicts(data, id[, ...])

Generate result dicts with time, id, discharge, and year.

get_discharge_metric_values_by_variable(df)

Get finite discharge metric values grouped for summary tables.

get_gauge_coords(ds, ref_facc[, ...])

Find gauge coordinates by matching reference and simulated catchment area.

get_grdc_for_one_gauge(id, observed_data_by_id)

Read observed data for one gauge.

get_hydrograph_pdf_files(output_dir)

Get saved hydrograph PDF files in stable gauge order.

get_sim_data_for_gauges_from_nodes(sim_ds, ...)

Extract discharge series by nearest river node to gauge coordinates.

get_sim_data_for_one_gauge(id, index, ...[, ...])

Read out simulation data for one gauge.

load_ds(file_path[, file_name])

Load an xarray dataset from disk.

plot_cdf(df, output_path[, boostrap_iterations])

Create CDF plots for alpha, beta, gamma, KGE, and NSE.

plot_kde(results_df, output_path)

Create kde plots of alpha, beta and gamma.

plot_map(results_df, output_path[, ...])

Plot gauge maps for each variable using color-coded points.

plot_metric_violins(df, output_path[, ...])

Create violin plots for finite discharge metric rows.