@@ -22,8 +22,9 @@ parameters drawn from the posterior.
2222
2323This document walks through a single realization in detail.
2424Understanding one realization is the key to understanding the full
25- simulation: the outer loop simply repeats this process with a different
26- parameter set each time. The walkthrough covers the stratified sampling
25+ simulation: the outer loop simply repeats this process with a resampled
26+ parameter set each time (in ` rfaR ` , this is the * next* parameter set
27+ from the input). The walkthrough covers the stratified sampling
2728procedure, random sampling of starting stage and hydrograph shape, and
2829calculation of stage exceedance probabilities — steps that are common to
2930all simulation types. The full uncertainty simulation conducts 10,000
@@ -54,8 +55,9 @@ is comprised of 10,000 realizations. Each realization is compromised of
5455
5556- Modified-Puls routings to obtain peak stages and/or peak discharge
5657
57- The subsections below will step through an rfaR realization. These
58- sections represent modules and functions contained in
58+ These module emulate the workflow and methodology from RMC-RFA. The
59+ subsections below will step through an rfaR realization. These sections
60+ represent modules and functions contained in
5961[ ` rfa_simulate() ` ] ( https://ideal-broccoli-1q9y47z.pages.github.io/reference/rfa_simulate.md ) .
6062
6163## Flow-Frequency Stratified Sampling
@@ -71,18 +73,18 @@ divided into `Nbins` equal-probability bins, and `Mevents` are sampled
7173uniformly within each bin. This ensures the tail is well-represented
7274without artificially inflating the total number of routing operations.
7375
74- The bin weights (` ords$Weights ` ) reflect the true probability mass that
75- each bin represents. These weights are applied later to reconstruct the
76- true exceedance probability from the stratified sample, correcting for
77- the fact that rare-event bins were intentionally oversampled relative to
78- their actual frequency of occurrence.
79-
8076``` r
8177ords <- stratified_sampler(Nbins = 20 ,
8278 Mevents = 500 ,
8379 dist = " ev1" )
8480```
8581
82+ The bin weights (` ords$Weights ` ) reflect the true probability mass that
83+ each bin represents. These weights are applied later to reconstruct the
84+ true exceedance probability from the stratified sample, correcting for
85+ the fact that rare-event bins were intentionally oversampled relative to
86+ their actual frequency of occurrence.
87+
8688### Construct a Probability Matrix from the Stratified Bins
8789
8890The z-variate matrix translates each stratified sample into a standard
@@ -99,7 +101,7 @@ z_matrix <- matrix(ncol = ords$Nbins, nrow = ords$Mevents)
99101
100102# Using EV1
101103for (i in 1 : ords $ Nbins ){
102- # Lower Bin Boundary (prior bin's upper boundar )
104+ # Lower Bin Boundary (prior bin's upper boundary )
103105 bin_lower <- ords $ Zlower [i ]
104106
105107 # Upper Bin Boundary
@@ -121,7 +123,7 @@ inflow volume corresponds to a sample from the inflow volume-frequency
121123distribution.
122124
123125The parameter set used here (` meanlog ` , ` sdlog ` , ` skewlog ` ) represents a
124- single draw from the posterior distribution of LP3 parameters — one
126+ single draw from the distribution of LP3 parameters — one posterior
125127parameter set for this realization.
126128
127129``` r
@@ -202,6 +204,8 @@ The shape of the flood hydrograph is sampled randomly from a selection
202204of historical and synthetic hydrographs. Each hydrograph in the library
203205is assigned a weight (default weights are uniform); the sampled shape is
204206then scaled to match the flood volume drawn from the LP3 distribution.
207+ Note that the defined critical duration is 2-days (` critical_duration ` )
208+ and the routing window has been set to 10-days (` routing_days ` ).
205209
206210``` r
207211hydrographs <- hydrograph_setup(jmd_hydro_apr1999 ,
0 commit comments