Summary
Add a levee analysis capability to rfaR that bypasses reservoir routing and instead works directly with flow-frequency or stage-frequency relationships at a gage or volume-frequency analysis (VFA) location, optionally applying Muskingum channel routing to a downstream levee site.
Motivation
Levee analysis requires flow-frequency (or stage-frequency) estimation at a protected reach, not at a reservoir pool. The existing rfa_simulate() workflow is reservoir-centric — it samples inflow-volume frequency and routes through a storage-indicator table to produce pool stage-frequency. For levee applications, the routing target is a channel cross-section or rating curve, not a reservoir pool, and the "skip routing" path avoids the Modified Puls step entirely.
Reference
The stratified sampling example workflow spreadsheet includes a levee example that should serve as the primary reference for implementation.
Proposed Approach
Open Design Question
Should this be a separate function or a module within rfa_simulate()?
| Option |
Pros |
Cons |
rfa_simulate_levee() — separate function |
Clear separation of concerns; simpler function signatures; easier to document and test independently |
Code duplication of the stratified sampling scaffolding; two entry points to maintain |
Module within rfa_simulate() |
Single entry point; shared infrastructure (stratified sampling, output formatting) |
rfa_simulate() is already large; more complex branching logic; harder to read |
Current lean: Given that rfa_simulate() is already growing crowded, a dedicated rfa_simulate_levee() may be the cleaner path. Decision should be revisited once the levee workflow is fully scoped.
Muskingum Routing (Bonus)
Adding Muskingum channel routing would enable users to:
Related
rfa_simulate()
mod_puls_routing()
- Stratified sampling bin structure
- Levee example tab in stratified sampling workflow spreadsheet
Summary
Add a levee analysis capability to
rfaRthat bypasses reservoir routing and instead works directly with flow-frequency or stage-frequency relationships at a gage or volume-frequency analysis (VFA) location, optionally applying Muskingum channel routing to a downstream levee site.Motivation
Levee analysis requires flow-frequency (or stage-frequency) estimation at a protected reach, not at a reservoir pool. The existing
rfa_simulate()workflow is reservoir-centric — it samples inflow-volume frequency and routes through a storage-indicator table to produce pool stage-frequency. For levee applications, the routing target is a channel cross-section or rating curve, not a reservoir pool, and the "skip routing" path avoids the Modified Puls step entirely.Reference
The stratified sampling example workflow spreadsheet includes a levee example that should serve as the primary reference for implementation.
Proposed Approach
Open Design Question
Should this be a separate function or a module within
rfa_simulate()?rfa_simulate_levee()— separate functionrfa_simulate()rfa_simulate()is already large; more complex branching logic; harder to readCurrent lean: Given that
rfa_simulate()is already growing crowded, a dedicatedrfa_simulate_levee()may be the cleaner path. Decision should be revisited once the levee workflow is fully scoped.Muskingum Routing (Bonus)
Adding Muskingum channel routing would enable users to:
muskingum_routing()as a standalone utility function.Related
rfa_simulate()mod_puls_routing()