Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.0%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: drabuharuna
  • Language: R
  • Default Branch: main
  • Size: 2.14 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Created about 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme Citation

README.md

egpdIDF: Modeling Intensity-Duration-Frequency (IDF) and Intensity-Duration-Area-Frequency(IDAF) Curves using the Extended Genaralized Pareto Distribution (EGPD)

DOI

Introduction

Intensity-Duration-Frequency (IDF) curves provide the link between precipitation intensity, duration, and non-exceedance frequency (or rather the return period). It is a very common and useful tool in the area of water resources engineering. IDF curves are practically used to infer high return levels of rainfall intensities for the hydrological designs of structures such as sewer lines, culverts, drains, dams, dykes, etc.

IDF curves are usually modeled using Generalized Extreme Value distributions (GEV). Here, we consider the three parameter Extended Generalized Pareto Distribution (EGPD) of Naveau et al 2016 to build IDF curves. EGPD models the distribution of the non-zero rainfall intensities, not only extremes, thereby making efficient use of the available information. The package provides the implementation of 10 different IDF modelling approaches as contained in Haruna et al 2023.

Runnig the Functions

Loading the package

The package is loaded by calling the function below:

{r setup} library(egpdIDF)

Aggeregation precipitation data to intensities of longer durations

Before the IDF curves are modeled, the data has to be aggregated to intensities of different duration that are specified by the user.

```{r, eval = FALSE}

## load the data data("precipdata")

## Here the resolution of the data is in 'hours', we want to aggeregate the data up to 72 hours ## specify the aggregation durations

durations = c(1,2, 3, 6, 10, 12, 16, 18, 24, 48, 72)

## get the aggrageted data for each of the stationdata= aggregatedata(sampledata = precipdata, stcode = "SCH", durations = durations)

head(station_data)

} ```

Fitting EGPD to intensities of each duration separately

We can fit EGPD to the intensities of each duration separately. This helps to investigate how each EGPD parameter varies with duration. We can also investigate the quality of the EGPD fit. Finally, the outputs of the function are used to initialize the other functions ues in modeling the IDF curves.

```{r, eval=FALSE} initialparams = egpdidfinit(stationdata = stationdata, durations = durations, fittingmethod = "mle", declusteringduration = c(1,2,3,6,10,12, 16,18, 24, 48, 72), autofit = FALSE) ## check the fitted egpd parameters for each duration initialparams$fits$kappaparam initialparams$fits$scaleparam initialparams$fits$shapeparam

## check the quality of the fit initial_params$fits$nrsme

## for a good fit, 'nrsme" should be small.

## Tt's always good to use left censoring with 'mle' fit. Lets try, and check the 'nrmse' again ## we set "autofit=T", "nrmsetol=0.1" "useroptim=T" , "nrsmequantile = 0". ## Check the arguments for their meaning initialparams = egpdidfinit(stationdata = stationdata, durations = durations, fittingmethod = "mle", declusteringduration = c(1,2,3,6,10,12, 16,18, 24, 48, 72), autofit = TRUE, nrmsetol = 0.1,useroptim = TRUE, nrsmequantile = 0) ## check the quality of the fit initialparams$fits$nrsme ## check the parameters initialparams$fits$kappaparam initialparams$fits$scaleparam initialparams$fits$shapeparam ```

Fitting data-driven IDF models

This class of IDF model rely on empirically determined functional relationships between the EGPD parameter and duration. It is not based on any physical model assumption but rather based on the identified empirical relationship.

```{r, eval=FALSE}

load the data

data("precipdata")

## Here the resolution of the data is 'hours', we want to aggeregate the data up to 72 hours ## specify the aggregation durations

durations = c(1,2, 3, 6, 10, 12, 16, 18, 24, 48, 72)

## get the aggrageted data for each of the stationdata= aggregatedata(sampledata = precipdata, stcode = "SCH", durations = durations)

## get initial values

initialparams = egpdidfinit(stationdata = stationdata, durations = durations, fittingmethod = "mle", declusteringduration = c(1,2,3,6,10,12, 16,18, 24, 48, 72), autofit = T, nrmsetol = 0.1,useroptim = T, nrsmequantile = 0) ## fit the data driven IDF fittedidf = fitegpdidfdatadriven(stationdata = stationdata, durations = durations, declusteringduration = c(1,2, 3, 6, 10, 12, 16, 18, 24, 48, 72), fittingmethod = 'mle', initialparams = initialparams, optimalgo = "BFGS")

#check 'optim' params, for convergencem etc fittedidf$fittedparams

#parameters of the IDF fittedidf$fittedparams$par

# fitted egpd parameters for the given durations kappafit = fittedidf$kappaparam sigmafit = fittedidf$scaleparam xifit = fittedidf$shape_param

#compute nrmse to check quality of fit nrmsed = computenrsme(stationdata, c(1,2,3,6,10,12, 16,18, 24, 48, 72), kappafit, sigmafit, xifit, inittimestep = 1, q = 0) nrmse_d

Plot the IDF curves

plotegpdidfcurves(stationdata = stationdata, kappafit = kappafit, sigmafit = sigmafit, xifit = xifit, durations, declusteringduration=c(1,2,3,6,10,12, 16,18, 24, 48, 72), npy = 92, inittime_step=1 )

```

