Rainfall

Daily rainfall data analysis

Daily rainfall analysis turns a gauge or gridded record into the numbers a hydrological study needs: mean annual precipitation, the seasonal pattern, the annual maximum daily series and a check that the record is consistent. This tool loads daily data for South Africa, the United States, Australia or any point on Earth, or your own CSV, and runs those checks and statistics on it.

Where the daily data comes from

You choose the source, then a station or a point on the map, or you load your own file:

RegionSourceTypeNotes
South AfricaLynch (2004) daily rainfall database (SAWS and other networks)GaugesEvery value carries a quality flag; missing days are patched where possible
United StatesNOAA NCEI GHCN-DailyGaugesNearest station to your point
AustraliaSILO DataDrill (Queensland Government)Interpolated gridContinuous, no gaps
AnywhereOpen-Meteo historical archive (ERA5 reanalysis)Reanalysis gridFrom 1940 to a few days ago
AnywhereYour CSV or pasted tableAs suppliedDate and rainfall columns; comma, semicolon or tab; common date formats detected

A gauge measures rain at a point. A gridded or reanalysis product estimates the average over a cell, which smooths short, intense storms. The worked example below shows what that does to the statistics.

What the tool calculates

Mean annual precipitation. Daily values are summed by calendar year and the totals of the complete years averaged:

MAP=1N∑j∈J∑d∈jPd\text{MAP} = \frac{1}{N}\sum_{j \in J} \sum_{d \in j} P_d

where PdP_d is the rainfall on day dd (mm), JJ the set of years with at least the threshold share of their days recorded, and NN the number of years in JJ. The default threshold is 100 %: a year with one missing day is left out, as in Lynch (2004), and patched days count as recorded. At that default the tool reproduces the observed MAP that the Daily Rainfall Extraction Utility lists for a South African station (Kunz, 2004); Gansbaai (0001605 W), for example, gives 485.4 mm from 114 of its 125 years, against 468.9 mm if every year with data were averaged. You can lower the threshold for a record with scattered gaps. The tool also reports the standard deviation of annual totals, mean and median monthly totals, the largest daily value and its date, and the share of wet days (days with at least 1 mm). Station MAP is a useful cross-check on the interpolated catchment MAP that South African flood methods take as an input, for example in design flood estimation.

Mass and residual mass curves. The mass curve is the running total ∑Pd\sum P_d. The residual mass curve subtracts what the mean daily rate would have produced:

R(n)=∑d=1nPd−n PˉdR(n) = \sum_{d=1}^{n} P_d - n\,\bar{P}_d

with Pˉd\bar{P}_d the mean daily rainfall over the record. Rising stretches are wetter than average and falling stretches drier. A sharp change of direction with no climatic explanation points to a station move or gauge change.

Double mass curve. For a South African station, the cumulative annual totals plotted against the cumulative mean of up to five nearby stations, over the complete years they share (Searcy and Hardison, 1960). Weather moves both together, so a consistent record plots as a straight line, and a lasting change of slope marks a change at one of the gauges.

Completeness. A year-by-month heatmap of recorded, patched and missing days, and a table of every year left out of MAP or the annual maxima, with its share of days recorded and the reason.

Annual maximum daily rainfall. The largest daily value in each calendar year forms the annual maximum series. A partial year keeps its maximum unless at least a third of the year is missing and the maximum is among the lowest 40 % of the series (Papalexiou and Koutsoyiannis, 2013): a large maximum from a partial year is still the year’s maximum. The tool fits GEV, Gumbel, log-Pearson Type III and log-normal distributions by maximum likelihood, ranks them by the Kolmogorov–Smirnov test, and reports quantiles from 1:2 to 1:200 years. A bootstrap option refits the distribution to resampled series to show the spread of each quantile. The Mann–Kendall test with Sen’s slope checks annual totals and annual maxima of the complete years for trend, and the Pettitt test looks for a change point.

Worked example: gauge and reanalysis at Washington, DC

The same 30 years (1991–2020) at Washington Reagan National Airport, once from the GHCN-Daily gauge record (USW00013743) and once from the Open-Meteo reanalysis archive at the same coordinates. Both records are complete: all 30 years pass the completeness check, so every figure below uses every year.

