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.

Reference for understanding Spire Weather file names. See also the GRIB2 and NetCDF glossary entries for file format details.

Standard Forecast Files

Pattern

{system}.{date}.{time}.{resolution}.{bundle}.{region}.{lead_time}.{format}

Example

sof-d.20240115.t00z.0p25.basic.global.f006.grib2
ComponentValueDescription
sof-dSystemSpire Operational Forecast - Deterministic
20240115DateIssuance date (YYYYMMDD)
t00zTimeIssuance Time (UTC)
0p25Resolution0.25° grid spacing
basicBundleData bundle
globalRegionGeographic coverage
f006Lead timeForecast Hour (6 hours ahead)
grib2FormatFile format

Component Reference

Forecast Systems

CodeDescription
sofSpire Operational Forecast
sof-dSpire Operational Forecast - Deterministic Forecast
sof-eSpire Operational Forecast - Ensemble Forecast
srfsSpire Regional Forecast System
cwcCurrent Weather Conditions

Issuance Time

Format: tHHz where HH is the hour in UTC.

CodeTime (UTC)
t00z00:00 UTC
t06z06:00 UTC
t12z12:00 UTC
t18z18:00 UTC

Resolution

Format: XpYY where X.YY represents degrees.

CodeDegreesApproximate Distance
0p0270.027°~3 km
0p1250.125°~14 km
0p250.25°~28 km
0p50.5°~55 km
1p01.0°~111 km

Bundles

CodeDescription
basicStandard meteorological variables
maritimeMarine parameters
agriculturalAgriculture parameters
aviationAviation weather
solarSolar radiation
windWind power data
precipitationDetailed precipitation

Regions

CodeCoverage
globalWorldwide
naNorth America
euEurope
asiaAsia
auAustralia

Lead Time

Format: fHHH where HHH is hours from issuance. See Lead Time.

CodeMeaning
f000Analysis (0 hours)
f0066-hour forecast
f02424-hour forecast
f04848-hour forecast
f1687-day forecast

File Formats

ExtensionFormat
.grib2GRIB2 (WMO standard)
.ncNetCDF
.csvComma-separated values
.jsonJSON

Current Weather Files

Pattern

cwc.{date}.{time}.{resolution}.{bundle}.{region}.{format}

Example

cwc.20240115.t16z.0p027.basic.global.grib2

Soil Moisture Files

Pattern

soil-moisture.{date}.{region}.{format}

Example

soil-moisture.20240115.global.nc

Lightning Files

Pattern

lightning.{date}.{time}.{region}.{format}

Example

lightning.20240115.t00z.global.nc

Archive Files

Archive files may be delivered as ZIP archives with directory structure:

{date}/
  {hour}/
    {filename}

Example Structure

20240115/
  00/
    sof-d.20240115.t00z.0p25.basic.global.f000.grib2
    sof-d.20240115.t00z.0p25.basic.global.f006.grib2
  12/
    sof-d.20240115.t12z.0p25.basic.global.f000.grib2

Custom Product Files

Custom products may have organization-specific naming conventions. Contact your Spire representative for documentation of custom file naming.


Parsing File Names in Python

import re
from dataclasses import dataclass
from datetime import datetime

@dataclass
class ForecastFileInfo:
    system: str
    date: datetime
    issuance_hour: int
    resolution: float
    bundle: str
    region: str
    lead_hours: int
    format: str

def parse_forecast_filename(filename):
    """Parse a standard forecast filename into components."""
    pattern = r'^(\w+)\.(\d{8})\.t(\d{2})z\.(\d+p\d+)\.(\w+)\.(\w+)\.f(\d{3})\.(\w+)$'
    match = re.match(pattern, filename)

    if not match:
        raise ValueError(f"Could not parse filename: {filename}")

    system, date_str, hour, res_str, bundle, region, lead, fmt = match.groups()

    # Parse resolution (e.g., "0p25" -> 0.25)
    resolution = float(res_str.replace('p', '.'))

    return ForecastFileInfo(
        system=system,
        date=datetime.strptime(date_str, '%Y%m%d'),
        issuance_hour=int(hour),
        resolution=resolution,
        bundle=bundle,
        region=region,
        lead_hours=int(lead),
        format=fmt
    )

# Example usage
filename = "sof-d.20240115.t00z.0p25.basic.global.f006.grib2"
info = parse_forecast_filename(filename)
print(f"System: {info.system}")
print(f"Date: {info.date}")
print(f"Issuance: {info.issuance_hour:02d}Z")
print(f"Resolution: {info.resolution}°")
print(f"Lead time: {info.lead_hours} hours")

Filter Files by Lead Time

def filter_by_lead_time(filenames, min_hours=0, max_hours=48):
    """Filter forecast files by lead time range."""
    result = []
    for filename in filenames:
        try:
            info = parse_forecast_filename(filename)
            if min_hours <= info.lead_hours <= max_hours:
                result.append(filename)
        except ValueError:
            continue
    return result

# Get only 0-24 hour forecasts
short_range = filter_by_lead_time(file_list, max_hours=24)