Something went wrong on our end
-
Marco Matthies authored
`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.
Marco Matthies authored`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.
Code owners