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.

02 / What is in the record

365 days, 0 missing values

Elements, from the CI inspection of the record
ElementUnitValuesMissingRangeQuality flags
PRCPmm36500 to 54.9none
TMAXdegrees C36507.8 to 42.8none
TMINdegrees C3650-0.5 to 27.2none

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.

  1. AGR-001 Inspect a daily weather record

    Station, dates, units, missing values and every flag, before any number is used.

  2. AGR-002 Estimate reference evapotranspiration

    Reproduce FAO’s worked examples, then compute daily ET0 from temperature alone and compare two methods.

  3. AGR-003 Estimate a crop’s irrigation need

    Maize crop coefficients by growth stage, effective rain, and the net irrigation need by month.

  4. 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

Published values and the script’s values, rounded as published
SourceQuantityPublishedComputedResult
FAO-56 Example 8 (3 September, 20 degrees S)inverse relative distance Earth-Sun dr (eq. 23)0.9850.985Pass
FAO-56 Example 8 (3 September, 20 degrees S)solar declination, rad (eq. 24)0.120.12Pass
FAO-56 Example 8 (3 September, 20 degrees S)sunset hour angle, rad (eq. 25)1.5271.527Pass
FAO-56 Example 8 (3 September, 20 degrees S)extraterrestrial radiation Ra, MJ m-2 day-1 (eq. 21)32.232.2Pass
FAO-56 Example 18 (Uccle, Brussels, 6 July)extraterrestrial radiation Ra, MJ m-2 day-1 (eq. 21)41.0941.09Pass
FAO-56 Example 18 (Uccle, Brussels, 6 July)actual vapour pressure ea, kPa (eq. 17)1.4091.409Pass
FAO-56 Example 18 (Uccle, Brussels, 6 July)grass reference evapotranspiration ET0, mm/day (eq. 6)3.93.9Pass
FAO Training Manual 3, section 4.2 questioneffective rainfall for 35 mm/month1111Pass
FAO Training Manual 3, section 4.2 questioneffective rainfall for 90 mm/month4747Pass
FAO Training Manual 3, section 4.2 questioneffective rainfall for 116 mm/month6868Pass
FAO Training Manual 3, section 4.2 questioneffective rainfall for 5 mm/month00Pass
FAO Training Manual 3, section 4.2 questioneffective rainfall for 260 mm/month183183Pass
FAO Training Manual 3, section 4.2 questioneffective rainfall for 75 mm/month3535Pass

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.

Monthly reference evapotranspiration, mm
MonthPenman-MonteithHargreavesHargreaves ÷ PMRainDays unavailable
2023-014140.70.99100.30
2023-0253.753.71.00108.20
2023-0368.974.31.08101.70
2023-04125.6134.31.0700
2023-05158.9172.61.098.90
2023-06167.8183.41.0900
2023-07217.8233.21.0700
2023-08183.1194.51.064.90
2023-09131.5137.41.0400
2023-10101100.81.0000
2023-116561.60.955.30
2023-1246.4440.9517.30

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.

Monthly crop water need, mm
MonthET0ETc (maize)RainEffective rainIrrigation need
2023-04125.637.70037.7
2023-05158.9109.18.90109.1
2023-06167.8196.800196.8
2023-07217.8260.700260.7
2023-08165.2122.54.90122.5
Season835.3726.813.80726.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

Each card changes one assumption; season irrigation need, mm
CardChangeNeedChange in need
AThe grower harvests the grain wet: use Kc end 0.60, the other end of the Table 12 range749.3+22.5
BThe site is arid: estimate dewpoint as Tmin minus 2 degrees C (FAO-56, eq. 48 note)753.7+26.9
CPlanting moves to 1 May 2023, same stage lengths724.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.

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.