5.1.007 bug: hourly evaporation time series can stop a SWMM run

Rob James

Hourly evaporation time series can cause SWMM5.1.007 to stop mid run with no error message in the report file. The problem seems to be caused by rounding the current simulation time to days. Removing the rounding function may solve the problem.

In climate_getNextEvap() in climate.c:

days = floor(days)

For example, if the current simulating time is days = 39448.04166667824, it is rounded to 39448. If NextEvapDate is 39448.041666666, it would have been less than the unrounded days. However, it is greater than the rounded days and is returned:

if ( NextEvapDate > days ) return NextEvapDate;

As a result, the runoff time step is calculated as 0 and the simulation is stopped.


Lew Rossman

You can remove the “days = floor(days);” line, but you should change the line under “case FILE_EVAP:” (in climate_getNextEvap) to be:

case FILE_EVAP:
 return floor(days) + 1;

since a Climate File always uses daily values.