Closed oleksmialyk closed 3 months ago
The changes to run_single_timestep make sense and will be approved.
The changes to infiltration are incorrect, because the zBund is supplied in metres so should be converted to millimetres (1000) during these calculations. Please either remove these changes or provide evidence to support the removal of the '1000' before resubmitting this commit.
Thanks :) zBund in m would be fine if its use was consistent through the code. In some cases, it's compared to other variables in mm which leads to a mismatch in units. E.g:
Since the whole water balance is done in mm, we can make it consistent with zBund too so the users are less confused. Also, it's a bit strange that zBund is in m but bund_water (initial storage) in mm. Alternatively, you can search through all instances of zBund and z_bund to make sure it's everywhere multiplied by 1000. But again, this adds unnecessary operations to the code.
First of all, thank you for spotting a number of discrepancies in the code! Here are our comments:
In HIref_current_day, we purposefully made and tested the removal of L106-108 in this commit as part of the update from v6 to v7. Please remove this change before resubmitting.
The return of zGW in check_groundwater_table is correct and will be accepted.
The removal of hard-coded value in irrigation is correct and will be accepted.
The return of rCor in root_development is correct and will be accepted.
In run_single_timestep, all changes are correct apart from L273 which you have already fixed in the subsequent bunds-related commit.
I removed lines in HIref_current_day, thanks.
I was comparing AquaCrop-OSPy based on AquaCrop v6.1 (2022) vs v7.0 (2024) and found several bugs including: