plots.conf

The configuration file used by data.plots.update. It is located in $DB/etc/$STATION/plots.$STATION.conf or in the default location $DB/etc/plots.conf. The default one is loaded first, then the station specific one on top of it. This causes any archive definitions from the default one to be overwritten if they exist in the station specific one, but global keys to be directly overlaid.

See also CPX2. Plots are configured with CPX2 XML files in a specific location (see below).

Format

Lines beginning with '#' are treated as comments. The format consists of a CSV separated list of key and optional value pairs. Keys are case insensitive. There are several block types. When a plot is being generated the lookups start at the innermost block and work outward.

In all string valued keys the string “${STATION}” will be replaced with the lower case station code.

Global Keys

These keys are valid in any block scope except the innermost graph or tab, the innermost one with respect to a plot is used.

Global Scope

The outermost scope. All global keys are valid in addition to the following:

Graph and Tab Scopes

Defines a graph or tab in more detail, the following keys are valid:

Archive Scope

Defines the sets of plots to be generated when an archive is updated. All global keys are valid in addition to the following:

Valid set interval types are:

Time interval specifications may be either of the form “[[hours:]minutes:]seconds” or a number followed by a multiplier character. The multiplier is one of “d” for days, “h” for hours, “m” for minutes. So one hour can be specified by any of “01:00:00”, “1h”, “60m” or “3600”.

Then entire archive update interval specifications optionally take an argument that extends the “current” time passed to CPX2 (see below). The “update” time remains the start of the latest complete interval, while the current time is moved backwards by the amount specified. The specification is one of the following:

For example, to create a set of plots updated on each complete month, that includes the last 12 months in the “current” time, the specification would be “Montly,11 months”.

Set Scope

Defines a set of plots to be generated with one call to CPX2. All global keys are valid in addition to the following:

CPX2 Configuration Files

Each set of plots requires a corresponding CPX2 configuration file. The set (or some enclosing scope) specifies a CPX2Config value, which corresponds to the base name of the file used. If the file $DB/etc/$STATION/plots/$BASE.$STATION.xml exists it is used, otherwise the file $DB/etc/plots/$BASE.xml is. If neither exists, then no plots for that set can be generated.

Within the file the internal names of graphs and/or tabs are used to lookup them for generation. So a graph with an internal name (“name=…”) tag will be references by that name for generation purposes. The output file name may be specified as above with a graph block otherwise it defaults to the internal name. If the output name does not end in “.png” is it appended.

Before calling CPX2, data.plots.update will set some environment variables that relate to the generation interval that the call reflects. It sets UPDATE_START to be equal to the epoch time of the start of the “update” interval. This is generally the very latest interval of completion that triggered the call. CURRENT_START is set to the epoch time of the start of the “current” interval. This is the time this update considers to be “current” data. The two may be equal if the call does not distinguish or they may be undefined if the call does not have a notion of the interval.