By day the land warms faster than the sea. The cool marine air then slides inland as a gravity current with a raised nose, and the front arrives at a town as a sudden cool, humid, windy change.
The step at the arrival time is the front: air cools towards the sea temperature and the dew point jumps up (about 3 K here, illustrative).
Sweeps the daily land temperature range and records the front position at the end of the heating half-cycle (21:00, numeric track) against the closed form derived from the lemniscate integral for a sinusoidal ΔT.
The science
Why it starts. Land air warms by day more than sea air, so for the same pressure at the top the warm column is lighter and the pressure difference between land and sea at the surface is Δp ≈ ρ g H ΔT/T, about 1 hPa for ΔT = 5 K and H = 500 m. It drives air from sea to land.
Gravity-current front. The cool air behaves like a dense layer of depth H under warmer air with reduced gravity g' = g ΔT/T. Its front moves at U = Fr √(g' H), with a Froude number Fr of about 0.7 to 1.2 for ideal laboratory currents; the default here is 0.5 to stand in for surface friction on land (adjustable 0.3 to 1.2), with g' reduced as the cool air is warmed by the land, g'eff = g' e−x/L (L is the air modification length, default 25 km, an illustrative tuning value), plus any ambient onshore wind: dx/dt = U e−x/2L + uwind. As ΔT follows the daily cycle, the front position is the time integral of that speed. For ΔT = a sin(ω(t − t0)), constant H and no ambient wind the equation integrates exactly: x = 2L ln(1 + I/2L) with I = Fr √(g a H/T) · (1/ω) ∫0π √sin θ dθ (I is the no-decay distance), and the integral equals √π Γ(3/4)/Γ(5/4) = 2.3963; the check compares this closed form with the time-stepped track.
Cloud line. The raised head lifts air about 1.3 H. If that exceeds the lifting condensation level of marine air (about 125 m per kelvin of dew-point spread) a line of cumulus forms above the front; the cloud depth shown is a rough illustration.
Simplifications, stated honestly. One-dimensional front in a uniform layer, no Coriolis turning (it matters for long sea breezes, which rotate the wind to the right in the northern hemisphere), no terrain, no turbulence mixing into the head, constant sea temperature, a fixed head shape and a simple temperature and dew-point step at the town. Fr, the 30 % head rise, the 3.5 K marine dew-point spread and the 0.45 mixing factor are typical or illustrative values, not measurements.