The composite tool combines a time series of earth data.
Name
cwcomposite - combines a time series of earth data.
Synopsis
cwcomposite [OPTIONS] input [input2 ...] output
cwcomposite [OPTIONS] {-i, --inputs=FILE} output
Options:
-c, --coherent=VARIABLE1[/VARIABLE2[...]]
-h, --help
-m, --match=PATTERN
-M, --method=TYPE
-p, --pedantic
-v, --verbose
-V, --valid=COUNT
--version
Description
The composite tool combines a time series of earth data.
Data variables are combined on a pixel-by-pixel basis using
one of several statistical or temporal methods: mean, geometric mean, median,
minimum, maximum, explicit or latest. The input files must have
matching earth transforms but may have different dates. The
composite tool may be used, for example, to combine a number
of sea-surface-temperature datasets into one in order to
obtain a mean SST for a certain region and help eliminate
cloud. Another use is to combine datasets from different
regions that are registered to the same earth transform to
create a mosaic. The output dataset is constructed using
metadata from each input dataset so that it properly reflects
the different input dataset dates and other metadata.
Parameters
Main parameters:
- input [input2 ...]
- The input data file names. At least one input file is required,
unless the --inputs option is used. If multiple files
are specified, they must have matching earth transforms.
- -i, --inputs=FILE
- The file name containing a list of input data files. The file
must be an ASCII text file containing input file names, one per
line. If multiple files are listed, they must have matching
earth transforms. If the inputs file name is '-', input is read
from standard input.
- output
- The output data file name.
Options:
- -c, --coherent=VARIABLE1[/VARIABLE2[...]]
- Turns on coherent mode (only valid with --method
latest or --method explicit). In coherent mode, the output
values for all variables at a given pixel location are
guaranteed to originate from the same input file. The specified
variable list is used to prioritize variables to check for a
valid latest/last value. If there are no valid values for the
first variable at a given location, then the next variable is
checked and so on until the latest/last valid value is found.
This mode is useful for when data variables and their
respective quality flags should be kept together during a
composite operation. Without this option, the 'latest' and
'explicit' composite methods may select the latest/last valid
data value from one input file, and the latest/last valid
quality flag from another input file for a given location.
- -h, --help
- Prints a brief help message.
- -m, --match=PATTERN
- The variable name matching pattern. If specified, the
pattern is used as a regular expression to match variable names.
Only variables matching the pattern will be present in the
output. By default, no pattern matching is performed and all
variables are combined.
- -M, --method=TYPE
- The composite method. Valid methods are:
- mean - Computes the arithmetic mean or average value (sum of
values over n)
- geomean - Computes the geometric mean (nth root of product
of values)
- median - Finds the median value (middle value of n values)
- min - Finds the minimum value
- max - Finds the maximum value
- latest - Finds the most recent valid value (latest in time
according to the data time stamp)
- explicit - Finds the last valid value in the set of input
files, according to the explicit order given on the command line.
This would yield the same results as the 'latest' method if the
files were listed in chronological order on the command line.
The default is to compute the mean value.
- -p, --pedantic
- Turns pedantic mode on. In pedantic mode, metadata from
each input file is combined exactly such that composite
attributes in the output file may contain repeated values. When
pedantic mode is off, composite attributes are collapsed so that
only unique values appear. By default, pedantic mode is
off.
- -v, --verbose
- Turns verbose mode on. The current status of data
combination is printed periodically. The default is to run
quietly.
- -V, --valid=COUNT
- The minimum number of valid values required to form an
aggregate function. By default, only one value per pixel is
required. If the actual number of valid values is below this
threshold, the output value is set to invalid.
- --version
- Prints the software version.
Exit status
0 on success, > 0 on failure. Possible causes of errors:
- Invalid command line option.
- Invalid input or output file names.
- Unsupported input file format.
- Input file earth transforms do not match.
- No matching variables found.
- Unsupported composite method.
Examples
The following shows the combination of several Earth
datasets into one using the 'latest' composite method:
phollema$ cwcomposite -v --method latest 2003_097_1428_n17_wi_na.hdf
2003_097_1607_n17_wi_na.hdf 2003_097_1751_n17_mo_na.hdf
2003_097_1931_n17_mo_na.hdf 2003_097_n17_na.hdf
cwcomposite: Reading input 2003_097_1428_n17_wi_na.hdf
cwcomposite: Adding avhrr_ch1 to composite variables
cwcomposite: Adding avhrr_ch2 to composite variables
cwcomposite: Adding avhrr_ch4 to composite variables
cwcomposite: Reading input 2003_097_1607_n17_wi_na.hdf
cwcomposite: Reading input 2003_097_1751_n17_mo_na.hdf
cwcomposite: Reading input 2003_097_1931_n17_mo_na.hdf
cwcomposite: Creating output 2003_097_n17_na.hdf
cwcomposite: Writing avhrr_ch1
cwcomposite: Writing avhrr_ch2
cwcomposite: Writing avhrr_ch4