| ModvegeSite | R Documentation |
Implements the ModVege grass growth model based off of Jouven et al. (2006).
This class contains model and site parameters and state variables as attributes and has methods for running ModVege with weather and management input.
Use the run() method to carry out a simulation for a given year. The
results are stored in the state variables in this instance and can be written
to file using write_output().
See Jouven et al. (2006) for a thorough description of all model variables.
BM
Standing biomass in kg DM per ha.
BMG
Standing green biomass (kg DM / ha).
cBM
Cumulativeley grown biomass (kg DM / ha).
dBM
Daily grown biomass (kg DM / ha).
hvBM
Cumulative harvested biomass (kg DM / ha).
OMD
Organic matter digestibility (kg / kg).
OMDG
OMD of green matter (kg / kg).
ST
Temperature sum in degree Celsius days.
REP Reproductive function. Gives the fraction of growth that is
assigned to reproductive growth. The remainder goes into vegetative growth.
Dimensionless.
PGRO
Potential growth in kg DM / ha.
GRO
Effective growth in kg DM / ha.
LAI
Leaf area index, accounting for the proportion of light intercepted by the
sward. Dimensionless.
LAIGV
LAI of green vegetative biomass. Dimensionless.
AET
Actual evapotranspiration in mm.
WR
Water reserves in mm.
ENV
Function representing environmental effects on growth. Acts as a
multiplicative factor. Dimensionless.
ENVfPAR
Part of ENV due to strength of incident radiation. Dimensionless.
ENVfT
Part of ENV due to temperature. Dimensionless.
ENVfW
Part of ENV due to water limitation. Dimensionless.
AgeGV Age of green vegetative matter in degree Celsius days.
AgeGR Age of green reproductive matter in degree Celsius days.
AgeDV Age of dead vegetative matter in degree Celsius days.
AgeDR Age of dead reproductive matter in degree Celsius days.
BMGV biomass of GV (kg DM per ha).
BMGR biomass of GR (kg DM per ha).
BMDV biomass of DV (kg DM per ha).
BMDR biomass of DR (kg DM per ha).
BMDR biomass of DR (kg DM per ha).
SENG senescence of GV (kg DM per ha).
SENG senescence of GR (kg DM per ha).
ABSG abscission of DV (kg DM per ha).
ABSG abscission of DR (kg DM per ha).
ST thermal time (degree days).
cBM cumulative total biomass (kg per ha).
time_stepUsed time step in the model in days (untested).
state_variable_namesVector containing the names of the model's state variables.
n_state_variablesNumber of state variables.
versionVersion number of the growR package. Is written into output files.
site_nameName of the site to be simulated.
run_nameName of the simulation run. Used to distinguish between different runs at the same site.
yearYear to be simulated.
days_per_yearNumber of days in this year.
j_start_of_growing_seasonIndex (DOY) of the day the growing season was determined to begin.
cut_heightHeight of remaining grass after cut in m.
parametersA ModvegeParameters object.
determine_cutFunction used to decide whether a cut occurs on a given DOY. Is overloaded depending on whether management data is provided or not.
cut_DOYsList of DOYs on which a cut occurred.
cut_during_growth_preriodBoolean to indicate whether a cut occurred during the growth period, in which case reproductive growth is stopped.
last_DOY_for_initial_cutautocut Start cutting after this DOY, even if yield target is not reached.
max_cut_periodautocut Maximum period to wait between subsequent cuts.
dry_precipitation_limitautocut Maximum amount of allowed precipitation (mm) to consider a day.
dry_days_before_cutautocut Number of days that shold be dry before a cut is made.
dry_days_after_cutautocut Number of days that shold be dry after a cut is made.
max_cut_delayautocut Number of days a farmer is willing to wait for dry conditions before a cut is made anyways.
cut_delaysautocut Vector to keep track of cut delay times. wait for dry conditions before a cut is made anyways.
dry_windowautocut Logical that indicates if DOY at index is considered dry enough to cut.
target_biomassautocut Biomass amount that should to be reached by given DOY for a cut to be made.
end_of_cutting_seasonautocut Determined DOY after which no more cuts are made.
BM_after_cutautocut Amount of biomass that remains after a cut (determined through cut_height and biomass densities BDGV, BDDV, BDGR, BDDR).
weatherA list created by a WeatherData object's
get_weather_for_year() method.
managementA list containing management data as returned by
ModvegeEnvironment's get_environment_for_year() method. If its
is_empty field is TRUE, the autocut routine will be employed.
new()Constructor
ModvegeSite$new(parameters, site_name = "-", run_name = "-")
parametersA ModvegeParameters object.
site_namestring Name of the simulated site.
run_namestring Name of the simulation run. Used to differentiate between different simulation conditions at the same site. Defaults to "-", which indicates no specific run name.
get_weather()Return weather data if it exists
ModvegeSite$get_weather()
The WeatherData object, if it exists.
get_management()Return management data if it exists
ModvegeSite$get_management()
The ManagementData object, if it exists.
set_SGS_method()Choose which method to be used for determination of SGS
Options for the determination of the start of growing season (SGS) are:
Multicriterial thermal definition,
start_of_growing_season_mtd()
Commonly used, simple SGS definition based on
temperature sum, start_of_growing_season()
ModvegeSite$set_SGS_method(method)
methodstr Name of the method to use. Options: "MTD", "simple".
none
determine_cut_from_input()Read from the input whether a cut occurs on day DOY.
ModvegeSite$determine_cut_from_input(DOY)
DOYInteger day of the year for which to check.
Boolean TRUE if a cut happens on day DOY.
determine_cut_automatically()Decide based on simple criteria whether day of year DOY would be a good day to cut.
This follows an implementation described in Petersen, Krischan, David Kraus, Pierluigi Calanca, Mikhail A. Semenov, Klaus Butterbach-Bahl, and Ralf Kiese. “Dynamic Simulation of Management Events for Assessing Impacts of Climate Change on Pre-Alpine Grassland Productivity.” European Journal of Agronomy 128 (August 1, 2021): 126306. https://doi.org/10.1016/j.eja.2021.126306.
The decision to cut is made based on two criteria.
First, it is checked whether a target biomass is reached on given
DOY. The defined target depends on the DOY and is given through
:func:get_target_biomass. If said biomass is present, return TRUE.
Otherwise, it is checked whether a given amount of time has passed
since the last cut. Depending on whether this is the first cut of
the season or not, the relevant parameters are
:int:last_DOY_for_initial_cut and :int:max_cut_period.
If that amount of time has passed, return TRUE, otherwise return
FALSE.
ModvegeSite$determine_cut_automatically(DOY)
DOYInteger day of the year for which to make a cut decision.
Boolean TRUE if a cut happens on day DOY.
get_target_biomass()Get target value of biomass on given DOY, which determines whether a cut is to occur.
The regression for the target biomass is based on Fig. S2 in the supplementary material of Petersen, Krischan, David Kraus, Pierluigi Calanca, Mikhail A. Semenov, Klaus Butterbach-Bahl, and Ralf Kiese. “Dynamic Simulation of Management Events for Assessing Impacts of Climate Change on Pre-Alpine Grassland Productivity.” European Journal of Agronomy 128 (August 1, 2021): 126306. https://doi.org/10.1016/j.eja.2021.126306.
A refinement to expected yield as function of altitude has been implemented according to Table 1a in Huguenen-Elie et al. "Düngung von Grasland", Agrarforschung Schweiz, 8, (6), 2017, https://www.agrarforschungschweiz.ch/2017/06/9-duengung-von-grasland-grud-2017/
ModvegeSite$get_target_biomass(DOY, intensity = "high")
DOYInteger day of the year to consider.
intensityOne of ("high", "middle", "low") specifying management intensity.
target Biomass (kg / ha) that should be reached on day DOY for this management intensity.
run()Carry out a ModVege simulation for one year.
ModvegeSite$run(year, weather, management)
yearInteger specifying the year to consider.
weatherWeather list for given year as returned by
WeatherData$get_weather_for_year.
managementManagement list for given year as provided by
ModvegeEnvironment$get_environment_for_year().
None Fills the state variables of this instance with the
simulated values. Access them programmatically or write them to
file using write_output().
write_output()Write values of ModVege results into given file.
A header with metadata is prepended to the actual data.
ModvegeSite$write_output(filename, force = FALSE)
filenamePath or name of filename to be created or overwritten.
forceBoolean If TRUE, do not prompt user before writing.
None Writes simulation results to file filename.
set_parameters()Savely update the values in self$parameters.
This is just a shorthand to the underlying ModvegeParameters
object's set_parameters() function. Special care is taken to
account for potential changes to functional group weights.
ModvegeSite$set_parameters(params)
paramsList of name-value pairs of the parameters to update.
None Updates this object's parameter values.
plot()Create an overview plot for 16 state variables.
Creates a simple base R plot showing the temporal evolution of 16 modeled state variables.
Can only be sensibly run after a simulation has been carried out,
i.e. after this instance's run() method has been called.
ModvegeSite$plot(...)
...Further arguments are discarded.
NULL Creates a plot of the result in the active device.
plot_bm()Create an overview plot for biomass.
Creates a simple base R plot showing the BM with cutting events and,
if applicable, target biomass, dBM, cBM and hvBM.
Can only be sensibly run after a simulation has been carried out,
i.e. after this instance's run() method has been called.
ModvegeSite$plot_bm(smooth_interval = 28, ...)
smooth_intervalInt. Number of days over which the variable
dBM is smoothened.
...Further arguments are discarded.
NULL Creates a plot of the result in the active device.
plot_limitations()Create an overview plot of limiting factors.
Creates a simple base R plot showing the different environmental
limitation functions over time.
Can only be sensibly run after a simulation has been carried out,
i.e. after this instance's run() method has been called.
ModvegeSite$plot_limitations(...)
...Further arguments are discarded.
NULL Creates a plot of the result in the active device.
plot_water()Create an overview plot of the water balance.
Creates a simple base R plot showing different variables pertaining to the water balance, namely water reserves WR, actual evapotranspiration AET, leaf area index LAI and LAI of the green vegetative compartment LAIGV.
Can only be sensibly run after a simulation has been carried out,
i.e. after this instance's run() method has been called.
ModvegeSite$plot_water(...)
...Further arguments are discarded.
NULL Creates a plot of the result in the active device.
plot_growth()Create an overview plot of growth dynamics.
Creates a simple base R plot showing different variables pertaining to the growth dynamics, namely potential growth PGRO, effective growth GRO, the reproductive function REP and the temperature sum ST.
Can only be sensibly run after a simulation has been carried out,
i.e. after this instance's run() method has been called.
ModvegeSite$plot_growth(...)
...Further arguments are discarded.
NULL Creates a plot of the result in the active device.
plot_var()Plot the temporal evolution of a modeled state variable.
ModvegeSite$plot_var(var, ...)
varString. Name of the state variable to plot.
...Further arguments are passed to the base plot() function.
None, but plots to the current device.
clone()The objects of this class are cloneable with this method.
ModvegeSite$clone(deep = FALSE)
deepWhether to make a deep clone.
jouven2006ModelPredictingDynamicsgrowR
autocut
start_of_growing_season_mtd(), start_of_growing_season()
get_target_biomass()
ModvegeParameters$set_parameters()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.