NASA_DAAC_download.Rd
Parallel download data from the NASA ORNL DAAC server given period, spatial bounding box, and data DOI.
NASA_DAAC_download(
ul_lat,
ul_lon,
lr_lat,
lr_lon,
ncore = 1,
from,
to,
outdir = getwd(),
band = NULL,
credential.folder = NULL,
doi,
just_path = FALSE
)
Numeric: upper left latitude.
Numeric: upper left longitude.
Numeric: lower right latitude.
Numeric: lower right longitude.
Numeric: numbers of core to be used if the maximum core
Character: date from which the data search starts. In the form "yyyy-mm-dd".
Character: date on which the data search end. In the form "yyyy-mm-dd".
Character: path of the directory in which to save the downloaded files. Default is the current work directory(getwd()).
Character: the band name of data to be requested.
Character: physical path to the folder that contains the credential file. The default is NULL.
Character: data DOI on the NASA DAAC server, it can be obtained directly from the NASA ORNL DAAC data portal (e.g., GEDI L4A through https://daac.ornl.gov/cgi-bin/dsviewer.pl?ds_id=2056).
Boolean: if we just want the metadata and URL or proceed the actual download.
Physical paths of downloaded files (just_path = T) or URLs of the files (just_path = F).
if (FALSE) { # \dontrun{
ul_lat <- 35
ul_lon <- -121
lr_lat <- 33
lr_lon <- -117
from <- "2022-02-23"
to <- "2022-05-30"
doi <- "10.3334/ORNLDAAC/2183"
outdir <- "/projectnb/dietzelab/dongchen/SHIFT/test_download"
paths <- NASA_DAAC_download(ul_lat = ul_lat,
ul_lon = ul_lon,
lr_lat = lr_lat,
lr_lon = lr_lon,
from = from,
to = to,
doi = doi,
just_path = T)
} # }