mostlyright.core.schemas.satellite
Satellite schema (schema.satellite.v1).
This module defines:
validate_satellite_station
: The site-identity check the GOES ABI L2 extractor
(mostlyright.weather._fetchers._goes_extract) calls at the
_build_record write site. ColumnSpec supports only
dtype/nullable/enum and no regex (see core/schema.py), so the identity
rule cannot live as a column pattern; it is enforced by this function plus
validate_site_id_for_path on the cache path.
SatelliteSchema
: The full schema.satellite.v1 shape contract — 18 storage fields plus
the overlay columns source / delivery / qc_status /
as_of_time. Registered with the Validator
(core/schemas/__init__.py) and wired into the codegen exporter
(scripts/export_schemas.py, _GROUP_A_SCHEMA_IDS) so
schemas/json/schema.satellite.v1.json is emitted deterministically.
The TypeScript SDK has no reader for these rows.
Source identity. _registered_sources is the set of the four native-ring
source identities {noaa_goes, jma_himawari, noaa_viirs, eumetsat_meteosat},
one per instrument family, so a model trained on one can never silently
reconcile against another. Within a single frame the source is homogeneous: the
validator reconciles df.attrs["source"] against the set, and the per-row
source overlay column must equal that single df.attrs["source"], so no
frame mixes sources. noaa_goes rows are byte-identical across delivery
channels (local extraction and the hosted feed). delivery (enum {live, hosted}, default "live") records the delivery channel only and is not
part of source identity. mirror is a transport choice and is deliberately
not a schema column.
Module Attributes
Section titled “Module Attributes”| Attribute | Description |
|---|---|
SATELLITE_DELIVERY_VALUES | Delivery-channel lineage. |
SATELLITE_QC_STATUS_VALUES | qc_status values. |
Functions
Section titled “Functions”| Function | Description |
|---|---|
validate_satellite_station(station) | Validate a satellite row’s station identity is a well-formed site id. |
Classes
Section titled “Classes”| Class | Description |
|---|---|
SatelliteSchema() | schema.satellite.v1 — single-pixel satellite scan rows, native grid. |
mostlyright.core.schemas.satellite.SATELLITE_DELIVERY_VALUES : tuple[str, …]
Section titled “mostlyright.core.schemas.satellite.SATELLITE_DELIVERY_VALUES : tuple[str, …]”Delivery-channel lineage. delivery records how the row was obtained
(local extraction vs the hosted feed) without being part of source identity:
both channels reconcile to the same per-source identity, so local GOES rows
and hosted GOES rows are both noaa_goes.
mostlyright.core.schemas.satellite.SATELLITE_QC_STATUS_VALUES : tuple[str, …]
Section titled “mostlyright.core.schemas.satellite.SATELLITE_QC_STATUS_VALUES : tuple[str, …]”qc_status values. Rows are annotated, never dropped. "clean" passed
every rule; "flagged" tripped a warning-class rule; "suspect"
tripped an error-class rule (a physics or structure violation, almost
always an extraction bug), and the row is kept rather than dropped.
class mostlyright.core.schemas.satellite.SatelliteSchema
Section titled “class mostlyright.core.schemas.satellite.SatelliteSchema”Bases: Schema
schema.satellite.v1 — single-pixel satellite scan rows, native grid.
One row per (station, satellite, product, variable, pressure_level_hpa, scan_start_utc), which is also the dedup key and does not include the
mirror. Carries 18 storage fields plus the overlay columns source /
delivery / qc_status / as_of_time.
The schema covers GOES East/West, Himawari, VIIRS, and EUMETSAT through a
set of distinct source identities (_registered_sources) and a
correspondingly broad satellite enum, so a polar VIIRS swath row
validates alongside a geostationary GOES/Himawari/SEVIRI row:
subsatellite_longitude_degrees is nullable (geostationary only) and
pixel_row/pixel_col mean either a native grid index or a swath
line/sample index.
schema_id: ClassVar[str]
Section titled “schema_id: ClassVar[str]”mostlyright.core.schemas.satellite.validate_satellite_station(station)
Section titled “mostlyright.core.schemas.satellite.validate_satellite_station(station)”Validate a satellite row’s station identity is a well-formed site id.
A site id is 4-12 uppercase ASCII letters/digits: a station ICAO
("KNYC", "EGLC") or a coordinate-derived identifier
("S4078N0739W"). Returns the station string unchanged when valid (so
call sites can use it inline). Raises SchemaValidationError for
anything else — notably 3-letter NWS codes, which must raise rather than
silently produce un-joinable rows.
services/weather delegates its station query-parameter check to
this function, so widening the alphabet here widens the serving route with
it: one identity contract, one place to change it.