get_wth | R Documentation |
This function is a wrapper for the nasapower::get_power()
with predefined
parameters suitable for use in epicrop.
get_wth(lonlat, dates, duration)
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 |
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 |
Adam H. Sparks, adamhsparks@gmail.com
# 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,
source = "nasapower"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.