Data Analysis for Engineers/Module 6

Module 6 · Section 2 of 8

Case Study 6.1 - Extreme Rainfall & Flood Frequency

Civil / Water Resources Engineering

A local government unit is sizing a drainage channel for a flood-prone barangay. You have 30 years of annual-maximum 1-day rainfall (mm) for the nearest PAGASA station. Fit a Gumbel (Extreme Value Type I) distribution and report the 25-, 50-, and 100-year return-period rainfall depths - the standard basis for a drainage or flood-control design.

np.random.seed(101)
years = np.arange(1994, 2024)      # 30 years of record
# synthesise annual maxima by drawing from a Gumbel (extreme-value) distribution
annual_max_1day = np.round(stats.gumbel_r.rvs(loc=185, scale=55, size=len(years), random_state=101), 1)

# .fit() estimates the Gumbel parameters that best describe this record
loc_fit, scale_fit = stats.gumbel_r.fit(annual_max_1day)
print(f"Fitted Gumbel: loc={loc_fit:.1f} mm, scale={scale_fit:.1f}")

# Return period T <-> non-exceedance probability (1 - 1/T); .ppf inverts the CDF
print("\nReturn-period 1-day rainfall:")
rp = {}
for T in (2, 5, 10, 25, 50, 100):
    rp[T] = stats.gumbel_r.ppf(1 - 1 / T, loc=loc_fit, scale=scale_fit)
    print(f"  {T:>3}-year: {rp[T]:6.1f} mm")

fig, axes = plt.subplots(1, 2, figsize=(12, 4.5))
axes[0].bar(years, annual_max_1day, color="steelblue")
axes[0].set_title("Annual Maximum 1-Day Rainfall"); axes[0].set_ylabel("mm")
# smooth curve of design depth vs return period; the fitted rp points sit on it
T_axis = np.linspace(1.01, 120, 200)
axes[1].plot(T_axis, stats.gumbel_r.ppf(1 - 1 / T_axis, loc_fit, scale_fit), color="darkred")
axes[1].scatter(list(rp), list(rp.values()), color="black", zorder=5)   # zorder=5: draw on top
axes[1].set_xscale("log"); axes[1].set_xlabel("Return period (years)"); axes[1].set_ylabel("Rainfall depth (mm)")
axes[1].set_title("Return-Period Curve")
plt.tight_layout(); plt.show()

Key Takeaways

  • The return-period depth grows with T and, on a log return-period axis, the Gumbel fit is a straight line - a quick visual check of the fit.
  • DPWH practice commonly designs minor roadway drainage to a 25-year event and more critical urban flood-control works to 50-100 years; the choice is an engineering decision, not just a statistic.
  • Thirty years of record is a practical minimum; with fewer years the fitted scale (and therefore the 100-year estimate) carries real uncertainty.

57 / 63 sections · Course home · Join the coaching cohort