This component provides an interface to write a stream of data to the main archive.
Usage
da.archive [switches…] [[station] variables times [archive]|[file]]
Switches
- --quiet[=BOOLEAN]
-
If set then no progress output is displayed.
Default: Disabled
- --remove=TYPE
-
This defines the data explicitly removed as part of the write. Identical (same station, archive, variable, flavors, start, end, and priority) values are always replaced and do not need removal. Data in the event archive is never removed.
Default: Remove values at all priorities within the updated time range
The possible values are:
- --remove=instrument
-
Remove all values of an instrument (unique station, archive, and suffix) of any priority within the range the update of that instrument spans.
- --remove=instrument-priority-zero
-
Remove all values of an instrument (unique station, archive, and suffix) with priority zero within the range the update of that instrument spans.
- --remove=none
-
Do not explicitly remove any values, only directly replace any inputs.
- --remove=purge
-
Remove all values seen in the input from the archive entirely.
- --remove=purge-instrument
-
Remove all values of an instrument (unique station, archive, and suffix) of any priority within the range the of data while also removing any values seen in the input.
- --remove=purge-variable
-
Remove all values of a variable (unique station, archive, and variable) of any priority within the range of data while also removing any values seen in the input.
- --remove=variable
-
Remove all values of a variable (unique station, archive, and variable) of any priority within the range the update of that variable spans.
- --remove=variable-priority-zero
-
Remove all values of a variable (unique station, archive, and variable) with priority zero within the range the update of that variable spans.
- --remove-flavors=TYPE
-
This defines how flavors are considered during data removal.
Default: Ignore flavors and only consider the other components
The possible values are:
- --remove-flavors=any
-
Ignore flavors and only consider the other components.
- --remove-flavors=exact
-
Require an exact match of all flavors for removal.
- --remove-flavors=flatten
-
Require a match of flavors but consider secondary components (e.x. coverage) as part of their main variable.
- --run-tasks[=BOOLEAN]
-
If set then the immediate tasks are run after the archive add.
Default: Enabled
Arguments
If no bare word input specification is supplied then data are read from standard input.
- station
-
This argument is used to specify the station used to look up variables that do not include a station as part of an archive read specification. The station is the three letter GAW station code of the location, such as
BND
. The argument accepts multiple stations specified as regular expressions and separated by:
or;
or,
. For exampleBND,MLO
and(BND|MLO)
are two ways of selecting both the BND and MLO stations.The special value
allstations
may also be specified to select all stations. - variables
-
This argument may be split into multiple actual program arguments. Each part consists of one or more variable specifications separated by
,
(commas). The station and archive used if none are explicitly given are defined in the other arguments or inferred from system defaults. For example simplyBsB_S11
selects the blue scattering from the S11 instrument and returns all cut sizes and metadata. If instead::BsB_S11:pm10
is used then only PM10 scattering is returned. That is, the selection specifies "any" station and archive (the defaults are set in the other arguments) then requires that it has the "PM10" flavor. A specification such asbnd:BsB_S11,thd:BsB_S11
allows for data selection from multiple stations.This may also be used to select a "record" type alias such as "S11a". In this mode all the variables defined in the alias are returned.
Finally the special value
everything
can be used to select all available data for the given station(s) and archive(s). - times
-
This argument may be split into multiple actual program arguments. This full list of time arguments defines a time bounds list that sets the range of data queried. The final resulting data are clipped to the given time bounds but any values that intersect them are returned.
- archive
-
This argument is used to specify the archive used to look up variables that do not include an archive as part of an archive read specification. The archive is the internal name, such as
raw
orclean_meta
. The argument accepts multiple archives specified as regular expressions and separated by:
or;
or,
. For exampleraw(_meta)?
selects both theraw
andraw_meta
archives.The special value
allarchives
may also be used to select all available archives. - file
-
This argument is used to specify the the file to read data from. If it is present and exists then data is read from the given file name instead of from standard input. Alternatively
-
(a single dash) may be used to explicitly specify standard input.
Examples
- Defaults
-
This will add data to the archive, merging the metadata with any that already exists to form a continuous record. Data are replaced on a per-variable basis.
da.archive input.dat