From 32e96f727db36b1bcaac0085172b5b347ce7ac36 Mon Sep 17 00:00:00 2001 From: Marco Matthies <71844+marcom@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:02:40 +0100 Subject: [PATCH] ALMaSS crop model: remove commented out code --- src/crop/almass.jl | 47 ---------------------------------------------- 1 file changed, 47 deletions(-) diff --git a/src/crop/almass.jl b/src/crop/almass.jl index 38e424d..b2680c4 100644 --- a/src/crop/almass.jl +++ b/src/crop/almass.jl @@ -843,51 +843,4 @@ end #TODO spray!() #TODO till!() - - -# """ -# growcrop!(cropstate, gdd, model) - -# Apply the relevant crop growth model to update the plants crop state -# on this farm plot. Implements the ALMaSS crop growth model by Topping -# et al. (see `ALMaSS/Landscape/plant.cpp:PlantGrowthData::FindDiff()` and -# `ALMaSS/Landscape/elements.cpp:VegElement::DoDevelopment()`). -# """ -# function growcrop!(cs::CropState, gdd::Float64, model::SimulationModel) -# fertiliser in cs.events ? -# curve = cs.croptype.lownutrientgrowth : -# curve = cs.croptype.highnutrientgrowth -# points = curve.GDD[cs.phase] #FIXME what if the curve is empty? -# for p in 1:length(points) -# if points[p] == 99999 -# !(cs.phase in (janfirst, sow)) && (cs.mature = true) #FIXME only in the last phase? -# return # the marker that there is no further growth this phase -# elseif points[p] == -1 # the marker to set all variables to specified values -# cs.height = curve.height[cs.phase][p] -# cs.LAItotal = curve.LAItotal[cs.phase][p] -# cs.LAIgreen = curve.LAIgreen[cs.phase][p] -# return -# else -# gdd = cs.growingdegreedays -# # figure out which is the correct slope value to use for growth -# if p == length(points) || gdd < points[p+1] -# #FIXME it appears to me from the ALMaSS source code that the curve value -# # for the day is multiplied with that day's growingdegreedays to give the -# # diff, which is then added to the previous values. However, this results -# # in values that are staggeringly too large. I'm not quite sure what the -# # issue is here... -# cs.height += bounds(curve.height[cs.phase][p]*gdd) -# cs.LAItotal += bounds(curve.LAItotal[cs.phase][p]*gdd) -# cs.LAIgreen += bounds(curve.LAIgreen[cs.phase][p]*gdd) -# return -# end -# #XXX To be precise, we ought to figure out if one or more inflection -# # points have been passed between yesterday and today, and calculate the -# # growth exactly up to the inflection point with the old slope, and onward -# # with the new slope. Not doing so will introduce a small amount of error, -# # although I think this is acceptable. -# end -# end -# end - end # module ALMaSS -- GitLab