StatisticGHCN-Daily gaugeERA5 reanalysis
Mean annual precipitation1 062.1 mm1 088.0 mm
Standard deviation of annual totals225.2 mm267.3 mm
Wettest year2018, 1 684.0 mm2018, 1 992.3 mm
Wet days (≥ 1 mm)25.1%31.8%
Largest daily total131.8 mm, 25 June 2006148.4 mm, 16 September 1999
Mean annual maximum70.3 mm64.0 mm
Skewness of annual maxima0.561.67
Best-fitting distributionLog-Pearson IIILog-Pearson III
1:10-year daily rainfall102.6 mm92.5 mm
1:100-year daily rainfall140.8 mm142.3 mm
Trend in annual maxima (Mann–Kendall)Increasing, p = 0.015None, p = 0.69

The reanalysis gets mean annual precipitation within 2.4% of the gauge, but it rains lightly on more days, and its typical annual maximum is 9% lower. Its 1:100-year value is close to the gauge’s because one storm, the 148 mm day in September 1999, sets the skew of its series: drop that year and the reanalysis 1:100-year value falls from 142.3 mm to 115.7 mm. The gauge’s annual maxima show a significant upward trend (Sen’s slope 1.2 mm per year), which breaks the stationarity a frequency fit assumes and is worth a sentence in any report that uses them.

Neither record gives a design rainfall. NOAA Atlas 14 puts the 1:100-year 24-hour depth at this point at 209 mm, from a regional analysis of longer records over any 24 consecutive hours rather than calendar days. For design depths, use design rainfall.

Quality flags in South African data

Every value in the Lynch (2004) database carries a flag:

FlagMeaning
(blank)Reliable observed value
PMissing value infilled by a patching technique
AAccumulated total, deemed reliable
UAccumulated total, deemed unreliable
NValue corrected for an anomaly
MMissing value that could not be patched
SSuspect: exceeds the threshold value
sPreviously flagged P, A, U or N, and also exceeds the threshold

The tool treats M and U as missing and counts P as data, shown separately on the completeness heatmap. Report the share of patched days for any station you rely on; patched values preserve the statistics of the record but are not observations, and they can understate individual extremes.

Inputs and checks

  • Station or point. For South Africa, search stations near a point and compare their record length and reliable, patched and missing percentages before loading one. For the US the nearest GHCN-Daily station is used; for Australia and elsewhere the gridded value at the point.
  • Analysis period. Trim the record with the start and end months, and replace or paste corrected data where you have it. The original record can be restored.
  • Completeness threshold. The share of a year’s days that must be recorded for the year to count toward MAP (default 100 %), and the rule for annual maxima from partial years. The review step shows how many years each setting keeps before you run.
  • A second source. Where a gauge record is short or gappy, load the reanalysis or gridded record for the same point and compare MAP and seasonality, as in the example above.

Limitations

  • At the default threshold a record with scattered single missing days can have few complete years. Lowering the threshold lets partial years into MAP, and each one pulls it low; report the threshold with the MAP.
  • The annual maximum screen keeps a partial year with a large maximum. A partial year missing its whole wet season but with a moderate maximum can still stay in; check the excluded-years table against the heatmap.
  • Annual maxima are calendar-day totals. The largest rainfall in any 24 consecutive hours is higher, so fitted daily quantiles are not 24-hour design depths.
  • Frequency fitting needs at least 10 years. Quantiles rarer than about twice the record length depend mostly on the shape of the fitted distribution.
  • Gridded and reanalysis data smooth point extremes, as the example shows.
  • A significant trend or change point means the record is not stationary. Split the record or use a regional design rainfall.

What the full Studio tool adds

The Studio tool draws daily, annual and monthly charts, a monthly box plot, the mass, residual mass and double mass curves and the completeness heatmap. It adds drought analysis with the Standardised Precipitation Index over 1 to 24 months, wet and dry spell statistics, inverse-distance interpolation from several South African stations to a point, disaggregation of daily totals into sub-daily hyetographs, and stochastic generation of synthetic daily series. For design storms built from published rainfall, use the design storm generator. Annual maxima can be taken further in flood frequency analysis. Analyses save to a project and export as Word, PDF or Excel reports.

FAQ

Common questions

