【问题标题】:World Weather API returns negative swell heightWorld Weather API 返回负膨胀高度
【发布时间】:2013-12-24 06:42:43
【问题描述】:

我正在使用 World Weather Online API,并且得到了一些奇怪的结果。我找不到太多关于这些读数如何工作的文档,但我看到的一件奇怪的事情是 -999 米的膨胀高度。我正在使用加利福尼亚州山景城的一个位置,该位置不是离水很近,但我希望 API 会从最近的可用站/仪器返回结果。这是一个示例响应:

        <data>
        <script id="tinyhippos-injected"/>
        <request>
        <type>LatLon</type>
        <query>Lat 37.39 and Lon -122.09</query>
        </request>
        <nearest_area>
        <latitude>37.467</latitude>
        <longitude>-122.083</longitude>
        <distance_miles>5.4</distance_miles>
        </nearest_area>
        <weather>
        <date>2013-12-06</date>
        <maxtempC>10</maxtempC>
        <mintempC>-233</mintempC>
        <hourly>
        <time>0</time>
        <tempC>1</tempC>
        <tempF>34</tempF>
        <windspeedMiles>4</windspeedMiles>
        <windspeedKmph>6</windspeedKmph>
        <winddirDegree>193</winddirDegree>
        <winddir16Point>SSW</winddir16Point>
        <weatherCode>113</weatherCode>
        <weatherIconUrl>
        <![CDATA[
        http://cdn.worldweatheronline.net/images/wsymbols01_png_64/wsymbol_0001_sunny.png
        ]]>
        </weatherIconUrl>
        <precipMM>0.0</precipMM>
        <humidity>68</humidity>
        <visibility>10</visibility>
        <pressure>1021</pressure>
        <cloudcover>0</cloudcover>
        <sigHeight_m>-999.0</sigHeight_m>
        <swellHeight_m>-999.0</swellHeight_m>
        <swellDir>-999</swellDir>
        <swellPeriod_secs>-999.0</swellPeriod_secs>
        <waterTemp_C>12</waterTemp_C>
        <waterTemp_F>54</waterTemp_F>
        </hourly>

这个阅读有什么问题吗?我假设它应该只是一个零膨胀高度,我可以处理,但我想确保 -999 并不意味着其他东西(比如当时没有读数或其他东西)。

【问题讨论】:

  • 不,它会做那种事情,这对我来说没有意义。
  • 听起来像是一个不可靠的服务,我知道这不能回答你的问题,但如果这是一个严肃的应用程序,我会考虑付费服务。我们已经使用 Wea​​therUnderground 一年多了,它很棒。 api.wunderground.com我不是 100% 确定,但我想我在某处读到谷歌使用这些人。我也相信你可以免费测试它。
  • 是的,我也检查了 wunderground,但它们没有膨胀的高度 - 根据 9 个月前的论坛帖子:“不是现在,只有潮汐。我们希望尽快提供更多。 "
  • api.wunderground.com/weather/api 试试这个,我刚刚查询了加利福尼亚州山景城并获得了良好的数据。抱歉,我不知道他们没有您要查找的数据。我主要将它用于当前条件、预测和风速、露点等。

标签: xml api weather


【解决方案1】:

-999 通常用于表示天气源中缺失的数据,正如您所担心的那样。如果该提要没有为您提供所需的数据,您可以尝试National Data Buoy Center,它收集全球范围内的波高数据,重点是美国海岸。他们提供了多种使用数据的方式,包括 KML 下载。

【讨论】:

  • 你说得对——我给 World Weather 的人发了电子邮件,他们告诉我,-999 意味着他们没有该地区的任何数据。我将查看国家数据浮标中心,看看他们是否有更可靠的数据可用。谢谢!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-05-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多