Closed aramcharan closed 9 years ago
I saw the output. I don't think the crop is harvested earlier than it should. The difference in thermal time accumulation is caused by the handling of output in the C version. In the C version, the daily outputs are printed at the end of day, after the daily cycle and operations. So on the day of crop harvest, the thermal time is 0 because at the end of day there is no crop left. So we should fix this to output before the crop is killed?
This is not a bug. This is caused by different "margins" used in VB and C to calculate forced harvest. In Amanda's VB version, the margin is 9 days while in C it's 10 days. Therefore, the crop is always harvested one day earlier in C than in VB. To change the margin, go to DailyOperation.c and find the ForcedMaturity function. The variable "margin" is defined in there (it is set as 9 now).
Comparing thermal time accumulation, it appears that maize gets harvested one day earlier than it should. The weather file I'm using has no leap years. Will email relevant files.