diff --git a/src/crop/almass.jl b/src/crop/almass.jl index 891cbcf828276423c4f55a14dbefa9b4dbd5590b..eb7db59037c188e707de12c30e65eb43c0aacf49 100644 --- a/src/crop/almass.jl +++ b/src/crop/almass.jl @@ -172,7 +172,10 @@ function readcropparameters(generalcropfile::String, growthfile::String) filter(x -> x.nutrient_status=="high")) lownuts = buildgrowthcurve(cropgrowthdata |> filter(x -> x.nutrient_status=="low")) - croptypes[crop.name] = CropType(crop.name, crop.group, crop.minsowdate, crop.maxsowdate, + # TODO: set crop group temporarily until there is a column in + # the csv file + crop_group = "CROP_GROUP_NOT_SET" + croptypes[crop.name] = CropType(crop.name, crop_group, crop.minsowdate, crop.maxsowdate, crop.minharvestdate, crop.maxharvestdate, crop.mingrowthtemp, highnuts, lownuts) end diff --git a/test/crop_tests.jl b/test/crop_tests.jl index eb6b3e6a7266fd59725c04ef87c5c5ec913c8cc1..93e233c49d1386a8afc8e1af0d96b6cba9fb5402 100644 --- a/test/crop_tests.jl +++ b/test/crop_tests.jl @@ -19,13 +19,15 @@ const TESTPARAM_SIMPLECROP = joinpath(pkgdir(Persefone), "test", "test_parameter end @testset "Submodule ALMaSS" begin - ct = Ps.ALMaSS.CropType("olive tree", missing, missing, missing, missing, missing, - missing, missing) + ct = Ps.ALMaSS.CropType("olive tree", "no_crop_group", + missing, missing, missing, missing, missing, missing, missing) id = 0 pixels = [(0, 0)] farmer = 0 + mature = false + events = Ps.Management[] fp = FarmPlot(id, pixels, farmer, - Ps.ALMaSS.CropState(ct, Ps.ALMaSS.janfirst, 0.0, 0.0m, 0.0, 0.0, Ps.Management[])) + Ps.ALMaSS.CropState(ct, Ps.ALMaSS.janfirst, 0.0, 0.0m, 0.0, 0.0, mature, events)) @test fp isa FarmPlot @test fp isa FarmPlot{Ps.ALMaSS.CropState} @test croptype(fp) isa Ps.ALMaSS.CropType diff --git a/test/test_parameters.toml b/test/test_parameters.toml index 0a8e4055b6ce3cd1c578beb3866dc30f37e28c57..089712ee2f4ab8c4ecd7da50ed97fc7dc4ca74be 100644 --- a/test/test_parameters.toml +++ b/test/test_parameters.toml @@ -28,7 +28,9 @@ farmfieldsmap = "fields_jena.tif" # location of the field geometry map weatherfile = "weather_jena.csv" # location of the weather data file [farm] -farmmodel = "FieldManager" # which version of the farm model to use (not yet implemented) +farmmodel = "BasicFarmer" # which version of the farm model to use +setaside = 0.04 # proportion of farm area set aside as fallow +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 diff --git a/test/test_parameters_almass.toml b/test/test_parameters_almass.toml index 1308029ee9b7b387064752b0c0e3a70174798c77..159e59d2cb484a8f51da325c3bbbad1ae0af9e48 100644 --- a/test/test_parameters_almass.toml +++ b/test/test_parameters_almass.toml @@ -28,7 +28,9 @@ farmfieldsmap = "fields_jena.tif" # location of the field geometry map weatherfile = "weather_jena.csv" # location of the weather data file [farm] -farmmodel = "FieldManager" # which version of the farm model to use (not yet implemented) +farmmodel = "BasicFarmer" # which version of the farm model to use +setaside = 0.04 # proportion of farm area set aside as fallow +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 diff --git a/test/test_parameters_simplecrop.toml b/test/test_parameters_simplecrop.toml index fc199a8c8664b0d900e131d9b5b159dc006ee502..b7c08f1008786b06a0fc391437efd294bad8fdd2 100644 --- a/test/test_parameters_simplecrop.toml +++ b/test/test_parameters_simplecrop.toml @@ -28,7 +28,9 @@ farmfieldsmap = "fields_jena.tif" # location of the field geometry map weatherfile = "weather_jena.csv" # location of the weather data file [farm] -farmmodel = "FieldManager" # which version of the farm model to use (not yet implemented) +farmmodel = "BasicFarmer" # which version of the farm model to use +setaside = 0.04 # proportion of farm area set aside as fallow +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