How urban surfaces respond to a diurnal cycle
Why the surface energy balance matters
The temperature you feel walking past a wall on a hot afternoon is set not by the air around it but by what happens at the surface itself — how much sunlight it absorbs, how it radiates back to the sky, how quickly heat conducts away into the wall, and how much of that heat the wind carries off into the atmosphere. All of this is bookkept by the surface energy balance (SEB).
Getting the SEB right is what separates an urban climate model from a guess. It controls:
- The urban heat island — why cities stay several degrees warmer than surrounding countryside, especially after sundown.
- Heat-wave mortality — surfaces that store heat through the day and release it overnight prevent buildings from cooling, with direct consequences for the elderly and vulnerable.
- Building energy demand — a roof’s albedo and thermal mass determine whether a building needs cooling or heating, and when.
- Outdoor thermal comfort — the radiant load on a person standing on dark asphalt versus a light pavement can differ by tens of watts per square metre.
Different materials respond very differently. A dark bitumen roof heats up rapidly under the morning sun and stays warm long after sunset; a thick-walled concrete facade lags the air by hours; a vegetated surface sheds energy as latent heat and barely warms at all. Pick one or two materials below and see for yourself.
What the SEB equation says
At every point on a surface, the energy that arrives must balance the energy that leaves. Written out:
Each term is a flux, in :
- — net shortwave radiation absorbed from the sun, , where is the incoming solar flux and is what the surface reflects (set by its albedo).
- — net longwave radiation exchanged with the sky and neighbouring surfaces, , where is the surface’s own thermal emission at temperature .
- — sensible heat flux, warming the air above the surface; driven by the difference between and the air temperature .
- — latent heat flux, evaporating water; zero for a dry impervious surface like asphalt, dominant for a wet leaf or moist soil.
- — ground heat flux, conducting heat into the wall or pavement, where it shows up later as a phase-shifted thermal wave.
The four flux terms on the right are not given — they emerge from the state of the surface and the air above it. The model below solves the 1D heat equation through a layered surface with material properties from a small database, driven by a diurnal cycle of , , and . At each step the surface temperature adjusts so that the equation closes.
The same code runs in your browser via Pyodide. It is the very same 1D conduction + SEB model that runs on the desktop teaching demo — and a stripped-down sibling of what we use in the urban LES code uDALES when we resolve every wall, roof, and pavement individually.
About this demo
The desktop version of the model — a small standalone Python application with the same physics — is open-source on GitHub at mvreeuwijk/SEBdemo. It was developed to accompany an invited lecture I gave at the Urban Physics Autumn School 2025 in Albania, where students could use it to build intuition for how surface materials, geometry, and forcing combine to set urban microclimate.
The GitHub SEB demo was also the first time I used agentic software engineering in a substantial way: I used a large language model to help build the user interface around the physics model, a piece of work I would normally not have had the time to do. The browser version keeps the same underlying physics module and wraps it in the in-browser interface shown here.