Description Usage Arguments Author(s) Examples
View source: R/get_cfsr_latlon.R
This is a funciton to grab daily summaries of the CFSR from the drfuka.org service
1 | get_cfsr_latlon(declat, declon, emailaddr, timeoff = 0, interppow = 2)
|
declat |
|
declon |
|
emailaddr |
|
timeoff |
|
interppow |
Daniel R Fuka
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
hist_wx=get_cfsr_latlon(45,-72,"dan@dan.com",timeoff=0,interppow=2)
plot(hist_wx$TMX)
## End(Not run)
## The function is currently defined as
function (declat, declon, emailaddr, timeoff = 0, interppow = 2)
{
library(XML)
options(timeout = 120)
url = paste("http://www.cfsr.tamu-cornell.drfuka.org/swat-cfsr-v02.pl?lat=",
declat, "&lon=", declon, "&timeoff=", timeoff, "&interppow=",
interppow, "&.submit=Submit", sep = "")
hist_wx = readHTMLTable(url, which = 1, header = T, colClasses = c("character",
"numeric", "numeric", "numeric", "numeric", "numeric",
"numeric", "numeric", "numeric"))
hist_wx$DATE = as.Date(hist_wx$DATE, format = "%Y-%m-%d")
return(hist_wx)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.