This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script takes the standard download of annual max, min, mean data from | |
# http://data.water.vic.gov.au/monitoring.htm | |
# Plots a bar plot with ggplot | |
library(stringr) | |
library(dplyr) | |
library(lubridate) | |
library(ggplot2) | |
library(devtools) | |
library(scales) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage | |
# | |
# source_gist('https://gist.github.com/TonyLadson/280fd3ae3e730b3bb370') | |
# DeltaTable_Kite(g = 0.1, aep = 0.02) | |
# [1] 2.3425 | |
DeltaTable_Kite <- function(g, aep){ | |
# g = skew | |
# aep = annual exceedance probability |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Routing | |
# Based on discussion in | |
# Mein, R. G., E. M. Laurenson and T. A. McMahon (1974). | |
# "Simple nonlinear model for flood estimation." Journal of the Hydraulics Division, American Society of Civil Engineers 100(HY11): 1507-1518. | |
# Time stepping solution - ideas from Section 23.2, p490 of | |
# Jones, O., Maillardet, R. and Robinson, A. (2014) Introduction to scientific programming and simulation using R. | |
# CRC Press |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(deSolve) | |
# dQ/dt = (I - Q)/(kmQ^(m-1)) | |
# Specify the inflow hydrograph, using a function as discussed at | |
# https://tonyladson.wordpress.com/2015/07/21/hydrograph-as-a-function/ | |
my.Qmin <- 0 | |
my.Qmax <- 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Interpolating design rainfall intensities | |
# | |
library(dplyr) | |
library(stringr) | |
library(optimx) | |
# Assemble data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################################################### | |
# | |
# Influence of shape factor in regional flood estimation | |
# See https://tonyladson.wordpress.com/2016/04/13/shape-factor-in-regional-flood-estimation/ | |
# | |
#################################################################### | |
# Plot of shape factor distribution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################################################### | |
# | |
# Influence of shape factor in regional flood estimation | |
# See https://tonyladson.wordpress.com/2016/04/13/shape-factor-in-regional-flood-estimation/ | |
# | |
#################################################################### | |
# Plot of shape factor distribution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find parameters of the Pearson III distribution given three quantile values | |
# Function for the Pearson III frequency factor | |
# details at https://tonyladson.wordpress.com/2015/03/10/frequency-factors-2/ | |
Ky_gamma <- function(g, aep){ | |
if(abs(g) < 1e-8) { # Use the Wilson-Hilferty approximation to avoid numerical | |
# issues near zero |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#remove(list = objects()) | |
library(stringr) | |
library(dplyr) | |
library(ggplot2) | |
library(devtools) | |
library(readr) | |
library(repmis) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hourly data from Victorian monitoring site | |
# This script takes the standard download of hourly max, min, mean data from | |
# http://data.water.vic.gov.au/monitoring.htm | |
# File is downloaded as 'gaugenumber.csv' | |
#remove(list = objects()) | |