diff --git a/src/crop/cropmodels.jl b/src/crop/cropmodels.jl index f5ec6d084ca919ed5a0cbed8916475c0611afc07..daabf5ff3503d8da3a0863cc4d9c8f743a7f5c55 100644 --- a/src/crop/cropmodels.jl +++ b/src/crop/cropmodels.jl @@ -70,44 +70,3 @@ function initfields!(model::SimulationModel) @info "Initialised $(length(model.farmplots)) farm plots." end - -# # TODO: this function should be moved to the individual crop models, -# # and overloaded on the type of cropstate (see notes above) -# """ -# setsoiltype!(farmplot, soiltype, model) -# """ -# function setsoiltype!(farmplot::FarmPlot, soiltype::SoilType, model::SimulationModel) -# farmplot.soiltype = soiltype -# if @param(crop.cropmodel) == "aquacrop" -# farmplot.cropstate.soiltype = soiltype -# else -# # do nothing for other cropmodels -# end -# end - -# # TODO: move this function to individual crop model files -# """ -# makecropstate(model, soiltype) -# -# An internal utility function to initialise one instance of the configured crop growth model. -# """ -# function makecropstate(model::SimulationModel, soiltype::SoilType) -# if @param(crop.cropmodel) == "almass" -# phase = (month(model.date) < 3 ? ALMaSS.janfirst : ALMaSS.marchfirst) -# cs = ALMaSS.CropState( -# croptype = model.crops["natural grass"], -# phase = phase, -# ) -# elseif @param(crop.cropmodel) == "simple" -# cs = SimpleCrop.CropState( -# model.crops["natural grass"], -# 0.0m -# ) -# elseif @param(crop.cropmodel) == "aquacrop" -# croptype = model.crops["natural grass"] -# cs = AquaCropWrapper.CropState(croptype, soiltype, model) -# else -# Base.error("Unhandled crop model '$(@param(crop.cropmodel))' in makecropstate().") -# end -# return cs -# end