Skip to content

Commit

Permalink
Merge branch 'main' into feature/ResEvap-document-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rma-kayla authored Feb 4, 2025
2 parents 6ba56c3 + 4495dda commit 6f60d83
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions java/opendcs/src/main/java/decodes/cwms/algo/ResEvapAlgo.java
Original file line number Diff line number Diff line change
Expand Up @@ -560,32 +560,37 @@ protected void doAWTimeSlice()
protected void afterTimeSlices()
throws DbCompException
{
if (baseTimes.size() == 24 || (baseTimes.size() == 23 && isDayLightSavings))
try
{
setOutput(dailyEvap, tally, _timeSliceBaseTime);
try
if (baseTimes.size() == 24 || (baseTimes.size() == 23 && isDayLightSavings))
{
setAsFlow(tally, _timeSliceBaseTime);
setOutput(dailyEvap, tally, _timeSliceBaseTime);
try
{
setAsFlow(tally, _timeSliceBaseTime);
}
catch (RatingException | NoConversionException | DecodesException ex)
{
throw new DbCompException("Failed to compute flow values from evap rate", ex);
}
setDailyProfiles(_timeSliceBaseTime);

//TODO save HourlyWTP
// hourlyWTP.SaveProfiles(timeSeriesDAO);
dailyWTP.SaveProfiles(timeSeriesDAO);
}
catch (RatingException | NoConversionException | DecodesException ex)
else
{
throw new DbCompException("Failed to compute flow values from evap rate", ex);
warning("There are less than 24 hourly samples, can not compute daily sums");
}
setDailyProfiles(_timeSliceBaseTime);

//TODO save HourlyWTP
// hourlyWTP.SaveProfiles(timeSeriesDAO);
dailyWTP.SaveProfiles(timeSeriesDAO);

}
finally
{
tsdb.freeConnection(conn);
crd.close();
siteDAO.close();
timeSeriesDAO.close();
}
else
{
warning("There are less than 24 hourly samples, can not compute daily sums");
}
//AW:AFTER_TIMESLICES
//AW:AFTER_TIMESLICES_END
}
Expand Down

0 comments on commit 6f60d83

Please sign in to comment.