Coder Social home page Coder Social logo

aluke1 / bayesian-flood-frequency-analysis Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 2.0 33 KB

This program fits a log-pearson Type III distribution to peak stream flow records using Bayesian methods

License: GNU Affero General Public License v3.0

MATLAB 100.00%

bayesian-flood-frequency-analysis's Introduction

Bayesian-Flood-Frequency-Analysis in MATLAB

This program fits a log-pearson Type III distribution to peak stream flow records using Bayesian methods

bayes_LPIII.m fits the stationary (ST) and non-stationary (NS) LPIII distributions to peak streamflow data using Bayesian inference.
Post-processing following parameter estimation calculates and plots selected return periods vs return levels, input time series vs. the mean of distribution, and the density of return level estimates for a selected return period.

Required input data is an annual maximum discharge record. Note: This program is not intended to inform design or insurance products. Please refer to federal and state guidelines for such procedures. For methodological details please see sections 4.1.1 - 4.1.3 of "Predicting nonstationary flood frequencies: Evidence supports an updated stationarity thesis in the United States". Luke et al 2017, Water Resources Research

In the NS model, the mean of the LPIII distribution changes as a function of time. Return periods are not calculated assuming changing probabilities. Return periods are obtained by calculating the return periods associated with the NS mean at the end of the fitting period, or t = t(end). We refer to this approach as updating ST return periods. The updated ST return periods are calculated and displayed by default when applying bayes_LPIII.m for estimation of the NS LPIII model parameters.

Required function files (must be in same directory)

bayes_LPIII.m -> main program

dream_zs.m -> MCMC algorithm

lp3inv.m -> inverse of LPII CDF based on Wilson - Hilferty transformation

lp3pdf.m -> PIII probability density function calculated in log-space (returns actual density)

prior_pdf.m -> computes prior density of parameter combination

prior_rnd.m -> random draw from prior (for initialization)

post_pdf.m -> computes unnormalized posterior density for at proposal theta and data X. Likelihood function in this file

record.txt -> example record (United States Geological Survey site number 08074500, available at: URL:http://nwis.waterdata.usgs.gov/nwis/peak?)

Please see comments in program files and "Predicting nonstationary flood frequencies: Evidence supports an updated stationarity thesis in the United States" for further details. Luke et al 2017, Water Resources Research

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.