Is it safe to reuse this water? ambre puts a number on it.
ambre (Approche Multi-Barrières pour la Réutilisation de l’Eau / Multi-Barrier Approach for Water Reuse) is an open-source R package for Quantitative Microbial Risk Assessment (QMRA) applied to the reuse of treated wastewater for agricultural irrigation.
Reusing treated wastewater to irrigate crops helps face water
scarcity, but only if it is safe. Before reusing water, we need to
perform risk analysis to define what could be done and how. In real
world, risk analysis rely mainly on qualitative assessment, but in labs
we use quantitative ones (QMRA), much more precise and helpful for
alternative scenarios comparison. But most QMRA tools are complex,
consider only one target population at a time, and account for water
treatment alone. ambre was built to go further:
ambre is not on CRAN yet. Install the development
version from the INRAE forge:
# install.packages("remotes")
remotes::install_git("https://forge.inrae.fr/reversaal/reut/ambre-package.git")A reuse scenario (crops, exposed populations, treatment scheme…) is described in an Excel file. The package ships ready-to-run examples; use them as templates for your own scenarios.
The input file should contain the following values:
| CropName | Area | PopulationName | nb_population | PathName | STEPtreatmentName | CollectiveTreatmentName | InitialProcessName | SupplementaryProcessName | nb_day_decay |
|---|---|---|---|---|---|---|---|---|---|
| Tomato | 10 | Maintenance staff | 1 | Ingestion following direct contact with a part of the plant during crop maintenance, followed by hand-to-mouth contact | Q.1 - Activated Sludge | Q.2 - Maturation Pond | Q.6 - Chlorination | E.1.1 - Micro-sprinkler | NA |
| Corn seed | 35 | Maintenance staff | 1 | Ingestion following direct contact with a part of the plant during crop maintenance, followed by hand-to-mouth contact | Q.1 - Activated Sludge | Q.2 - Maturation Pond | Q.6 - Chlorination | P.5 - Natural die-off | 3 |
library(ambre)
plots <- run_qmra_treatment(
scenario_path = system.file("input_1culture_2pop.xlsx", package = "ambre"),
pathogen = c("Campylobacter jejuni", "Norovirus")
)
plots$dalys
plots$infection_probability
scenario <- create_scenario(system.file("input_1culture_2pop.xlsx", package = "ambre"))
regulation_concentration <- config_ambre$regulation$regulation_value |>
dplyr::filter(Country == "France") |>
dplyr::select(-c(Country, RegulationID, Reduction))
run_qmra_supplementary_process(scenario = scenario,
pathogen = c("Campylobacter jejuni"),
regulationConcentration = regulation_concentration )
# 3. Economic analysis of the scenario
run_economic_analysis(scenario = scenario,
price_per_m3 = 0.1,
membership_fee = 200,
grant = 0.5)run_qmra_initial_situation() and
run_qmra_supplementary_process() each return a named list
of ggplot objects (concentration,
volume, logreduction,
infection_probability, dalys,
regulation matrix) so you can inspect every step of the
assessment.
The engine behind ambre is an original
multi-barrier database that puts a number on
every measure a reuse scheme can place between the wastewater
and the people exposed to it — not just the treatment plant. It
operationalises the database built in Alice-Rose Thomas’s
PhD (INSA
Lyon, 2024; condensed in the thesis’ Tableau 13) and used
in her Multiware participatory simulation tool (Thomas et al., 2024,
TSM).
International guidance no longer frames “safe reuse” as a treatment-only problem:
E. coli ≤ 10
/ 100 / 1 000 / 10 000 per 100 mL) and explicitly lets a scheme meet
them through additional barriers rather than
ever-heavier treatment (EUR-Lex);E. coli thresholds ~100×) (Légifrance);ambre’s database turns that qualitative guidance into
computable numbers, adding two things the normative texts leave out:
per-pathogen-type reductions (rather than a single
E. coli indicator) and economic cost.
49 barriers, grouped into the four families of the thesis’ classification:
| Family | What it is | Examples |
|---|---|---|
| 🚰 Quality (17) | treatment processes that lower pathogen concentration | activated sludge, membrane bioreactor, maturation lagoon, sand / micro- / ultra-filtration combined with UV, chlorination or electro-oxidation |
| 🔧 Equipment (14) | physical means deployed on the scheme | micro-sprinkling, surface & subsurface drip, storage, partition cover, signage, access control, automatic irrigation, mechanised maintenance & harvest, PPE |
| 🌱 Cultivation & irrigation practices (12) | how the crop is grown, watered and prepared | 70 m buffer distance, natural die-off before harvest, night-time irrigation, stop-in-strong-wind, non-food crop choice, post-harvest cooking / drying / peeling / washing / disinfection |
| 🛠️ System operation (6) | keeps the chain working over time | training, awareness-raising, health monitoring, microbiological monitoring, equipment maintenance |
Each barrier is described by how it cuts risk and for whom:
Crucially, every entry is stored as a probability
distribution (uniform, normal, …) rather than a point estimate
— this is what powers ambre’s Monte-Carlo, multi-run engine
and lets it report a risk range. A few illustrations drawn from
the data:
The database ships as five CSVs in data-raw/, assembled
into the bundled config_ambre dataset:
File (data-raw/) |
config_ambre slot |
Content |
|---|---|---|
ambre_barriere_general.csv |
treatment$processes |
log₁₀ concentration reduction, per barrier × pathogen type |
ambre_barriere_voie.csv |
treatment$barriere_path |
exposure / volume reduction, per route × population |
ambre_barriere_specifique.csv |
treatment$barriere_specific |
crop-height-dependent credits (irrigation systems) |
ambre_barriere_deperissement.csv |
treatment$barriere_decay |
natural die-off, per crop height × population × pathogen |
ambre_barriere_cout.csv |
economic$cost |
capex / opex, with units |
run_qmra_initial_situation() credits only the curent
situation, while run_qmra_supplementary_process()
evaluates the additional measures relating to Quality,
Equipment, Practices and System operation.
That difference is the whole point of the multi-barrier approach:
reaching the WHO health target by combining measures
across the chain instead of over-treating the water.
ambre is developed with {fusen}: the source of
truth lives in the dev/flat_*.Rmd files.ambre is developed at INRAE (REVERSAAL). Its
barrier database builds on the PhD work of Alice-Rose
Thomas (Application de l’approche Multi-barrières pour la
réutilisation des eaux usées traitées, INSA Lyon, 2024) and
the associated Multiware tool.
Released under the MIT license.