# Data model

> The fields every Snotel value carries and what each means: station, triplet, element, observation, interval, unit, flags, freshness, revision and provenance. Read before storing Snotel data.

Every Snotel surface is built from the same few concepts. This page defines each one; the pages linked from it go deeper. Field names below are the ones the [API](https://opensnotel.com/docs/api.md) and the MCP tools return.

## Station

A station is one SNOTEL site: a fixed location with an elevation and a set of sensors. A station has a name, a latitude and longitude, an elevation in feet, whether it is still reporting, and the dates its record begins and ends. Station metadata comes from NRCS and is kept as the source describes it.

## Station triplet

The canonical identifier of a station is its triplet, `<station number>:<state>:<network>`, for example `312:ID:SNTL`. The number alone is not unique across states, so the triplet is the only key Snotel uses to identify a station. See [station IDs](https://opensnotel.com/docs/reference/station-ids.md).

## Element

An element is one kind of measurement, named by a short upper-case code such as `WTEQ` for snow water equivalent or `SNWD` for snow depth. The set of elements is open: stations report others, such as soil moisture and battery voltage, and a station only has the elements its sensors provide. [Measurements](https://opensnotel.com/docs/data/measurements.md) covers the snow elements.

## Observation

An observation is one value of one element at one station for one period. It is raw source data and never a calculation. An observation carries these fields:

| Field                                  | Meaning                                                 |
| -------------------------------------- | ------------------------------------------------------- |
| `elementCode`                          | Which element was measured.                             |
| `duration`                             | The interval the value covers.                          |
| `ordinal`                              | Distinguishes several sensors for one element.          |
| `heightDepthIn`                        | The sensor's height or depth in inches, null if none.   |
| `observedAt`                           | The UTC instant the period starts.                      |
| `utcOffsetMinutes`                     | The offset the source's local calendar used.            |
| `localDate`                            | The calendar date in the source's own time.             |
| `value`                                | The measurement, or null when the source reported none. |
| `unit`                                 | The unit the station declares for this element.         |
| `flag`, `qualityFlag`, `isProvisional` | What the source says about its quality.                 |
| `plausibilityFlags`                    | The Snotel checks the reading failed, empty if none.    |
| `originalValue`, `originalQualityFlag` | The reading as first received, null if none was sent.   |
| `sourceUpdatedAt`                      | When the source last revised the value, if it says.     |
| `revision`                             | How many times the stored value has changed.            |

## Interval

The interval, called duration in the stored data, says how much time one value covers: instantaneous, hourly, daily, semimonthly or monthly. A daily value and an hourly value for the same element are different observations and are never blended. See [time and dates](https://opensnotel.com/docs/reference/time.md).

## Unit

Each observation states its unit and Snotel does not convert it. Snow depth, snow water equivalent and precipitation are in inches, and air temperature is in degrees Fahrenheit, as stations store them.

## Quality and provisional flags

The source attaches flags to values: whether a value passed checks, was edited or estimated, and whether it is provisional, approved or raw. Snotel passes them through unchanged. Beside them, Snotel's own plausibility flags mark a reading that looks like a sensor fault, such as a spike that reverses; they are derived and never change the value. See [quality](https://opensnotel.com/docs/data/quality.md).

## Freshness

Freshness is how recent a value is. It separates when a station observed something from when the source revised it and when Snotel ingested it. See [freshness](https://opensnotel.com/docs/data/freshness.md).

## Source revision

The source can correct a value after publishing it. Snotel keeps the latest value, counts revisions, and uses the source's update time to order corrections, so a redelivered older value never overwrites a newer one.

## Provenance

Provenance is the trail from a value back to its source: the station, element and unit it came from, the flags the source gave it, and the times it was observed, revised and ingested. It is also where observed values are told apart from derived, inferred and forecast ones. See [provenance](https://opensnotel.com/docs/data/provenance.md).

## Next

- [Measurements](https://opensnotel.com/docs/data/measurements.md): What snow water equivalent (SWE), snow depth, precipitation and air temperature are, their element codes and units, how daily and hourly differ, and why null is never zero.
- [Station IDs](https://opensnotel.com/docs/reference/station-ids.md): The identifier to store for a station: the NRCS triplet such as 312:ID:SNTL, its format, why the station number alone isn't unique, and a parser.

Canonical page: https://opensnotel.com/docs/data-model
