Get Weather Data for Use in epicrop Modelling
get_wth.Rd
This function is a wrapper for the nasapower::get_power()
with predefined
parameters suitable for use in epicrop.
Arguments
- lonlat
A numeric vector of geographic coordinates for a cell or region entered as x, y coordinates.
- dates
A character vector of start and end dates in that order.
- duration
A numeric value indicating how many days a single growing season being simulated is to be. If this is used, only the start date will be used and the end date will be ignored if supplied. This must match the
duration
parameter value passed along toSEIR()
or any of thepredict
family of functions.
Value
A data.table::data.table()
of weather data, dates and
geolocation information (LAT/LON values) suitable for use in epicrop
with the following columns:
Field Name | Value |
YYYYMMDD | Date as Year Month Day (ISO8601) |
DOY | Consecutive day of year, commonly called "Julian date" |
TEMP | Mean daily temperature (°C) |
RHUM | Mean daily relative humidity (%) |
RAIN | Mean daily rainfall (mm) |
LAT | Latitude of area of interest |
LON | Longitude of area of interest |
Author
Adam H. Sparks, adamhsparks@gmail.com
Examples
# get weather for IRRI Zeigler Experiment Station in wet season 2000 from the
# default NASA POWER data.
power <- get_wth(
lonlat = c(121.25562, 14.6774),
dates = c("2000-06-30", "2000-12-31")
)
# get 120 days of weather for IRRI Zeigler Experiment Station in wet season
# 2000 by specifying the duration but not the end-date and specifying to use
# POWER data.
power <- get_wth(
lonlat = c(121.25562, 14.6774),
dates = "2000-06-30",
duration = 120
)