weach_imn: Weather change Iowa Mesonet

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

Description

Manipulates weather data in the format obtained from Iowa Mesonet (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 takes and returns hourly weather information only.

Usage

1
2
3
4
5
6
7
8
weach_imn(data, ts = 1, temp.units = c("Fahrenheit", "Celsius"),
rh.units = c("percent", "fraction"), ws.units = c("mph", "mps"),
pp.units = c("in", "mm"), ...)

weach_imn2(data, temp.units = c("Fahrenheit", "Celsius"), rh.units = c("percent", 
    "fraction"), ws.units = c("mph", "mps"), pp.units = c("in", 
    "mm"), na.chr = -99) 
NULL

Arguments

data

data as obtained from the Iowa Mesonet (see details)

ts

Time step, at the moment it is assumed to be 1.

temp.units

Temperature units.

rh.units

Relative humidity units

ws.units

wind speed units

pp.units

precipitation units

...
na.chr

missing data character

Details

The first function (weach_imn) should be used to transform data from the Iowa Mesonet at hourly intervals from here:

http://mesonet.agron.iastate.edu/agclimate/hist/hourlyRequest.php

When selecting to download variables: Air Temperature (Fahrenheit) Solar Radiation (kilocalories per meter squared) Precipitation (inches) Relative humidity (percent) Wind Speed (mph)

You can read the data directly as it is downloaded making sure you skip the first 6 lines (This includes the title row).

The imported data frame should have 9 columns with:

  1. col 1 site ID

  2. col 2 site name

  3. col 3 date in format "year-month-day", e.g. '2010-3-25'

  4. col 4 hour in format "hour:minute", e.g. '15:00'

  5. col 5 temperature (Fahrenheit)

  6. col 6 solar radiation (kilocalories per meter squared

  7. col 7 precipitation (inches)

  8. col 8 relative humidity (%).

  9. col 9 wind speed (mph)

The second function is in development and it is meant to be used with data downloaded from:

http://mesonet.agron.iastate.edu/agclimate/hist/hourly.php

It might not work well at the moment. It still needs work.

Value

It will return a data frame in the same format as the weach function.

Author(s)

Fernando E. Miguez

References

Iowa Mesonet http://mesonet.agron.iastate.edu/index.phtml

See Also

weach

Examples

1
2
3
4
5
6
7
8
## Not run: 
## Read an example data set from my website
## This can take a while as it processes data for the period 1986-2013
url <- "http://www.agron.iastate.edu/miguezlab/research/biocro/data/ames-weather.csv"
ams <- read.csv(url)
ams2 <- weach_imn(ams)

## End(Not run)

BioCro documentation built on May 2, 2019, 6:15 p.m.