Crop submodel
Persefone reimplements two different crop models for different purposes. AquaCrop is a well-established crop growth model developed by the FAO, which provides quite reliable estimates of plant growth but is data-intensive to parameterise. The vegetation submodel of ALMaSS is much simpler, but also less reliable. Accordingly, we use AquaCrop for our main crop types, and ALMaSS for the rest (especially grass growth).
cropnames.jl
This provides a unified name list of crop types that can potentially be simulated by Persefone.jl.
Persefone.cropgroup — Method
cropgroup(cropname)Return the CropGroup that this crop belongs to.
farmplot.jl
This file is responsible for the farm plots, i.e. the indidivual fields that farmers manage.
Persefone.harvest! — Method
harvest!(farmplot, model)Harvest the crop of this farm plot (i.e. a landscape polygon with a cropstate).
Persefone.sow! — Method
sow!(farmplot, model, cropname)Sow the specified crop on a farm plot (i.e. a landscape polygon with a cropstate).
Persefone.stepagent! — Method
stepagent!(le::LandscapeElement, model)Update the vegetation in a landscape polygon using the crop model (if applicable).
Persefone.@harvest — Macro
@harvest()Harvest the current field. Requires the variables field and model.
Persefone.@sow — Macro
@sow(cropname)Sow the named crop on the current field. Requires the variables field and model.
cropmodels.jl
This initialises the crop models and the farmplots at the beginning of the simulation.
Persefone.initcropmodels — Method
initcropmodels(cropmodels, cropdirectory; region)Initialise the crop models given as a comma-delimited string (e.g. "almass,aquacrop"). The crop model parameters are read from the cropdirectories, also a comma-delimited string. Returns the crop types available in the simulation.
Persefone.initfields! — Method
initfields!(model)Identify all arable and grassland landscape polygons and save their IDs for quick reference.
almass.jl
This file reimplements the ALMaSS vegetation submodel.
Persefone.ALMaSS.temperature_to_solar_conversion_c3 — Constant
Temperature to solar conversion factor for C3 plants.
Persefone.ALMaSS.temperature_to_solar_conversion_c4 — Constant
Temperature to solar conversion factor for C4 plants.
Persefone.ALMaSS.CropCurveParams — Type
CropCurveParamsThe values in this struct define one crop growth curve.
Persefone.ALMaSS.CropState — Type
CropStateThe state data for an ALMaSS vegetation point calculation.
Persefone.ALMaSS.CropType — Type
CropTypeThe type struct for all crops. Currently follows the crop growth model as implemented in ALMaSS.
Persefone.ALMaSS.GrowthPhase — Type
GrowthPhaseALMaSS crop growth curves are split into five phases, triggered by seasonal dates or agricultural events.
Base.tryparse — Method
Base.tryparse(type, str)Extend tryparse to allow parsing GrowthPhase values. (Needed to read in the CSV parameter file.)
Persefone.ALMaSS.buildgrowthcurve — Method
buildgrowthcurve(data)Convert a list of rows from the crop growth data into a CropCurveParams object.
Persefone.ALMaSS.readcropparameters — Method
readcropparameters(cropdirectory)Parse a CSV file containing the required parameter values for each crop (as produced from the original ALMaSS file by convert_almass_data.py).
Persefone.ALMaSS.setphase! — Method
setphase!(cropstate, phase)Set the growth phase of an ALMaSS cropstate.
Persefone.ALMaSS.solar_conversion_c3 — Method
solar_conversion_c3(temperature)Solar conversion factor (no units) for C3 plants.
Persefone.ALMaSS.solar_conversion_c4 — Method
solar_conversion_c3(temperature)Solar conversion factor (no units) for C4 plants.
Persefone.harvest! — Method
harvest!(cropstate, model)Harvest the crop of this cropstate.
Persefone.sow! — Method
sow!(cropstate, model, cropname)Change the cropstate to sow the specified crop.
Persefone.stepagent! — Method
stepagent!(cropstate, model)Update a farm plot by one day.
aquacrop.jl
This file integrates the AquaCrop model (implemented in a separate pacakge) into Persefone.
Persefone.AquaCropWrapper.readcropparameters — Method
readcropparameters(cropdirectory; region)Read parameters needed for the AquaCrop crop module in Persefone:
- a CSV file crop_data.csv containing some parameters required to map
AquaCrop crop names to Persefone crop names, as well as additional crop data needed for Persefone (cropgroup, minsowdate, maxsowdate)
- modified crop parameters for each region, e.g. the file
data/crops/aquacrop/regions/jena/winter_wheat.tomlcan be used to overload the parameters of the Persefone crop "winter wheat" for the "jena" region (falls back to Germany-wide parameters, then defaults)
Persefone.AquaCropWrapper.weightedmean — Method
weightedmean(weights, params)Weighted mean for AquaCrop parameter containers (AbstractParametersContainer), combining numeric fields and recursing into nested containers.
Persefone.harvest! — Method
harvest!(cropstate, model)Harvest the crop of this cropstate.
Persefone.sow! — Method
sow!(cropstate, model, cropname)Change the cropstate to sow the specified crop.
Persefone.stepagent! — Method
stepagent!(cropstate, model)Update a crop state by one day.