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

Revert "ALMaSS: allow choosing highnutrientcurve when calling sow!"

This reverts commit b077630d.
parent fc6b78c3
Branches
Tags
No related merge requests found
...@@ -804,17 +804,13 @@ supply_global_radiation(model::SimulationModel) = ...@@ -804,17 +804,13 @@ supply_global_radiation(model::SimulationModel) =
Change the cropstate to sow the specified crop. Change the cropstate to sow the specified crop.
""" """
function sow!(cs::CropState, model::SimulationModel, cropname::String; function sow!(cs::CropState, model::SimulationModel, cropname::String)
highnutrients::Bool=false)
!ismissing(cs.croptype.minsowdate) && model.date < cs.croptype.minsowdate && !ismissing(cs.croptype.minsowdate) && model.date < cs.croptype.minsowdate &&
@warn "$(model.date) is earlier than the minimum sowing date for $(cropname)." @warn "$(model.date) is earlier than the minimum sowing date for $(cropname)."
empty!(cs.events)
if highnutrients
push!(cs.events, fertiliser)
end
cs.croptype = model.crops[cropname] cs.croptype = model.crops[cropname]
setphase!(cs, sow, model) setphase!(cs, sow, model)
cs.mature = false cs.mature = false
empty!(cs.events)
# cs.vegddegs = 0.0 # cs.vegddegs = 0.0
# cs.ddegs = 0.0 # cs.ddegs = 0.0
......
...@@ -36,9 +36,9 @@ end ...@@ -36,9 +36,9 @@ end
Sow the specified crop on the farmplot. Sow the specified crop on the farmplot.
""" """
function sow!(farmplot::FarmPlot, model::SimulationModel, cropname::String; kwargs...) function sow!(farmplot::FarmPlot, model::SimulationModel, cropname::String)
createevent!(model, farmplot.pixels, sowing) createevent!(model, farmplot.pixels, sowing)
sow!(farmplot.cropstate, model, cropname; kwargs...) sow!(farmplot.cropstate, model, cropname)
@debug "Farmer $(farmplot.farmer) sowed $(cropname) on farmplot $(farmplot.id)." @debug "Farmer $(farmplot.farmer) sowed $(cropname) on farmplot $(farmplot.id)."
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment