Skip to content

Nowcast System

Chris Nighswonger edited this page Mar 25, 2026 · 2 revisions

Nowcast System

Kanfei's nowcast feature generates short-range, hyper-local weather guidance using your station's observations combined with external weather data and AI analysis.

Operating Modes

Kanfei supports two nowcast modes, controlled by the nowcast_mode config key:

Local Mode (nowcast_mode: "local")

Runs the nowcast engine on your Kanfei host. Requires the kanfei-nowcast add-on package.

  • Full data collection (radar, NWS alerts, nearby stations)
  • Knowledge base with verification and self-improvement
  • All nowcast API endpoints available

Remote Mode (nowcast_mode: "remote")

Connects to the Kanfei Nowcast SaaS service. Set nowcast_remote_url to the service endpoint and nowcast_remote_api_key to your API key.

  • Nowcast results fetched from the hosted service
  • Manual generation triggers forwarded to the service
  • NWS alerts fetched directly (no remote dependency)
  • Quality presets available based on service tier

How It Works

The nowcast system runs on a configurable cycle (nowcast_interval, default 15 minutes). Each cycle collects available weather context and produces a short-range forecast for your station's location.

Depending on configuration and availability, inputs may include:

  • latest local station observations
  • forecast guidance
  • radar products
  • active NWS alerts
  • nearby station observations (IEM, Weather Underground, APRS — each toggled separately)

Alert-Aware Behavior

The nowcast system monitors NWS alerts for your location:

  • Cycle frequency can increase during active alerts
  • Analysis depth escalates for higher-severity scenarios
  • New alerts can trigger immediate regeneration

Quality Presets

Nowcast supports quality presets that balance cost and analysis depth:

  • Economy — lowest cost, suitable for routine weather
  • Standard — good balance of cost and quality
  • Premium — highest quality analysis

Knowledge and Verification

(Local mode only)

  • Forecasts are verified after the forecast horizon expires
  • The system learns from verification results over time
  • Proposed knowledge entries can be reviewed, accepted, or rejected
  • Auto-accept timing is configurable (nowcast_knowledge_auto_accept_hours)

API Endpoints

All modes

  • GET /api/nowcast — latest nowcast result
  • POST /api/nowcast/generate — trigger immediate generation
  • GET /api/nowcast/status — service status
  • GET /api/nowcast/presets — available quality presets
  • GET /api/nowcast/alerts — active NWS alerts for station location

Local mode only

  • GET /api/nowcast/history
  • GET /api/nowcast/knowledge
  • PUT /api/nowcast/knowledge/{id}
  • GET /api/nowcast/verifications
  • GET /api/nowcast/radar
  • GET /api/nowcast/radar/{id}

Configuration Keys

Main nowcast controls in station_config:

  • nowcast_enabled
  • nowcast_disclaimer_accepted
  • nowcast_mode (local/remote)
  • nowcast_remote_url
  • nowcast_remote_api_key (API key for remote service authentication)
  • nowcast_model
  • nowcast_interval
  • nowcast_horizon
  • nowcast_max_tokens
  • nowcast_radius
  • nowcast_radar_enabled
  • nowcast_nearby_iem_enabled
  • nowcast_nearby_wu_enabled
  • nowcast_wu_api_key
  • nowcast_nearby_aprs_enabled

Budget/cost related:

  • usage_budget_monthly_usd
  • usage_budget_auto_pause
  • usage_budget_paused
  • anthropic_admin_api_key

Operational Tips

  • Keep station location accurate; multiple subsystems depend on it.
  • Start with conservative settings and observe cost behavior.
  • Monitor /api/usage/status and /api/usage/local when tuning cadence.
  • Remote mode is ideal for deployments where you want nowcast without managing API keys or additional packages.

Clone this wiki locally