Combine PhenoCam time series with MODIS data for matching dates.
merge_modis(
data,
product,
band,
trim = FALSE,
internal = TRUE,
out_dir = tempdir()
)
a PhenoCam data file or data structure
which MODIS product to query (character vector)
which MODIS band(s) to include (character vector)
logical, trim the MODIS data to the length of the
PhenoCam time series or include the whole Daymet time series (1980-current).
(default = FALSE
)
return a data structure if given a file on disk
(TRUE
/ FALSE
= default)
output directory where to store data (default = tempdir())
A PhenoCam data structure or file which combines PhenoCam time series data with MODIS values (columns will be added). Data is queried from the ORNL MODIS subsets service using the `MODISTools` package, please consult either sources on product and band names.
if (FALSE) {
# download demo data
download_phenocam(site = "harvard$",
veg_type = "DB",
roi_id = "1000",
frequency = "3")
# merge data with daymet data
df <- merge_modis(file.path(tempdir(),
"harvard_DB_1000_3day.csv"),
product = "MOD13Q1",
band = "250m_16_days_NDVI")
}