Configuration

Persefone requires three input files: a configuration file and two map files. How to generate the map files is documented elsewhere. The configuration file defines parameter values and looks like this (see src/parameters.toml for the default):

### Persefone.jl - a model of agricultural landscapes and ecosystems in Europe.
###
### This is the default configuration file for Persefone, containing all model parameters.
### The syntax is described here: https://toml.io/en/
	
[core]
configfile = "src/parameters.toml" # location of the configuration file
outdir = "results" # location and name of the output folder
overwrite = "ask" # overwrite the output directory? (true/false/"ask")
logoutput = "both" # log output to screen/file/none/both
csvoutput = true # save collected data in CSV files
visualise = true # generate result graphs
storedata = true # keep collected data in memory
figureformat = "pdf" # file format to use for graphical output
loglevel = "info" # verbosity level: "debug", "info", "warn"
seed = 2 # seed value for the RNG (0 -> random value)
startdate = 2020-01-01 # first day of the simulation
enddate = 2022-12-31 # last day of the simulation

[world]
region = "jena" # the region to simulate (must be a folder in `mapdirectory`)
mapdirectory = "data/regions" # the directory in which all geographic data are stored
mapresolution = 10 # map resolution in meters
landcovermap = "landcover.tif" # name of the landcover map in the map directory
farmfieldsmap = "fields.tif" # name of the field geometry map in the map directory
soiltypesmap = "soil.tif" # name of the soil type map in the map directory
weatherfile = "weather.csv" # name of the weather data file in the map directory
fixlandcover = true # correct misclassified landcover pixels
	
[farm]
farmmodel = "BasicFarmer" # which version of the farm model to use
setaside = 0.04 # proportion of farm area set aside as fallow
croprotation = ["winter wheat", "winter rape", "maize", "winter barley"]
extensivegrassland = 0.60 # proportion of grassland managed extensively
mowingthreshold = 25 # height in cm above which intensive grassland is mown
mowingperiod = 10 # number of days in which mowing may occur on extensive grassland
fieldoutfreq = "daily" # output frequency for crop/field data, daily/monthly/yearly/end/never
scenarios = ["thuringian_fallows"] # management scenarios to apply

[nature]
targetspecies = ["MarbledWhite", "Skylark"] # list of target species to simulate
popoutfreq = "daily" # output frequency population-level data, daily/monthly/yearly/end/never
indoutfreq = "monthly" # output frequency individual-level data, daily/monthly/yearly/end/never

# MarbledWhite parameters - see src/nature/species/marbled_white.jl for details
marbledwhite_initialdensity = 1 # individuals/hectare at initialisation
marbledwhite_mintemp = 16
marbledwhite_maxtemp = 32
marbledwhite_rainactive = false
marbledwhite_movement = "random"
marbledwhite_maxstepsperday = 100
marbledwhite_selfavoidance = 0.9
marbledwhite_habitatpreference = 0.95
marbledwhite_maxindperpixel = inf
marbledwhite_maxeggsperday = 5
marbledwhite_oviposition = "linear"
marbledwhite_juvenilemortality = 0.96
marbledwhite_mowingmortality = 0.0
marbledwhite_recordeggstats = false # record habitat of eggs laid rather than movement?

# Skylark parameters - see src/nature/species/skylark.jl for details
skylark_initialdensity = 3 # ha/individual at initialisation
skylark_minimumterritory = 5000
skylark_limitterritory = false
skylark_movementrange = 500
skylark_mindistancetoedge = 60
skylark_maxforageheight = 50
skylark_maxforagecover = 70
skylark_minnestingheight = 15
skylark_maxnestingheight = 45
skylark_minnestingcover = 20
skylark_maxnestingcover = 100
skylark_offfieldnesting = true
skylark_firstyearmortality = 0.38
skylark_migrationmortality = 0.33
skylark_matefaithfulness = 0.5
		
[crop]
cropmodel = "almass,aquacrop" # crop growth model to use, "almass", "aquacrop", or "simple"
cropdirectory = "data/crops/almass/,data/crops/aquacrop/" # the directory storing all data files for the selected crop model
use_region_specific_params = true # use calibrated crop parameters, or the defaults?
Parameter scanning

You can set any parameter to a list of different values, e.g. seed = [1,2,3]. Persefone will then set up and run multiple simulations, one for every possible combination of parameters that you entered (i.e. do a full-factorial simulation experiment). Use runparallel.jl to have these simulations run on multiple processors.