Skip to content

mostlyright.core.schemas.forecast_nwp

NWP forecast schema (schema.forecast_nwp.v1) — Phase 3.2.

Distinct from mostlyright.core.schemas.forecast (which describes IEM MOS forecasts on a per-station-cycle basis). NWP forecasts come from gridded numerical models (HRRR / GFS / NBM in v0.1.0; ECMWF Tier-2 predeclared in the enum for v0.2) and carry model-native units (Kelvin for temperature, m/s for wind, mm for precip, Pa for pressure) per Phase 3.2 lock #4 in 03.2-RESEARCH.md.

mirror records which NOAA Big Data Program mirror served the bytes that produced this row — quants auditing “why does this forecast disagree?” can trace bytes back to the mirror they came from.

NWP_MODEL_VALUESModels that ship in v0.1.0 + Phase 17 catalog expansion.
NWP_MIRROR_VALUESMirrors that may appear in the mirror column.
NWP_QC_STATUS_VALUESQC status values populated by the inline physics-bounds check in mostlyright.weather.forecast_nwp.
NwpForecastSchema()schema.forecast_nwp.v1 — gridded NWP forecast rows.

mostlyright.core.schemas.forecast_nwp.NWP_MIRROR_VALUES : tuple[str, …] = (‘aws_bdp’, ‘gcp_bdp’, ‘azure_bdp’, ‘nomads’, ‘ecmwf_data_portal’, ‘ecmwf_aws’, ‘ecmwf_azure’, ‘ecmwf_gcp’, ‘msc’)

Section titled “mostlyright.core.schemas.forecast_nwp.NWP_MIRROR_VALUES : tuple[str, …] = (‘aws_bdp’, ‘gcp_bdp’, ‘azure_bdp’, ‘nomads’, ‘ecmwf_data_portal’, ‘ecmwf_aws’, ‘ecmwf_azure’, ‘ecmwf_gcp’, ‘msc’)”

Mirrors that may appear in the mirror column. Reserves the four ECMWF mirrors so a v0.2 ECMWF lift can add rows without bumping schema_id. Phase 17 PLAN-05 adds "msc" for Canadian Datamart.

mostlyright.core.schemas.forecast_nwp.NWP_MODEL_VALUES : tuple[str, …] = (‘hrrr’, ‘gfs’, ‘nbm’, ‘ecmwf_ifs_hres’, ‘ecmwf_ifs_ens’, ‘ecmwf_aifs_single’, ‘ecmwf_aifs_ens’, ‘hrrrak’, ‘gefs’, ‘gdas’, ‘rap’, ‘rrfs’, ‘rtma’, ‘urma’, ‘cfs’, ‘hrdps’, ‘rdps’, ‘gdps’, ‘geps’, ‘reps’, ‘hafs’, ‘nam’, ‘href’, ‘hiresw’)

Section titled “mostlyright.core.schemas.forecast_nwp.NWP_MODEL_VALUES : tuple[str, …] = (‘hrrr’, ‘gfs’, ‘nbm’, ‘ecmwf_ifs_hres’, ‘ecmwf_ifs_ens’, ‘ecmwf_aifs_single’, ‘ecmwf_aifs_ens’, ‘hrrrak’, ‘gefs’, ‘gdas’, ‘rap’, ‘rrfs’, ‘rtma’, ‘urma’, ‘cfs’, ‘hrdps’, ‘rdps’, ‘gdps’, ‘geps’, ‘reps’, ‘hafs’, ‘nam’, ‘href’, ‘hiresw’)”

Models that ship in v0.1.0 + Phase 17 catalog expansion. Reserving the enum day-one (and adding Phase 17 entries additively) keeps schema_id stable while the catalog grows. Length 24 after Phase 17.

mostlyright.core.schemas.forecast_nwp.NWP_QC_STATUS_VALUES : tuple[str, …] = (‘clean’, ‘flagged’, ‘suspect’)

Section titled “mostlyright.core.schemas.forecast_nwp.NWP_QC_STATUS_VALUES : tuple[str, …] = (‘clean’, ‘flagged’, ‘suspect’)”

