temperature: Generate simulated mean temperature

View source: R/temperature.R

temperatureR Documentation

Generate simulated mean temperature

Description

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

Usage

	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

# 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)


sgoslee/VFS documentation built on May 25, 2022, 5:11 a.m.