View source: R/get_iemre_apsim_met.R
get_iem_apsim_met | R Documentation |
Retrieves weather data from Iowa Environmental Mesonet (AgWeather) into an APSIM met file
get_iem_apsim_met(lonlat, dates, wrt.dir = ".", state, station, filename)
lonlat |
Longitude and latitude vector (optional) |
dates |
date ranges |
wrt.dir |
write directory |
state |
state which you choose climate data from |
station |
station which you choose cliamte data from |
filename |
file name for writing out to disk |
The original data can be obtained from: https://mesonet.agron.iastate.edu/request/coop/fe.phtml
If the filename is not provided it will not write the file to disk, but it will return an object of class ‘met’. This is useful in case manipulation is required before writing to disk. For this function either provide the longitude and latitude or the state and station, but not both. In fact, ‘state’ and ‘station’ will be ignored if ‘lonlat’ is supplied.
returns an object of class ‘met’ and writes a file to disk when filename is supplied.
## Not run:
## This will not write a file to disk
iem.met <- get_iem_apsim_met(state = "IA",
station = "IA0200",
dates = c("2012-01-01","2012-12-31"))
summary(iem.met)
## Alternatively, coordinates can be used
## This should be equivalent to the previous request
iem.met2 <- get_iem_apsim_met(lonlat = c(-93.77, 42.02),
dates = c("2012-01-01","2012-12-31"))
summary(iem.met2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.