Problem: differences in output (Biomass and related variables, not the water balance) between a compilation with optimization (DEBUG=0) and with a debug flag (DEBUG=1).
Cause: HarvestNow should be kept in memory when calling AdvanceOneTimeStep in FileManagement. HarvestNow was erroneous and caused problems in InitializeTransferAssimilates (L6437 of run.f90), ultimately causing differences in the biomass. Why this was not the case for DEBUG=0 is not entirely clear (probably related to the optimization, that somehow the HarvestNow was kept in the memory).
Solution: initialize HarvestNow to .false. and define it as an inout argument of AdvanceOneTimeStep.
Testing: zero diff for Ottawa, Cassava and AlfIsp testcases between DEBUG=0 and DEBUG=1. Still minor rounding differences when compared to output of Pascal Standalone (as previously).
Problem: differences in output (Biomass and related variables, not the water balance) between a compilation with optimization (DEBUG=0) and with a debug flag (DEBUG=1). Cause: HarvestNow should be kept in memory when calling AdvanceOneTimeStep in FileManagement. HarvestNow was erroneous and caused problems in InitializeTransferAssimilates (L6437 of run.f90), ultimately causing differences in the biomass. Why this was not the case for DEBUG=0 is not entirely clear (probably related to the optimization, that somehow the HarvestNow was kept in the memory). Solution: initialize HarvestNow to .false. and define it as an inout argument of AdvanceOneTimeStep. Testing: zero diff for Ottawa, Cassava and AlfIsp testcases between DEBUG=0 and DEBUG=1. Still minor rounding differences when compared to output of Pascal Standalone (as previously).