Fitting IDF models that are based on scaling principle

This class of IDF models rely on the scaling of precipitation process in time. We consider eight different variations of this models.

The first four are all based on simple scaling model and some extensions

  • Simple scaling IDF model
  • Simple scaling IDF model with scaling break
  • Simple scaling IDF model with shape parameter as a function of duration
  • Simple scaling IDF model with scaling break and shape parameter as a function of duration

The last four are based on the General IDF formulation of Koutsoyiannis et al 1998.

  • General IDF model
  • General IDF model with scaling break
  • General IDF model with shape parameter as a function of duration
  • General IDF model with scaling break and shape parameter as a function of duration

For their details, refer to Haruna et al. 2020.

Here we give example of the simple-scaling IDF model. This is achieved by setting the arguments simplescaling = T, multiregime = F, xi_constant = T. The other seven models can be fitted by modifying these arguments. For example, in the case of IDF based on the General formulation of Koutsoyiannis 1998, the arguments should be simple_scaling = F, while multiregime = F, xiconstant = T

```{r, eval=FALSE}

## load the data data("precipdata")

## Here the resolution of the data is in 'hours', we want to aggeregate the data up to 72 hours ## specify the aggregation durations

durations = c(1,2, 3, 6, 10, 12, 16, 18, 24, 48, 72)

## get the aggrageted data for each of the stationdata= aggregatedata(sampledata = precipdata, stcode = "SCH", durations = durations)

## get initial values

initialparams = egpdidfinit(stationdata = stationdata, durations = durations, fittingmethod = "mle", declusteringduration = c(1,2,3,6,10,12, 16,18, 24, 48, 72), autofit = T, nrmsetol = 0.1,useroptim = T, nrsmequantile = 0)

## fit the simple scaling IDF model fittedidf = fitegpdidfscalingmodels(stationdata = stationdata, durations = durations, censored = initialparams$fits$lowerthreshold, declusteringduration = c(1,2, 3, 6, 10, 12, 16, 18, 24, 48, 72), fittingmethod = 'mle', initialparams = initialparams, simplescaling = T, multiregime = F, xiconstant = T, inittimestep = 1,autofit = F, nrmsetol = 0.1, useroptim = F, nrsmequantile = 0, optimalgo = "BFGS")

#check 'optim' params, for convergence etc fittedidf$fittedparams

#parameters of the IDF fittedidf$fittedparams$par

# fitted egpd parameters for the given durations kappafit = fittedidf$kappaparam sigmafit = fittedidf$scaleparam xifit = fittedidf$shape_param

#compute nrmse to check quality of fit nrmsed = computenrsme(stationdata, c(1,2,3,6,10,12, 16,18, 24, 48, 72), kappafit, sigmafit, xifit, inittimestep = 1, q = 0) nrmse_d

Plot the IDF curves

plotegpdidfcurves(stationdata = stationdata, kappafit = kappafit, sigmafit = sigmafit, xifit = xifit, durations, declusteringduration=c(1,2,3,6,10,12, 16,18, 24, 48, 72), npy = 92, inittime_step=1 )

```

References

  • Naveau, P., Huser, R., Ribereau, P., and Hannart, A.: Modeling jointly low, moderate, and heavy rainfall intensities without a threshold selection,Water Resour. Res., 52, 2753–2769, https://doi.org/10.1002/2015WR018552, 2016.
  • Haruna, Abubakar, Juliette Blanchet, and Anne-Catherine Favre. "Modeling Intensity-Duration-Frequency curves for the whole range of precipitation: A comparison of models." Authorea Preprints (2022)
  • Koutsoyiannis, Demetris, Demosthenes Kozonis, and Alexandros Manetas. "A mathematical framework for studying rainfall intensity-duration-frequency relationships." Journal of hydrology 206.1-2 (1998): 118-135.

Owner

  • Login: drabuharuna
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Haruna"
  given-names: "Abubakar"
  orcid: "https://orcid.org/0000-0002-0508-6734"
title: "egpdIDF: Modeling Intensity Duration Frequency Curves (IDF) using the Extended Generalised Pareto Distribution"
version: 1.0.0
doi: 10.5281/zenodo.7828750
date-released: 2023-04-14
url: "https://doi.org/10.5281/zenodo.7828750"

GitHub Events

Total
  • Push event: 3
Last Year
  • Push event: 3