From dusk to late morning: does the valley fill with fog, how thick does it get, and when does the sun burn it off?
Each button runs the whole night headless (19:00 to 11:00) for several values and reports when the fog forms, how dense it gets and how long it lasts.
The science
Dew point and saturation. Saturation vapour pressure (Magnus form): es(T) = 6.112 exp(17.62 T / (243.12 + T)) hPa, T in °C. Dew point from relative humidity: Td = 243.12 γ / (17.62 − γ), γ = ln(RH/100) + 17.62 T/(243.12 + T). Saturation mixing ratio qs = 0.622 es / (p − es) with p = 1000 hPa.
Radiative cooling. The air layer (thickness h = 60 m) loses heat to the clear sky: F = ε σ (T⁴ − Tsky⁴)(1 − 0.8 c) β fw, with ε = 0.97, Tsky = 0.0553 T1.5 (Swinbank clear-sky form, T in K), cloud cover c, a coupling factor β = 0.5 for the share of the loss not returned by the ground (illustrative), and a wind factor fw = 1/(1 + (u/3)²) for turbulent mixing. The ground returns sensible heat H = 6 (T0 − 2 − T) W m⁻² K⁻¹ (illustrative). Then ρ cp h dT/dt = −F + H. Once the air is saturated, condensation releases latent heat and slows cooling by Γ = 1 + (L/cp) dqs/dT.
Liquid water and visibility. Total water is conserved: ql = max(0, qt − qs(T)), LWC = ρ ql. Kunkel (1984): Vis [km] = 1.002 / (LWC [g m⁻³] · N [cm⁻³])^0.6473, with droplet number N adjustable. Extinction used for drawing: 3.912 / Vis.
Cold-air drainage and pool. Slope flows follow a Prandtl-type balance: U = √(g′ δ sin α / CD), g′ = g (T0 − T)/T, δ = 8 m flow depth, α = 12° wall slope, CD = 0.05. Only ε = 20 % of the drained cold air is trapped (the rest leaves down-valley; illustrative). Cross-section of a trapezoidal valley: A = W0 D + D²/tan α, W0 = 600 m, and the pool grows by dA/dt = 2 ε U δ. The fog is drawn only where the terrain lies below the pool surface.
Sunrise. Absorbed shortwave 0.4 × 900 W m⁻² × sin(elevation) (halved inside fog) warms the layer until ql returns to zero. Simplifications: one-box layer, no fog-top longwave cooling, no advection, no soil heat store, no vertical mixing of the pool, flat pool surface. Typical constants only — spot-check them before quoting. Assets built with Blender; scene by Three.js.