| Title: | Crop-Specific Functions and Parameters for APSIM Next Generation Chickpea Model |
|---|---|
| Description: | Provides chickpea-specific functions, processes and parameter sets used by chickpea model in the Agricultural Production Systems sIMulator ('APSIM') Next Generation. Includes tools for crop process calculations, parameter management and customisation, enabling users to explore, modify and apply chickpea model components. |
| Authors: | Bangyou Zheng [aut, cre] |
| Maintainer: | Bangyou Zheng <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-09-24 10:33:53 UTC |
| Source: | https://github.com/byzheng/rapsimng.chickpea |
An options manager for configuring chickpea model parameters. This object provides methods to get and set chickpea related parameters.
chickpeachickpea
An option manager object for configuring chickpea model parameters.
Cardinal temperatures for thermal time calculation. Default: c(2, 30, 35)
Effective thermal time at corresponding cardinal temperatures. Default: c(0, 28, 0)
Method used for thermal time calculation. Supported values: "3hr" and "HourlySinPpAdjusted". Default: "HourlySinPpAdjusted"
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 chickpea$get("phenology.thermal_time.x") # Get default vernalisation time parameters chickpea$get("phenology.vernalisation_time.x") chickpea$get("phenology.vernalisation_time.y") # Set custom values chickpea$set("phenology.thermal_time.x" = c(0, 25, 40)) chickpea$set("phenology.thermal_time.y" = c(0, 25, 0)) # Reset to defaults chickpea$reset()# Get default thermal time cardinal temperatures chickpea$get("phenology.thermal_time.x") # Get default vernalisation time parameters chickpea$get("phenology.vernalisation_time.x") chickpea$get("phenology.vernalisation_time.y") # Set custom values chickpea$set("phenology.thermal_time.x" = c(0, 25, 40)) chickpea$set("phenology.thermal_time.y" = c(0, 25, 0)) # Reset to defaults chickpea$reset()
Calculate thermal time using cardinal temperatures
thermal_time( mint, maxt, x_temp = chickpea$get("phenology.thermal_time.x"), y_temp = chickpea$get("phenology.thermal_time.y"), method = chickpea$get("phenology.thermal_time.method"), ... )thermal_time( mint, maxt, x_temp = chickpea$get("phenology.thermal_time.x"), y_temp = chickpea$get("phenology.thermal_time.y"), method = chickpea$get("phenology.thermal_time.method"), ... )
mint |
The minimum temperature |
maxt |
The maximum temperature |
x_temp |
The cardinal temperatures using to calculate thermal time. The default values are c(2, 30, 35) defined in chickpea$get("phenology.thermal_time.x"). |
y_temp |
The effective thermal time at the corresponding cardinal temperatures. The default values are c(0, 28, 0) defined in chickpea$get("phenology.thermal_time.y"). |
method |
The method to calculate thermal time. The default is |
... |
Additional arguments passed to the underlying |
The daily thermal time is calculated by interpolating the effective thermal time at three hour intervals between the daily minimum and maximum temperatures, and then averaging these values to get the daily thermal time. For more information about the chickpea phenology model, see the APSIM Next Generation Chickpea Documentation.
The thermal time.
mint <- c(0, 10) maxt <- c(30, 40) date <- as.Date(c("2024-01-01", "2024-01-02")) thermal_time(mint, maxt, date = date, lat = -27)mint <- c(0, 10) maxt <- c(30, 40) date <- as.Date(c("2024-01-01", "2024-01-02")) thermal_time(mint, maxt, date = date, lat = -27)
Calculate vernalisation time using cardinal temperatures
vernalisation_days( mint, maxt, x_temp = chickpea$get("phenology.vernalisation_time.x"), y_temp = chickpea$get("phenology.vernalisation_time.y") )vernalisation_days( mint, maxt, x_temp = chickpea$get("phenology.vernalisation_time.x"), y_temp = chickpea$get("phenology.vernalisation_time.y") )
mint |
The minimum temperature |
maxt |
The maximum temperature |
x_temp |
The cardinal temperatures used to calculate vernalisation time. The default values are defined in chickpea$get("phenology.vernalisation_time.x"). |
y_temp |
The effective vernalisation time at the corresponding cardinal temperatures. The default values are defined in chickpea$get("phenology.vernalisation_time.y"). |
The daily vernalisation time is calculated by interpolating the effective vernalisation time at three hour intervals between the daily minimum and maximum temperatures, and then averaging these values to get the daily vernalisation time.
For more information about the Chickpea phenology model, see the APSIM Next Generation Chickpea Documentation.
The vernalisation time (days).
mint <- c(0, 10) maxt <- c(30, 40) vernalisation_days(mint, maxt)mint <- c(0, 10) maxt <- c(30, 40) vernalisation_days(mint, maxt)