Need maintenance for the directory path change in NASA EOSDIS. This function first retrieves the all hdf download links on a certain day, then only selects the relevant tiles from the retrieved links. Download is only done at the queried horizontal-vertical tile number combinations. An exception is MOD06_L2 product, which is produced every five minutes every day.
download_modis(
product = c("MOD09GA", "MYD09GA", "MOD09GQ", "MYD09GQ", "MOD09A1", "MYD09A1",
"MOD09Q1", "MYD09Q1", "MOD11A1", "MYD11A1", "MOD11A2", "MYD11A2", "MOD11B1",
"MYD11B1", "MOD13A1", "MYD13A1", "MOD13A2", "MYD13A2", "MOD13A3", "MYD13A3",
"MOD06_L2", "MCD19A2", "VNP46A2"),
version = "61",
horizontal_tiles = c(7, 13),
vertical_tiles = c(3, 6),
mod06_links = NULL,
nasa_earth_data_token = NULL,
date = c("2023-09-01", "2023-09-01"),
directory_to_save = NULL,
acknowledgement = FALSE,
download = FALSE,
remove_command = FALSE,
hash = FALSE
)
For hash = FALSE
, NULL
For hash = TRUE
, an rlang::hash_file
character.
HDF (.hdf) files will be stored in year/day_of_year sub-directories within
directory_to_save
.
character(1).
One of c("MOD09GA", "MOD11A1", "MOD06_L2", "MCD19A2", "MOD13A2", "VNP46A2")
character(1). Default is "61"
, meaning v061.
integer(2). Horizontal tile numbers
c({start}, {end})
. Default is c(7, 13)
.
integer(2). Vertical tile numbers
c({start}, {end})
. Default is c(3, 6)
.
character(1). CSV file path to MOD06_L2 download links
from NASA LAADS MOD06_L2. Default is NULL
.
character(1). Token for downloading data from NASA. Should be set before trying running the function.
character(1 or 2). length of 10. Date or start/end dates for downloading data.
Format "YYYY-MM-DD" (ex. January 1, 2018 = "2018-01-01"
). Note: ignored if
product == "MOD06_L2"
.
character(1). Directory to save data.
logical(1). By setting TRUE
the
user acknowledges that the data downloaded using this function may be very
large and use lots of machine storage and memory.
logical(1). Download data or only save wget commands.
logical(1). Remove (TRUE
) or keep (FALSE
)
the text file containing download commands.
logical(1). By setting TRUE
the function will return
an rlang::hash_file()
hash character corresponding to the
downloaded files. Default is FALSE
.
Mitchell Manware, Insang Song
data_mcd19a22021amadeus
data_mod06l2_2017amadeus
data_mod09ga2021amadeus
data_mod11a12021amadeus
data_mod13a22021amadeus
article_roman2018vnp46amadeus