Skip to content
Snippets Groups Projects
Commit 4dda213a authored by Marco Matthies's avatar Marco Matthies
Browse files

Implement AquaCrop cropcover(), cropyield()

parent 0a1b4404
No related branches found
No related tags found
No related merge requests found
...@@ -27,9 +27,9 @@ end ...@@ -27,9 +27,9 @@ end
croptype(cs::AquaCropState) = cs.croptype croptype(cs::AquaCropState) = cs.croptype
cropname(cs::AquaCropState) = cropname(croptype(cs)) cropname(cs::AquaCropState) = cropname(croptype(cs))
cropheight(cs::AquaCropState) = cs.height cropheight(cs::AquaCropState) = cs.height # TODO: use AquaCrop state info
cropcover(cs::AquaCropState) = 0.0 # TODO: implement cropcover(cs::AquaCropState) = AquaCrop.canopycover(cs.cropstate)
cropyield(cs::AquaCropState) = 0.0 # TODO: implement, units? cropyield(cs::AquaCropState) = AquaCrop.dryyield(cs.cropstate) # TODO: there is also freshyield
isharvestable(cs::AquaCropState) = true # TODO: implement this correctly isharvestable(cs::AquaCropState) = true # TODO: implement this correctly
""" """
......
...@@ -65,6 +65,6 @@ end ...@@ -65,6 +65,6 @@ end
@test cropname(fp) isa String @test cropname(fp) isa String
@test cropheight(fp) isa Length{Float64} @test cropheight(fp) isa Length{Float64}
@test cropcover(fp) isa Float64 @test cropcover(fp) isa Float64
@test cropyield(fp) isa Float64 @test cropyield(fp) isa type(1.0u"kg/ha")
# TODO: test stepagent!(), sow!(), harvest!() # TODO: test stepagent!(), sow!(), harvest!()
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment