get_site_MODIS: Acquire a time series of MODIS satellite products

View source: R/get_site_MODIS.R

get_site_MODISR Documentation

Acquire a time series of MODIS satellite products

Description

[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:

FALSE (the default): no map is shown or created.
Otherwise: an aggregation function such as "mean", "max", or "min.

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"

Value

Full path of all downloaded and cropped Geotiff files

Author(s)

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

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

References

\insertRef

MODIStspReLTER

\insertRef

sfRReLTER

\insertRef

terraRReLTER

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/.

Examples

 ## Not run: 
# Lago Maggiore - Italy, LST over an 6 month time span
# Saved in LAEA ETRS89 coordinate reference system
# This example completes in about 10 mins
deimsid = "https://deims.org/f30007c4-8a6e-4f11-ab87-569db54638fe"
product <- "LST"
from_date <- "2018.03.01"
to_date <- "2018.08.30"
output_dir <- tempdir()
output_proj <- "3035"
download_list <- ReLTER::get_site_MODIS(deimsid,
    product = product,
    from_date = from_date, to_date = to_date,
    output_dir = output_dir,
    plot_ts = TRUE,
    output_proj = output_proj)

# Northern Negev LTER - Israel, NDVI over 4 winter months,
# projected to Israeli 05/12 CRS
# This example completes in about 30 mins
deimsid <- "https://deims.org/871a90b2-e372-456a-93e3-518ad1e11239"
from_date <- "2018.01.01"
to_date <- "2018.04.30"
product = "VI"
output_dir <- tempdir()
output_proj <- "6991"
download_list <- ReLTER::get_site_MODIS(deimsid,
    product = product,
    from_date = from_date, to_date=to_date,
    output_dir = output_dir,
    plot_ts = TRUE,
    output_proj = output_proj)

# Nationalpark Mols Bjerge - Denmark, 10 year only for July
# Show aggregated mean NDVI and EVI, (No time series plot)
# projected to EPSG:25832 (UTM zone 32, ETRS89)
# Takes about 3/4 hour to run...
deimsid <- "https://deims.org/8407da23-d75d-4a02-a5a5-7b9701a86743"
from_date <- "2005.07.01"
to_date <- "2015.08.01"
output_dir <- tempdir()
output_proj <- "25832"
product <- "VI"
download_list <- ReLTER::get_site_MODIS(deimsid,
    product = product,
    from_date = from_date, to_date = to_date,
    output_dir = output_dir,
    output_proj = output_proj,
    download_range = "Seasonal",
    plot_ts = FALSE,
    show_map = "mean")


# Braila Islands - Romania, 2 year time series of evapotranspiration
# projected to Pulkova 1942(59) Zone 9 CRS, EPSG:3839
# Takes almost 1.5 hours to run (requires 2 MODIS tiles)
deimsid <- "https://deims.org/d4854af8-9d9f-42a2-af96-f1ed9cb25712"
from_date <- "2015.01.01"
to_date <- "2016.12.31"
output_dir <- tempdir()
output_proj <- "3839"
product <- "ET"
download_list <- ReLTER::get_site_MODIS(deimsid,
    product = product,
    from_date = from_date, to_date = to_date,
    output_dir = output_dir,
    output_proj = output_proj,
    download_range = "Full",
    plot_ts = TRUE,
    show_map = FALSE)


# Gran Paradiso National Park - Italy,
1 year time series of LAI and aggregated map
# projected to ETRS89 LAEA, EPSG:3035
# Takes about 3/4 hour to run
deimsid <- "https://deims.org/e33c983a-19ad-4f40-a6fd-1210ee0b3a4b"
from_date <- "2020.01.01"
to_date <- "2020.12.31"
output_dir <- tempdir()
output_proj <- "3035"
product <- "LAI"
download_list <- ReLTER::get_site_MODIS(deimsid,
    product = product,
    from_date = from_date, to_date = to_date,
    output_dir = output_dir,
    output_proj = output_proj,
    download_range = "Full",
    plot_ts = TRUE,
    show_map = "mean")


## End(Not run)



oggioniale/ReLTER documentation built on Jan. 4, 2024, 3:48 p.m.