MazamaScience/RAWSmet

fix precip calculation in wrcc_parseData()

Closed this issue · 0 comments

We need to handle the case where the is precipitation on the first hour of the water year.

Right now, we reset any negative value to zero. This means that the start of a new water year will always have zero precip.

Instead, we need to be more careful and compare the negative value of the first hour of the water year with the positive value of the last hour of the water year. If they are the same except for the negative sign, then we can safely set the first hour to zero. But if they differ, we need to add them together to find out how much rain fell in the first hour of the water year.