You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stations with the network_variable_name of cum_pcpn_amt seem to measure precipitation by accumulation - that is, they report how much total precipitation has fallen since the last time the instrument reset on an hourly basis, instead of reporting how much precipitation has fallen that hour. Here are a couple representative graphs:
Physically it seems likely these are "tippng bucket" stations, measuring rainfall via a bucket that accumulates water until it is full, and tips out to reset.
In order to calculate monthly precipitation observed at these stations, we do not want to average hourly or daily reported values; this leads to months where, in the case of the second graph, every day or hour sees 1600 mm of precipitation! I believe the right calculation goes something like:
month_max = maximum value recorded during month
month_min = smallest value recorded during month
month_last = last value recorded during month
month_first = first value recorded during month
if month_max > month_last: #bucket "tipped" this month
return (month_last - month_min) + (month_max - month_first)
else: bucket did not "tip" this month
return month_last - month_first
In order for the back end to calculate this special case reasonably quickly, we need a new materialized view with month_max, month_min, month_last, and month_first for each station and month using the cum_pcpn_amt variable, as well as the earliest and latest days each month for which data is available so we can prorate it if there is less than a full month's data in the database.
The text was updated successfully, but these errors were encountered:
corviday
changed the title
Support alternate monthly mean calculations for tippng bucket stations
Support alternate monthly mean calculations for tipping bucket stations
Apr 16, 2024
Stations with the
network_variable_name
ofcum_pcpn_amt
seem to measure precipitation by accumulation - that is, they report how much total precipitation has fallen since the last time the instrument reset on an hourly basis, instead of reporting how much precipitation has fallen that hour. Here are a couple representative graphs:Physically it seems likely these are "tippng bucket" stations, measuring rainfall via a bucket that accumulates water until it is full, and tips out to reset.
In order to calculate monthly precipitation observed at these stations, we do not want to average hourly or daily reported values; this leads to months where, in the case of the second graph, every day or hour sees 1600 mm of precipitation! I believe the right calculation goes something like:
In order for the back end to calculate this special case reasonably quickly, we need a new materialized view with
month_max
,month_min
,month_last
, andmonth_first
for each station and month using thecum_pcpn_amt
variable, as well as the earliest and latest days each month for which data is available so we can prorate it if there is less than a full month's data in the database.The text was updated successfully, but these errors were encountered: