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
4f413e95
Commit
4f413e95
authored
6 months ago
by
Marco Matthies
Browse files
Options
Downloads
Patches
Plain Diff
ALMaSS: temporarily always return false for maturity
parent
e68f4bc0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/crop/almass.jl
+4
-5
4 additions, 5 deletions
src/crop/almass.jl
with
4 additions
and
5 deletions
src/crop/almass.jl
+
4
−
5
View file @
4f413e95
...
@@ -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
...
...
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