Agriculture · Pathway
From a weather record to a checked estimate.
Four katas on one year of real daily weather. Each step has a file you can open and a result that CI computes again on every pipeline.
01 / The files
One station, one year, one crop
The record is NOAA’s daily summary for weather station USW00093193 (Fresno Yosemite International, California; 36.77999, -119.72016, 101.9 m) from 2023-01-01 to 2023-12-31: maximum and minimum temperature and rain, in metric units, with NOAA’s flags on every value. The crop is maize for grain, planted on 2023-04-01, with FAO’s general crop values. Nothing was grown; this is a practice estimate.
- The weather record (CSV, as NOAA’s data service returned it), unchanged.
- Daily results (CSV): radiation, Penman-Monteith and Hargreaves reference evapotranspiration for every day.
- The result summary (Markdown) and every result as JSON under the manifest, with the method and the input hash.
- The pathway script (Python 3.12, standard library only, MIT), so you can rerun every number yourself.
- README: sources, terms, how to rerun the checks, and what they do not cover.
02 / What is in the record
365 days, 0 missing values
| Element | Unit | Values | Missing | Range | Quality flags |
|---|---|---|---|---|---|
| PRCP | mm | 365 | 0 | 0 to 54.9 | none |
| TMAX | degrees C | 365 | 0 | 7.8 to 42.8 | none |
| TMIN | degrees C | 365 | 0 | -0.5 to 27.2 | none |
23 rain values carry the measurement flag T (a trace, recorded as 0 mm). The station has no humidity, sunshine or wind in this record, so those are estimated as FAO-56 describes for missing data. Full inspection (JSON).
03 / The steps
Four katas, in order
Each kata has a brief, prompts, checks and the evidence for the checks the Dojo has run. They are drafts: the Dojo built the example and CI checks it, and no learner has run them yet. Do the foundations first: Compare AI instructions and Spot a context trap.
- AGR-001 Inspect a daily weather record
Station, dates, units, missing values and every flag, before any number is used.
- AGR-002 Estimate reference evapotranspiration
Reproduce FAO’s worked examples, then compute daily ET0 from temperature alone and compare two methods.
- AGR-003 Estimate a crop’s irrigation need
Maize crop coefficients by growth stage, effective rain, and the net irrigation need by month.
- AGR-R01 Agriculture Randori: an unseen change
A partner reveals one changed assumption after you start; predict its effect, then recompute.
04 / The checks
Reproduce the method, then use it
These results come from CI: the pipeline reruns /examples/agriculture-pathway/tools/agri_pathway.py and fails if any output differs from the published files.
Reference checks: FAO’s own worked examples
| Source | Quantity | Published | Computed | Result |
|---|---|---|---|---|
| FAO-56 Example 8 (3 September, 20 degrees S) | inverse relative distance Earth-Sun dr (eq. 23) | 0.985 | 0.985 | Pass |
| FAO-56 Example 8 (3 September, 20 degrees S) | solar declination, rad (eq. 24) | 0.12 | 0.12 | Pass |
| FAO-56 Example 8 (3 September, 20 degrees S) | sunset hour angle, rad (eq. 25) | 1.527 | 1.527 | Pass |
| FAO-56 Example 8 (3 September, 20 degrees S) | extraterrestrial radiation Ra, MJ m-2 day-1 (eq. 21) | 32.2 | 32.2 | Pass |
| FAO-56 Example 18 (Uccle, Brussels, 6 July) | extraterrestrial radiation Ra, MJ m-2 day-1 (eq. 21) | 41.09 | 41.09 | Pass |
| FAO-56 Example 18 (Uccle, Brussels, 6 July) | actual vapour pressure ea, kPa (eq. 17) | 1.409 | 1.409 | Pass |
| FAO-56 Example 18 (Uccle, Brussels, 6 July) | grass reference evapotranspiration ET0, mm/day (eq. 6) | 3.9 | 3.9 | Pass |
| FAO Training Manual 3, section 4.2 question | effective rainfall for 35 mm/month | 11 | 11 | Pass |
| FAO Training Manual 3, section 4.2 question | effective rainfall for 90 mm/month | 47 | 47 | Pass |
| FAO Training Manual 3, section 4.2 question | effective rainfall for 116 mm/month | 68 | 68 | Pass |
| FAO Training Manual 3, section 4.2 question | effective rainfall for 5 mm/month | 0 | 0 | Pass |
| FAO Training Manual 3, section 4.2 question | effective rainfall for 260 mm/month | 183 | 183 | Pass |
| FAO Training Manual 3, section 4.2 question | effective rainfall for 75 mm/month | 35 | 35 | Pass |
13 passed, 0 failed. The script stops without writing any result if one check fails, so every number below was computed by code that reproduces FAO’s examples. Result (JSON).
Reference evapotranspiration (AGR-002)
FAO-56 Penman-Monteith (eq. 6), daily, with the chapter 3 estimates for missing data. Humidity: dewpoint = Tmin - 0.0 degrees C (eq. 48). Radiation: Hargreaves radiation formula, kRs = 0.16 (interior), limited to clear-sky Rso (eqs. 50, 37). Wind: u2 = 2.0 m/s (no wind in the record). The Hargreaves equation is a second, simpler estimate; where the two disagree, neither is measured truth.
| Month | Penman-Monteith | Hargreaves | Hargreaves ÷ PM | Rain | Days unavailable |
|---|---|---|---|---|---|
| 2023-01 | 41 | 40.7 | 0.99 | 100.3 | 0 |
| 2023-02 | 53.7 | 53.7 | 1.00 | 108.2 | 0 |
| 2023-03 | 68.9 | 74.3 | 1.08 | 101.7 | 0 |
| 2023-04 | 125.6 | 134.3 | 1.07 | 0 | 0 |
| 2023-05 | 158.9 | 172.6 | 1.09 | 8.9 | 0 |
| 2023-06 | 167.8 | 183.4 | 1.09 | 0 | 0 |
| 2023-07 | 217.8 | 233.2 | 1.07 | 0 | 0 |
| 2023-08 | 183.1 | 194.5 | 1.06 | 4.9 | 0 |
| 2023-09 | 131.5 | 137.4 | 1.04 | 0 | 0 |
| 2023-10 | 101 | 100.8 | 1.00 | 0 | 0 |
| 2023-11 | 65 | 61.6 | 0.95 | 5.3 | 0 |
| 2023-12 | 46.4 | 44 | 0.95 | 17.3 | 0 |
Irrigation need (AGR-003)
Maize (grain), planted 2023-04-01, harvested 2023-08-28 (150 days); crop coefficient 0.3 at the start, 1.2 at mid-season and 0.35 at harvest. Effective rain uses FAO’s simple monthly formula; net irrigation need is crop evapotranspiration minus effective rain.
| Month | ET0 | ETc (maize) | Rain | Effective rain | Irrigation need |
|---|---|---|---|---|---|
| 2023-04 | 125.6 | 37.7 | 0 | 0 | 37.7 |
| 2023-05 | 158.9 | 109.1 | 8.9 | 0 | 109.1 |
| 2023-06 | 167.8 | 196.8 | 0 | 0 | 196.8 |
| 2023-07 | 217.8 | 260.7 | 0 | 0 | 260.7 |
| 2023-08 | 165.2 | 122.5 | 4.9 | 0 | 122.5 |
| Season | 835.3 | 726.8 | 13.8 | 0 | 726.8 |
The season had almost no rain, so effective rain is 0 mm in every month and the whole crop need falls to irrigation. That is the net need only: a real system also loses water to its own inefficiency, which is not estimated here. Result (JSON).
Randori cards
| Card | Change | Need | Change in need |
|---|---|---|---|
| A | The grower harvests the grain wet: use Kc end 0.60, the other end of the Table 12 range | 749.3 | +22.5 |
| B | The site is arid: estimate dewpoint as Tmin minus 2 degrees C (FAO-56, eq. 48 note) | 753.7 | +26.9 |
| C | Planting moves to 1 May 2023, same stage lengths | 724.4 | -2.4 |
The partner keeps this table hidden until the learner has written a prediction; see AGR-R01. Result (JSON).
05 / The tools and sources
No packages, public sources
The script uses only the Python 3.12 standard library, so it runs offline with nothing to install. A spreadsheet works for checking single days by hand. The Armory lists the stack recipe Python standard library.
- FAO Irrigation and Drainage Paper 56, Crop evapotranspiration (FAO, 1998): the Penman-Monteith method, the missing-data estimates, Hargreaves, crop coefficients, and Examples 8 and 18. The equations and table values are used; no text is copied.
- FAO Irrigation Water Management Training Manual 3, Irrigation Water Needs, section 4.2: the effective-rainfall formula and its worked question.
- NOAA NCEI GHCN-Daily: dataset metadata and terms, cited as GHCN-Daily version 3, doi:10.7289/V5D21VHZ, with the dataset overview paper doi:10.1175/JTECH-D-11-00103.1.
06 / What is checked
Verified, and not verified
Verified
- The weather record is the file NOAA’s data service returned for the query on this page, unchanged (SHA-256 abde49906522…, checked by the site’s tests).
- The script reproduces 13 published values from FAO’s own worked examples (FAO-56 Examples 8 and 18, and the effective-rainfall answers in FAO Training Manual 3) and refuses to write any result if one differs. (evidence)
- The record has 365 days, 0 missing temperature or rain values and 0 quality flags, as the inspection counts them. (evidence)
- On every pipeline, CI reruns the script with Python 3.12 and fails if any output differs from the files on this page. (evidence)
Not verified
- Measured evapotranspiration. Humidity, radiation and wind are estimated from temperature as FAO-56 describes for missing data; no station that measures them was compared.
- Any real field, soil, irrigation system or crop. The crop coefficients and stage lengths are FAO’s general table values, not adjusted for this climate, and nothing here was grown.
- Soil water balance, irrigation efficiency, leaching, salinity and rainfall runoff: the estimate is the net crop water need only.
- Whether the station record is homogeneous: NOAA says GHCN-Daily is not homogenized and was not managed to climate-monitoring standards.
- Use by real learners: no learner has run these katas yet.
Professional review: None. Nothing here is an irrigation recommendation or has been reviewed by an agronomist, irrigation engineer or water authority; real water use needs the qualified people and local rules that apply to it.
07 / Credits
Credits and terms
- Weather record: NOAA National Centers for Environmental Information, GHCN-Daily, station USW00093193, retrieved 21 November 2026. A work of the US federal government, not under copyright in the US (17 U.S.C. 105); NCEI asks users to cite the dataset and gives no warranty.
- Method and reference values: FAO-56 and FAO Training Manual 3, © FAO. Cited and linked; read FAO’s own terms before you copy their text or figures.
- The pathway script and its outputs: Developer Dojo, MIT licence.



