Complete reference for units used in Spire Weather API responses. Every point-style response lists the unit of each returned field in meta.units, so you can always check the unit programmatically.
Radiation fields come in two forms. The forecast Solar Energy bundle delivers energy accumulated over a period in J/m²; Current Weather and the Optimized Point irradiance fields deliver instantaneous power in W/m². Neither is converted by unit_system.
JSON key
Unit
Meaning
surface_net_downward_shortwave_flux, surface_net_downward_longwave_flux, surface_net_upward_shortwave_flux, surface_net_upward_longwave_flux, net_upward_longwave_flux_at_top_of_atmosphere (Solar Energy bundle)
J/m²
Accumulated since forecast start
The same keys with _1hr, _3hr, _6hr (Solar Energy Accumulation bundle)
Field names follow CF Conventions standard names where one exists (for example air_temperature, eastward_wind, sea_surface_wave_significant_height). Level-specific fields append the level (eastward_wind_80m, soil_temperature_0-10cm) and windowed fields append the window (precipitation_amount_3hr). This keeps the JSON compatible with common meteorological software and data formats.
def kelvin_to_celsius(k):
"""Convert Kelvin to Celsius."""
return k - 273.15
def kelvin_to_fahrenheit(k):
"""Convert Kelvin to Fahrenheit."""
return (k - 273.15) * 9/5 + 32
def ms_to_knots(ms):
"""Convert m/s to knots."""
return ms * 1.944
def ms_to_mph(ms):
"""Convert m/s to mph."""
return ms * 2.237
def pa_to_hpa(pa):
"""Convert Pa to hPa (millibars)."""
return pa / 100
def meters_to_feet(m):
"""Convert meters to feet."""
return m * 3.281
def joules_to_mean_watts(j_per_m2, window_seconds):
"""Convert an accumulated J/m² value to mean W/m² over the window."""
return j_per_m2 / window_seconds
def wind_components_to_speed_direction(u, v):
"""Convert U/V wind components to speed and direction.
Args:
u: Eastward wind component (m/s)
v: Northward wind component (m/s)
Returns:
tuple: (speed in m/s, direction in degrees)
"""
import math
speed = math.sqrt(u**2 + v**2)
direction = (270 - math.degrees(math.atan2(v, u))) % 360
return speed, direction