Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hourly precipitation calculation in weather.R incorrect #27

Closed
rmcd1024 opened this issue Jun 29, 2017 · 1 comment
Closed

Hourly precipitation calculation in weather.R incorrect #27

rmcd1024 opened this issue Jun 29, 2017 · 1 comment
Labels
bug an unexpected problem or unintended behavior wip work in progress

Comments

@rmcd1024
Copy link
Contributor

rmcd1024 commented Jun 29, 2017

When aggregated, the hourly precipitation numbers in the weather dataframe do not match official NOAA daily totals for the same locations. The calculation of hourly precipitation is somewhat involved. The issue is that hourly cumulative totals reset at 51 minutes (this is not invariably true, but it appears true for the 3 NY airports in 2013). My pull request #26 addresses this.

See this page for an example using ASOS data to match NOAA daily totals.

@hadley hadley added bug an unexpected problem or unintended behavior wip work in progress labels Jun 7, 2018
@rmcd1024
Copy link
Contributor Author

rmcd1024 commented Jun 7, 2018

To summarize the issue, the ASOS weather observations often include multiple observations in an hour. This occurs when the weather situation is changing rapidly, and thus often when there is heavy precipitation, The precipitation totals are cumulated during the hour and reset to zero at between 51 and 57 minutes, depending on the station. To get an accurate per-hour precipitation total, it's necessary to determine the reset time (which is 51 minutes past the hour for the three NYC airports) and to extract the precipitation total each hour from that observation. A possible algorithm is outlined here and the ASOS weather observations are also discussed here.

@hadley hadley closed this as completed Jun 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior wip work in progress
Projects
None yet
Development

No branches or pull requests

2 participants