This component calculates solar position parameters for the input data. This includes dark and solar noon flagging in addition to solar position (azimuth and elevation) calculations.

Usage

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

Switches

--dark=INPUT

This is the number of degrees below the horizon the sun must be for it to be considered dark and the flag set.

Default: 0

--flags=SELECTION

This is flags variable that the solar state flags are added to. The calculation adds flags for dark (below the horizon) and a flag on the data point nearest solar noon.

Default: All available flags variables

--instruments=SUFFIX…​

These are the instrument suffixes to calculate flows for. For example P01 would usually specifies the stack flow pitot sensor. This option is mutually exclusive with manual variable specification.

Default: All instrument suffixes

--latitude=INPUT

This is the latitude in degrees north to calculate parameter for.

Default: Automatic from data

--longitude=INPUT

This is the longitude in degrees east to calculate parameter for.

Default: Automatic from data

--magnitude=INPUT

This is the magnitude set for the solar position vector. This value is used when data are averaged.

Default: 1

--output-azimuth=SELECTION

This is the output that contains the calculated solar azimuth angle.

Default: Automatic if enabled

--output-elevation=SELECTION

This is the output that contains the calculated solar elevation angle.

Default: Automatic if enabled

--output-magnitude=SELECTION

This is the output that contains the specified vector magnitude for use in averaging.

Default: Automatic if enabled

--position[=BOOLEAN]

This enables the generation of variables that contain the solar position. This is the current azimuth and elevation angles as well as a magnitude vector used in averaging.

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 generate solar noon and dark flagging for all available input flags.

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

Or:

da.calc.solarposition input_file.c3d

Or:

da.get bnd S11a 2015-05-01 2015-05-03 | da.calc.solarposition
Single instrument with position

This will generate flagging for only the instrument P01 and add solar position variables to the output.

da.calc.solarposition --instruments=P01 --position bnd S11a 2015-05-01 2015-05-03
Single position generation

This will the solar position for T_X1 and generate the vector components using it, assuming explicitly specified location coordinates.

da.calc.solarposition --latitude=40 --longitude=-105 --magnitude=bnd:raw:T_X1 --output-azimuth=bnd:raw:ZAz_X1 --output-elevation=bnd:raw:ZEl_X1 --output-magnitude=bnd:raw:ZMa_X1 bnd S11a 2015-05-01 2015-05-03