Replies: 1 comment
-
Okay, there are a lot of things going on here :) First off, forecast.weather.gov and API are entirely separate systems with their own data feeds, so the fact that it works in one but not the other is not surprising. As far as missing station metadata, there are new stations coming online every day. We source much of this data from Synoptic Data/MesoWest; however, as our API is still mostly a beta project, we do not currently have a set schedule for synchronizing this data and pulling new stations in. So a missing station in API, especially if it is new, is not surprising. We will look at updating this data more regularly in the future. As for the stations with special characters, this is a bug in the management interface for the forecast offices and I have forwarded this to the appropriate team. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I've noticed while looking at local forecast zones, there are some referenced stations that don't seem to exist:
For example, https://api.weather.gov/zones/forecast/WAZ559 (Bremerton and Vicinity, WA), references F0240, however
https://api.weather.gov/stations/F0240 returns HTTP 404, with
{
"correlationId": "fc211054-8c15-468f-aa15-9d082bb5d98f",
"title": "Observation Station Does Not Exist",
"type": "https://api.weather.gov/problems/InvalidObservationStation",
"status": 404,
"detail": "Observation station F0240 does not exist",
"instance": "https://api.weather.gov/requests/fc211054-8c15-468f-aa15-9d082bb5d98f"
}
However, https://forecast.weather.gov/MapClick.php?lat=47.565&lon=-122.6275 shows current conditions from FW0240 Bremerton (F0240).
From a crawl of all the forecast zones, starting from https://api.weather.gov/zones/forecast, I saw 371 unique stations referenced, a total of 639 times. I've attached a list of the stations and the zone where it was referenced: bad_stations.txt
6 of the instances are a little bit special:
BadStation https://api.weather.gov/stations/%20KSQI https://api.weather.gov/zones/forecast/ILZ028
BadStation https://api.weather.gov/stations/KOMA%60 https://api.weather.gov/zones/forecast/MOZ004
BadStation https://api.weather.gov/stations/K7W4%20 https://api.weather.gov/zones/forecast/VAZ048
BadStation https://api.weather.gov/stations/%20KEFT https://api.weather.gov/zones/forecast/WIZ064
BadStation https://api.weather.gov/stations/%20KEFT https://api.weather.gov/zones/forecast/WIZ069
BadStation https://api.weather.gov/stations/%20KENW https://api.weather.gov/zones/forecast/WIZ071
These stations are returning HTTP 500, because the station name has special characters in it (spaces or a less than sign). These stations do exist, if the character is removed.
To Reproduce
urls above seem readily reproducible.
If possible, also include the correlationId from the response.
Expected behavior
I would expect the stations listed in properties->observationStations to be reachable
Environment
Developing with PHP and Perl, but reproduced all findings with calls in Firefox. Happy to provide Perl crawling script if needed/desired.
Beta Was this translation helpful? Give feedback.
All reactions