🌾 Sustainable Agriculture Lab: Nitrogen, Irrigation and Precision Farming

The science

What you see. A 20 x 12 grid field with smooth natural variation in soil water capacity (85-165 mm) and soil mineral nitrogen. One simulated day passes per tick. Change a control and the whole season restarts.

  • Water bucket per cell: W(t+1) = W + rain + irrigation x efficiency - ETa, with drainage when W exceeds the capacity. ETa = ETm x min(1, W / (0.5 capacity)) and ETm = ET0 x Kc. Irrigation efficiency is 0.55 for flood and 0.90 for drip (typical orders of magnitude); of the water that does not reach the root zone, 60% is assumed to percolate below it (carrying nitrate) and 40% is lost to evaporation and runoff.
  • Yield (FAO-33 form): Ya/Ym = 1 - Ky (1 - ETa/ETm) with Ky = 1.25 for a maize-like crop, multiplied by a nitrogen response 1 - exp(-U/70) (Mitscherlich shape, normalised so U = 210 kg N/ha is full demand). Ym = 11 t/ha.
  • Nitrogen: soil nitrate gains fertiliser and mineralisation, loses what the crop takes up, and loses N (1 - exp(-D / (0.9 capacity))) to leaching for each drainage event D. Splitting doses and placing less N on already-rich zones (variable rate, mean-preserving) cut the amount sitting in the soil when heavy rain arrives. A cover crop is modelled as a flat 30% cut in leaching (illustrative).
  • N2O: 1% of applied N emitted as N2O, converted with a warming potential of 273 (the IPCC default emission factor, a typical value; real emissions vary by a factor of several).
  • Economics: grain $150/t, N $1.2/kg, irrigation $0.6/mm. These are made-up round numbers.

Checks shown in the page. Water and nitrogen mass-balance closure (supply = uses + storage, catching bookkeeping errors) and the FAO-33 relation evaluated by hand at 80% ET. The right-hand plot reruns the entire season for 16 fertiliser rates in the background to draw the diminishing-returns curve.

Simplifications. No temperature, pests, runoff, volatilisation, phosphorus, soil carbon changes or multi-year rotation; daily rainfall is a fixed pseudo-random pattern scaled to the chosen season total.

Presets

Controls

Live readouts

Independent checks