name: search-precipitation description: > Search rain and precipitation data from the weather station. Use when the user asks about rain, rainfall, precipitation, how much it rained, or daily/weekly/monthly rain totals.
Search Precipitation
Parse the time range from the user's request.
For daily/accumulated totals, prefer reading the pre-aggregated fields:
SELECT last(dailyrainin), last(weeklyrainin), last(monthlyrainin), last(totalrainin)
FROM weather WHERE time > now() - 1h
- For understanding the rate of rain at a particular time, use
hourlyraininwhich takes a point estimate of the rain at that sample and extrapolates to see how much rain would accrue if it kept raining at that rate for a full hour. For example, to get the heaviest rate of rain from the last 30 days:
SELECT max(hourlyrainin) FROM weather WHERE time > now() - 30d
- Present results in inches, noting accumulation periods.