ClimateSmartWeather
Developer Documentation

ClimateSmartWeather Docs

Complete technical reference for the ClimateSmartWeather platform — covering the planetary intelligence APIs, Climate Protocol smart contracts, data sources, and integration guides.

Platform Overview

ClimateSmartWeather is a real-time planetary intelligence platform that aggregates data from over 1,200 global sensors, satellites, and scientific agencies to deliver a unified view of Earth's climate, weather, natural hazards, and space weather. The platform is built on three pillars:

Planetary Intelligence

Live feeds from NOAA, NASA, USGS, ESA, and ECMWF covering weather, seismic activity, wildfires, hurricanes, volcanoes, and space weather — all unified in a single command center.

Climate Protocol

The world's first climate-indexed token system. CLM, HOT, and COLD tokens are priced by a composite of 12 real-time climate metrics, creating a direct financial link between Earth's conditions and on-chain value.

Resilient Infrastructure

Multi-source data validation, automatic oracle fallback during satellite outages, and on-chain governance ensure the platform remains accurate and trustworthy even during extreme events.

Data Sources & Update Frequency

SourceData TypeUpdate FrequencyCoverage
NOAA SWPCSpace weather, Kp index, solar wind, X-ray flux1–5 minutesGlobal
NASA DONKISolar flares, CMEs, geomagnetic stormsReal-timeHeliosphere
NASA SDOSolar imagery (EUV, HMI magnetogram)12 minutesSolar disk
NASA FIRMSWildfire hotspots (MODIS + VIIRS)3 hoursGlobal
NASA EONETNatural events (fires, storms, floods, volcanoes)Real-timeGlobal
USGS EarthquakeSeismic events M1.0+Real-timeGlobal
Open-MeteoWeather forecasts, historical climate, AQI1 hourGlobal
OpenWeatherMapCurrent conditions, 5-day forecasts10 minutes200,000+ cities
NOAA Mauna LoaAtmospheric CO₂ concentrationAnnual/monthlyGlobal baseline
GNews APIClimate & weather news articles15 minutesGlobal media
ESA/NASA SOHOCoronagraph imagery (LASCO C3)30 minutesSolar corona
ECMWF ERA5Historical reanalysis climate dataMonthly updates1940–present

Platform API Reference

All platform data is served via a tRPC API over /api/trpc. The following procedures are available to authenticated clients.

weather.getCurrentparams: city: string→ WeatherData

Current conditions for a city (temperature, humidity, wind, pressure, UV index, visibility)

weather.getForecastparams: lat: number, lon: number→ ForecastData[]

5-day hourly forecast from Open-Meteo

weather.getAlertsparams: lat: number, lon: number→ WeatherAlert[]

Active severe weather alerts for a location

weather.getRadarparams: lat: number, lon: number, zoom: number→ RadarTileSet

Animated precipitation radar tile URLs

weather.getAQIparams: lat: number, lon: number→ AQIData

Air quality index and pollutant breakdown

Climate Protocol — CLM, HOT & COLD Tokens

CLM
Climate Master Token

The governance and base liquidity token. CLM price is derived from a weighted composite of all 12 climate metrics. Holders vote on oracle parameters, fee splits, and protocol upgrades.

HOT
Heat Anomaly Token

Tracks global temperature anomaly above the 1951–1980 baseline. HOT appreciates when heat records are broken and depreciates during cooling periods. Driven by NOAA GHCN and NASA GISS data.

COLD
Polar Vortex Token

Tracks Arctic sea ice extent and polar vortex strength. COLD appreciates during polar vortex disruptions and Arctic amplification events. Driven by NSIDC and ECMWF reanalysis data.

Getting Started with the Protocol

Install the Climate Protocol SDK:

bash
npm install ethers @climate-protocol/sdk

Connect to the CLM token contract and read the current composite score:

javascript
import { ethers } from "ethers";
import { ClimateProtocol } from "@climate-protocol/sdk";

const provider = new ethers.BrowserProvider(window.ethereum);
const signer = await provider.getSigner();

// Initialize the Climate Protocol SDK
const protocol = new ClimateProtocol({ provider, signer, network: "polygon" });

// Read the current CLM composite score (0–100 scale)
const composite = await protocol.clm.getCurrentComposite();
console.log("CLM Composite Score:", composite.toString());

// Read current HOT token heat anomaly index
const heatIndex = await protocol.hot.getHeatAnomalyIndex();
console.log("Global Heat Anomaly:", heatIndex.toFixed(2), "°C above baseline");

// Read COLD token polar vortex strength
const polarIndex = await protocol.cold.getPolarVortexIndex();
console.log("Polar Vortex Index:", polarIndex.toString());

Subscribe to oracle updates (emitted every 15 minutes on-chain):

