Configuration

The configuration file provides a central place for all simulation-related parameters. To set up a new simulation experiment, modify a copy of this file and pass it to the software (e.g. using ./run.jl -c <config>). This is what the default config file looks like:

### 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 = 2022-01-01             # first day of the simulation
enddate = 2023-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
landscapemap = "landscape.gpkg" # name of the landscape map in the map directory
weatherfile = "weather.csv"     # name of the weather data file in the map directory
	
[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", "silage 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

[animal]
animaldirectory = "data/animals"
targetspecies = ["Skylark", "MarbledWhite"] # 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
showhomeranges = true  # plot home ranges on output maps?
		
[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
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.

Note that species-specific parameters are stored in the data/crops and data/animals directories. For instructions on how to create or modify these, see the crop calibration tutorial and the animal model documentation.