Author Topic: Missing Parameters in NWS Meteogram XML Files  (Read 266 times)

0 Members and 1 Guest are viewing this topic.

Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 184
    • Willowsford Farm Weather
Missing Parameters in NWS Meteogram XML Files
« on: May 04, 2024, 08:12:32 AM »
I run a script that downloads the NWS meteogram in XML format from the NWS Hourly Weather Graph (Meteogram) so I can graph the parameters in Highcharts. My location is at this URL: https://forecast.weather.gov/MapClick.php?lat=38.9879&lon=-77.5193&unit=0&lg=english&FcstType=graphical. In the upper right corner of the meteogram is an orange button labeled "XML" that has the meteogram parameters in XML format. When clicking the link the resulting XML file states "This XML file does not appear to have any style information associated with it. The document tree is shown below." The only data in the file is date/time - all of the meteorological parameters are missing.

Wondering if anyone else uses this XML file and might know the reason for the missing parameters. I was thinking it might have to do with the recent NWS outages. Thoughts?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Missing Parameters in NWS Meteogram XML Files
« Reply #1 on: May 04, 2024, 10:20:27 AM »
It's not the NWS outages, but the change of weather.gov to new hosting/design.  Some of the features previously existing are possibly deprecated, and that includes the XML  They are trying to move all automated data requests to api.weather.gov and highly favor JSON outputs.  It also may be that the MapClick request for graphical is just 'broken' and not yet fixed, but the best option is to switch to using api.weather.gov for the future.  See those docs at https://www.weather.gov/documentation/services-web-api

see https://www.weather.gov/idp/forecastmigration for details regarding the migration of weather.gov to their IDP framework.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 184
    • Willowsford Farm Weather
Re: Missing Parameters in NWS Meteogram XML Files
« Reply #2 on: May 05, 2024, 07:09:52 AM »
Thanks Ken. If they depreciated XML, they should remove it from that webpage, but I'm sure there are a lot of things they need to find and update.

I'll look into using the api in the next iteration of my website. I'm moving from VA to NC on June 3, so I'll be shutting down my current website, https://novawx.dscloud.me/index.php, and starting fresh, sometime this summer.