# NOT RUN {
# Using local sources
data("modis", package = "climatrends")
day <- as.Date("2013-10-28", format = "%Y-%m-%d")
ETo(modis,
day.one = day,
span = 10,
Kc = 0.92)
# }
# NOT RUN {
# Using remote sources
library("nasapower")
# random geographic locations around bbox(11, 12, 55, 58)
set.seed(123)
lonlat <- data.frame(lon = runif(2, 11, 12),
lat = runif(2, 55, 58))
# random dates around 2018-05-15 and 2018-05-20
set.seed(321)
dates <- as.integer(runif(2, 17666, 17670))
dates <- as.Date(dates, origin = "1970-01-01")
# the evapotranspiration in the first 50 days after day.one
ETo(lonlat,
day.one = dates,
span = 50,
lat = lonlat[["lat"]])
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab