Skip to content
Snippets Groups Projects
Commit b077630d authored by Marco Matthies's avatar Marco Matthies
Browse files

ALMaSS: allow choosing highnutrientcurve when calling sow!

`sow!(::ALMaSS.CropState, ...)` calls `setphase!`, which needs to know
which growth curve to use.  Some crop types (e.g. "permanent
set-aside") do not have a lownutrientgrowthcurve, which then causes an
error when `setphase!` tries to access the `missing` growth curve.

The highnutrientgrowthcurve would only be chosen when the cropstate
had `fertilising` in its events.  As the events for a cropstate are
now `empty!`ied in `sow!`, it's not possible to set the `fertilising`
event before calling `sow!`.

This previously didn't cause a bug, as the logic for which growth
curve to choose was the wrong way around, choosing the
highnutrientgrowth curve when no `fertilising` event was set for the
cropstate.
parent dbc4e94b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment