get_mod_filenames: Find the names of MODIS images corresponding to the selected...

View source: R/get_mod_filenames.R

get_mod_filenamesR Documentation

Find the names of MODIS images corresponding to the selected dates

Description

Accessory function to find the names of HDF images corresponding to a given date and interval of spatial tiles within the lpdaac archive.

Usage

get_mod_filenames(
  http,
  used_server,
  user,
  password,
  n_retries,
  date_dir,
  v,
  h,
  tiled,
  out_folder_mod,
  gui
)

Arguments

http

character url of http site on lpdaac corresponding to a given MODIS product.

used_server

character can assume values "http"; it cannot be NA.

user

character username for earthdata server.

password

character password for earthdata server.

n_retries

numeric number of times the access to the http server should be retried in case of error before quitting, Default: 20.

date_dir

⁠character array⁠ array of folder names corresponding to acquisition containing dates where MODIS files to be downloaded are to be identified (return array from get_mod_dates).

v

⁠integer array⁠ containing a sequence of the vertical tiles of interest (e.g., c(18,19)).

h

⁠integer array⁠ containing a sequence of the horizontal tiles of interest (e.g., c(3,4)).

tiled

numeric [0/1] indicates if the product to be downloaded is tiled or not tiled. 1 = tiled product; 0 = non-tiled product (resolution 0.05 deg).

out_folder_mod

character folder where hdf files have to be stored.

gui

logical indicates if processing was called within the GUI environment or not. If not, processing messages are redirected direct to the log file.

Value

⁠character array⁠ containing names of HDF images corresponding to the requested tiles available for the product in the selected date

Note

License: GPL 3.0

Author(s)

Original code by Babak Naimi (.getModisList, in ModisDownload.R) modified to adapt it to MODIStsp scheme and to http archive (instead than old FTP) by:

Lorenzo Busetto, phD (2014-2016)

Luigi Ranghetti, phD (2016)


ropensci/MODIStsp documentation built on Oct. 16, 2023, 2:34 a.m.