Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Persefone.jl
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Persefone
Persefone.jl
Commits
32e96f72
Commit
32e96f72
authored
5 months ago
by
Marco Matthies
Browse files
Options
Downloads
Patches
Plain Diff
ALMaSS crop model: remove commented out code
parent
5e4cdaa9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/crop/almass.jl
+0
-47
0 additions, 47 deletions
src/crop/almass.jl
with
0 additions
and
47 deletions
src/crop/almass.jl
+
0
−
47
View file @
32e96f72
...
@@ -843,51 +843,4 @@ end
...
@@ -843,51 +843,4 @@ end
#TODO spray!()
#TODO spray!()
#TODO till!()
#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
end
# module ALMaSS
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment