# TEMPO crop simulations — exploratory pilot, 6 November 2026

The published maps are based on executed crop models, not interpolated or invented yields. They cover 12 municipal coordinates, not the whole Brazilian territory. They are **not regionally validated recommendations**.

## Reproduce

Create a Python 3.12 environment; install `requirements.txt`. From this directory:

```sh
python fetch_weather.py
python run_pilot.py
python run_sequences.py
python export_site.py
python -m unittest test_models.py
```

`run_pilot.py` executes 17,400 independent crop simulations: 12 soybean sites, 12 maize sites and five wheat sites; five sowing dates; 1996–2025; two models and two water regimes. The source results retain water at harvest for chaining. The public JSON omits the internal water vectors.

`run_sequences.py` uses those soybean runs and executes maize after seven complete fallow days. It transfers soil water without resetting to field capacity. Candidate maize sowing later than 15 March is classified infeasible and contributes zero maize yield. This cutoff is an experimental assumption, not ZARC or a regional recommendation. There are 5,800 published sequences for 1996–2024. The complete 2025 soybean year is excluded from **every** Calendar scenario because two late maize runs need weather beyond the complete forcing period. NASA POWER solar radiation for 7 September 2026 was missing in the retrieved longer series; no values were imputed. Yield Gap retains 30 complete independent crop years.

## Engines and provenance

- **AquaCrop-OSPy 3.1.0**, Apache-2.0, https://github.com/aquacropos/aquacrop . This independent Python implementation is not the official FAO 7.3 engine. Its code is redistributed unchanged in a browser ZIP with its license. `aquacrop_leap_calendar.py` is an attributed, conditional calendar-only adaptation: February 29 inputs use reference year 2000 rather than the package's non-leap reference 1990. Actual planting/weather dates are unchanged. The original license is in `vendor/aquacrop/LICENSE` and the browser ZIP.
- Soybean: partial transfer of the BRS 284 coefficients attributed to Battisti et al. (2017), DOI https://doi.org/10.1016/j.fcr.2016.10.004 , reproduced in Dohler (2021), Table 1, pp.36–37: https://sappg.ufes.br/tese_drupal/tese_12701_Rafael%20Esteves%20Dohler.pdf . Explicit transferred values are in `aquacrop_parameters.py`; all other coefficients are inherited from OSPy SoybeanGDD. This is not a reproduction of the complete published calibration or validation in Mato Grosso. No management/yield-gap scaling factor is applied.
- Maize and wheat: OSPy generic GDD presets; no cultivar-specific regional calibration claimed. Relevant literature for further calibration includes Souza et al. (2020), DOI https://doi.org/10.1590/0102-7786352001 , and Rosa et al. (2020), DOI https://doi.org/10.1590/S1678-3921.pab2020.v55.01238 . The latter does not support a blanket claim of satisfactory independent wheat validation.
- **SIMPLE equations implemented by TEMPO**, based on Zhao et al. (2019), https://doi.org/10.1016/j.eja.2019.01.009 . Cultivars: Bragg soybean, McCurdy84aa maize, Yecora Rojo wheat. This is not the authors' reference executable. Expansion and senescence logistic branches are combined using their minimum; global radiation is multiplied by RUE, temperature, heat/water and CO₂ factors; harvest stops at thermal maturity. SCO₂ coefficients in the table are interpreted per100ppm, consistent with paper Figure6. The published table values are divided by100 for use with ppm. This numerical interpretation, and the branch join, require further benchmarking against the reference executable.
- SIMPLE adaptations: FAO56 ET₀ replaces Priestley–Taylor; a single soil-water bucket uses SCS runoff and drainage of half the excess above field capacity per day. Water-stress index ARID = 1−min(ET₀,0.096×PAW)/ET₀. This simplified water accounting follows the described ARID/ZeBook approach: https://rdrr.io/cran/ZeBook/src/R/watbal.model.r . Ksat and residue cover are **not** represented in this SIMPLE implementation.

Both engines assume constant CO₂410ppm to isolate meteorological variability. Yields are dry matter t/ha; neither model's yield is silently converted to commercial moisture. Different cultivar presets mean model differences include genotype/parameter differences. Neither their average nor their agreement is presented as validation.

## Climate, soil and spin-up

NASA POWER daily AG data: Tmax, Tmin, mean temperature, mean RH, wind at2m, surface pressure, precipitation, surface shortwave radiation. Radiation delivered as MJ/m²/day; it is not multiplied by3.6. Daily series must be continuous, finite and free of -999. Input files have requested URLs, retrieval time and SHA256 sidecars. ET₀ is FAO56 Penman–Monteith, with actual vapour pressure approximated from mean RH (FAO56eq19), not measured daily dew point. FAO documentation: https://www.fao.org/4/X0490E/x0490e06.htm . Grid climate is not a farm weather station.

Common pilot soil: total depth1.20m, WP0.15, FC0.30, saturation0.45m³/m³, Ksat100mm/day, CN70, no mulch. OSPy has12 compartments; roots are capped at soil depth−0.10m so its initialization cannot silently extend the profile. BRS284 maximum roots are0.50m. Farm profiles distribute whole centimetres over12 compartments to match OSPy's internal rounding. Soil starts at FC with90days of simulated preplant balance. This finite initialization affects results; it is not a measured initial condition. Irrigation removes water stress after sowing, without constraining water availability or accounting for application losses.

OSPy's reported Harvest Date is the following day's start; the adapter subtracts one day so the public harvest date denotes the final processed crop day. The harvested water vector is selected using Harvest Date(Step), not the trailing zero-filled storage rows. Maize starts its balance on harvest+1 and plants on harvest+8. SIMPLE transfers its entire PAW bucket.

