USGS-R/Rainmaker

Suggested fix for hourly rainfall data

Closed this issue · 1 comments

I am working with hourly rain accumulation data and noticed that RMevents.R assumes that the time interval in the provided dataset is always minutes (there is a hard-coded conversion from hours to minutes here). However, the base R function diff will return units of hours or minutes based on the interval it detects (diff is used here).

Since ieHr is a user-provided parameter in hours, I have a solution that detects whether ieHr needs to be converted to minutes or remain in hours for a valid time comparison. Let me know if I should open a PR.

Hi Ariel, if you'd like to open a pull request I'd be happy to take a look. At the moment we don't have many resources to do enhancements, but I could certainly see if the PR would fit our needs. Thanks for reaching out!