Specialization kata · AGR-003

Estimate a crop's net irrigation need from crop coefficients and effective rain

Turn reference evapotranspiration into a maize crop's water need with FAO-56 crop coefficients by growth stage, subtract effective rain with FAO's simple monthly formula, and report the net irrigation need by month.

Draft. This recipe is a draft. Its checks may not have been run, and it can change.

Status
Draft
Kata ID
AGR-003
Maintainer
Agriculture pathway maintainer
Last verified
Not available. Built and checked by the Dojo maintainers and CI; no independent, agronomic or engineering review yet.
Found a problem?
Report it

The outcome

A monthly net irrigation need for maize planted on 1 April 2023, with every coefficient traced to FAO's tables.

For: Learners who finished AGR-002.

Done when

  • You state the stage lengths (30, 40, 50 and 30 days) and Kc values (0.30, 1.20 and 0.35) and the table rows they come from
  • Your effective-rainfall function reproduces the manual's six answers
  • Your monthly table matches /examples/agriculture-pathway/generated/irrigation.json
  • You list what the net need leaves out

You make: Irrigation estimate. Outcome: Estimate irrigation need.

Showcase and provenance

The Dojo’s worked example, made by the maintainers rather than by a learner: one year of NOAA daily weather for a California station, FAO-56 reference evapotranspiration and a maize irrigation estimate, every number computed by the site’s CI.

See the showcase

Made by
NOAA National Centers for Environmental Information (weather record); Developer Dojo maintainers (script and results)
Source
NOAA GHCN-Daily station USW00093193, 2023; method from FAO Irrigation and Drainage Paper 56; results from /examples/agriculture-pathway/tools/agri_pathway.py
Licence
Weather record is a US government work (no US copyright, 17 U.S.C. 105); script and outputs MIT
Date

Brief, inputs and constraints

Inputs

  • et0-daily.csv. Source: Your AGR-002 output, or /examples/agriculture-pathway/generated/et0-daily.csv. Terms: Dojo output, MIT licence.
  • FAO-56 Tables 11 and 12, and FAO Training Manual 3 section 4.2. Source: fao/crop-evapotranspiration-56 and fao/irrigation-water-needs. Terms: © FAO; use the published numbers, do not copy the text.

Constraints

  • No paid tools
  • Offline capable
  • No personal data

Capabilities practised

  • Calculate
  • Verify evidence

Stack, permissions and cost

Stack components with version, permissions and cost
PartComponentVersionPermissionsCost
RuntimePython, standard library only3.12Reads the files you give it and writes only the output folder you nameFree
ToolAny spreadsheetNot available. Not fixed; any spreadsheet that opens CSV worksOpens a copy of the CSV filesNot available. Depends on the spreadsheet you use; free ones work
DataDaily ET0 from AGR-0022023, SHA-256 abde4990…b3b9a7Read a copyFree (US government work)
HarnessAny chat assistant or coding agentNot available. Not fixed; an assistant may explain an equation or draft code, and every number it gives is checked against FAO's worked examplesReads what you paste in; give it a copy of the record onlyNot available. Depends on your assistant and plan; not measured

Stack recipes

  • Python standard library

Why this stack

The standard library is enough for these equations, runs offline with nothing to install, and gives the same numbers on every machine. CI runs the identical script on every pipeline.

Alternatives

  • A ready-made evapotranspiration package or FAO's ETo Calculator. Faster, but hides the equations this pathway is about. Not tried for this pathway, so its numbers are not compared here. Not tested for this recipe.

Agents and review gates

  1. Explaining assistant

    Explains the crop coefficient curve and the effective-rainfall rule, and drafts the Python for each.

    Review gate: Its code must reproduce FAO's worked example before you use it on the record.

  2. Learner as reviewer

    Compares each result with FAO's published values and with the Dojo's CI output.

    Depends on: Explaining assistant

    Review gate: A number stays only if you can say which equation and which input produced it.

Setup and smoke test

  1. Use the folder and Python from AGR-001.

Sign-in and access: None. Nothing here needs an account.

Smoke test

Do
Run: python3 -I tools/agri_pathway.py . out (from the folder that holds inputs/ and tools/)
Expect
out/reference-checks.json reports 13 passed and 0 failed
Result
Passed /examples/agriculture-pathway/generated/reference-checks.json, recomputed by CI on every pipeline

Prompts

Copy a prompt into the assistant you use. Replace anything that does not fit your situation, and never paste private or personal data you are not allowed to share.

What does this number leave out?

Practise stating the limits of an estimate before anyone uses it.

