diff --git a/src/crop/almass.jl b/src/crop/almass.jl index 4d8bc8f6721af65b3750c91c9157ad54867e9cc5..14fec6d4405a9ae1e52dabf4cc88a3c0de83f8d4 100644 --- a/src/crop/almass.jl +++ b/src/crop/almass.jl @@ -272,14 +272,14 @@ function setphase!(cs::CropState, phase::GrowthPhase) height = curve.height[cs.phase] LAItotal = curve.LAItotal[cs.phase] LAIgreen = curve.LAIgreen[cs.phase] - if (length(GDD) == 0 || length(height) == 0 || length(LAItotal) == 0 || length(LAIgreen) == 0) error("One of these has length zero:\n GDD = $GDD\n height = $height\n LAItotal = $LAItotal\n LAIgreen = $LAIgreen") end - if GDD[1] == -1.0 + is_valid_start = GDD[1] == -1 + if is_valid_start # set height, LAItotal, LAIgreen # TODO: what about when # GDD[1] == curve.GDD[cs.phase][1] == 99999.0