India's grid is cleanest at noon.
Grid-India publishes all-India generation by fuel every 15 minutes. CleanHour turns that into carbon intensity per hour, and schedules heavy AI jobs into the cleanest (and, on the power exchange, cheapest) window.
Every hour of the last 30 days
Each cell is one hour. Darker means more CO₂ per kWh. The pale band through the middle of every day is solar.
The average day
Mean carbon intensity by hour of day, with the 10th–90th percentile range across the month.
Why: what's generating
Average all-India generation by hour, GW.
And it's cheaper
Average IEX Day-Ahead Market price by hour, ₹/kWh.
The scheduler
Give it a job length and a deadline. It forecasts the next 24 hours from the same hour over the past week, uses real IEX prices where the day-ahead market has already cleared, and starts the job in the best window.
$ python -m cleanhour plan --hours 2 --kwh 50
Best window : Fri 30 Oct 11:00 -> 13:00 ~511 gCO2/kWh, Rs 0.88/kWh
$ python -m cleanhour run --hours 2 --within 24 -- python train.py
[cleanhour] cleanest 2h window starts Sat 11:00 (~506 gCO2/kWh); waiting 0.8h
[cleanhour] starting: python train.py
Does the forecast work? Backtest
A job was submitted at every hour of the month. The scheduler could only see the past. We then scored the window it picked using what actually happened.
One real job, measured
Method & caveats
- Data. Grid-India (NLDC) daily Power Supply Position reports, "TimeSeries" sheet: all-India MW by fuel every 15 minutes. Prices: IEX Day-Ahead Market hourly clearing price (MCP).
- Intensity. Direct combustion only. Coal and lignite at 0.96 tCO₂/MWh (CEA CO₂ Baseline Database, operating margin), gas at 0.45. Solar, wind, hydro and nuclear count as zero. Storage discharge counts as zero to avoid double counting. "Others" also counts as zero. Lifecycle factors would raise every hour slightly but barely change the shape.
- National average. This is the all-India mix. A specific data centre's state grid and power contracts will differ.
- Laptop energy. GPU power is measured through NVML. CPU and RAM are CodeCarbon estimates, because Windows exposes no RAPL counters. The job uses the same kWh at any hour; only the CO₂ and price per kWh change.
- Price. The DAM price is what a large consumer buying on the exchange pays. A laptop on a flat home tariff pays the same at every hour.