November 5, 2025

GoldSim Tutorial: Calculating and Displaying Annual Peak Flow Statistics

Posted by Jason Lillywhite

Reliable peak river flow statistics are necessary for effective design, planning, and risk communication. GoldSim can calculate a range of statistics for flood frequency analysis, such as the flow associated with a specific return period (e.g., the 99th percentile flow) or the timing distribution of the annual peak flow. This tutorial walks you through building a model to calculate these types of statistics in GoldSim, focusing on displaying results on a dashboard: 

  • Median Peak Flow
  • Median Time of Peak (Day of the Year)
The GoldSim Extrema element captures these annual extreme values. To display specific statistics (like a percentile or value at a percentile), these statistics need to be shown on a Dashboard, which requires a specific setup. I will show the process of screening out a certain group of results, so the result statistics reflect that screening.

GoldSim Model Dashboard showing Annual Peak Flow Statistics

Figure 1. GoldSim Model Dashboard: Annual Peak Flow Statistics

The Model: Time Series Random Sampling

This model simulates future conditions stochastically from a deterministic historical record (1904–2016). We run the simulation for a single calendar year (starting January 1st, 2025, for example). Most of the work is being done by the Time Series element "WilliamsFork TS", using its Time Shifting capability, as described here:

For each Monte Carlo realization, WilliamsFork TS (a Time Series element ) randomly samples a different historical year from the record. This sampled flow data is sent to Peak_Discharge (an Extrema element), which gathers the annual peak flow and the time it occurred. The results are then passed to Qpeak Distribution (a Distribution Result element) to provide statistics for display in Dashboard1 (the model's user interface).

Model schematic showing Time Series and Distribution elements

Figure 2. Model schematic for the Annual Peak Flow analysis.


Note on Sampling Methods

While we use random sampling here, you can configure the model to sample sequentially or use any other method. Refer to this article to learn more about time shifting and configuring your own method of sampling the historical time series record.

Example Time History Chart of Sampled River Flow Time History

Figure 3. Example Probabilistic Time History Chart of daily River Flow.


Step 1: Gather Statistics with a Distribution Result Element

The Peak_Discharge element (an Extrema element) captures two outputs for each realization: the Peak Flow Value and the Time of Peak. Since we are tracking two different distributions, you need a separate Distribution Result element for each:

  1. Connect the Peak Flow Value from Peak_Discharge to a Distribution Result element. This element processes the flow magnitudes.
  2. Connect the Time of Extreme (TofExtreme output available on all Extrema elements) output from Peak_Discharge to another Distribution Result element. This element processes the timing values.
  3. These two Distribution Result elements are necessary because they hold the processed Monte Carlo results (the full distribution) from which you can extract any specific statistic (mean, median, 99th percentile, etc.) to display on the Dashboard.
View of the Result Distribution capturing Peak Discharge Statistics

Figure 4. View of the Result Distribution capturing Peak Discharge Statistics


Step 2: Apply Realization Screening

While standard annual flood frequency analysis typically uses all recorded peaks, Realization Screening can be used when you need to isolate a specific population of events for statistics. For instance, an engineer may need to calculate the median flow of only those years that exceeded a certain threshold flow rate, thereby ensuring the statistics reflect only the flood events within that range of magnitude.

  • In the properties of the Distribution Result element, click on the Options... button.
  • In the Realization Classification and Screening section, define a screening condition relevant to your analysis. For example, if the threshold is 5 m^3/s, the condition would be: `Peak_Discharge >  5 m3/s`
  • Uncheck Category 1: All Realizations to screen out all those realizations in which the criteria is not met.
  • By screening the data, the subsequent statistic calculation (like the median) only uses the flow peaks that met your specific flood criteria.
Figure 5. Realization Screening setup to filter results based on a flow threshold.


Step 3: Link the Result Display to the Filtered Distribution

The final step is getting those filtered numbers onto your Dashboard. The key is to link the Result Display dashboard control to the Distribution Result elements themselves, not to the original Extrema element.

  1. In the Dashboard element, add two separate Result Display controls.
  2. Configure the first Result Display to link to the Qpeak Distribution element and select the Median statistic (for the Median Peak Flow).
  3. Configure the second Result Display to link to the Qpeak Time Distribution element and also select the Median statistic (for the Median Time of Peak).

Figure 6. Final Dashboard showing the Annual Peak Flow Statistics derived from the filtered distribution results.




The Dashboard now displays two key hydrological statistics based on your Monte Carlo results:

Figure 7. Dashboard in Result Mode, showing the statistical results




Download Example

By using the Distribution Result element, applying Realization Screening, and correctly linking the Result Display, you can show many different peak flow statistics in your GoldSim Dashboards.

You can download this working model example here: Screened Result Statistics Dashboard.gsm

Happy modeling!

No comments:

Post a Comment