An options manager for configuring canola model parameters. This object provides methods to get and set canola related parameters.
canolaAn object of class list of length 3.
Cardinal temperatures for thermal time calculation. Default: c(2, 30, 35)
Effective thermal time at corresponding cardinal temperatures. Default: c(0, 28, 0)
Cardinal temperatures for vernalisation time calculation. Default: c(0, 2, 8, 15)
Effective vernalisation time at corresponding cardinal temperatures. Default: c(0, 1, 0.5, 0.0)
Retrieve the value of an option by its key (e.g., "phenology.thermal_time.x")
Set the value of an option by its key
Reset all options to their default values
# Get default thermal time cardinal temperatures
canola$get("phenology.thermal_time.x")
#> [1] 2 30 35
# Get default vernalisation time parameters
canola$get("phenology.vernalisation_time.x")
#> [1] 0 2 8 15
canola$get("phenology.vernalisation_time.y")
#> [1] 0.0 1.0 0.5 0.0
# Set custom values
canola$set("phenology.thermal_time.x" = c(0, 25, 40))
canola$set("phenology.thermal_time.y" = c(0, 25, 0))
# Reset to defaults
canola$reset()