UMEP-dev / SUEWS

Surface Urban Energy and Water Balance Scheme
https://suews.readthedocs.io/
Mozilla Public License 2.0
12 stars 6 forks source link

Issue in calculating irrigation #228

Closed ljarvi closed 8 months ago

ljarvi commented 8 months ago

I'm running SUEWS with irrigation on in such a way that all irrigation is manual irrigation (Faut is zero in SUEWS_Irrigation.txt). The model calculates daily irrigation and prints it correctly to the daily SUEWS output file. However, in the hourly output file the irrigation column is all zero and based how the evaporation looks like, also the calculation of evaporation is not getting the irrigated water. I have tried to track down where the issue is in the source code, but have failed to find it out. If Faut is not zero in SUEWS_Irrigation.txt, then also hourly irrigation is produced.

I enclosed the zip file with the issue present.

Version and platform (please complete the following information):

Additional context Add any other context about the problem here. sample_runHel.zip

sunt05 commented 8 months ago

Hello @ljarvi, could you please specify which code commit is causing this issue?

ljarvi commented 8 months ago

Good question. I think it is commit version eade2e12a5d6867170c56cba5f6b915f6f502732. I cloned the code on 27th September here from github

sunt05 commented 8 months ago

Thanks @ljarvi !

Once I've finished teaching for the week tomorrow, I'll take a closer look and get back to you here.

sunt05 commented 8 months ago

I've identified the issue - it's caused by the incorrect calculation of rain_cum_daily in the dailystate module:

https://github.com/UMEP-dev/SUEWS/blob/9bec82f7f2ceed2f4ff56a646afccc6949154976/src/suews/src/suews_phys_waterdist.f95#L2090-L2092

rain_cum_daily is above the threshold with a much larger value.

A fix will be applied soon.