Git Product home page Git Product logo

stochasticprecipitation's Introduction

StochasticPrecipitation

R code for generating multi-site stochastic precipitation from daily observations using the modified Wilks approach of Mhanna and Bauwens (2012).

In water resource management, climate change, hydrology and related disciplines long time series of precipitation/rainfall data is required. Since historical records are relatively short, typically 50 years or less, mathematical/statistical models are used to generate synthetic data of required length. This data generation process requires that the spatio-temporal statistics are preserved between the observations and the synthetic data. There are a number of procedures in the literature, largely beginning in the late 1990s with the work of Wilks (see references below). However, the code required to generate the synthetic data is typically not available. Only recently, two R packages have been made available (see links below).

This page provides the R code for the computationally and conceptually simple implementation of the modified Wilks approach of Mhanna and Bauwens (2012).

Code

  • "mod_wilks_lib.R" - is the library of R functions used by the code
  • "mod_wilks_code.R" - this is the file you need to run
  • "mod_wilks_plot.R" - for summary plots

Input Data

The code on this page generates 1000 years of synthetic precipitation data for 15 stations (in the San Francisco Bay Area), only for the month of January. The input data is provided as the file "janData.txt". The format of this file is:

  • year, day of month, rain @ stn 1, rain @ stn 2, ..., rain @ stn 15
  • year, day of month, rain @ stn 1, rain @ stn 2, ..., rain @ stn 15
  • ...

This code should work for any dail data set, provided the input format is consistent with the above specified format.

References

  • Mhanna and Bauwens (2012), A Stochastic space-time model for the generation of daily rainfall in the Gaza Strip, International Journal of Climatology, 32, 1098-1112.
  • Brissette, Khalili and Leconte (2007), Efficient stochastic generation of multi-site synthetic precipitation data, Journal of Hydrology, 345, 121-133.

Links to R-based weather generators

stochasticprecipitation's People

Contributors

rationshop avatar

Watchers

James Cloos avatar Mao-Lin Shen avatar

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.