Skip to main content
U.S. FlagAn official website of the United States government
icon dot gov
Official websites use .gov

A .gov website belongs to an official government organization in the United States.

icon https
Secure .gov websites use HTTPS

A lock () or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

data.comments.get

data.comments.get is the interface to retrieve station data comments. data.comments.get takes a specification of the archives desired and the start and end times. It will retrieve all comments affecting that time period (including ones that may originate or end outside of it).

Command Line Usage

data.comments.get [--raw] [station] start end [archives]

Arguments

start and end

The time specifiers for the data to be retrieved. Start is inclusive while end is exclusive, so all comments intersecting within the half open interval [start,end) will be returned. Any convertible time format is accepted. Additionally either or both can be “none” to denote positive or negative infinity (all time up until or after).

station

The station identifier code. For example 'brw'. Case insensitive.

archives

List of archives to get comments from, defaulting to all archives. Multiple archives types may be separated by ”,”, ”;” or ”:”. Note that this is a single argument and that spaces are not allowed.

--raw

If present output is in “raw” format. This format does not output human readable times (it uses epoch time) and the framing is not human readable. Data is output based on raw byte counts, which will likely not be displayable.

Output

Normal

If the –raw switch is absent comments are output in a form intended to be human readable. Since comments may be multiple lines each one is bounded by a seperator. Sample output may look like:

=== raw some.tag 2007-01-01T00:00:00 2007-02-02:T11:11:11 ===
Some comment data
That may have multiple lines
===
=== clean other.tag 2007-01-01T00:00:00 2007-02-02:T11:11:11 ===
Some comment more data
===

The format of the “header” line for each comment is:

=== <ARCHIVE> <TAG> <START> <END> ===

If the comment is not tied to an archive, the ARCHIVE field will be “ALL”.

If there is no tag, the TAG field will be “NONE”.

--raw

Raw output intended for program communication.

Output is a series of records where each record is a binary field string of the form (byte witdth in parentheses).

La(2) Archive(La) Ts(8) Te(8) Lt(2) Tag(Lt) Ld(4) Data(Ld)

Ts and Te

Start and end time as a double-precision float (IEEE ordering). Either being zero indicates +/- infinity.

Lt

Length of the tag, unsigned native byte order.

Tag

Tag data string, Lt bytes long.

Ld

Length of data, unsigned native byte order.

Data

Data string, Ld bytes long.

Example Usage

All raw comments for a given time

data.comments.get sgp 2008:10 2008:20 raw

All comments before a given time

data.comments.get sgp none 2008:20