javascript
// Listen for composite score updates
protocol.clm.on("CompositeUpdated", (newScore, timestamp, sources) => {
  console.log(`New CLM score: ${newScore} at ${new Date(timestamp * 1000).toISOString()}`);
  console.log(`Active data sources: ${sources.join(", ")}`);
});

// Listen for oracle pause events (triggered by G5 geomagnetic storms)
protocol.clm.on("OraclePaused", (reason, kpIndex) => {
  console.warn(`Oracle paused: ${reason} (Kp=${kpIndex})`);
});

CLM Composite Score Formula

The CLM token price is derived from a weighted average of 12 real-time climate metrics. Each metric is normalised to a 0–100 scale before weighting. The composite is recalculated every 15 minutes on-chain.

MetricData SourceWeightUpdate Interval
Global Temperature AnomalyNASA GISS / NOAA GHCN20%Monthly
CO₂ Concentration (Mauna Loa)NOAA GML15%Annual
Arctic Sea Ice ExtentNSIDC12%Daily
Global Sea Level RiseNASA Altimetry10%10 days
Active Wildfire Count (FRP > 50 MW)NASA FIRMS10%3 hours
Tropical Cyclone Activity IndexNOAA NHC / JTWC8%6 hours
Kp Geomagnetic IndexNOAA SWPC8%3 hours
Extreme Precipitation AnomalyECMWF ERA57%6 hours
Drought Monitor IndexUSDA / NOAA5%Weekly
Ocean Heat Content (0–700m)NOAA NCEI3%Monthly
Stratospheric Aerosol Optical DepthNASA GISS1%Monthly
Solar Irradiance AnomalySORCE / LASP1%Daily

Oracle Resilience & Fallback Mechanisms

Normal Operation

All 12 data sources are polled every 15 minutes. Each metric is validated against a 3σ outlier threshold before inclusion in the composite. A minimum of 8 active sources is required for a standard composite update.

Degraded Mode (6–7 sources)

When 5–6 sources are unavailable (e.g., during satellite outages), the oracle switches to a 6-hour rolling average. Token price volatility is dampened by ±5% to prevent manipulation during data gaps.

Storm Mode (Kp ≥ 7)

When NOAA SWPC reports Kp ≥ 7 sustained for >30 minutes (G3+ geomagnetic storm), the oracle automatically extends to a 12-hour average. Satellite-dependent metrics are temporarily excluded from the composite.

Emergency Pause (Kp ≥ 9 / G5)

Extreme G5 geomagnetic storms (Kp ≥ 9) trigger a full oracle pause. Token prices are frozen at the last valid composite until sensor integrity is confirmed. The pause requires a multi-sig governance vote to lift.

Platform Pages & Features

/
Planetary Command Center
The main dashboard. Live global disaster feed, weather stations, space weather metrics, NASA APOD, and real-time news ticker.
/weather
Weather Intelligence
Search any city for current conditions, 5-day forecast, UV index, AQI, and local weather alerts.
/radar
Weather Radar
Animated precipitation radar overlaid on an interactive map. Supports multiple layers: rain, snow, wind, temperature.
/hazards
Natural Hazards
Real-time earthquake, wildfire, flood, hurricane, volcano, and tsunami monitoring from USGS, NASA, and NOAA.
/wildfires
Wildfire Tracker
NASA FIRMS satellite hotspot map with FRP intensity filter, clustering, and Open-Meteo AQI overlay.
/space-weather
Space Weather Center
NOAA SWPC Kp gauge, solar wind charts, X-ray flux, aurora oval images, NASA DONKI flare/CME feed, and NASA SDO solar imagery.
/analytics
Analytics
Climate data analytics: temperature trends, CO₂ history, sea level rise, and protocol performance metrics.
/climate
Climate Explorer
Interactive 50-year NOAA/NASA climate datasets with time-series charts and anomaly maps.
/about
About
Platform mission, data sources, team, and development roadmap.
/contact
Contact
Contact form with category selection. Messages stored in DB and owner notified via built-in notification system.
/docs
Documentation
This page — full technical reference for the platform API, data sources, and Climate Protocol.
/terms
Terms of Service
Platform terms of service, acceptable use policy, and disclaimer.
/privacy
Privacy Policy
Data collection, storage, and user privacy practices.

External Resources & Data Portals

CLI Tools & Integration

The ClimateSmartWeather CLI provides command-line access to all platform data endpoints and Climate Protocol interactions.

bash
# Install the CLI globally
npm install -g @climate-protocol/cli

# Authenticate with your wallet
csw auth --wallet 0xYourWalletAddress

# Fetch current space weather dashboard
csw space-weather --format json

# Get latest wildfire hotspots within 500km of a location
csw wildfires --lat 34.05 --lon -118.24 --radius 500

# Stream real-time Kp index updates
csw kp-watch --threshold 5 --notify

# Query CLM composite score
csw protocol composite --token CLM

# Simulate oracle update with custom metric values
csw protocol simulate --temp-anomaly 1.5 --co2 425 --kp 3