This component calculated dewpoint, temperature, or RH from the two that are present. That is, if given a temperature and RH it can calculate the dewpoint for those measurements.

Usage

da.calc.dewpoint [switches…​] [[station] variables times [archive]|[file]]

Switches

--always[=BOOLEAN]

When set, this enables calculation of the outputs regardless of if they already have values. Normally the outputs are only calculated when they do not already exist in the data, but this will cause them to always be (re-)calculated.

--input-rh=INPUT

This is the relative humidity to use in calculations. This is used when calculating a dewpoint or a temperature.

Default: Resolved automatically from other variables

--input-t=INPUT

This is the temperature to use in calculations. This is used when calculating a relative humidity or dewpoint.

Default: Resolved automatically from other variables

--input-td=INPUT

This is the dewpoint to use in calculations. This is used when calculating a relative humidity or temperature.

Default: Resolved automatically from other variables

--instruments-rh=SUFFIX…​

These are the instrument suffixes to perform relative humidity calculation for. When set, only relative humidities with these suffixes are generated. This option is mutually exclusive with manual variable specification.

Default: All instrument suffixes

--instruments-t=SUFFIX…​

These are the instrument suffixes to perform temperature calculation for. When set, only temperatures with these suffixes are generated. This option is mutually exclusive with manual variable specification.

Default: All instrument suffixes

--instruments-td=SUFFIX…​

These are the instrument suffixes to perform dewpoint calculation for. When set, only dewpoints with these suffixes are generated. This option is mutually exclusive with manual variable specification.

Default: All instrument suffixes

--output-rh=SELECTION

These are the relative humidity variables that are generated. When only these variables are calculated from a single set of inputs.

Default: All relative humidities

--output-t=SELECTION

These are the temperature variables that are generated. When only these variables are calculated from a single set of inputs.

Default: All temperatures

--output-td=SELECTION

These are the dewpoint variables that are generated. When only these variables are calculated from a single set of inputs.

Default: All temperatures

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 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.

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 calculate temperatures, dewpoints, and relative humidities for all sensors present in the input data stream. If two are present the missing third one will be calculated. For example, if the input contains T_V11 and U_V11 the output will have TD_V11 generated.

da.calc.dewpoint bnd S11a 2015-05-01 2015-05-03

Or:

da.calc.dewpoint input_file.c3d

Or:

da.get bnd S11a 2015-05-01 2015-05-03 | da.calc.dewpoint
Single instrument with alternate humidity

This will calculate the dewpoints for all sensors belonging to the S11 instrument but using the value of U_V11 as the relative humidity.

da.calc.dewpoint --input-rh=bnd:raw:U_V11 --instruments-td=S11 bnd S11a 2015-05-01 2015-05-03
Single variable

This will calculate U_XM1 from TD_XM1 and T_XM1.

da.calc.dewpoint --input-t=bnd:raw:T_XM1 --input-td=bnd:raw:TD_XM1 --output-rh=bnd:raw:U_XM1 bnd S11a 2015-05-01 2015-05-03