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
A struct representing a single field, on which a crop can be grown.
Persefone.averagefieldsize
— Methodaveragefieldsize(model)
Calculate the average field size in hectares for the model landscape.
Persefone.cropcover
— Methodcropcover(model, position)
Return the crop cover of the crop at this position, or nothing if there is no crop here (utility wrapper).
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.harvest!
— Methodharvest!(farmplot, model)
Harvest the crop of this farmplot.
Persefone.isgrassland
— Methodisgrassland(farmplot, model)
Classify a farmplot as grassland or not (i.e., is the landcover of >80% of its pixels grass?)
Persefone.sow!
— Methodsow!(farmplot, model, cropname)
Sow the specified crop on the farmplot.
Persefone.stepagent!
— Methodstepagent!(farmplot, model)
Update a farm plot by one day.
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
.
crops.jl
This includes the types and functions needed for all crop growth model, which are also referenced by the other submodels.