Learn R Programming

modiscloud (version 0.14)

modfns_to_ftp_download_cmd: Make download commands for MODIS files

Description

Take some MODIS product filenames and produce the appropriate FTP "get" command.

Usage

modfns_to_ftp_download_cmd(mod03_fns_dropped, ftp_prefix = "get allData/5/", output_to = "screen")

Arguments

mod03_fns_dropped
A list of MODIS product files (e.g. the files returned as mismatches by check_for_matching_geolocation_files
ftp_prefix
The prefix that the user would like to pre-pend to the FTP directory
output_to
If "screen", the FTP commands are printed to screen (and returned as a list). If "data.frame", the FTP commands are only returned as a list. Any other string is interpreted as a filename, and the FTP commands will be saved to that as a textfile (and returned as a list).

Value

ftp_cmds, A list of the FTP commands.

Details

E.g., an input of:

MYD03.A2007019.1935.005.2009277181756.hdf

...is converted to:

get allData/5/MYD03/2007/019/MYD03.A2007019.1935.005.2009277181756.hdf MYD03.A2007019.1935.005.2009277181756.hdf

The user must specify ftp_prefix, e.g. for the products I have worked with, it is as follows:

MOD03: get allData/5/ MOD35_L2: get allData/5/ MYD03: get allData/5/ MYD35_L2: get allData/5/ MYD06_L2: get allData/51/ MYD06_L2: get allData/51/

See Also

check_for_matching_geolocation_files