How is mean annual precipitation calculated from daily data?
Sum the daily values in each calendar year to get annual totals, then average the totals of the complete years. A year with missing days gives a low total and drags the mean down, so by default the tool counts a year toward MAP only when every day is recorded (patched days count), the rule Lynch (2004) used for the South African database. For a record with scattered gaps you can lower the threshold. The tool lists every year it leaves out and why. A 30-year period is the usual basis for a climate normal.
What is a rainfall mass curve used for?
A mass curve plots cumulative rainfall against time. A steady record plots as a line of near-constant slope; a sustained change in slope that no drought or wet spell explains suggests a gauge move, a change of instrument or a data problem. The residual mass curve, the running departure from the mean, makes such breaks easier to see because it removes the overall slope.
How many years of daily rainfall do I need for frequency analysis?
The tool needs at least 10 annual maxima to fit a distribution, but quantiles from 10 to 20 years of data are very uncertain, and the bootstrap option shows how uncertain. A common rule of thumb is not to extrapolate beyond about twice the record length. For rarer return periods, use a regional design rainfall built from many stations.
Is reanalysis rainfall such as ERA5 good enough for design?
It is useful for mean annual precipitation and seasonality where no gauge exists, and it is complete and consistent over long periods. It represents rainfall averaged over a grid cell, not at a point, so it tends to show more wet days and lower typical daily maxima than a gauge. Use it for screening and water balance work, and use gauge-based or published design rainfall for flood design.
What do the P and M flags mean in South African daily rainfall data?
In the Lynch (2004) database used for South African stations, P marks a missing day that was infilled by one of the patching techniques, and M marks a missing day that could not be patched. Other flags mark accumulated totals (A reliable, U unreliable), corrected anomalies (N) and values above a suspect threshold (S, and s for values already flagged). Patched values are estimates, not observations.
Full documentation: Daily Rainfall Statistics
Every input, option and equation in the Studio tool, with its limitations.
Run it from your AI agent
This engine is open to Claude, ChatGPT, Cursor and other MCP clients as analyze_daily_rainfall. The agent passes the inputs, the engine does the calculation, and the record is saved to your project for you to review.

References

  1. Lynch, S.D. (2004) Development of a Raster Database of Annual, Monthly and Daily Rainfall for Southern Africa. WRC Report No. 1156/1/04. Water Research Commission, Pretoria.
  2. Kunz, R.P. (2004) Daily Rainfall Data Extraction Utility: User Manual, Version 1.4. Institute for Commercial Forestry Research and School of Bioresources Engineering and Environmental Hydrology, University of KwaZulu-Natal, Pietermaritzburg.
  3. Papalexiou, S.M. and Koutsoyiannis, D. (2013) Battle of extreme value distributions: A global survey on extreme daily rainfall. Water Resources Research, 49(1), 187–201.
  4. Searcy, J.K. and Hardison, C.H. (1960) Double-mass curves. U.S. Geological Survey Water-Supply Paper 1541-B.
  5. Menne, M.J., Durre, I., Vose, R.S., Gleason, B.E. and Houston, T.G. (2012) An overview of the Global Historical Climatology Network-Daily database. Journal of Atmospheric and Oceanic Technology, 29(7), 897–910.
  6. Jeffrey, S.J., Carter, J.O., Moodie, K.B. and Beswick, A.R. (2001) Using spatial interpolation to construct a comprehensive archive of Australian climate data. Environmental Modelling and Software, 16(4), 309–330.
  7. Hersbach, H. et al. (2020) The ERA5 global reanalysis. Quarterly Journal of the Royal Meteorological Society, 146(730), 1999–2049.
  8. Smithers, J.C. and Schulze, R.E. (2003) Design Rainfall and Flood Estimation in South Africa. WRC Report No. 1060/1/03. Water Research Commission, Pretoria.
  9. McKee, T.B., Doesken, N.J. and Kleist, J. (1993) The relationship of drought frequency and duration to time scales. Proceedings of the 8th Conference on Applied Climatology, American Meteorological Society, Anaheim, California.

Last reviewed by the Delta Hydro engineering team.

Keep the whole study in one place

Delta Hydro Studio puts this tool alongside catchment, rainfall, runoff and hydraulics tools, with projects, team sharing and Word and Excel reports. Run them by hand, or let your AI agent run them for you to review.