[BUG] FlexModel Calculated recharge problem for large gamma value #432
Labels
bug
Indicates an unintended behavior or coding error
duplicate
Indicates similar issues, pull requests, or discussions
priority 1
normal, deal with in the foreseeable future
Milestone
Calculating r using a large gamma causes to much reduction in the root zone storage state:
pastas/pastas/recharge.py
Lines 378 to 379 in 1cd9fd9
The effect is that the root zone storage state gets drained more for large amount of rain and snowmelt than for smaller amounts. In other words, a small precipitation event causes the root zone to be a little wetter, while a large event drains it almost completely!
I made a semi-solution (there are probably better ways to do it) in the code below which divides the timestep into smaller iterative parts instead of one large step. The resulting image shows the problem with the regular calculation and the result using the iterative method.
An iterative step of 1 (the topmost plot) is equal to the regular calculation. One can see that when "sr before timestep" approaches and passes 150 the resulting "sr after timestep" starts to decrease for all gammas above 1.
For this example, using 5 steps almost solves the issue and there is very little, if any, difference between 5, 10 and 1000 iterative steps.
I'm not sure how often this problem exists and the model seems to work rather well anyway at the larger level and might be compensated in the response function, but it should probably be fixed somehow.
Edit:
Here is an example from a calibration where this effect happened:
As can be seen in the image, the root zone storage is rather constant. During the first large snow melt the "Recharge (R)" is so great that it almost drains the root zone storage and during the large precipitation event it is completely drained.
The text was updated successfully, but these errors were encountered: