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

ALMaSS: temporarily always return false for maturity

parent e68f4bc0
No related branches found
No related tags found
No related merge requests found
...@@ -130,7 +130,6 @@ part of a `FarmPlot`. ...@@ -130,7 +130,6 @@ part of a `FarmPlot`.
# `VegElement` from `Landscape/Elements.h`, line 601 # `VegElement` from `Landscape/Elements.h`, line 601
croptype::CropType croptype::CropType
events::Vector{Management} = Management[] events::Vector{Management} = Management[]
mature::Bool = false #TODO how do we determine this?
phase::GrowthPhase phase::GrowthPhase
vegddegs::Float64 = 0 # Vegetation growing degree days since sowing vegddegs::Float64 = 0 # Vegetation growing degree days since sowing
...@@ -161,7 +160,9 @@ cropname(cs::CropState) = cropname(croptype(cs)) ...@@ -161,7 +160,9 @@ cropname(cs::CropState) = cropname(croptype(cs))
cropheight(cs::CropState) = cs.veg_height cropheight(cs::CropState) = cs.veg_height
cropcover(cs::CropState) = cs.veg_cover cropcover(cs::CropState) = cs.veg_cover
cropyield(cs::CropState) = cs.veg_biomass # TODO: correct? units? dry or wet? cropyield(cs::CropState) = cs.veg_biomass # TODO: correct? units? dry or wet?
isharvestable(cs::CropState) = cs.mature function isharvestable(cs::CropState)
return false
end
# Constant in original ALMaSS code: # Constant in original ALMaSS code:
# `EL_VEG_START_LAIT` from `Landscape/Elements.cpp`, line 238-239 # `EL_VEG_START_LAIT` from `Landscape/Elements.cpp`, line 238-239
...@@ -813,10 +814,9 @@ function sow!(cs::CropState, model::SimulationModel, cropname::String) ...@@ -813,10 +814,9 @@ function sow!(cs::CropState, model::SimulationModel, cropname::String)
@warn "$(model.date) is earlier than the minimum sowing date for $(cropname)." @warn "$(model.date) is earlier than the minimum sowing date for $(cropname)."
cs.croptype = model.crops[cropname] cs.croptype = model.crops[cropname]
setphase!(cs, sow, model) setphase!(cs, sow, model)
cs.mature = false
# TODO: is this correct to remove all events? this would # TODO: is this correct to remove all events? this would
# e.g. remove fertilising event? # e.g. remove fertilising event?
empty!(cs.events) #empty!(cs.events)
# cs.vegddegs = 0.0 # cs.vegddegs = 0.0
# cs.ddegs = 0.0 # cs.ddegs = 0.0
...@@ -834,7 +834,6 @@ Harvest the crop of this cropstate. ...@@ -834,7 +834,6 @@ Harvest the crop of this cropstate.
function harvest!(cs::CropState, model::SimulationModel) function harvest!(cs::CropState, model::SimulationModel)
phase = (cs.phase in (ALMaSS.harvest1, ALMaSS.harvest2) ? ALMaSS.harvest2 : ALMaSS.harvest1) phase = (cs.phase in (ALMaSS.harvest1, ALMaSS.harvest2) ? ALMaSS.harvest2 : ALMaSS.harvest1)
setphase!(cs, phase, model) setphase!(cs, phase, model)
cs.mature = false
# height & LAI will be automatically adjusted by the growth function # height & LAI will be automatically adjusted by the growth function
return cs.veg_biomass # TODO: units ok of cs.veg_biomass ? return cs.veg_biomass # TODO: units ok of cs.veg_biomass ?
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment