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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Persefone
Persefone.jl
Commits
d871ef90
Commit
d871ef90
authored
Nov 6, 2024
by
Marco Matthies
Browse files
Options
Downloads
Patches
Plain Diff
Revert "ALMaSS: allow choosing highnutrientcurve when calling sow!"
This reverts commit
b077630d
.
parent
fc6b78c3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/crop/almass.jl
+2
-6
2 additions, 6 deletions
src/crop/almass.jl
src/crop/farmplot.jl
+2
-2
2 additions, 2 deletions
src/crop/farmplot.jl
with
4 additions
and
8 deletions
src/crop/almass.jl
+
2
−
6
View file @
d871ef90
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/crop/farmplot.jl
+
2
−
2
View file @
d871ef90
...
@@ -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
...
...
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
sign in
to comment