Description Usage Arguments Details Value Examples
Manipulates weather data in the format obtained from WARM (see link below) and returns the format and units needed for most functions in this package. This function should be used for one year at a time. It returns hourly (or sub-daily) weather information.
1 2 3 4 5 6 7 |
X |
a matrix (or data frame) containing weather information. The input format is strict but it is meant to be used with the data usually obtained from weather stations in Illinois. The data frame should have 11 columns (see details). |
lat |
latitude at the specific location |
ts |
timestep for the simulation of sub-daily data from daily. For example a value of 3 would return data every 3 hours. Only divisors of 24 work (i.e. 1,2,3,4, etc.). |
solar.units |
Assumed units for solar radiation input. |
temp.units |
Option to specify the units in which the temperature is entered. Default is Farenheit. |
rh.units |
Option to specify the units in which the relative humidity is entered. Default is percent. |
ws.units |
Option to specify the units in which the wind speed is entered. Default is miles per hour. |
pp.units |
Option to specify the units in which the precipitation is entered. Default is inches. |
... |
additional arguments to be passed to
|
year |
input for the |
seed |
seed used for the random generation of the distribution for downscaling rainfall from daily to hourly. |
This function was originally used to transform daily data to hourly data. Some flexibility has been added so that other units can be used. The input data used originally looked as follows.
col 1 year
col 2 day of the year (1–365). Does not consider leap years.
col 3 total daily solar radiation (MJ/m^2).
col 4 maximum temperature (Fahrenheit).
col 5 minimum temperature (Fahrenheit).
col 6 average temperature (Fahrenheit).
col 7 maximum relative humidity (%).
col 8 minimum relative humidity (%).
col 9 average relative humidity (%).
col 10 average wind speed (miles per hour).
col 11 precipitation (inches).
All the units above are the defaults but they can be changed as part of the arguments.
a data.frame
returning hourly (or sub-daily) weather data. Dimensions 8760 (if hourly) by 8.
If it is a leap year it will be 8784 rows.
year |
Year. |
doy |
Day of the year. |
hour |
Hour of the day (0–23, depending on the timestep). |
SolarR |
Direct solar radiation (micro mol per meter squared per second). |
Temp |
Air temperature (Celsius). |
RH |
Relative humidity (0–1). |
WS |
Average wind speed (meter per second). |
precip |
Precipitation (mm) |
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
## The data typically used can be obtained from
## http://www.isws.illinois.edu/warm/weather/
## I have downloaded and cleaned up the data
## For Champaign and it is available here
url <- "http://www.agron.iastate.edu/miguezlab/research/biocro/data/cmi-weather.csv"
cmi <- read.csv(url)
cmi05 <- weach(subset(cmi, year == 2005), lat=40)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.