## Calendar and ENSO

Five soybean dates:15Sep,1Oct,15Oct,1Nov,15Nov. Selection maximizes mean yield across the common complete years of a class. Map DOY uses a non-leap reference year; annual tables and farm outputs retain actual dates/DOY. These are the best **tested** dates, not a continuous or daily optimization.

The succession objective is half normalized mean soybean yield plus half normalized mean maize yield. Each mean is divided by the best mean for that crop among the tested sequence dates in the same location/model/regime/ENSOclass. No grain prices, gross margin or sum of soybean and maize tonnes is used. A late maize planting is a zero outcome, not removed from the denominator.

ENSO uses historical NOAA ONI ERSSTv6 SON in the soybean sowing year, https://www.cpc.ncep.noaa.gov/data/indices/oni.ascii.txt , archived as `oni.txt` and hashed in the manifest. Classes warm≥0.5°C, cold≤−0.5°C, neutral otherwise. These are seasonal thermal classes, **not** official multi-season ENSO event classification, a forecast, or the newer operational RONI. Five crop years minimum is an exploratory display rule, not a statistical-power guarantee. Consecutive years within one event are dependent. Published calendar counts: warm10, neutral9, cold10.

Original pilot eligibility (superseded by the national PAM2025 mask): positive soybean and second-crop maize planted area in at least two of2023/24/25, IBGE PAM1612 and839, variable109, classification81, crop codes2713 and114254. Raw responses and the derived mask are archived. IBGE's '-' denotes absolute zero. Ten pilots qualify. Municipal coexistence does not prove succession on the same plot; Barreiras has a small second-crop maize area and is not presented as a dominant system.

## Farm simulation

Runs locally in a module WebWorker using Pyodide0.27.7, NumPy and pandas, and the same Python sources. A fixed NASA POWER proxy provides1995–31Aug2026 for validated coordinates; exact pilot coordinates use the archived same input. Nonpilot requests are cached by coordinate to four decimal places. If the server proxy is unavailable, the browser queries the same public NASA POWER endpoint directly with CORS; no other climate source is substituted. The server never receives the soil/management scenario; coordinate lookup is sent to NASA POWER. No account or personal identity is needed.

The establishment trigger is a **separate simplified0–20cm bucket**, initialized90days before the first allowed date and updated using precipitation and ET₀. Sowing starts the day after the user-entered end of sanitary fallow, only when PAW/TAW reaches the threshold; no fallback planting is forced on the last date. No irrigation is applied to the trigger. Both crop models use the selected date, their own90day spin-up and their own soil-water equations; the trigger is not represented as an observed sensor or their exact simulated topsoil state. Residue and Ksat only affect OSPy, not SIMPLE or this trigger. Soil depth, retention and CN are explicit. User-entered dates are not checked against current legal calendars or ZARC.

## Verification limits

Numerical tests cover water conservation, drought vs irrigated response, zero radiation, no-sowing years, missing weather rejection, leap-day handling, variable-depth geometry and complete published matrices. Local and browser simulations are smoke-tested. **These are software checks, not independent field calibration or validation.** Regions, cultivars, soil profiles, phenology and observed yields still require independent calibration/validation before agronomic recommendations or national yield-gap estimation. Soybean→wheat and triple cropping are not implemented yet.


## National expansion — 6 November 2026

`national_catalog.py` reads PAM2025 planted area: soybean2642 municipalities, maize5052, second-crop maize1832, wheat1033; soybean AND second-crop maize1374. The catalog union is5118. Presence is determined in the same year, without the earlier pilot 2-of-3-year rule. No municipal co-occurrence is presented as proof of a field rotation. This mask determines eligibility; the result maps are filled only with actual model outputs, with pending municipalities hatched.

`run_national.py` starts the full queue, downloads NASA POWER at each municipal coordinate, and writes one gzip checkpoint per municipality. It does not reuse another municipal yield or interpolate the pilot. It adds Sep–Nov maize sowing candidates alongside Jan–Mar candidates; these remain experimental dates, not regional agronomic windows. Missing inputs/model failures remain explicit and require review. Checkpoints must be reviewed and published separately; starting the queue does not update the public potential maps. Exact command and runtime location are in national-run.json.


## Municipal result maps — 6 November 2026

Yield Gap and Calendar now use municipal polygons, not point markers. Crop masks
come from positive planted area in PAM 2025, including the soybean × second-crop
maize intersection. Pending eligible municipalities are hatched; absence of a
model run is never zero yield. A state filter enlarges both maps.

`export_national.py --cache PATH` exports compact summaries and one lazily loaded
annual detail file per municipality. It accepts only complete, finite runs,
requires all 30 yield years and all 29 calendar years (or all years in an ENSO
class), and ranks dates only when every candidate has the same complete sample.
Pilot runs are remapped to IBGE IDs; newer national checkpoints supersede them.
The filled polygon represents the municipality's model coordinate with common
soil assumptions, not a spatial average.

New NASA POWER downloads are currently blocked by this execution environment's
network policy. `run_national.py --cached-only` processes downloaded forcing
without accessing the network. The older Drive climate grid has separate daily meteorological and ET0-input
files (radiation and pressure). The inspected pair ends in July 2024 and has
early radiation gaps, so it cannot silently replace the 1995–2026 forcing.
A change of reference period and verification of spatial coverage would be
required before using this cache nationally. National coverage is incomplete until these data
and remaining runs are available. No automatic publication is configured.
