| Type: | Package |
| Title: | Carbon Use Model for Yield and Brix Assessment in Processing Tomato |
| Version: | 0.1.0 |
| Description: | A daily time-step crop model for processing tomato that simulates thermal time, phenology, root growth, a three-layer soil-water balance, carbon accumulation modulated by heat, cold and water stress, and predicts fresh-fruit yield and Brix at harvest. Two top-level entry points are provided: cumba_experiment() replays observed irrigation schedules (used for calibration), and cumba_scenario() runs the model in deficit-irrigation scenario mode, with irrigation triggered automatically when the crop water status falls below phase-specific thresholds. Methods build on Yan and Hunt (1999) <doi:10.1006/anbo.1999.0955>, Zhao et al. (2019) <doi:10.1016/j.eja.2019.01.009>, Casadebaig et al. (2011) <doi:10.1016/j.agrformet.2010.09.012> and Prudent et al. (2010) <doi:10.1093/jxb/erq318>; the field dataset used for calibration is described in Carucci et al. (2024) <doi:10.1016/j.dib.2024.110225>. |
| License: | GPL-3 |
| URL: | https://github.com/GeoModelLab/cumba, https://GeoModelLab.github.io/cumba/ |
| BugReports: | https://github.com/GeoModelLab/cumba/issues |
| RoxygenNote: | 7.3.3 |
| Encoding: | UTF-8 |
| Imports: | crayon, dplyr, lubridate, tibble |
| Depends: | R (≥ 4.1) |
| LazyData: | true |
| Suggests: | knitr, rmarkdown, ggplot2, testthat (≥ 3.0.0) |
| VignetteBuilder: | knitr |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2026-11-01 11:37:22 UTC; Administrator |
| Author: | Simone Bregaglio |
| Maintainer: | Simone Bregaglio <simoneugomaria.bregaglio@crea.gov.it> |
| Repository: | CRAN |
| Date/Publication: | 2026-11-19 11:10:12 UTC |
cumba: Carbon Use Model for Yield and Brix Assessment in Processing Tomato
Description
A daily time-step crop model for processing tomato that simulates phenology,
a three-layer soil-water balance, and fresh-fruit yield and Brix. Two entry
points are provided: cumba_experiment, which replays observed
irrigation schedules (for calibration), and cumba_scenario,
which schedules deficit irrigation automatically when the crop water
status (1 minus the water stress index) falls below phase-specific
thresholds.
Author(s)
Maintainer: Simone Bregaglio simoneugomaria.bregaglio@crea.gov.it (ORCID)
Authors:
See Also
Useful links:
Report bugs at https://github.com/GeoModelLab/cumba/issues
Model Parameters for Cumba
Description
This dataset contains the model parameters used in the Cumba package: RUE, Theat, k0 and FruitWaterContentDecreaseMax hold the values calibrated on the bundled tomatoFoggia experiments, the others literature or measured defaults. Each element corresponds to a model parameter and includes its description, current value, minimum, and maximum.
Usage
cumbaParameters
Format
A named list where each entry is a list with:
- description
Text description of the parameter
- value
The parameter value (calibrated or default)
- min
The minimum allowed value
- max
The maximum allowed value
Examples
names(cumbaParameters)
cumbaParameters$Tbase$value
CUMBA model - experiment runner
Description
Runs the daily time-step CUMBA simulation for one or more sites/experiments, computing tomato yield and Brix from weather inputs and irrigation options. The function validates inputs, converts a list-of-lists parameter object to a tibble of numeric values when needed, and prints a blue message indicating it is running in *experiment* mode.
Usage
cumba_experiment(
weather,
param,
estimateRad = TRUE,
estimateET0 = TRUE,
irrigation_df,
irrigationEfficiency = 0.9,
fullOut = FALSE,
verbose = FALSE
)
Arguments
weather |
A |
param |
Model parameters. Either:
The object must contain (as names/columns) all of:
|
estimateRad |
Logical. If |
estimateET0 |
Logical. If |
irrigation_df |
A |
irrigationEfficiency |
Numeric (0-1). Fraction of the observed applied
water ( |
fullOut |
Logical. If |
verbose |
Logical. If |
Details
On start, the function prints "CUMBA running in experiment mode" in
blue (via crayon). It checks that all required columns/elements are
present and throws informative errors if anything is missing. Sites are
inferred from the unique values of weather$Site.
If param is supplied as a list-of-lists with a value field,
it is converted internally with tibble::as_tibble(lapply(param, `[[`, "value")).
Value
A data.frame containing the input weather plus the
daily CUMBA outputs per site and date; the set of columns depends on
fullOut.
Required inputs
weather: must include columns Site, Tx, Tn,
P, DATE. Depending on the flags:
if
estimateRad = TRUE(default), columnLatis required;if
estimateRad = FALSE, columnRadis required;if
estimateET0 = FALSE, columnET0is required.
irrigation_df: must include columns ID, Site,
YEAR, DATE, WVOL.
See Also
Examples
data(tomatoFoggia)
data(cumbaParameters)
# Replay one growing season from the bundled field dataset
wx <- subset(tomatoFoggia$weather, format(DATE, "%Y") == "2018")
out <- cumba_experiment(wx, cumbaParameters,
irrigation_df = tomatoFoggia$irrigation)
head(out)
CUMBA model - automatic irrigation scenario runner
Description
Runs the daily time-step CUMBA simulation in scenario (automatic
irrigation) mode. Unlike cumba, which requires an observed
irrigation schedule, cumba_scenario computes irrigation
autonomously based on the crop water stress index, phenological stage, and
user-defined stress thresholds. This is the function used by the CUMBA
Shiny app for decision support and what-if analysis.
Usage
cumba_scenario(
weather,
param,
estimateRad = TRUE,
estimateET0 = TRUE,
transplantingDOY = 120,
irrigationStrategy = list(vegetative = list(wsLevel = 0.5, turnMin = 2), reproductive =
list(wsLevel = 0.5, turnMin = 2), ripening = list(wsLevel = 0.5, turnMin = 2)),
irrigationStopCycle = 100,
irrigationEfficiency = 0.9,
fullOut = FALSE,
irrigationOverride = NULL,
verbose = FALSE
)
Arguments
weather |
A |
param |
Model parameters. Either a named list where each
element is itself a list with fields |
estimateRad |
Logical. If |
estimateET0 |
Logical. If |
transplantingDOY |
Integer. Day of year (1-365) of transplanting.
The model starts accumulating GDD and running the water balance from
this day. Default |
irrigationStrategy |
A named list with three phenological phases -
Default: all phases use |
irrigationStopCycle |
Numeric (0-100). Cycle-completion percentage
beyond which automatic irrigation is suppressed regardless of crop water
status. Useful to implement a cut-off irrigation strategy near harvest.
Default |
irrigationEfficiency |
Numeric (0-1). Fraction of applied water that
effectively reaches the root zone. Default |
fullOut |
Logical. If |
irrigationOverride |
A
Default |
verbose |
Logical. If |
Details
On each simulated day the model: (1) updates the two-layer soil-water
balance; (2) computes the water-stress index WSI from the fraction
of transpirable soil water (FTSW), and its complement ws = 1 - WSI;
(3) decides whether to irrigate - irrigation is applied when
ws < wsLevel for the current
phase, at least turnMin days have elapsed since the last event,
cycleCompletion < irrigationStopCycle, and the crop is in an active
phenological phase (phenoCode > 0); (4) applies
irrigationEfficiency so that the gross applied volume equals
net deficit / efficiency while only the net fraction enters the
soil; (5) computes biomass accumulation, fruit growth, and Brix dynamics.
Any irrigationOverride entries are applied after the automatic
decision and before the water-balance update, so they correctly propagate
to soil moisture in subsequent days.
The function prints "CUMBA running in deficit irrigation mode" in
blue (via crayon) when called.
Value
A data.frame of daily outputs. When fullOut = FALSE
(default) the columns are: site, year, doy,
p (precipitation, mm), irrigation (mm),
stage (phenological stage label), swc (soil water
content, %), yield (fruit fresh weight, t/ha), brix
(degrees Brix). When fullOut = TRUE, all internal state variables
are included.
Required weather columns
weather must contain Site, Tx, Tn, P,
DATE. Additionally:
if
estimateRad = TRUE(default),Latis required;if
estimateRad = FALSE,Radmust be present;if
estimateET0 = FALSE,ET0must be present.
See Also
cumba for the experiment-mode runner that requires
an observed irrigation schedule; cumbaParameters for the
default parameter set.
Examples
data(tomatoFoggia)
data(cumbaParameters)
# Autonomous deficit-irrigation scenario on one growing season
wx <- subset(tomatoFoggia$weather, format(DATE, "%Y") == "2018")
out <- cumba_scenario(
weather = wx,
param = cumbaParameters,
transplantingDOY = 120,
irrigationStrategy = list(
vegetative = list(wsLevel = 0.5, turnMin = 4),
reproductive = list(wsLevel = 0.5, turnMin = 4),
ripening = list(wsLevel = 0.5, turnMin = 4)
)
)
head(out)
Tomato field trial data from Foggia (Italy)
Description
A dataset containing weather, irrigation, management, and production data from processing tomato field trials conducted near Foggia (Apulia, Italy). The dataset is organized as a list of four data frames.
Usage
tomatoFoggia
Format
A list of four data frames:
weatherDaily weather data with columns: DATE (POSIXct), Tx (max temp, degC), Tn (min temp, degC), P (precipitation, mm), Rad (radiation, MJ m-2 d-1), RHx (max RH, Date (Date), Site ("Foggia"), Lat (latitude, numeric).
irrigationIrrigation records with columns: ID (plot id), DATE (POSIXct), WVOL (mm), YEAR, CV (cultivar), TRANS (transplanting, POSIXct), HARV (harvest, POSIXct), IRR_M (management, e.g. "50 Site ("Foggia").
managementPlot identifiers and treatments with columns: ID, YEAR, CV, TRANS (POSIXct), HARV (POSIXct), IRR_M.
productionProduction and quality data with columns: ID, yield_ref (t ha-1), yield_ref_sd (t ha-1), brix_ref (degBrix), brix_ref_sd (degBrix).
Source
Carucci et al. (2024) doi:10.1016/j.dib.2024.110225
Examples
data(tomatoFoggia)
str(tomatoFoggia)
head(tomatoFoggia$weather)