How barometer.today draws its isobars
barometer.today shows air pressure for any city: the reading now, the change since yesterday, and the week ahead. It also has a world isobar map, animated hour by hour from a day back to four days ahead. This post explains what isobars are and the algorithms that we use to draw them. The code is Python with numpy, scipy, contourpy and shapely, and anyone drawing contour maps from gridded data…
barometer.today displays air pressure data for cities worldwide, including a world isobar map that shows lines of equal pressure. These isobars indicate wind strength, with closely packed lines representing fast-changing pressure and widely spaced lines indicating calmer air. Isobars close around high-pressure centers (H) and low-pressure centers (L), with deeper lows having tighter rings signifying storms and broader highs indicating stable weather.
The map utilizes data from the ECMWF global forecast, which provides a grid of sea-level pressure values every 0.25 degrees (approximately 28 km) for the entire planet. Open-Meteo interpolates the model's three-hour time step to hourly values. The data is fetched from Open-Meteo, which runs on the website's own server for SimpleMeteo.com sites.
To smooth the jagged cell-to-cell data from the raw model grid, a Gaussian blur with a sigma of one cell (28 km) is applied. This blurring helps create smoother lines, though it must account for mountains. A normalized convolution technique is used to blur fields around plateaus like the Himalayas, ensuring that lowland values remain accurate. Masking is applied to regions above 2,500 meters, with isobars drawn as dashed lines in these areas to indicate extrapolated values.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.