temperature: Generate simulated mean temperature

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/temperature.R

Description

Generates simulated daily temperature minimum and maximum based on parameters derived from daily weather data.

Usage

1
	temperature(ndays, thiswth)

Arguments

ndays

number of days to simulate

thiswth

list output of wth.param.

Details

This is a very simple temperature simulation, using three parameters derived from daily weather data and the day of year to calculate a smooth annual temperature change derived from the first harmonic of a Fourier function.

Value

Returns a vector of daily mean temperature (X).

Author(s)

Heather Gall and Sarah Goslee

References

Grimenes, A. and Nissen, O. (2004) Mathematical modeling of the annual temperature wave based on monthly mean temperatures, and comparisons between local climate trends at seven Norwegian stations. Theor Appl Climatol 78, 229–246. doi: 10.1007/s00704-004-0036-9

See Also

wth.param, rainfall

Examples

1
2
3
4
5
6
7
8
9
# A sample GHCN daily weather file for State College, PA, is included with this package.
# This file contains a subset of data (1980-2009) 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 10 years of temperature
temp10 <- temperature(365*10, weather.param.p)

VFS documentation built on May 2, 2019, 8:58 a.m.