Monthly-to-Daily Pipeline¶
Many applications need daily synthetic flows, but the most robust generation methods operate at a monthly scale. SynHydro's pipelines chain a monthly generator with a temporal disaggregator in a single interface.
KirschNowakPipeline combines the Kirsch monthly bootstrap with the Nowak
KNN disaggregator. You provide daily observed data; it handles the internal
monthly aggregation and disaggregation automatically.
Generate daily synthetic flows¶
import synhydro
Q_daily = synhydro.load_example_data()
pipeline = synhydro.KirschNowakPipeline()
pipeline.fit(Q_daily)
daily_ensemble = pipeline.generate(n_realizations=10, n_years=30, seed=42)
Q_syn_daily = daily_ensemble.data_by_realization[0]
print(Q_syn_daily.shape) # (~10957 days x n_sites)
Single-site alternative
Visualize¶
Plot a one-year window to inspect daily variability:
from synhydro.plotting import plot_timeseries
site = Q_daily.columns[0]
fig, ax = plot_timeseries(
daily_ensemble,
observed=Q_daily[site],
start_date="2000-01-01",
end_date="2000-12-31",
show_members=3,
)
Next steps¶
- Drought analysis on synthetic flows - Tutorial 04
- Ensemble validation - Tutorial 05
- Algorithm details - Kirsch Bootstrap, Nowak Disaggregation