Skip to contents

[Stable] Acquire either Land Surface Temperature (LST) or Vegetation Index (NDVI) both cropped to an eLTER site boundary. Download a timeseries of MODIS images containing the requested product and optionally:

Plot a time series graph of the average values over the site.

Create and show an aggregated map of the acquired product

Use of this function requires registering on the EarthData website:

https://urs.earthdata.nasa.gov/home In order to guard your user credentials, please save your username and password to environment variables. i.e.

Sys.setenv("earthdata_user"="homer_simpson") Sys.setenv("earthdata_pass"="bart&lucy")

Usage

get_site_MODIS(
  deimsid,
  product = "VI",
  from_date = "2010.01.01",
  to_date = "2020.31.12",
  output_dir = NULL,
  plot_ts = TRUE,
  output_proj = "3035",
  download_range = "Full",
  show_map = FALSE
)

Arguments

deimsid

character. The DEIMS ID of the site from DEIMS-SDR website. DEIMS ID information here.

product

character. The requested product. One of: "LST", "VI", "ET", "LAI". "LST" for Land Surface Temperature, night and day, 8 day intervals at 1000m resolution "VI" for Vegetation Indices, NDVI and EVI 16 day intervals at 250m resolution "LAI" for Leaf area index and FPAR at 500m resolution "ET" for Evapotranspiration, 8 day interval at 500m resolution Default is "VI".

from_date

character: the start date formatted as YYYY.MM.DD

to_date

character: the end date formatted as YYYY.MM.DD

output_dir

character: where to save downloaded rasters (Default is tempdir())

plot_ts

boolean: whether to plot the time series, Default TRUE.

output_proj

character: the EPSG code of desired output projection. Default is "3035", the European LAEA coordinate reference system.

download_range

character: one of "Full" or "Seasonal". Specifies whether to acquire all images between start and end dates, or only for a specific season. e.g. if the starting date is "2010.01.01" and the ending date is "2020.02.28" then only images for January and February are acquired, over the 10 year time span. (See example)

show_map

character: Whether to create, save and display an aggregated map from the time series of acquired MODIS products. See note below. This string must be one of:

Value

Full path of all downloaded and cropped Geotiff files

Details

Certain layers from each of the supported MODIS products are acquired.

  • from: "LST_3band_emissivity_8day_1km (M\*D21A2)" two "Land surface temperature" bands are acquired:

    "LST_Day_1KM", "LST_Night_1KM"

  • from: "Vegetation Indexes_16Days_250m (M\*D13Q1)" two Vegetation Indicies are acquired:

    "NDVI" and "EVI"

  • from: "LAI_8Days_500m (M\*D15A2H)" two indicies are acquired:

    "Fpar" and "Lai"

  • from: "Net_ET_8Day_500m (M\*D16A2)" one Evapotranspiration band:

    "PET" (Potential EvapoTranspiration)

NOTES:

  • The default output_dir is tempdir(), so the downloaded MODIS files will be deleted when exiting R. Enter a permanent path for output_dir to save the files.

  • Use the plot_ts parameter to create and save line plots of a time series of average pixel values over the site.

  • Use the show_map parameter to create and show a time series aggregation map of the product over the site.

  • Evapotranspiration products are available only up to 2018

  • Plotting with show_map requires: packageVersion("leaflet")>"2.1.1"

References

Busetto L, Ranghetti L (2016). “MODIStsp: an R package for preprocessing of MODIS Land Products time series.” Computers & Geosciences, 97, 40-48. ISSN 0098-3004, doi: 10.1016/j.cageo.2016.08.020 , https://github.com/ropensci/MODIStsp.

Pebesma E (2018). “Simple Features for R: Standardized Support for Spatial Vector Data.” The R Journal, 10(1), 439--446. doi: 10.32614/RJ-2018-009 .

Hijmans RJ (2022). terra: Spatial Data Analysis. R package version 1.5-21, https://CRAN.R-project.org/package=terra.

MODIS images from: https://lpdaac.usgs.gov, maintained by the NASA EOSDIS Land Processes Distributed Active Archive Center (LP DAAC) at the USGS Earth Resources Observation and Science (EROS) Center, Sioux Falls, South Dakota. 2018, https://lpdaac.usgs.gov/resources/data-action/aster-ultimate-2018-winter-olympics-observer/.

Author

Micha Silver, phD (2020) silverm@post.bgu.ac.il

Alessandro Oggioni, phD (2020) oggioni.a@irea.cnr.it

Examples