Skip to content
César Venzac

Ciel

The next 24 hours over Mougins, drawn in characters from the forecast: three decks of cloud in the wind, rain beneath them, the sun or the moon over the hills.

Open-Meteo, Noise, ASCII
--:--

Looking at the sky…

Weather data by Open-Meteo.com (CC BY 4.0).

Move the hour through the next day, or let the time-lapse play it. The sentence under the sky says what it shows.

From a forecast to a sky

Every half hour at most, the server asks Open-Meteo for the next 25 hours at Mougins: cloud cover at three heights, rain, snow, wind and temperature, with the day's sunrise and sunset. The page reads them from the site's own route, so no visitor calls the weather service, and between two hours it blends the values, turning the wind the short way round.

Each height is a deck of its own, drawn with its own characters: cirrus thin and streaky near the top in -~=, the middle deck in .:-=+, low cloud lowest and heaviest, up to *, in front of the others. The wind slides them sideways, rain falls from the base of the cloud in more columns the harder it rains, slanting when the wind blows, and the sun crosses from east to west between sunrise and sunset, as seen looking south over the hills.

Cover you can count

The clouds are noise, four octaves of it, cut at a threshold. The obvious threshold, 0.6 for 40% cover, is wrong: noise isn't spread evenly between 0 and 1 but bunches around the middle, so a fixed cut covers a quarter of the deck for a 40% sky and three quarters for a 60% one. Instead the page samples the noise once, sorts it, and cuts each deck at the value that 40% of the samples lie above, so 40% cover clouds about 40% of the deck.

The noise is hashed from each cell's coordinates rather than random, so the same moment always draws the same sky. It's characters in a <pre>, written straight into the page twelve times a second instead of through React, and only while it's on screen. The sun, the moon and the stars aren't monospace, so they're laid over the grid. With reduced motion nothing drifts, and the hour changes only when you move it.