Index: wflow-py/wflow/wflow_funcs.py =================================================================== diff -u -r531317c453fb999265e9b1dabd69dfd6532bd4e1 -re14061eac25a80485dc43ebab91c0f5b07649a78 --- wflow-py/wflow/wflow_funcs.py (.../wflow_funcs.py) (revision 531317c453fb999265e9b1dabd69dfd6532bd4e1) +++ wflow-py/wflow/wflow_funcs.py (.../wflow_funcs.py) (revision e14061eac25a80485dc43ebab91c0f5b07649a78) @@ -120,7 +120,7 @@ Pfrac = (1 - p -pt) * Precipitation # S cannot be larger than Cmax, no gravity drainage below that - DD = ifthenelse (CanopyStorage > Cmax , Cmax - CanopyStorage , 0.0) + DD = ifthenelse (CanopyStorage > Cmax , CanopyStorage - Cmax , 0.0) CanopyStorage = CanopyStorage - DD # Add the precipitation that falls on the canopy to the store