Introduction
PrecipGen is a GoldSim-based model designed to simulate daily precipitation using a first-order, two-state Markov chain-gamma model, enhanced to incorporate long-term climatic adjustments. It builds upon the foundational work of Dee Allen Wright and the WGEN model (1983), originally implemented in FORTRAN, to deliver a robust simulation of precipitation patterns over extended periods. This new approach captures both short-term variability and multi-decadal oscillations, such as prolonged droughts and periods of heavy rainfall, making it a valuable tool for understanding and forecasting hydrological processes.
The model comprises two components: PrecipGen PAR and PrecipGen. PrecipGen PAR processes historical data to estimate statistical parameters. These parameters feed into PrecipGen, which generates daily precipitation realizations using Monte Carlo simulation.
This article describes the tools and usage along with a summary of test results. If you are interested in trying the model out yourself, please visit the GoldSim Library: Precipitation Simulator (PrecipGen) – GoldSim Help Center
PrecipGen PAR
The PrecipGen PAR component serves as the parameter generation engine for PrecipGen, bridging historical precipitation data with the statistical framework required for daily simulations. Its formulation involves both foundational methods from Wright (1983) and enhancements I introduced to capture long-term variability.
The initial step involves analyzing historical daily precipitation data to calculate the following four parameters for each calendar month, averaged across all years on record:
- PWW: Probability of a wet day following another wet day
- PWD: Probability of a wet day following a dry day
- ALPHA: Shape parameter of the gamma distribution for wet days
- BETA: Scale parameter of the gamma distribution for wet days
These parameters encapsulate the average monthly precipitation characteristics observed in the historical record, providing a baseline for simulating daily precipitation patterns.
Enhancements to Capture Long-Term Variability
To account for long-term climatic variability, I expanded the original framework by introducing a shifting window analysis. This method applies a moving window—currently set to 2 years—across the historical record. For each window, the four parameters (PWW, PWD, ALPHA, and BETA) are recalculated. The 2-year window strikes a balance between capturing meaningful year-to-year variations and providing enough data for reliable statistical estimates. This approach smooths out noise while preserving fluctuations.
As the window progresses through the historical record, it produces an annualized parameter array, where each window represents a unique set of parameter values. From this array, I derive two key metrics: annual volatility, which quantifies year-to-year variability, and reversion rate, which measures how quickly parameter values return to their long-term averages after deviation. Additionally, I calculate the correlations between PWW-PWD and PWW-ALPHA to account for the interdependencies inherent in precipitation behavior.
For now, I have chosen to exclude long-term trends observed in some sites, focusing this study on stochastic variability. These trends, while significant, will be addressed in future research. The resulting parameter tables and correlations are stored in a format ready for direct integration into PrecipGen, enabling the model to simulate both short- and long-term precipitation dynamics with higher fidelity.
Figure 1 - View of GoldSim's PrecipGen PAR
PrecipGen PAR: Inputs and Settings
When setting up a new PrecipGen PAR model, inputs and adjustments are necessary to ensure accurate simulations. This model is static but it includes embedded submodels that execute calendar simulations to facilitate time series analysis. You must set the following parameters and settings:
- Num_Years: This is the number of years of historical record provided in the time series.
- Precipitation_TS: This is the time series of measured daily totals, which should be verified for accuracy. In cases where records are missing, stochastic imputation can be used to fill gaps.
- Array Label Set “n”: Update this to match the number of years (Num_Years).
- Monthly_Gen Submodel Dates: Adjust the start and end dates to align with the time series (Precipitation_TS).
- Lag_Window: Found in the Ann_Gen Container, this parameter determines the time window used to calculate annual volatility and reversion rate.
The Lag_Window defines the lag or smoothing period, influencing how the model balances short-term variability and long-term trends. This parameter allows you to customize the model’s sensitivity to short-term changes or long-term trends, ensuring simulations align with the temporal characteristics of the input data. For example:
- A 1-year window captures sharp, year-to-year changes, focusing on short-term variability.
- A 2-year window smooths out fluctuations by averaging over consecutive years, reducing noise and highlighting broader dynamics.
- Longer windows (e.g., 3 years or more) amplify this smoothing effect, making the random walk evolve more gradually over time.
PrecipGen PAR: Model Outputs
PrecipGen PAR produces several critical outputs that are integral to running simulations in PrecipGen. These outputs are stored in easily accessible tables and are ready for direct integration. Together, they enable PrecipGen to capture both short- and long-term precipitation dynamics, providing a robust framework for simulating climatic patterns with precision.
High-Level Overview
PrecipGen relies on three output categories to model daily precipitation patterns effectively:
- Seasonal Parameters: Monthly values of Probability of Wet-Wet (PWW), Probability of Wet-Dry (PWD), ALPHA, and BETA form the backbone of daily precipitation simulations, capturing seasonal climatic variability.
- Long-Term Random Walk Parameters: Annual parameters such as Volatility, Reversion Rate, Initial Value, and Target define the model's sensitivity to short-term changes and long-term trends, ensuring temporal consistency.
- Correlation Coefficients: These quantify the relationships between key parameters, revealing interdependencies and ensuring realistic interactions in the simulations.
Seasonal Parameters
The Seasonal Parameters are foundational to PrecipGen's ability to generate daily precipitation simulations. These parameters—PWW, PWD, ALPHA, and BETA—are calculated for each month, capturing seasonal variability in precipitation patterns. They are derived from the historical dataset and stored in the “Monthly Parameters” Final Value output table within PrecipGen PAR.
Table 1 - Example PrecipGen PAR Output: Seasonal Parameters
Month | PWW | PWD | ALPHA | BETA |
January | 0.29 | 0.06 | 0.72 | 9.43 |
February | 0.35 | 0.06 | 0.77 | 9.30 |
March | 0.32 | 0.07 | 0.63 | 8.36 |
April | 0.44 | 0.10 | 0.77 | 5.38 |
May | 0.47 | 0.17 | 0.81 | 4.62 |
June | 0.52 | 0.21 | 0.83 | 4.18 |
July | 0.50 | 0.23 | 0.91 | 3.47 |
August | 0.54 | 0.22 | 0.95 | 3.50 |
September | 0.44 | 0.19 | 0.86 | 4.80 |
October | 0.41 | 0.13 | 0.81 | 5.71 |
November | 0.41 | 0.10 | 0.77 | 6.77 |
December | 0.36 | 0.09 | 0.71 | 7.93 |
- PWW: The probability of a wet day following another wet day.
- PWD: The probability of a wet day following a dry day.
- ALPHA: The shape parameter of the gamma distribution, influencing precipitation intensity on wet days.
- BETA: The scale parameter of the gamma distribution, affecting the spread of precipitation totals.
These outputs provide the necessary inputs for PrecipGen, ensuring it captures both stochastic variability and seasonal characteristics. You can compare these outputs to those of the original model: WGEN PAR.
Long-Term Random Walk Parameters
The Long-Term Random Walk Parameters govern the annual variability in precipitation, ensuring simulations reflect realistic temporal patterns. Outputs include Volatility, Reversion Rate, and Mean. In a future version, we could add an initial value and target, to simulate long term trends upward or downward.
An example of this output table is shown below. These values can be found in the “Volatility Reversion” Final Value output table within the PrecipGen PAR model:
Table 2 – Example PrecipGen PAR Output: Long-Term Random Walk Parameters
Parameter | Volatility | Reversion | Params_Mean |
PWW | 0.049 | 0.47 | 0.42 |
PWD | 0.020 | 0.52 | 0.13 |
ALPHA | 0.080 | 0.36 | 0.79 |
BETA | 1.11 | 1.44 | 6.12 |
- Volatility: Magnitude of year-to-year variability for each parameter.
- Reversion: Strength with which parameters return to their Initial Value.
- Params_Mean: Average of all time for each parameter.
These parameters form the basis for long-term precipitation dynamics in PrecipGen, ensuring the model remains flexible and adaptable to future enhancements.
Correlation Coefficients
PrecipGen PAR calculates correlation coefficients between key parameter pairs, revealing the interdependencies that shape precipitation patterns. These coefficients are critical for maintaining realistic parameter interactions in simulations. An example output is shown below:
Table 3 – Example PrecipGen PAR Output: Correlation Coefficients
Parameter Pair | Correlation Coefficient |
PWW-PWD | 0.52 |
PWW-ALPHA | -0.30 |
ALPHA-BETA | 0.8 (assumed) |
- PWW-PWD Correlation (0.52): Indicates a moderate positive relationship, where increases in PWW (Probability of Wet-Wet) are associated with increases in PWD (Probability of Wet-Dry).
- PWW-ALPHA Correlation (-0.30): Suggests a weak negative relationship, where higher PWW is slightly associated with lower ALPHA, affecting the shape of precipitation distributions.
- ALPHA-BETA Correlation (0.80): This value is assumed as a constant default for all models. Based on an evaluation of historical coefficients across multiple locations in testing, 0.8 was found to approximate calculated values well. While not currently an output of PrecipGen PAR, this correlation could be added in a future update upon request.
Users can update the ALPHA-BETA Correlation as needed by modifying the Edit Matrix settings in the History Generator. For most applications, the default value of 0.8 should provide reliable results aligned with observed behavior.
PreipGen
PrecipGen is a stochastic model designed to simulate daily precipitation over long time horizons, incorporating both short-term variability and long-term climatic fluctuations. Building upon the foundational WGEN model (Richardson and Wright, 1984), PrecipGen employs a first-order Markov chain-gamma model to replicate daily precipitation patterns. While WGEN was originally developed in FORTRAN by the U.S. Department of Agriculture, PrecipGen advances this approach with added capabilities for representing interannual variability and long-term trends.
Model Overview
The core of PrecipGen lies in its ability to simulate daily precipitation based on four key monthly parameters derived from historical data:
- PWW: Probability of a wet day following another wet day
- PWD: Probability of a wet day following a dry day
- ALPHA: Shape parameter of the gamma distribution for wet days
- BETA: Scale parameter of the gamma distribution for wet days
Figure 2 - View of the Markov chain gamma model
These parameters are generated by PrecipGen PAR and serve as the primary inputs for daily simulations. By relying on Markov chain probabilities and gamma distributions, PrecipGen captures the inherent randomness and seasonality in precipitation patterns.
Model Enhancements
PrecipGen goes beyond WGEN’s original framework by introducing mechanisms to simulate year-to-year variability. This is achieved using GoldSim’s History Generator element, which employs a random walk to create long-term stochastic variations. The random walk is driven by the following inputs:
- Annual Volatility: Captures the scale of fluctuations from year to year.
- Reversion Rate: Represents the tendency for parameters to return to a long-term mean.
- Initial Value and Target Value: Define starting conditions and the expected mean for the random walk.
- Inter-Parameter Correlations: Reflect relationships between parameters, ensuring realistic joint variability.
Figure 3 - View of Random Walk Implementation
Scaling Parameters
The output from the History Generator is used to calculate a scaling factor (SF), which modifies the mean parameters (PWW, PWD, ALPHA, BETA) on an annual basis. This scaling factor adjusts the parameters dynamically as the simulation progresses through time, accounting for both interannual variability and monthly differences. The result is a set of parameters that evolves naturally, simulating realistic transitions between wet and dry years while preserving monthly precipitation characteristics.
Figure 4 - Output of the Random Walk
Input Requirements
To run PrecipGen effectively, you need to provide a range of input data derived from PrecipGen PAR. These inputs ensure the model captures both the short-term variability and long-term dynamics of precipitation:
- Parameter Table (Params_Mean_T): Contains the monthly averages for the four key parameters (PWW, PWD, ALPHA, and BETA) calculated from historical data. These represent the baseline characteristics of daily precipitation.
- Annual Volatility (Volatility_T): Reflects the degree of year-to-year variability in each parameter, quantifying how much the parameters deviate from their mean over time. This input ensures that the model captures interannual fluctuations in precipitation patterns.
- Initial Value (Init_Mean_T): The Random Walk’s starting point for each parameter. Currently, it is assumed to be the mean, found in the output Params_Mean from PrecipGen PAR.
- Target (Target_T): The target of the the random walk, for each parameter. You must determine these independently, as they are not an output of PrecipGen PAR currently. Although I did discover long-term trends in one or more of the parameters, I did not have sufficient time to investigate these trends thoroughly to establish a solid model in PrecipGen PAR. This comprehensive analysis and integration will be addressed in a later version of the PrecipGen PAR model, ensuring that future iterations will capture these important trends more accurately.
- Annual Reversion Rate (Reversion_T): Represents the rate at which each parameter returns to its long-term average after a deviation. This helps simulate the stability or persistence of precipitation characteristics over extended periods.
- Wet-Dry Correlation (Corr_PWW_PWD): PrecipGen PAR outputs this value but you must enter this manually into the History Generator element (Edit Matrix…) called “Random_Walk” located in \Random_Walks. Accounts for the interdependence between the probability of a wet day following a wet day (PWW) and a wet day following a dry day (PWD). This ensures realistic transitions between wet and dry spells.
- Wet-Month Correlation (Corr_PWW_ALPHA): PrecipGen PAR outputs this value but you must enter this manually into the History Generator element (Edit Matrix…) called “Random_Walk” located in \Random_Walks. Represents the relationship between PWW and the shape parameter (ALPHA) of the gamma distribution, which helps maintain consistency in precipitation intensity and duration.
Model Outputs
The final output of PrecipGen includes daily precipitation values that reflect both stochastic variability and the structure inherent in historical records. By integrating long-term adjustments through the scaling factor, the model ensures that annual fluctuations and multi-decadal patterns are accurately represented. This provides a robust simulation framework for exploring potential climatic scenarios and supporting water resource planning.
Here are some sample outputs from a simulation of precipitation at Australia Plains, Australia. These show both daily rates and totals on a monthly and annual basis.
Figure 5 - Sample PrecipGen Output
Conclusion
PrecipGen builds on the WGEN framework by incorporating methods to capture both annual variability and parameter interdependencies. With nothing more than a historical time series, we can quantify the temporal characteristics in a compact set of input tables, including seasonal parameters, long-term random walk settings, and correlation coefficients. The model provides a means to simulate precipitation patterns that reflect both short-term variability and long-term trends.
By structuring the simulation around historical data and integrating stochastic processes for temporal variability, PrecipGen offers a detailed representation of precipitation dynamics for a site. This approach ensures that users can explore climatic patterns across different timescales while understanding how model parameters interact to shape outcomes.
Using the Model
Use the links below to download a copy of both models: PrecipGen PAR and PrecipGen. To generate the input parameters for PrecipGen, use the model PrecipGen PAR. Instructions are provided in the Note Pane of the models.
You can read about 4 applications of this model at different locations around the world in my blog post, here: GoldSim Blog: Testing PrecipGen Across Four Sites
Download the Latest Version
Click the links below to download the latest version of PrecipGen and PrecipGen PAR. We welcome your feedback and questions about how to use this model. Please let us know if you encounter any problems.
Comments
0 comments
Please sign in to leave a comment.