diff --git a/src/run.f90 b/src/run.f90 index 690e2ae8..ca07c5d4 100644 --- a/src/run.f90 +++ b/src/run.f90 @@ -6977,7 +6977,13 @@ subroutine AdvanceOneTimeStep(WPi, HarvestNow) end if end if else - call SetRootingDepth(0._dp) + ! In GDD mode, SumGDD needs to be higher than GDDaysToHarvest to prevent reset to zero before harvest + if ((GetCrop_ModeCycle() == modeCycle_GDDays) .and. & + (GetSimulation_SumGDD() <= 0.0)) then + call SetRootingDepth(0._dp) + else + call SetRootingDepth(GetZiprev()) + end if end if else call SetRootingDepth(GetZiprev())