Skip to content
Snippets Groups Projects
Commit 2b25a290 authored by xo30xoqa's avatar xo30xoqa
Browse files

Updated CHANGELOG, various bugfixes

parent 1805ef30
Branches
Tags
No related merge requests found
......@@ -15,20 +15,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
*Plan: add more regions*
## [0.7.1] - unreleased
## [0.8.0] - unreleased
**This point release adds the first butterfly model (marbled white)**
### Added
- Marbled white (*Melanargia galathea*) species model with associated data output
- implemented management of extensive and intensive grassland in the farm model (new
parameters: `farm.extensivegrassland`, `farm.mowingthreshold`, `farm.mowingperiod`)
### Changed
- crop names now defined centrally **(??)**
- ALMaSS grassland data expanded to allow continued growth after mowing
- crop rotation on all fields can now be set via parameter `farm.croprotation`
### Deprecated
### Removed
### Fixed
- fixed `isvalidstart()` bug in `almass.jl`
## [0.7.0] - 14-03-2025
......
......@@ -650,12 +650,6 @@ curve_id,crop_name,nutrient_status,growth_phase,point_type,GDD,LAI_total,LAI_gre
25,permanent grassland (low yield),high,harvest1,slope,1500,-0.0000508,-0.0000508,-0.000609143
25,permanent grassland (low yield),high,harvest1,slope,99999,0,0,0
25,permanent grassland (low yield),high,harvest2,start,-1,3,1,10
25,permanent grassland (low yield),high,harvest2,slope,0,0,0,-0.026548673
25,permanent grassland (low yield),high,harvest2,slope,113,0.008928571,0.008928571,0.053571429
25,permanent grassland (low yield),high,harvest2,slope,225,0.013333333,0.02,0.026666667
25,permanent grassland (low yield),high,harvest2,slope,300,0.012,0.025333333,0.066666667
25,permanent grassland (low yield),high,harvest2,slope,375,0.0000889,0.0000889,0.031111111
25,permanent grassland (low yield),high,harvest2,slope,1500,-0.0000508,-0.0000508,-0.000609143
25,permanent grassland (low yield),high,harvest2,slope,99999,0,0,0
70,lucerne,high,janfirst,slope,99999,0,0,0
70,lucerne,high,sow,start,-1,0,0,0
......
......@@ -93,6 +93,7 @@ function initpopulation!(species::Type, p::PopInitParams, model::SimulationModel
end
#XXX break randomly to avoid initialising all individuals in a single column?
# Break if a popsize was specified and has been exceeded
#FIXME popsize == 1 but ~200 individuals created?
(p.popsize > 0 && n >= p.popsize) && break
end
end
......
......@@ -181,7 +181,6 @@ weather data.
if eggsremaining > 0 && suitablehabitat(self, model, pos)
if @chance(@randn(self.juvenilesurvival)/100)
@reproduce() # only create an individual that will survive to adulthood
#FIXME offspring reproduce too quickly
end
eggsremaining -= 1
end
......@@ -206,7 +205,7 @@ be managed, or not have been fertilised and be a certain height.
function suitablehabitat(butterfly::MarbledWhite, model::SimulationModel, pos::Tuple{Int64,Int64})
(@landcover() == agriculture && @cropname() == "set-aside") ||
(@landcover() == grass && (@cropname() == "NA" ||
(!(fertiliser in model.landscape[pos...].events) &&
(@cropname() == "permanent grassland (low yield)" &&
@cropheight() >= butterfly.minheight &&
@cropheight() <= butterfly.maxheight)))
end
......@@ -237,7 +236,7 @@ random, but I don't have data for that.)
@randn(self.pupatime), @randn(self.adulttime)]
# check whether eclosure is during the flight period, change the larval time if not
if self.enforceflyingperiod
eclose = self.birthdate + Day(sum(self.daysinphase))
eclose = self.birthdate+Day(self.daysinphase[1]+self.daysinphase[2]+self.daysinphase[3])
if eclose < self.earliesteclosure
diff = @thisyear(self.earliesteclosure) - eclose
self.daysinphase[2] += diff.value
......@@ -255,10 +254,12 @@ Initialise the marbled white population with one individual on every grassland p
"""
@populate MarbledWhite begin
#TODO this is very rough at the moment
habitat = @habitat(@landcover() == grass) #XXX too simple? (cf. suitablehabitat())
habitat = @habitat(@cropname() == "permanent grassland (low yield)" ||
(@cropname() == "NA" && @landcover() == grass))
initphase = egg # this should advance within a few days to the correct phase
birthphase = egg
indarea = 0.1ha # reduce the number of individuals #XXX
popsize = 1
#indarea = 0.1ha # reduce the number of individuals #XXX
#popsize = -1 # one individual per suitable location
sex = female #TODO change to hermaphrodite to force all individuals to have the same sex
end
......
......@@ -19,8 +19,8 @@ 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)
startdate = 2021-01-01 # first day of the simulation
enddate = 2023-12-31 # last day of the simulation
#enddate = 2021-12-31 # last day of the simulation (test value)
#enddate = 2023-12-31 # last day of the simulation
enddate = 2021-12-31 # last day of the simulation (test value)
[world]
mapdirectory = "data/regions/jena/" # the directory in which all geographic data are stored
......@@ -33,16 +33,16 @@ 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
extensivegrassland = 0.33 # proportion of grassland managed extensively
croprotation = ["winter rape", "winter wheat", "maize", "winter barley"]
extensivegrassland = 0.33 # 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
[nature]
#targetspecies = ["Wolpertinger", "Wyvern"] # list of target species to simulate - example species
targetspecies = [] # XXX disable all species for farm model testing
#targetspecies = ["MarbledWhite"] #["Skylark"] # list of target species to simulate
#targetspecies = [] # XXX disable all species for farm model testing
targetspecies = ["MarbledWhite"] #["Skylark"] # list of target species to simulate
#popoutfreq = "never" # output frequency population-level data, daily/monthly/yearly/end/never
#indoutfreq = "never" # output frequency individual-level data, daily/monthly/yearly/end/never
popoutfreq = "daily" # output frequency population-level data, daily/monthly/yearly/end/never
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment