Description Usage Arguments Details Value Author(s) References See Also Examples
The climate generation functions for rainfall and temperature require parameters calculated from GHCN daily weather data, or from any data frame with columns containing year, month, day, precipitation, and minimum and maximum temperature. Partial years at the beginning or end of the dataset are removed. Leap days are also removed to standardize dayofyear calculation.
1 2 3  wth.param(dly, llim = 0, method = "poisson", year.col = "YEAR",
month.col = "MONTH", day.col = "DAY", prcp.col = "PRCP.VALUE",
tmin.col = "TMIN.VALUE", tmax.col = "TMAX.VALUE")

dly 
A data frame, such as the output of 
llim 
The minimum daily rainfall for a wet day to be counted. 
method 
Choice of model for which to calculate parameters, either "poisson" or "markov". 
year.col 
Name of the column containing year number. 
month.col 
Name of the column containing month number. 
day.col 
Name of the column containing day number. 
prcp.col 
Name of the column containing daily precipitation. 
tmin.col 
Name of the column containing daily minimum temperature. 
tmax.col 
Name of the column containing daily maximum temperature. 
The rainfall simulation currently offers choice of two methods: the simple Poisson model of RodriguezIturbe et al. (1999), and the Markov chain model of Nicks (1974). The latter rainfall calculation is used by the APEX farm model, among others, and is based on monthly statistics. NOTE: For reasons of time and space, the example contains only ten years of daily weather data. We suggest using thirty years for estimating parameter values.
params 
Parameters for simulating longterm point rainfall. For
For

temperature 
Parameters for simulating longterm daily temperature. 
llim 
Minimum daily rainfall for a wet day. 
start 
First full year of weather data 
end 
Last full year of weather data 
Sarah Goslee
RodriguezIturbe, I., Porporato, A., Ridolfi, L., Isham, V. and Coxi, D. R. (1999) Probabilistic modelling of water balance at a point: the role of climate, soil and vegetation. Proc Royal Soc A 455, 269–288.
Nicks, A. D. (1974) Stochastic generation of the occurrence, pattern and location of maximum amount of daily rainfall. Pp. 154–171 in: Proceedings Symposium on Statistical Hydrology. USDA Agricultural Research Service Miscellaneous Publication No. 1275, Washington, DC.
read.dly
,
rainfall
,
temperature
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26  # GHCN daily weather file for State College, PA
# subset of data (20002009) for station USC00368449
#
data("weather")
# calculate parameters for the poisson model
# using 0.3 mm as the lower limit for wet days.
weather.param.p < wth.param(weather, method = "poisson", llim = 0.3)
# simulate ten years of rainfall
rain10.p < rainfall(365*10, weather.param.p)
# increase perevent rainfall by 5 mm
weather.param.p5 < weather.param.p
weather.param.p5$params$depth < weather.param.p5$params$depth + 5
rain10.p5 < rainfall(365*10, weather.param.p5)
# calculate parameters for the Markov chain model
# using 0.3 mm as the lower limit for wet days.
weather.param.m < wth.param(weather, method = "markov", llim = 0.3)
# rainfall() selects Markov model based on input parameter types
rain10.m < rainfall(365*10, weather.param.m)
# simulate 10 years of temperature
temp10 < temperature(365*10, weather.param.p)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.