Every restoration project sells a forecast before it sells a tonne. The ex-ante library is the code that produces TREEO's version of that forecast, and because it is open source, the calculation chain can be inspected rather than trusted.
What the Modules Do
ex_ante/
├── coredb_trees/ species, growth parameters, wood density
├── csi_tree/ individual tree growth and carbon state
├── plot/ plot geometry, spacing, spatial configuration
├── population_tco2/ aggregation from trees to tCO2e at project scale
├── ui/ interactive configuration
└── utils/ shared conversion and [validation](/blog/validation-versus-verification/) helpersThe separation is the interesting part. Individual tree growth, plot geometry and population aggregation are distinct stages rather than one formula — which is what lets a mixed planting with different species at different spacings be modelled without pretending it is uniform.
From One Tree to a Project Total
The chain runs in the same order as the physical reality it describes.
A species record supplies growth parameters and wood density. A tree's state at a given age comes from the growth trajectory. The allometric relationship converts dimensions to biomass, wood density converts to mass, and the carbon fraction converts to carbon. Plot geometry determines how many trees occupy a hectare and how they compete. Population aggregation scales to the project and applies survival.
| Stage | Input | Principal uncertainty |
|---|---|---|
| Species parameters | Growth curve, density | Provenance of the source data |
| Tree state | Age, growth model | Model transferability to the site |
| Biomass conversion | Allometric equation | Calibration range fit |
| Plot configuration | Spacing, density | Competition effects |
| Population scaling | Survival rate | The single largest assumption |
Why Survival Sits at the End
Survival is applied at the population stage rather than baked into the growth curve, and that ordering is deliberate. It keeps the assumption visible and adjustable.
A model that folds mortality into growth produces one number and hides the parameter that most affects it. Keeping survival separate means a sensitivity run can vary it directly — and as covered elsewhere, survival is usually the assumption that moves the result most.
Maximum Density and Self-Thinning
The library ships a maximum stems-per-hectare reference by species. That constraint prevents a common modelling error: projecting a dense planting forward without accounting for the competition-driven mortality that any real stand experiences.
A forecast that ignores self-thinning grows indefinitely on paper and plateaus in reality — which is precisely the divergence that shows up at first verification.
Why Open Source Matters Here
An ex-ante forecast is an argument made to investors, buyers and validators. An argument built on inspectable code is a different kind of claim from one built on a spreadsheet nobody outside the project has seen.
It also means a verifier can reproduce the calculation rather than accept its output — which is the same standard this content applies to measurement generally.
Sources
1. ex_ante library — https://github.com/miqbalf/ex_ante 2. IPCC 2006 Guidelines Vol. 4 (AFOLU) — https://www.ipcc-nggip.iges.or.jp/public/2006gl/vol4.html 3. Verra methodologies — https://verra.org/methodologies/
Turn uncertainty into a plan
Sampling design and growth assumptions decide how much measured carbon survives conservative deduction. TREEO Carbon Simulator models sequestration scenarios and biomass growth before the field season.