QC status values populated by the inline physics-bounds check in mostlyright.weather.forecast_nwp. "clean" passed all rules; "flagged" tripped one or more; "suspect" tripped a hard physics violation (e.g. negative absolute temperature) that warrants dropping for most use cases.

class mostlyright.core.schemas.forecast_nwp.NwpForecastSchema

Section titled “class mostlyright.core.schemas.forecast_nwp.NwpForecastSchema”

Bases: Schema

schema.forecast_nwp.v1 — gridded NWP forecast rows.

One row per (station, model, cycle, fxx, variable_column) — the variable column itself is encoded as separate float columns rather than long-form rows so quants can do model arithmetic without a pivot.

The mirror column lets a downstream auditor link a row back to the bytes that produced it (NOAA BDP mirror chain).

COLUMNS : ClassVar[list[ColumnSpec]] = [ColumnSpec(name=‘station’, dtype=‘string’, units=None, nullable=False, enum_values=None, notes=”), ColumnSpec(name=‘model’, dtype=‘enum’, units=None, nullable=False, enum_values=(‘hrrr’, ‘gfs’, ‘nbm’, ‘ecmwf_ifs_hres’, ‘ecmwf_ifs_ens’, ‘ecmwf_aifs_single’, ‘ecmwf_aifs_ens’, ‘hrrrak’, ‘gefs’, ‘gdas’, ‘rap’, ‘rrfs’, ‘rtma’, ‘urma’, ‘cfs’, ‘hrdps’, ‘rdps’, ‘gdps’, ‘geps’, ‘reps’, ‘hafs’, ‘nam’, ‘href’, ‘hiresw’), notes=”), ColumnSpec(name=‘mirror’, dtype=‘enum’, units=None, nullable=False, enum_values=(‘aws_bdp’, ‘gcp_bdp’, ‘azure_bdp’, ‘nomads’, ‘ecmwf_data_portal’, ‘ecmwf_aws’, ‘ecmwf_azure’, ‘ecmwf_gcp’, ‘msc’), notes=‘NOAA BDP mirror that served the underlying bytes’), ColumnSpec(name=‘grid_kind’, dtype=‘string’, units=None, nullable=False, enum_values=None, notes=‘grid-projection label (lambert_conformal_conus, regular_latlon_global_0p25, …)’), ColumnSpec(name=‘issued_at’, dtype=‘timestamp_utc’, units=None, nullable=False, enum_values=None, notes=‘model run / cycle reference time’), ColumnSpec(name=‘valid_at’, dtype=‘timestamp_utc’, units=None, nullable=False, enum_values=None, notes=‘forecast target time = issued_at + forecast_hour’), ColumnSpec(name=‘forecast_hour’, dtype=‘int64’, units=‘hours’, nullable=False, enum_values=None, notes=‘lead time in hours (alias: fxx)’), ColumnSpec(name=‘grid_dist_km’, dtype=‘float64’, units=‘km’, nullable=False, enum_values=None, notes=‘great-circle distance from station to nearest grid cell’), ColumnSpec(name=‘temp_k_2m’, dtype=‘float64’, units=‘K’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘dewpoint_k_2m’, dtype=‘float64’, units=‘K’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘relative_humidity_pct_2m’, dtype=‘float64’, units=‘percent’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘wind_u_ms_10m’, dtype=‘float64’, units=‘m/s’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘wind_v_ms_10m’, dtype=‘float64’, units=‘m/s’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘wind_gust_ms’, dtype=‘float64’, units=‘m/s’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘precip_mm_1h’, dtype=‘float64’, units=‘mm’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘pressure_pa_surface’, dtype=‘float64’, units=‘Pa’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘pressure_pa_mslp’, dtype=‘float64’, units=‘Pa’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘cloud_cover_pct’, dtype=‘float64’, units=‘percent’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘visibility_m’, dtype=‘float64’, units=‘m’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘cloud_ceiling_m’, dtype=‘float64’, units=‘m’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘qc_status’, dtype=‘enum’, units=None, nullable=False, enum_values=(‘clean’, ‘flagged’, ‘suspect’), notes=‘inline physics-bounds verdict; finer-grained QC lands in Phase 3.4’), ColumnSpec(name=‘retrieved_at’, dtype=‘timestamp_utc’, units=None, nullable=False, enum_values=None, notes=‘wall-clock UTC when the bytes were fetched’)]

