Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

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.

Unit Systems

The unit_system query parameter selects one of three unit systems:

Parameter ValueDescriptionTemperaturePressureWindVisibilityPrecipitation
si (default)SI Units following CF ConventionsKPam/smmm, mm/h
usUS Units with Celsius temperatures°ChPamphmiin, in/h
us-fUS Units with Fahrenheit temperatures°FhPamphmiin, in/h

Fields that are the same in every system (percentages, degrees, ratios, J/m², kg/kg) are not converted.

curl -X GET \
  'https://api.wx.spire.com/forecast/point?lat=40.0&lon=-105.0&bundles=basic&unit_system=us-f' \
  -H 'spire-api-key: YOUR_API_KEY'

Temperature

JSON keySI (si)usus-f
air_temperatureK°C°F
dew_point_temperatureK°C°F
air_temperature_max_in_last_6_hours, air_temperature_min_in_last_6_hoursK°C°F
sea_surface_temperatureK°C°F
surface_temperature (skin temperature)K°C°F
soil_temperature_0-10cm and the other soil layersK°C°F
heat_index, wind_chill (Optimized Point)K°C°F

Conversion

# Kelvin to Celsius
celsius = kelvin - 273.15

# Kelvin to Fahrenheit
fahrenheit = (kelvin - 273.15) * 9/5 + 32

# Celsius to Fahrenheit
fahrenheit = celsius * 9/5 + 32

Wind

JSON keySIus, us-f
wind_speed, eastward_wind, northward_windm/smph
wind_gustm/smph
wind_speed_50m, eastward_wind_50m, northward_wind_50m, wind_gust_50mm/smph
wind_speed_80m, wind_speed_100m, wind_speed_120m and their eastward_/northward_ componentsm/smph
wind_direction, wind_direction_50m, wind_direction_80m, ...degreesdegrees

Direction Convention

Wind direction follows meteorological convention: the direction from which the wind is blowing, measured clockwise from north.

DirectionDegrees
North0° / 360°
East90°
South180°
West270°

Conversion

# m/s to mph
mph = ms * 2.237

# m/s to knots (see glossary: Knot)
knots = ms * 1.944

# m/s to km/h
kmh = ms * 3.6

Pressure

JSON keySIus, us-f
air_pressure_at_sea_level (Point, Route, Current Weather)PahPa
air_pressure_at_mean_sea_level, surface_air_pressure (Optimized Point)PahPa

Conversion

# Pa to hPa (mb) — see glossary: hPa
hpa = pa / 100

# Pa to inHg
inhg = pa * 0.0002953

Precipitation

JSON keySIus, us-fNotes
precipitation_amountmminAccumulated since forecast start; GRIB2 tp is kg/m², numerically equal to mm
precipitation_amount_1hr, _3hr, _6hrmminWindowed accumulations
precipitation_ratemm/hin/hGRIB2 prate/tprate are mm/s (kg/m²/s)
snowfall_amount, snowfall_amount_1hr, _3hr, _6hr, _totalcminGRIB2 total snowfall is in m
ice_amount_1hr, _3hr, _6hr, _total (Optimized Point)cmin

Conversion

# mm to inches
inches = mm * 0.03937

# kg/m² equals mm for water
mm = kg_per_m2

# mm/s to mm/h
mm_per_hour = mm_per_second * 3600

Waves and Ocean

JSON keySIus, us-f
sea_surface_wave_significant_heightmft
sea_surface_wind_wave_significant_height, sea_surface_total_swell_wave_significant_heightmft
sea_surface_wave_maximum_heightmft
sea_surface_wave_mean_period, sea_surface_wave_maximum_period, sea_surface_wave_zero_upcrossing_period and the wind-wave / swell periodsss
sea_surface_wave_mean_direction and the wind-wave / swell directionsdegreesdegrees
eastward_sea_water_velocity, northward_sea_water_velocity, sea_water_speedm/smph
sea_water_directiondegreesdegrees
sea_water_practical_salinitypsupsu

Conversion

# meters to feet
feet = meters * 3.281

Visibility

JSON keySIus, us-f
surface_visibility (Point, Route, Current Weather)mmi
visibility (Optimized Point)mmi

Conversion

# meters to miles
miles = meters / 1609.34

# meters to nautical miles
nm = meters / 1852

Humidity

JSON keyAll unit systems
relative_humidity%
specific_humiditykg/kg

Humidity values are the same in every unit system.


Soil Moisture

JSON keyAll unit systems
soil_moisture_0-10cm, soil_moisture_10-40cm, soil_moisture_40-100cm, soil_moisture_100-200cm (forecast)fraction (m³/m³)
d_mssm (Soil Moisture Insights)fraction (m³/m³)

Soil moisture is expressed as volumetric water content and is not converted.


Radiation

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 keyUnitMeaning
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)J/m²Accumulated over the window
surface_net_downward_shortwave_flux (Current Weather)W/m²Instantaneous incoming shortwave radiation
GHI, DNI, POA (Optimized Point, solar-energy bundle)W/m²Instantaneous irradiance
# Mean power over an accumulation window
watts_per_m2 = joules_per_m2 / window_seconds   # e.g. 3600 for a 1-hour window

Energy and Fluxes

JSON keyAll unit systems
latent_heat_flux, sensible_heat_fluxW/m²
convective_available_potential_energy, downdraft_convective_available_potential_energy, convective_inhibitionJ/kg
storm_relative_helicitym²/s²
precipitable_waterkg/m²
air_density_80m, air_density_100m, air_density_120mkg/m³

Tides

JSON keySIus
tide_heightmft

The tides response repeats the unit in meta.units.


CF Conventions

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.


Python Helper Functions

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