Introduction

Go back to the homepage, or view the source code on Gitlab.

Persefone.jl models agricultural practice and how it impacts animal species at a landscape scale. It includes a farm submodel, a crop growth submodel, and individual-based models of multiple indicator species. Its aim is to investigate how changes in farm operations (e.g. through policy changes in the CAP) influence biodiversity.

The model is based on the Agents.jl framework. It is currently in the early stages of development.

Running the model

To run a single experiment, execute run.jl:

julia run.jl -c <CONFIG>

Other commandline arguments are:

usage: run.jl [-c CONFIGFILE] [-s SEED] [-o OUTDIR] [-l LOGLEVEL] 
              [--version] [-h]

optional arguments:
  -c, --configfile CONFIGFILE
                        name of the configuration file
  -s, --seed SEED       inital random seed (type: Int64)
  -o, --outdir OUTDIR   location of the output directory
  -l, --loglevel LOGLEVEL
                        verbosity: "debug", "info", or "quiet"
  --version             show version information and exit
  -h, --help            show this help message and exit

Model input

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 a complete list of parameters):

### 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")
loglevel = "debug" # verbosity level: "debug", "info", "warn"
processors = 2 # number of processors to use on parallel runs
seed = 2 # seed value for the RNG (0 -> random value)
# dates to start and end the simulation
startdate = 2022-01-01
enddate = 2022-12-31

[world]
landcovermap = "data/landcover_jena.tif" # location of the landcover map
farmfieldsmap = "data/fields_jena.tif" # location of the field geometry map
weatherfile = "data/weather_jena.csv" # location of the weather data file
	
[farm]
farmmodel = "FieldManager" # which version of the farm model to use (not yet implemented)

[nature]
targetspecies = ["Wolpertinger", "Wyvern"] # list of target species to simulate
popoutfreq = "daily" # output frequency population-level data, daily/monthly/yearly/end/never
indoutfreq = "end" # output frequency individual-level data, daily/monthly/yearly/end/never
insectmodel = ["season", "habitat", "pesticides", "weather"] # factors affecting insect growth
	
[crop]
cropmodel = "almass" # crop growth model to use, "almass" or "aquacrop"
cropfile = "data/crop_data_general.csv" # file with general crop parameters
growthfile = "data/almass_crop_growth_curves.csv" # file with crop growth parameters
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).

Last updated: 2023-09-13 (commit 34f053e)