diff --git a/src/crop/aquacrop.jl b/src/crop/aquacrop.jl index cea2b2f112eefbc22104692fc3eaef6532116cd0..c591def3f4b9246f371fac5a36dff38e6d949f7a 100644 --- a/src/crop/aquacrop.jl +++ b/src/crop/aquacrop.jl @@ -16,7 +16,7 @@ mutable struct AquaCropState function AquaCropState(croptype::AquaCropType, height::Length{Float64}=0.0cm) ac_parentdir = AquaCrop.test_toml_dir # TODO: hardcoded croptype - ac_runtype = :Julia + ac_runtype = :Toml cropstate, allok = AquaCrop.initialize_cropfield(; parentdir=ac_parentdir, runtype=ac_runtype) if ! allok.logi error("AquaCrop.initialize_cropfield() failed, status = $allok") @@ -38,7 +38,7 @@ isharvestable(cs::AquaCropState) = true # TODO: implement this correctly Update a crop state by one day. """ function stepagent!(cs::AquaCropState, model::SimulationModel) - # TODO: call into AquaCrop.jl to simulate one day + AquaCrop.dailyupdate!(cs.cropstate) end """ diff --git a/test/crop_tests.jl b/test/crop_tests.jl index dabcf849074c09c137a6e7aae3eeb19963c4ecc8..5f83b61f76a58b64e043e99245d96b23e7001749 100644 --- a/test/crop_tests.jl +++ b/test/crop_tests.jl @@ -19,6 +19,7 @@ import Unitful model = initialise(parampath) stepsimulation!(model) @test model isa AgricultureModel + # TODO: test stepagent!(), sow!(), harvest!() end end @@ -69,5 +70,4 @@ end @test cropheight(fp) isa Length{Float64} @test cropcover(fp) isa Float64 @test Unitful.dimension(cropyield(fp)) == Unitful.𝐌 * Unitful.𝐋^-2 - # TODO: test stepagent!(), sow!(), harvest!() end