You can also select and copy the text.

Practice exercise

Irrigation Water Management, Training Manual No. 3, Irrigation Water Needs. From Irrigation Water Management: Irrigation Water Needs (Training Manual No. 3) (Food and Agriculture Organization of the United Nations).

Terms: © FAO. Free to read online; cite it and read FAO's terms before copying text or figures.

Execution and handoffs

  1. Learner: Build the daily Kc curve from the stage lengths and table values, and multiply by ET0.
  2. Explaining assistant: Explains the effective-rainfall rule and drafts a function for it. Hand-off: You check it against the manual's answers.
  3. Learner: Sum by month, subtract effective rain, and compare with the CI output.

Tests, failures and corrections

Checks with expected and recorded results
CheckExpectedResultEvidence
Run the pathway script's effective-rainfall checks35 mm gives 11, 90 gives 47, 116 gives 68, 5 gives 0, 260 gives 183 and 75 gives 35; all passPassed on /examples/agriculture-pathway/generated/reference-checks.json, recomputed by CI on every pipeline
Compute the maize seasonHarvest 2023-08-28 after 150 days; ETc 726.8 mm; rain 13.8 mm; effective rain 0 mm; net irrigation need 726.8 mm, of which July 260.7 mmPassed on /examples/agriculture-pathway/generated/irrigation.json
Your own table matches the CI outputSame monthly values to 0.1 mmNot runNot run, so there is no evidence. This is not a pass.

Failures and corrections

  • Observed: Effective rain is zero in May although 8.9 mm fell Correction: The rule gives 0.6 × 8.9 − 10, which is below zero, so it is floored at zero. Small monthly rain is assumed lost to evaporation and runoff.

Adapt it

  • Use another crop from Tables 11 and 12 Name the row and region you chose; the table values are general and FAO says to adjust Kc mid and end for climate.

Unseen Randori

See the agriculture Randori recipe, AGR-R01.

Constraints

  • Trace every coefficient to a table row

How it is judged: The monthly table matches the CI output for the same inputs.

More Randori challenges

Belt evidence

Belt stages are proposed practice stages, not issued credentials. Evidence below is what a reviewer would look for; it is not a record that anyone has shown it.

Evidence a reviewer looks for

  • Code that reproduces the six effective-rainfall answers in FAO Training Manual 3 (Automated check, against FAO Training Manual 3 (Irrigation Water Needs))
  • A monthly table of ETc, rain, effective rain and net irrigation need that matches the Dojo's CI output (Automated check, against FAO Irrigation and Drainage Paper 56 (Crop evapotranspiration))
  • A Sensei or partner checks that the learner states what the net need leaves out (Sensei review)

Belt criteria

  • Practice: Reproduces the monthly irrigation table for maize and explains why effective rain is zero every month
  • Adapt: Estimates another crop from FAO-56 Tables 11 and 12, naming the rows used
  • Demonstrate: Explains to a reviewer why the net need is not the water to order, listing what a real estimate adds

See the belt stages · Prepare a practice review

Connections

Used by
No other kata names this one as a foundation yet.
Transfers to
Professional review
Required. Any real use of this outcome needs independent validation and any approval required from a qualified professional. Practice here does not grant a licence.

Standards in scope

  • FAO Irrigation and Drainage Paper 56 (Crop evapotranspiration), 1998. Applies to: Table 11 stage lengths and Table 12 crop coefficients for maize (grain), used without climate adjustment for practice. Review scope: What the listed checks test: that the Kc curve and monthly sums follow the tables and equations. No claim about any real field or crop.
  • FAO Training Manual 3 (Irrigation Water Needs), 1986. Applies to: The section 4.2 effective-rainfall formula, applied per calendar month. Review scope: What the listed checks test: that the code reproduces the manual's worked answers. The formula is a rough rule; it is not a soil water balance.

Sources

Maintenance and caveats

Review cadence: Every six months, or when FAO revises Paper 56

  • This recipe is a draft: the example was built and checked by the Dojo maintainers and CI, and no learner has run it yet.
  • Nothing here is an irrigation recommendation. No agronomist, irrigation engineer or water authority has reviewed it, and real water use needs the qualified people and local rules that apply to it.
  • Humidity, radiation and wind are estimated from temperature, as FAO-56 describes for missing data. The results are estimates, not measurements.
  • NOAA says GHCN-Daily is not homogenized. One station and one year say nothing about a trend.
  • The net irrigation need leaves out system efficiency, soil water storage, leaching and salinity. It is not the amount of water to order or apply.

All kata recipes · Back to katas