Section titled “COLUMNS : ClassVar[list[ColumnSpec]] = [ColumnSpec(name=‘station’, dtype=‘string’, units=None, nullable=False, enum_values=None, notes=”), ColumnSpec(name=‘model’, dtype=‘enum’, units=None, nullable=False, enum_values=(‘hrrr’, ‘gfs’, ‘nbm’, ‘ecmwf_ifs_hres’, ‘ecmwf_ifs_ens’, ‘ecmwf_aifs_single’, ‘ecmwf_aifs_ens’, ‘hrrrak’, ‘gefs’, ‘gdas’, ‘rap’, ‘rrfs’, ‘rtma’, ‘urma’, ‘cfs’, ‘hrdps’, ‘rdps’, ‘gdps’, ‘geps’, ‘reps’, ‘hafs’, ‘nam’, ‘href’, ‘hiresw’), notes=”), ColumnSpec(name=‘mirror’, dtype=‘enum’, units=None, nullable=False, enum_values=(‘aws_bdp’, ‘gcp_bdp’, ‘azure_bdp’, ‘nomads’, ‘ecmwf_data_portal’, ‘ecmwf_aws’, ‘ecmwf_azure’, ‘ecmwf_gcp’, ‘msc’), notes=‘NOAA BDP mirror that served the underlying bytes’), ColumnSpec(name=‘grid_kind’, dtype=‘string’, units=None, nullable=False, enum_values=None, notes=‘grid-projection label (lambert_conformal_conus, regular_latlon_global_0p25, …)’), ColumnSpec(name=‘issued_at’, dtype=‘timestamp_utc’, units=None, nullable=False, enum_values=None, notes=‘model run / cycle reference time’), ColumnSpec(name=‘valid_at’, dtype=‘timestamp_utc’, units=None, nullable=False, enum_values=None, notes=‘forecast target time = issued_at + forecast_hour’), ColumnSpec(name=‘forecast_hour’, dtype=‘int64’, units=‘hours’, nullable=False, enum_values=None, notes=‘lead time in hours (alias: fxx)’), ColumnSpec(name=‘grid_dist_km’, dtype=‘float64’, units=‘km’, nullable=False, enum_values=None, notes=‘great-circle distance from station to nearest grid cell’), ColumnSpec(name=‘temp_k_2m’, dtype=‘float64’, units=‘K’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘dewpoint_k_2m’, dtype=‘float64’, units=‘K’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘relative_humidity_pct_2m’, dtype=‘float64’, units=‘percent’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘wind_u_ms_10m’, dtype=‘float64’, units=‘m/s’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘wind_v_ms_10m’, dtype=‘float64’, units=‘m/s’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘wind_gust_ms’, dtype=‘float64’, units=‘m/s’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘precip_mm_1h’, dtype=‘float64’, units=‘mm’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘pressure_pa_surface’, dtype=‘float64’, units=‘Pa’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘pressure_pa_mslp’, dtype=‘float64’, units=‘Pa’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘cloud_cover_pct’, dtype=‘float64’, units=‘percent’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘visibility_m’, dtype=‘float64’, units=‘m’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘cloud_ceiling_m’, dtype=‘float64’, units=‘m’, nullable=True, enum_values=None, notes=”), ColumnSpec(name=‘qc_status’, dtype=‘enum’, units=None, nullable=False, enum_values=(‘clean’, ‘flagged’, ‘suspect’), notes=‘inline physics-bounds verdict; finer-grained QC lands in Phase 3.4’), ColumnSpec(name=‘retrieved_at’, dtype=‘timestamp_utc’, units=None, nullable=False, enum_values=None, notes=‘wall-clock UTC when the bytes were fetched’)]”