View source: R/get_site_MODIS.R
get_site_MODIS | R Documentation |
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")
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
)
deimsid |
|
product |
|
from_date |
|
to_date |
|
output_dir |
|
plot_ts |
|
output_proj |
|
download_range |
|
show_map |
FALSE (the default): no map is shown or created. Otherwise: an aggregation function such as "mean", "max", or "min. |
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"
Full path of all downloaded and cropped Geotiff files
Micha Silver, phD (2020) silverm@post.bgu.ac.il
Alessandro Oggioni, phD (2020) oggioni.a@irea.cnr.it
MODIStspReLTER
\insertRefsfRReLTER
\insertRefterraRReLTER
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/.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.