USGS-R / Rainmaker

Repo being permanently moved to: https://code.usgs.gov/water/analysis-tools/Rainmaker
https://code.usgs.gov/water/analysis-tools/Rainmaker
Other
18 stars 14 forks source link

Calculate 'timeInterval' instead of setting it as input #22

Open limnoliver opened 7 years ago

limnoliver commented 7 years ago

timeInterval is the minimum time expected between tips. This can be variable by rain gauge, and so may be more practical to calculate something like min(diff.time(pdate[i], pdate[i-1])) and use it as input to functions.

Currently implemented in RMevents_sko -- use elsewhere where timeInterval is needed.

limnoliver commented 6 years ago

In erosivity function, we need to internally calculate timeInterval, but we don't have the original (raw) data to calculate df(time). Export df(time) somehow from RMevents.

limnoliver commented 6 years ago

This is now an output of RMevents -- still deciding if this should still be an argument in the function where the user can subset the list from RMevents or just use behind the scenes.

rbcarvin commented 6 years ago

This can be behind the scenes, if the user changed it to something other than the minimum time then rainmaker will be giving them a less correct answer. In the past, the program 'trusted' the user to know this value, much better to just figure it out for the user.