| Title: | Carbon Use Model for Yield and Brix Assessment in Processing Tomato |
|---|---|
| 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>. |
| Authors: | Simone Bregaglio [aut, cre] (ORCID: <https://orcid.org/0000-0001-8381-2626>), Federica Carucci [aut], Luca Bechini [aut] (ORCID: <https://orcid.org/0000-0002-8152-6121>), Marcella Michela Giuliani [aut] (ORCID: <https://orcid.org/0000-0001-9014-1955>), Giuseppe Gatta [aut] (ORCID: <https://orcid.org/0000-0001-8381-7785>) |
| Maintainer: | Simone Bregaglio <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-11-19 13:41:46 UTC |
| Source: | https://github.com/cran/cumba |
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.
cumba_experiment( weather, param, estimateRad = TRUE, estimateET0 = TRUE, irrigation_df, irrigationEfficiency = 0.9, fullOut = FALSE, verbose = FALSE )cumba_experiment( weather, param, estimateRad = TRUE, estimateET0 = TRUE, irrigation_df, irrigationEfficiency = 0.9, fullOut = FALSE, verbose = FALSE )
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 |
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")).
A data.frame containing the input weather plus the
daily CUMBA outputs per site and date; the set of columns depends on
fullOut.
weather: must include columns Site, Tx, Tn,
P, DATE. Depending on the flags:
if estimateRad = TRUE (default), column Lat is required;
if estimateRad = FALSE, column Rad is required;
if estimateET0 = FALSE, column ET0 is required.
irrigation_df: must include columns ID, Site,
YEAR, DATE, WVOL.
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)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)
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.
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 )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 )
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 |
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.
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.
weather must contain Site, Tx, Tn, P,
DATE. Additionally:
if estimateRad = TRUE (default), Lat is required;
if estimateRad = FALSE, Rad must be present;
if estimateET0 = FALSE, ET0 must be present.
cumba for the experiment-mode runner that requires
an observed irrigation schedule; cumbaParameters for the
default parameter set.
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)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)
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.
cumbaParameterscumbaParameters
A named list where each entry is a list with:
Text description of the parameter
The parameter value (calibrated or default)
The minimum allowed value
The maximum allowed value
names(cumbaParameters) cumbaParameters$Tbase$valuenames(cumbaParameters) cumbaParameters$Tbase$value
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.
tomatoFoggiatomatoFoggia
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).
Carucci et al. (2024) doi:10.1016/j.dib.2024.110225
data(tomatoFoggia) str(tomatoFoggia) head(tomatoFoggia$weather)data(tomatoFoggia) str(tomatoFoggia) head(tomatoFoggia$weather)