Skip to content

Make Tempest the primary source for all current-conditions fields - #12

Merged
thornjad merged 4 commits into
mainfrom
fix-tempest-dewpoint
Jun 15, 2026
Merged

thornjad merged 4 commits into
mainfrom
fix-tempest-dewpoint

Conversation

@thornjad

@thornjad thornjad commented Jun 15, 2026 •

Copy link
Copy Markdown
Owner

Tempest is meant to be the primary source for every field it measures, but several conditions fields were still NWS-only, silently dropped, or wrong. The worst was sea-level pressure, which never computed at all. Station elevation lives under station_meta.elevation and we were reading the absent top-level key, so pressure_source quietly stayed sea_level.

This makes Tempest primary for dew point, wind gust, pressure, and observation time, and surfaces the fields it measures that we never showed (wind lull, brightness, WBGT, delta-T, last-hour precip, last-strike distance).

For pressure we now pass through the station's own sea_level_pressure instead of reducing station pressure ourselves. The local reduction was off by ~1 mb because it uses the instantaneous temperature rather than a mean column temperature, so it is now only a fallback for when the station gives no SLP.

thornjad added 2 commits June 15, 2026 09:36
_merge_tempest_conditions enriched temperature, feels-like, humidity,
wind, wet-bulb, and pressure from the Tempest station but never wrote
dew point. Dew point came only from the NWS METAR, so when the METAR
omitted it the field showed N/A even though the Tempest observation
carried dew_point.

Backfill dew point from the normalized Tempest value, labeling it
frost_point at and below 0C to match the NWS path, and drop the
opposite label so the merged result never carries both.
When a Tempest station is in range it should be the primary source for
every field it measures, but several were still NWS-only or dropped.

- source wind_gust from Tempest (was NWS-only) and add wind_lull
- set observation_time to the Tempest reading time, not the NWS METAR
- fix sea-level pressure never computing: station elevation lives under
  station_meta.elevation, so the top-level lookup always returned None
  and pressure silently fell back to NWS; pressure_source is now
  tempest_slp
- add hyper-local fields: brightness, wet_bulb_globe_temperature,
  delta_t (degrees C by convention), precip_last_hour, and last-strike
  distance (shown only after recent lightning)
@thornjad thornjad changed the title Fix Tempest dew point dropped from conditions Make Tempest the primary source for all current-conditions fields Jun 15, 2026
thornjad added 2 commits June 15, 2026 10:43
The local station-pressure reduction disagreed with the station's own
sea_level_pressure by ~1 mb because it uses instantaneous temperature
rather than a mean column temperature. Pass through the station's value
instead (pressure_source: tempest), and reduce locally only when the
station supplies no SLP (pressure_source: tempest_slp).
When a METAR reports no seaLevelPressure the code fell back to
barometricPressure, which is absolute station pressure, but still
labeled pressure_source "sea_level". Label that fallback "station" so
station pressure is not presented as a sea-level value.
@thornjad
thornjad merged commit b495893 into main Jun 15, 2026
4 checks passed
@thornjad
thornjad deleted the fix-tempest-dewpoint branch June 15, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant