Skip to content

mostlyright.weather.catalog.awc

AWC catalog adapter (CATALOG-02).

Wraps mostlyright.weather._awc.awc_to_observation() into a class that satisfies the WeatherAdapter Protocol and emits a canonical schema.observation.v1 DataFrame with overlay columns + correct SI units (see mostlyright.weather.catalog._obs_projection).

Source IDs: "awc.live" (the only AWC source — historical archive is not exposed via AWC’s public endpoint as of Sept 2025 endpoint migration).

AWC_LAGAWC observations are reported live; treat as known 5 minutes after valid time (faster than IEM since AWC pushes to its API immediately).
AWCAdapter()AWC observation adapter.

class mostlyright.weather.catalog.awc.AWCAdapter

Section titled “class mostlyright.weather.catalog.awc.AWCAdapter”

Bases: object

AWC observation adapter.

fetch_observations(source, station, from_date, to_date)

Section titled “fetch_observations(source, station, from_date, to_date)”

Phase 3 Mode-2 entry point. v0.1: NotImplementedError.

  • Return type: DataFrame
  • Parameters:

static from_rows(rows, , source=‘awc.live’, retrieved_at=None)

Section titled “static from_rows(rows, , source=‘awc.live’, retrieved_at=None)”

Project AWC parser-output rows to a canonical observation DataFrame with SI units (knots → m/s, miles → metres, feet → metres, inches → mm).

mostlyright.weather.catalog.awc.awc_to_observation(m)

Section titled “mostlyright.weather.catalog.awc.awc_to_observation(m)”

Convert a parsed AWC METAR dict to an observation schema dict.

Returns None if icaoId or obsTime is invalid. Output matches specs/observation.json (no extra fields).