Index: wflow-py/wflow/wflow_funcs.py =================================================================== diff -u -r11f8d5cb169091c08cc5b7210e35f2ce7aed5fb3 -r11d8022c8c35c64245ddb4fd78b3e19103e53b8f --- wflow-py/wflow/wflow_funcs.py (.../wflow_funcs.py) (revision 11f8d5cb169091c08cc5b7210e35f2ce7aed5fb3) +++ wflow-py/wflow/wflow_funcs.py (.../wflow_funcs.py) (revision 11d8022c8c35c64245ddb4fd78b3e19103e53b8f) @@ -52,7 +52,7 @@ return TF,Interception,IntEvap,InterceptionStorage -def rainfall_interception_gash(Cmax,EoverR,CanopyGapFraction, Precipitation, CanopyStorage): +def rainfall_interception_gash(Cmax,EoverR,CanopyGapFraction, Precipitation, CanopyStorage,maxevap=9999): """ Interception according to the Gash model (For daily timesteps). """ @@ -82,6 +82,12 @@ ThroughFall=ifthenelse(Cmax <= scalar(0.0), Precipitation,ThroughFall) Interception=ifthenelse(Cmax <= scalar(0.0), scalar(0.0),Interception) StemFlow=ifthenelse(Cmax <= scalar(0.0), scalar(0.0),StemFlow) + + # Now corect for amximum potential evap + OverEstimate = ifthenelse(Interception > maxevap,Interception - maxevap,scalar(0.0)) + Interception = min(Interception,maxevap) + # Add surpluss to the thoughdfall + ThroughFall = ThroughFall + OverEstimate return ThroughFall, Interception, StemFlow, CanopyStorage