Guides
Forecasts
Two complementary forecast surfaces: IEM MOS (text/JSON, both SDKs) and gridded NWP (GRIB2, Python today). Both feed dataset(include_forecast=True); Python additionally exposes the per-model NWP path for cross-model comparison.
Overview
Section titled “Overview” ┌──────────────────────────┐dataset(...) │ IEM MOS (both) │ → fcst_* columnsinclude_forecast│ gridded NWP (py) │ → fcst_*_nwp_<model> columns └──────────────────────────┘- IEM MOS is the default forecast in
research(). Text/JSON, station-level point forecasts, fully wired on both SDKs. - NWP (gridded) wraps NOAA Big Data Program, ECMWF Open Data, and MSC Datamart. 11 NCEP-family models are wired end-to-end in Python today (HRRR, HRRRAK, GFS, GEFS, GDAS, NBM, RAP, RRFS, RTMA, URMA, CFS). 13 others ship URL patterns + QC rules but raise structured errors (see Wiring status below). TypeScript: deferred to v2.0+ — see NWP in TypeScript.
dataset() with forecasts
Section titled “dataset() with forecasts”dataset(include_forecast=True) (and its research() alias) wires both the IEM MOS forecast and the per-NWP-model forecast end-to-end. Settlement-day bucketing uses station LST via settlement_date_for(observed_at, station) so post-midnight tail rows roll into the correct calendar settlement.
import mostlyright
# Default — IEM MOS forecasts populate fcst_* columnsdf = mostlyright.dataset( "KNYC", "2026-05-01", "2026-05-07", include_forecast=True,)print(df[["date", "obs_high_f", "fcst_high_f", "fcst_model"]])
# Additionally include NWP forecasts per modeldf = mostlyright.dataset( "KNYC", "2026-05-01", "2026-05-07", include_forecast=True, forecast_models=["hrrr", "gfs"],)print(df[[ "date", "fcst_high_f", "fcst_high_f_nwp_hrrr", "fcst_high_f_nwp_gfs",]])import { dataset } from "mostlyright";
// IEM MOS (NBE default) — TS-wired forecast pathconst rows = await dataset("KNYC", "2026-05-01", "2026-05-07", { include_forecast: true,});console.log(rows[0].fcst_high_f, rows[0].fcst_low_f, rows[0].fcst_model);NWP models in TS raise NwpNotAvailableError — see NWP in TypeScript.
Standalone IEM MOS
Section titled “Standalone IEM MOS”The TS SDK ships iemMosForecasts() as a standalone surface — useful when you want raw MOS rows without going through dataset().
# Python folds IEM MOS into dataset(); call sites that want raw MOS# use the internal _fetchers (not yet a public surface).import mostlyright
df = mostlyright.dataset("KNYC", "2026-05-01", "2026-05-07", include_forecast=True)import { iemMosForecasts } from "@mostlyrightmd/weather";
const rows = await iemMosForecasts("KNYC", "2026-05-01", "2026-05-07", { model: "nbe",});console.log(rows[0].tempC, rows[0].source); // 20.0, "iem.archive"Supported NWP models
Section titled “Supported NWP models”Wiring status legend — wired = fetch + decode + QC end-to-end. reserved = schema-declared (URL patterns + QC rules + idx dispatch present) but
forecast_nwp()raises today. Reserved models flip to wired in follow-up releases.
NCEP family (USA — NOAA BDP + NOMADS)
Section titled “NCEP family (USA — NOAA BDP + NOMADS)”| Model | Wiring | Coverage | Cycle freq | Historical depth | Notes |
|---|---|---|---|---|---|
hrrr | wired | CONUS 3km | hourly | 2014-07-30 | High-resolution rapid refresh |
hrrrak | wired | Alaska 3km | 3-hourly | 2018-01-01 | HRRR for Alaska |
gfs | wired | Global 0.25° | 6-hourly | 2021-01-01 | Standard global model |
gefs | wired | Global ensemble 32m | 6-hourly | 2017-01-01 | Default member c00; opt-in via member= |
gdas | wired | Global 0.25° short | 6-hourly | 2021-01-01 | GFS analysis system |
nbm | wired | Regional blend | hourly | 2020-01-01 | National Blend; fxx=0 auto-bumps to 1 |
rap | wired | CONUS 13km | hourly | 2020-01-01 | Rapid refresh |
rrfs | wired | CONUS 3km | hourly | 2024-01-01 | HRRR successor (pre-operational) |
rtma | wired | CONUS 2.5km analysis | hourly | 2024-01-01 | Real-time mesoscale (fxx=0 only) |
urma | wired | CONUS 2.5km analysis | hourly | 2024-01-01 | Un-Restricted MA (fxx=0 only) |
cfs | wired | Global 1° (4-member) | 6-hourly | 2011-01-01 | Climate Forecast System |
All 11 NCEP-family models wired in Python.
ECMWF family (Global — Open Data)
Section titled “ECMWF family (Global — Open Data)”| Model | Wiring | Cycle freq | Historical depth | Notes |
|---|---|---|---|---|
ecmwf_ifs_hres | reserved | 6-hourly | 2022-01-01 | Deterministic IFS HRES |
ecmwf_ifs_ens | reserved | 6-hourly | 2022-01-01 | Ensemble IFS |
ecmwf_aifs_single | reserved | 6-hourly | 2024-02-25 | AI single |
ecmwf_aifs_ens | reserved | 6-hourly | 2024-02-25 | AI ensemble |
MSC Canadian family
Section titled “MSC Canadian family”| Model | Wiring | Cycle freq | Historical depth | Notes |
|---|---|---|---|---|
hrdps | reserved | hourly | live-only | High-Resolution Deterministic Prediction |
rdps | reserved | 6-hourly | live-only | Regional Deterministic Prediction |
gdps | reserved | 12-hourly | live-only | Global Deterministic Prediction |
geps | reserved | 12-hourly | live-only | Global Ensemble Prediction |
reps | reserved | 12-hourly | live-only | Regional Ensemble Prediction |
MSC models raise HistoricalDepthError(archive_depth=None) (live-only Datamart, 24h retention) — different from NwpModelNotAvailableError so callers can branch on the recovery action.
Legacy + experimental
Section titled “Legacy + experimental”| Model | Wiring | Notes |
|---|---|---|
hafs | reserved | Hurricane Analysis & Forecast System |
nam | reserved | North American Mesoscale — retires 2026-08-31 (NWS scn26-47) |
href | reserved | High-Resolution Ensemble Forecast — retires 2026-08-31 |
hiresw | reserved | High-Resolution Window — retires 2026-08-31 |
Calling a retiring legacy model emits DeprecatedModelWarning with the retirement date.
Standalone NWP (Python)
Section titled “Standalone NWP (Python)”from mostlyright.weather import forecast_nwpfrom datetime import datetime, UTC
df = forecast_nwp( "KNYC", "hrrr", cycle=datetime(2026, 5, 27, 12, tzinfo=UTC), fxx=24,)print(df[["station", "valid_time", "temp_c"]])Rate limits / concurrency
Section titled “Rate limits / concurrency”- AWS BDP / Google Cloud / Azure — tolerate aggressive parallelism. Default
httpx.LimitsperFORECAST-LIMITS.md. - NOMADS — capped at
NOMADS_CONCURRENCY_CAP=4. mostlyright fails fast on 403. - MSC Datamart — undocumented; mostlyright is polite (
N≤4). - ECMWF Open Data — 500 simultaneous connections per IP; mostlyright uses
N≤8.
Errors
Section titled “Errors”| Error | When it fires |
|---|---|
NwpModelNotAvailableError | Reserved model called (ECMWF, HAFS, legacy) |
HistoricalDepthError | Cycle older than the model’s archive depth, OR MSC×5 (live-only) |
NoLiveForNwpError | The wired mirror has no live cycle reachable |
GribIntegrityError | Decoded GRIB2 bytes failed structural validation |
DeprecatedModelWarning | NAM / HREF / HiResW after 2026-08-31 retirement |
See also
Section titled “See also”- NWP in TypeScript — the v1.x deferral story + workarounds
- dataset() — composable forecasts via
include_forecast=True - Data quality / QC — physics-bound flags applied to forecasts
- API reference:
mostlyright.weather.forecast_nwp·mostlyright.forecasts