if (FALSE) {
## NOTE: Examples are wrapped in `/dontrun{}` to avoid sharing sensitive
## NASA EarthData tokden information.
vec_extent <- c(-80, 35, -75, 40)
# example with MOD09GA product
download_modis(
product = "MOD09GA",
version = "061",
date = "2024-01-01",
extent = vec_extent,
nasa_earth_data_token = "./pathtotoken/token.txt",
directory_to_save = tempdir(),
acknowledgement = TRUE,
download = FALSE, # NOTE: download skipped for examples,
remove_command = TRUE
)
# example with MOD06_L2 product
download_modis(
product = "MOD06_L2",
version = "6.1",
extent = vec_extent,
date = "2024-01-01",
nasa_earth_data_token = "./pathtotoken/token.txt",
directory_to_save = tempdir(),
acknowledgement = TRUE,
download = FALSE, # NOTE: download skipped for examples,
remove_command = TRUE
)
# example with VNP46A2 product
download_modis(
product = "VNP46A2",
version = "5200",
date = "2024-01-01",
extent = vec_extent,
nasa_earth_data_token = "./pathtotoken/token.txt",
directory_to_save = tempdir(),
acknowledgement = TRUE,
download = FALSE, # NOTE: download skipped for examples,
remove_command = TRUE
)
}
Run the code above in your browser using DataLab