wd ver 151…NOAA WARNINGS not working.
As I’m in UK, I have to ask: are these warnings part of WD? Or. . .?
WD 1037S 151
CURRENT WINTER ADVISORY IN EFFECT, WD NOT SEEING IT, TRIED OTHER OHIO NWS ZONES, NO DATA AT ALL
Sorry, I don’t do NOAA. . . but I do know that NWS warnings have changed recently.
Unless a fellow countryman chips in soon I suspect you will have to contact Brian direct.
NOAA changed from zone codes to county codes. The lookup function has not been updated to match. You can go on-line to look up your county code and manually enter it and it will work just fine. In Georgia my county code is GAC111.
Good luck and regards,
Jim
Thanks.
Cant seem to find Franklin County Ohio…old zone was OHZ055. Link to new codes if you know/
Weathership
Groveport OH
Terry Steinhauser
Franklin County Ohio is OHC049.
Goto NWS Alerts Click on Land Areas with Zones, then in your state click County Zones toward the right.
Good Luck
Jim
Thank you. I just found it before your email came in.
Terry
WHat else needs to be changed, NWS Alerts (weather.gov)
Above URL shows flood warning, changing the Zone to GAC109 and clicking go shows
GAC109
There are no active watches, warnings or advisories
Brian may need to change look up api and update a zip…also check that flood warning is a current one and not archived
I have been in touch with Brian and advised him of the problem and the Saratoga template solution to it. He is away, but will look at it when he gets back.
Jim
Thank you for this info
I’ve been struggling with the same issue for a few weeks as well. After Brain updates WD, it would be good to clarify if this NOAA change is only for warnings or forecasts/warnings.
suggests it’s only alerts?
What changed was alerts.weather.gov which stopped offering XML format ATOM alerts on the site in favor of offering alerts in JSON or CAP XML on api.weather.gov instead, using both a new host and query URI.
As I understand it, WD uses ftp to get zone forecasts and zone alerts (raw text) from tgftp.nws.noaa.gov. that capability still exists and is not being phased out (AFAIK).
A forecast zone like for my CAZ513 zone is at:
https://tgftp.nws.noaa.gov/data/forecasts/zone/ca/caz513.txt
which is a Zone, not a Point forecast so is more general.
The alerts for CAZ513 that WD uses in the NOAA Warnings setup is the old alerts.weather.gov query format:
https://alerts.weather.gov/cap/wwaatmget.php?x=CAZ513&y=1
The new format is
https://api.weather.gov/alerts/active.atom?zone=CAZ513
But… they changed the ATOM format to omit an <event>...</event>
entry where there are not any active alerts in the area. For the nws-alerts program, I had to detect that and insert XML with the missing <event>...</event>
so the rest of Curly’s code would work normally. (I was too lazy to just rewrite it).
The missing part I’d inserted was in this function from nws-alerts:
// FUNCTION - generate fake no-data alert for CAP 1.2 no alerts entries
function gen_no_alert($zData) { // Added in V2.00
global $noted,$doDebug;
$output = '';
/* input CAP1.2 with no <event> entry:
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:cap="urn:oasis:names:tc:emergency:cap:1.2">
<id>https://api.weather.gov/alerts.atom?zone%5B0%5D=CAZ513&limit=500&active=1</id>
<generator>NWS CAP Server</generator>
<updated>2024-01-23T00:30:00+00:00</updated>
<author>
<name>[email protected]</name>
</author>
<title>Current watches, warnings, and advisories for Santa Clara Valley Including San Jose (CAZ513) CA</title>
<link rel="self" href="https://api.weather.gov/alerts.atom?zone%5B0%5D=CAZ513&limit=500&active=1"/>
</feed>
Need something in <event> section like:
<entry>
<id>https://alerts.weather.gov/cap/wwaatmget.php?x=CAZ513&y=0</id>
<updated>2024-01-29T16:13:41+00:00</updated>
<author>
<name>[email protected]</name>
</author>
<title>There are no active watches, warnings or advisories</title>
<link href="https://alerts.weather.gov/cap/wwaatmget.php?x=CAZ513&y=0"/>
</entry>
*/
$id = isset($zData->id)?(string)$zData->id:'';
$id = str_replace('&','&',$id);
$updated = isset($zData->updated)?(string)$zData->updated:'';
$author = isset($zData->author->name)?(string)$zData->author->name:'';
$link = $id;
$rawXML = '<entry>
<id>'.$id.'</id>
<updated>'.$updated.'</updated>
<author>
<name>'.$author.'</name>
</author>
<title>There are no active watches, warnings or advisories</title>
<link href="'.$link.'"/>
<noalert>1</noalert>
</entry>
';
$output = simplexml_load_string($rawXML);
if($doDebug) {$noted .= "<!-- gen_no_entry generated \n".print_r($output,true)." -->\n"; }
return($output);
}
I think Brian will have to update the NOAA Warnings program to use/handle the new alerts URL.
I appreciate the clarifications and updates all
Did anyone try the new zipped version Brian updated for NWS Alerts. It is not finding any codes for my State - Tried New Hampshire and got the same. California appeared to find some zones that worked. I did try other states and it appeared hit or miss. Will test on my second system.
Do you not need to enter counties rather than zones now?
https://discourse2.weather-watch.com/t/noaa-warnings-not-working-now/73341/7
It worked once,now failing Tried both old zones format an then county format…
You’ll need county codes not the zone. Stand by, the work is in progress.
Jim