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).

farmplot.jl

This file is responsible for the farm plots, i.e. the indidivual fields that farmers manage.

Persefone.cropcoverMethod
cropcover(model, position)

Return the crop cover of the crop at this position, or nothing if there is no crop here (utility wrapper).

source
Persefone.cropgroupMethod
cropgroup(model, position)

Return the group of the crop at this position, or an empty string if there is no crop here (utility wrapper).

source
Persefone.cropheightMethod
cropheight(model, position)

Return the height of the crop at this position, or nothing if there is no crop here (utility wrapper).

source
Persefone.cropnameMethod
cropname(model, position)

Return the name of the crop at this position, or NA if there is no crop here (utility wrapper).

source
Persefone.croptypeMethod
croptype(model, position)

Return the crop at this position, or nothing if there is no crop here (utility wrapper).

source
Persefone.sow!Method
sow!(farmplot, model, cropname)

Sow the specified crop on the farmplot.

source
Persefone.@sowMacro
@sow(cropname)

Sow the named crop on the current field. Requires the variables field and model.

source

cropmodels.jl

This initialises the crop models and the farmplots at the beginning of the simulation.

Persefone.initcropmodelsMethod
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.

source

almass.jl

This file reimplements the ALMaSS vegetation submodel.

Base.tryparseMethod
Base.tryparse(type, str)

Extend tryparse to allow parsing GrowthPhase values. (Needed to read in the CSV parameter file.)

source
Persefone.ALMaSS.readcropparametersMethod
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).

source
Persefone.sow!Method
sow!(cropstate, model, cropname)

Change the cropstate to sow the specified crop.

source

aquacrop.jl

This file integrates the AquaCrop model (implemented in a separate pacakge) into Persefone.

Persefone.AquaCropWrapper.readcropparametersMethod
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/crop/aquacrop/regions/jena/winter_wheat.toml can be used to overload the parameters of the Persefone crop "winter wheat" for the "jena" region
source
Persefone.sow!Method
sow!(cropstate, model, cropname)

Change the cropstate to sow the specified crop.

source