merge_modis: Merge ORNL MODIS data with a PhenoCam time series

View source: R/merge_modis.R

merge_modisR Documentation

Merge ORNL MODIS data with a PhenoCam time series

Description

Combine PhenoCam time series with MODIS data for matching dates.

Usage

merge_modis(
  data,
  product,
  band,
  trim = FALSE,
  internal = TRUE,
  out_dir = tempdir()
)

Arguments

data

a PhenoCam data file or data structure

product

which MODIS product to query (character vector)

band

which MODIS band(s) to include (character vector)

trim

logical, trim the MODIS data to the length of the PhenoCam time series or include the whole Daymet time series (1980-current). (default = FALSE)

internal

return a data structure if given a file on disk (TRUE / FALSE = default)

out_dir

output directory where to store data (default = tempdir())

Value

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.

Examples


## Not run: 
# 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")

## End(Not run)

phenocamr documentation built on July 21, 2022, 1:06 a.m.