A calm, clear night over a sloping apple orchard in bloom. The ground radiates to the sky (Stefan-Boltzmann), cold air pools in an inversion and drains downhill, and buds die below their critical temperature. You decide when to start the wind machine, heaters or sprinklers — each costs money and works in a different way.
Armed devices switch on when the field-mean 2 m air temperature falls to the trigger (sprinklers: wet-bulb temperature). Or press the big buttons on the picture yourself.
Tap or click the ground to move the thermometer mast, the profile graph and the close-up tree.
Replays the same night with seven protection plans (automatic starts) and tabulates the lowest bud temperature, buds lost, crop value left and running cost.
Compares the code with hand calculations and closed-form results: Stefan-Boltzmann flux, the erfc diffusion solution, heat-budget closure, the latent-heat water requirement and the damage curve.
The science
Radiation frost. On a clear calm night the ground and the buds lose longwave radiation to the sky, which is much colder than they are. The net loss follows Stefan-Boltzmann:
Lnet = σ ( εs Ts4 − εsky Ta4 ), σ = 5.67×10−8 W m−2 K−4
The clear-sky emissivity comes from the vapour pressure e (hPa) of the dew point (Brunt): εsky = 0.52 + 0.065 √e, blended towards 0.96 with cloud cover. Dry air (low dew point) is more transparent, so it frosts harder; cloud returns radiation and stops the frost.
Surface and soil. The skin of the orchard floor has a small heat capacity Cs. Its balance is Cs dTs/dt = S(1−α) − Lnet − H + G, with sensible heat H to the air and conduction G from the warmer soil. Bare firm moist soil conducts heat up best; a tall cover crop insulates the soil and the ground gets colder.
Inversion. Heat leaves the air through a turbulent diffusion equation on a 30-layer grid (0.3 m at the ground, growing 13 % per layer to ~88 m), solved implicitly:
ρcp ∂T/∂t = ∂/∂z ( ρcp K(z) ∂T/∂z ) + sources
K = κ u* z f(Ri) is damped by the gradient Richardson number, f = 1/(1+10 Ri)2 in stable air. Cooling at the surface makes Ri large, K collapses and the cold layer decouples: the temperature near the ground falls far below the air 10 m up. That temperature difference is the inversion. Wind (u* ≈ 0.1 U10) stirs it away; large-scale advection and slow regional cooling relax the column toward the ambient air.
Cold-air drainage. Cold air is denser and slides downhill as a gravity current. The deficit in the lowest ~4 m moves one column down the slope at u = c √(g′ h sin α), g′ = g ΔT/T, with the flow concentrated as the valley narrows. The ridge sits in a warmer "thermal belt"; the bottom becomes a frost hollow, worse still behind a hedge or road bank (the dam).
Blossom damage. Critical temperatures are rounded values from widely published extension tables for apple (T10/T90: 10 %/90 % of buds killed in ~30 min). Between them the kill fraction is logistic; for longer exposure the survivors are exposed again each half hour: D = 1 − ∏ (1 − f(Tbud) Δt/30 min). The bud temperature comes from its own radiative-convective balance (sky-view factor 0.35), a degree or two below the air.
Wind machine. A tower-mounted fan tilted ~7° down sweeps round every few minutes and mixes warm air from the inversion layer down. Modelled as extra eddy diffusivity Kw(z) = 1.6 m²/s · √(P/90 kW) /(1+(z/40)4), weighted by exp(−(r/R)3) with coverage radius R ≈ 118 m √(P/90 kW) (about 4–5 ha per 90 kW machine). Because it only redistributes heat, its benefit is about a third to a half of the inversion strength and fades as the stored heat is used up. With no inversion (windy or cloudy night) it does nothing — turning it on at sunset wastes the warm reservoir.
Heaters. Each return-stack heater burns fuel at Ph (kW thermal); only about 12 % of the heat stays in the air near the trees (the rest rises or radiates away). Fuel use = 0.1 L per kWh thermal. A running wind machine pushes the rising heater plume back down, which I model as up to +80 % effective heat near the tower (an assumption, not a measurement). Heaters ramp up over ~15 minutes.
Sprinklers (latent heat). Water freezing on the buds releases Lf = 334 kJ/kg and holds the ice-water film at about 0 °C as long as it is applied continuously. The film must replace all the heat the wet bud loses (radiation, convection and evaporation):
rreq = qloss · Ac / [ ρw ( Lf + cw Tw ) · η ]
with Ac = 2 (wetted bud/twig area per m² of ground) and application efficiency η = 0.65. If the rate is too low the film cannot hold 0 °C and evaporative cooling can leave the buds colder than if they had stayed dry. Sprinklers do not warm the air in this model.
Honest simplifications: one vertical column per grid point (8 × 5 columns, 45 m apart) with 1-D drainage between them; no condensation or dew heat release; dew point held fixed; wind-machine mixing, heater efficiency, canopy factors and all prices are tuned illustrative values, not measurements; the sun is a fixed April day at ~51 °N. Educational model, not frost-protection advice for a real orchard.
Baked 3D scene. Trees, wind machine, heaters, sprinklers, mast and pump house, with named parts and baked per-vertex ambient occlusion, plus the grass albedo/normal/AO textures, were built in Blender 5.2 (Cycles); Three.js r160 animates the rest.