The download tool facilitates the downloading of specific data
files from a CoastWatch data server.
Name
cwdownload - downloads data from a CoastWatch server.
Synopsis
cwdownload [OPTIONS] host
General options:
-c, --script=PATH
-d, --dir=PATH
-f, --force
-h, --help
-t, --test
-T, --timeout=SECONDS
--version
Data file selection options:
-a, --age=HOURS
-C, --coverage=PERCENT
-G, --station=PATTERN
-p, --projection=TYPE
-r, --region=PATTERN
-s, --satellite=PATTERN
-S, --scenetime=PATTERN
Description
The download tool retrieves a set of user-specified data files
from a CoastWatch data server. Data files may be selected based on
satellite, scene time, region, ground station, and other
parameters. Without any command line options, all data files on
the server are retrieved. The command line options are used to
filter the list of data files. Multiple options are used in
conjunction, for example if both --satellite and
--scenetime are specified, only files matching the specified
satellites and scene times will be retrieved. The download tool
has a built-in facility for avoiding redundant file downloads.
Unless the --force option is used, files are only downloaded
if no file with the same name already exists in the local
directory. The --test option may be used for testing file
download options without downloading any actual data.
Parameters
Main parameters:
- host
- The CoastWatch server host name. There is no default host
name.
General options:
- -c, --script=PATH
- ADVANCED USERS ONLY. The query script path. The default is
/ctera/query.cgi.
- -d, --dir=PATH
- The download directory path. The default is to download
to the current directory.
- -f, --force
- Turns on forced mode. When forced mode is in effect, no
check is performed to determine if the file already exists in the
download directory. The default is to check if a file of the
same name exists, and if so skip the download for that particular
file.
- -h, --help
- Prints a brief help message.
- -t, --test
- Turns on test mode. When the test mode is in effect, the
data files are selected based on the specified command line
parameters but no actual data is downloaded. The default is to
perform the data download. Test mode may be used to determine if
a certain set of command line parameters have the desired effect
without having to wait for data files to transfer.
- -T, --timeout=SECONDS
- The network timeout in seconds. If the network becomes
unresponsive for the timeout period, the download is aborted. If
there is a file currently in the process of downloading when the
timeout occurs, the partial file is deleted. The default timeout
is 30 seconds.
- --version
- Prints the software version.
Data file selection options:
- -a, --age=HOURS
- The maximum age of the data in hours. Datasets contain a
time stamp for the date and time that the data was taken by the
sensor. Only datasets created more recently than the specified
number of hours ago are retrieved, based on the clock on the host
computer running the download. The default is to download
regardless of date and time.
- -C, --coverage=PERCENT
- The minimum data coverage in percent. Mapped regions may
have less than 100% coverage when the edge of the satellite pass
intersects the region area. The default minimum coverage is 0.
The use of this option implies --projection mapped.
- -G, --station=PATTERN
- The ground station matching pattern. Multiple ground
stations may be specified with a regular expression, for example
'(wi|mo|hi)' for the wi, mo, and hi stations. The default is to
download all ground stations.
- -p, --projection=TYPE
- The data projection type. Valid values are 'mapped' and
'swath'. Mapped datasets are those that have possibly been
reduced in resolution, and registered to a standard map
projection. Swath datasets are generally at the full sensor
resolution and unregistered sensor scan projection. By default,
all types of datasets are downloaded.
- -r, --region=PATTERN
- The region code matching pattern. Multiple regions may be
specified with a regular expression, for example '(er|sr|gr)' for
the 'er', 'sr', and 'gr' regions. The default is to download all
regions. The use of this option implies --projection
mapped.
- -s, --satellite=PATTERN
- The satellite name matching pattern. For example,
'noaa-16'. Multiple satellites may be specified with a regular
expression, for example 'noaa-1[56]' for NOAA-15 and NOAA-16.
The default is to download data from all satellites.
- -S, --scenetime=PATTERN
- The scene time matching pattern. Valid times are 'day',
'night', and 'day/night'. Multiple times may be specified with a
regular expression, for example '(day|night)' for day and night.
The default is to download all scene times.
Exit status
0 on success, > 0 on failure. Possible causes of errors:
- Invalid command line option.
- Cannot contact data server.
- Invalid or write-protected download directory.
- Error transferring data file.
Examples
The following shows a download command that retrieves
any NOAA-16 daytime data files for the East Coast north and south
regions captured at Wallops Island to the ~/cwatch/satdata directory from
the fictitious server frobozz.noaa.gov
:
phollema$ cwdownload --satellite noaa-16 --scenetime day
--region '(er|sr)' --station wi --dir ~/cwatch/satdata frobozz.noaa.gov
cwdownload: Contacting frobozz.noaa.gov
cwdownload: Retrieving 2002_197_1719_n16_er.hdf
cwdownload: Retrieving 2002_197_1719_n16_sr.hdf
cwdownload: Retrieving 2002_197_1900_n16_er.hdf
cwdownload: Retrieving 2002_197_1900_n16_sr.hdf
cwdownload: Transferred 31715 kb in 4 files