{
  "schemaVersion": 1,
  "slug": "drip-irrigation-calculator",
  "category": "gardening",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "fb0024a301a590649a20c79a4ca42e7140f548915fb9cf950fdb81813b9023a5",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/drip-irrigation-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "t = 60 × 0.623 × L × d × n × w ÷ (q × n × ⌊12L ÷ p⌋)",
    "vars": [
      [
        "L",
        "Row length (ft)"
      ],
      [
        "d",
        "Row spacing (ft)"
      ],
      [
        "n",
        "Number of rows"
      ],
      [
        "w",
        "Weekly water need (in)"
      ],
      [
        "q",
        "Flow per emitter (gal/h)"
      ],
      [
        "p",
        "Emitter spacing (in)"
      ]
    ],
    "note": "t is weekly run time (min); 0.623 converts inches of water over ft² to gallons. Zones = max(1, ceil(zone flow ÷ 200 gal/h)); emitters per row rounded down."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "EPA WaterSense — Irrigation systems and site-specific watering",
        "url": "https://www.epa.gov/watersense/watering-tips"
      }
    ],
    "referenceRole": "input",
    "implementationHash": "fb0024a301a590649a20c79a4ca42e7140f548915fb9cf950fdb81813b9023a5",
    "basis": "t = 60 × 0.623 × L × d × n × w ÷ (q × n × ⌊12L ÷ p⌋)",
    "limitations": "Use the cited guidance and your own measurements, bills or product specifications to choose inputs. Sample defaults are not current local data."
  },
  "contract": {
    "compute": "const emittersPerRow = Math.floor(rowLength*12/emitterSpacing); const totalEmitters = emittersPerRow*rows; const tubingFeet = rowLength*rows+rowSpacing*rows; const zoneFlow = totalEmitters*emitterFlow; const bedArea = rowLength*rowSpacing*rows; const weeklyGallons = bedArea*waterPerWeek*0.623; const runMinutes = zoneFlow > 0 ? weeklyGallons/zoneFlow*60 : 0; return { emittersPerRow, totalEmitters, tubingFeet, zoneFlow, runMinutes, zones: Math.max(1, Math.ceil(zoneFlow/200)) };",
    "inputs": [
      {
        "name": "rowLength",
        "type": "number",
        "default": 30,
        "min": 1,
        "max": 2000,
        "step": 1,
        "slider": true
      },
      {
        "name": "rows",
        "type": "number",
        "default": 4,
        "min": 1,
        "max": 200,
        "step": 1,
        "slider": true
      },
      {
        "name": "emitterSpacing",
        "type": "number",
        "default": 12,
        "min": 6,
        "max": 48,
        "step": 6
      },
      {
        "name": "emitterFlow",
        "type": "number",
        "default": 0.5,
        "min": 0.1,
        "max": 5,
        "step": 0.1,
        "slider": true
      },
      {
        "name": "rowSpacing",
        "type": "number",
        "default": 2,
        "min": 0.5,
        "max": 20,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "waterPerWeek",
        "type": "number",
        "default": 1,
        "min": 0.1,
        "max": 4,
        "step": 0.1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "emittersPerRow",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "totalEmitters",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "tubingFeet",
        "precision": 0,
        "unit": "ft"
      },
      {
        "name": "zoneFlow",
        "precision": 1,
        "unit": "gal/h"
      },
      {
        "name": "runMinutes",
        "precision": 0,
        "unit": "min"
      },
      {
        "name": "zones",
        "precision": 0,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
