This component reads data directly from the main archive. It is normally used as the start of a data extraction and processing chain. Data generated by it are not in a human readable format. To display the data use a component like da.export instead.

Usage

da.get [station] variables times [archive]

Arguments

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 example BND,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 simply BsB_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 as bnd: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 or clean_meta. The argument accepts multiple archives specified as regular expressions and separated by : or ; or ,. For example raw(_meta)? selects both the raw and raw_meta archives.

The special value allarchives may also be used to select all available archives.

Examples

General usage

This retrieves the record S11a (which is an alias for several relevant nephelometer parameters) for the station brw from 2010-01-01 to 2010-01-10 from the raw archive.

da.get brw S11a 2010-01-01 2010-01-10
Specifying a list of variables

This retrieves the given variables from the clean archive and also demonstrates more relaxed time specification.

da.get brw BsB_S11,BsG_S11,BsR_S11 2010 5 2010 7 clean
Advanced variable selection

This retrieves only variable BsB_S11 from the raw archive of the implied station (from the working directory or other information) but only the PM1 cut size data. It also retrieves the variable from the spo clean archive with both cut sizes. The data are retrieved from 2010-01-01 to 2010-01-02.

da.get ::BsB_S11:pm1 spo:clean:BsB_S11 2010:1