Crop submodel
Eventually, the plan is to have Persefone include a reimplementation of the AquaCrop model, a well-established crop growth model developed by the FAO. Until then, we are using the crop growth submodel used in ALMaSS.
farmplot.jl
This file is responsible for the farm plots, i.e. the indidivual fields that farmers manage.
Persefone.FarmPlot
— TypeFarmPlot
This represents one field, i.e. a collection of pixels with the same management. This is the spatial unit with which the crop growth model and the farm model work.
Persefone.averagefieldsize
— Methodaveragefieldsize(model)
Calculate the average field size in hectares for the model landscape.
Persefone.cropheight
— Methodcropheight(model, position)
Return the height of the crop at this position, or nothing if there is no crop here (utility wrapper).
Persefone.cropname
— Methodcropname(model, position)
Return the name of the crop at this position, or an empty string if there is no crop here (utility wrapper).
Persefone.croptype
— Methodcroptype(model, position)
Return the crop at this position, or nothing if there is no crop here (utility wrapper).
Persefone.growcrop!
— Methodgrowcrop!(farmplot, model)
Apply the relevant crop growth model to update the plants on this farm plot. Currently only supports the ALMaSS crop growth model by Topping et al.
Persefone.harvest!
— Methodharvest!(farmplot, model)
Harvest the crop on this farmplot.
Persefone.initfields!
— Methodinitfields!(model)
Initialise the model with its farm plots.
Persefone.sow!
— Methodsow!(cropname, farmplot, model)
Sow the specified crop on this farmplot.
Persefone.stepagent!
— Methodstepagent!(farmplot, model)
Update a farm plot by one day.
crops.jl
This includes the types and functions needed for all crop growth model, which are also referenced by the other submodels.
Persefone.CropCurveParams
— TypeCropCurveParams
The values in this struct define one crop growth curve.
Persefone.CropType
— TypeCropType
The type struct for all crops. Currently follows the crop growth model as implemented in ALMaSS.
Persefone.GrowthPhase
— TypeGrowthPhase
ALMaSS crop growth curves are split into five phases, triggered by seasonal dates or agricultural events.
Base.tryparse
— MethodBase.tryparse(type, str)
Extend tryparse
to allow parsing GrowthPhase values. (Needed to read in the CSV parameter file.)
Persefone.buildgrowthcurve
— Methodbuildgrowthcurve(data)
Convert a list of rows from the crop growth data into a CropCurveParams object.
Persefone.readcropparameters
— Methodreadcropparameters(generalcropfile, cropgrowthfile)
Parse a CSV file containing the required parameter values for each crop (as produced from the original ALMaSS file by convert_almass_data.py
).