Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

 

Purpose

A generic data download script that can be used to download

...

data files from

...

Earthdata Login enabled

...

OPTIONS
-i file The name of a file that contains a list of URLs to download.
This option may be given multiple times.

--uid=uid or -u uid
The Earthdata Login username under which the files will be
downloaded. Note that there is no option to provide a password
on the command line. However, credentials may be pulled from a
.netrc file.

--netrc or -n
Pull the required Earthdata Login credentials from your .netrc
file. This is expected to reside in your home directory.

--verbose or -v
Produce verbose (debugging) information during operation.

--quiet or -q
Supresses error messages for URLs that could not be downloaded.

--help or -h
This help information.

servers. Data files are identified using URLs, and may be provided on the command line or in a file. User credentials are required for authentication, and the applications from which the files are being downloaded must have been pre-authorized.

If a file is returned from the server with a 'Content-Disposition' header, the filename given in that header will be used as the name of the downloaded file, otherwise the filename in the URL will be used.

 

Options

-h / --help
Print out the command syntax
-u <uid>
The Earthdata Login username to use for downloading the URLs.
-n / --netrc
Pull Earthdata Login user credentials from user's .netrc file.
-i <file>
The name of a file that contains URLs to download
-d <directory>Save downloaded files into directory. If the directory does not exist, the script will attempt to create it.
-q / --quiet
Quiet mode - will suppress error messages about invalid URLs.
-v / --verbose
Verbose mode - will output additional debugging information about the progress during operation.

 

Examples

...

Download the files whos URLs are given in the file 'urllist' to

...

the current directory using the user profile 'peter.l.smith'. Prompt

...

for the user password. Verbose (debugging) output will be generated.

  get_data.

...

pl -u peter.l.smith

...

 -i urllist -v

 

Download the file given by the URL on the command line using the

...

user profile 'peter.l.smith' and save it into the directory 'data'.

...

Prompt for the user password. Note that you need send your request via HTTPS or your passwords will be sent in the clear. Make sure your links are modified from the metadata. All EOSDIS DAACs should support HTTPS even if the metadata hasn't been updated.

  get_data

...

.pl -u peter.l.smith -d data https://e4ftl01.cr.usgs.gov/ASTT/AST_L1T.003/2016.09.11/AST_L1T_00309112016020239_20160912100405_5264_QA.txt

 

...

Download the files whos URLs are given in the file 'urllist' and

...

save into the directory 'data'. Earthdata Login credentials will

...

be retrieved from the .netrc file.

DESCRIPTION
Downloads data files from Earthdata Login enabled servers. Data files
are identified using URLs, and may be provided on the command line or
in a file. User credentials are required for authentication, and the
applications from which the files are being downloaded must have been
pre-authorized.

...

  get_data.pl -n -d data -i urllist

 

 

Hide comments