Hello together
I have actually some problems with meteoalarm.org. There are some active Meteoalarms of my region, but they will not be shown in my pws-dashboard. Has somebody the same problems ?
Configured Meteoalarm regions: CH162,CH163,CH164,CH143,CH152,CH153,CH163,CH161,CH169
Script used: wrnWarningEU-CAP.php, but with the script wrnWarningEU-ATOM.php the same problem.
That is a difficult question and it will take some time for everybody to investigate.
You mention 9 areas but not the area which is missing alrams
The meteoallarm.org switzerland file has 550 alarms probably each one for multiple areas.
But the problem is, as with Sweden, very simple.
Load the file in FireFox as that browser nicely expands the json data or better check the raw data.
All active alarms do not use an area-code but a list of polygon values (coordinates).
Switserland has no active warnings with an area code since October 26.
As I do not know your meteoalarm-area code, I can not check if there are active warnings
Probably there are.
As this is not a single country problem as it occurs in two countries, I will haver to make some time to find a solution, maybe scanning for an area_name such as “areaDesc Werdenberg”
As I understand, in the feed of the meteoalarms, the area codes will not be submitted, only the names of the area and this is the problem, why the meteoalarms will not be shown in the pws dashboard.
I was in contact with meteoswiss to verify, what they have changed in the meteoalarm feed of Switzerland. Here is the answer in German:
Sehr geehrter Herr Ender
Wir haben im Zuge der Erneuerung der Software einerseits eine mehrsprachige Publikation der Warnungen lanciert, andererseits haben wir auf Warn-Polygone umgestellt. Letzteres bedeutet, dass wir nicht mehr einen geoCode an Meteoalarm senden, sondern nur noch die Koordinaten Paare, die ein geschlossenes Warn-Polygon definieren. Wir haben bei dieser Umstellung auf den Regionscode (z.B.» CH124») verzichtet mitzugeben.
Gemäss dem offiziellen CAP Standard Common Alerting Protocol ist bei den Area-Elementen nur die «areaDesc» zwingend. Der geocode ist optional und nicht zwingend mitzugeben.
Auf interne Nachfrage wurde mir mitgeteilt, dass wir den geocode nicht mehr publizieren werden.
Eine mögliche Lösung für sie könnte sein, dass sie statt auf den geocode auf den areaDesc zugreifen. Der Inhalt der areaDesc ist ein konstanter Wert und ändert sich nicht und kommt einem geocode gleich. Ich hoffe, dass sie mit dieser Information die nötigen Umstellungen vornehmen können.
Freundliche Grüsse
Markus Härri
Eidgenössisches Departement des Innern EDI Bundesamt für Meteorologie und Klimatologie MeteoSchweiz
Operation Center 1 | Postfach | CH-8058 Zürich-Flughafen
So for the meteoalarm in Switzerland we will need a new solution, like for Sweden.
In the mail of meteoswiss it could be a solution to work with the areaDesc as a filter, because the areaDesc is needed as written in the CAP standards.
I hope, you will be able to fix this, to have a working solution with meteoalarm again.
Thank you very much.
Sadly, the problem is far bigger. I am working on it since my post
I downloaded a few CAP files this past weeks.
Each downloaded file has an array [warnings], with a key 0,1 a.s.o.
Each warning has 1 [alert] with no usable data for us
Each [alert] has 1 [info] array with all information need with key 0,1 a.s.o.
Each [info] array member describes the same warning in a different language
Therefor each [areaDesc] field can and will have a different value based on the language used for that description.
English:
That is valid for 1 language only
Only the [geocode] is a unique identifier.
Using the [areaDesc] field needs a lot of user maintainable settings.
For each official language used in a country a correct string has to be entered.
And the persons who upload the warnings should not make a typo either.
It will take a few weeks of my rare spare time before a new working version is developed, tested and ready to use.
An example of the data is attached.
@bitsostring
Yes, you are right, before MeteoSwiss changed to the five languages, they published the meteoalarms only in English and with the geocode. With changing to the five languages they dont publish the geocode in the meteoalarms anymore.
As of today there are at least two countries (Sweden Switzerland) which switched from area-codes to polygon-areas.
More countries will follow, see quote from a meteoalarm mail to @bitsostring
The issuance of warnings is within the responsibility of the individual country. At MeteoAlarm, our role is to provide documentation regarding the CAP Profile. However, we strongly encourage the adoption of polygons, as they render additional geocode lists obsolete and minimise misinterpretation.
Furthermore, polygons enable the warning of smaller regions, aligning with an impact-based approach.
These polygons define an area.
Our station can only be inside or outside of that area.
Drawbacks for us:
Adapt three meteoalarm (CAP RSS ATOM) scripts to support polygon-areas
No easy possibility to use multiple adjacent areas, a real problem as some countries (f.i. Germany) have a lot of small areas, others have larger.
More computer “costs” as scanning the warning files will need
a. more memory as files are larger
b. more processor time as the inside-outside code is far far more complex,
Temporary solution: PWS_Dashboard 2012_lts updates
→ meteoalarm_polygon.zip but one needs a download token !
This is a first version, tested but it will need performance improvements.
Next version will need to have
more efficient “inside-outside code”
extra latitude/longitude settings for adjacent areas in another country
Hello Wim
thank you for your hard work to solve the problem for meteoalarms without geocode like in Switzerland right now.
Can you please send me the donload token, so I will be able to test your first version.
Thank you very much.
I replied to MeteoAlarm and pointed out that with polygons there is no longer a unique identifier for an area, and got this:
I suppose I should be glad that UK Met Office recently decided to go the other way and produced 153 new geocodes, even for some cities, instead of the 17 we had before
Download tokens are extra’s for individual users who supported the development in the last years
Almost all mails are were sent today. I checked all PayPall mails twice.
If I missed yours please either reply to the “Thank you” mail or forward me your PayPall mail. A few donation mails had no private e-mail address, no url and an unknown persons-name
@ ALL
There is no error whatsoever in the scripts.
The PWS_Dashboard is free-ware now.
I will put the scripts on-line for wider use, if and when they are ready for general use.
Another two countries switched or are in the process of switching.
Luxembourg and Norway.
Done:
I updated the scripts to do less unnecessary checking of identical polygons.
The download zip is updated today, scripts 2023-11-26
Added extra microtime counters to measure time spent.
ToDo
More optimization before the large countries such as Germany go to polygons only.
Wim
updated Nov 29:
Israel added polygons but uses also the emma-id’s , no problem for the scripts
Affected countries at 2023-11-26
Sweden Norway Iceland
Switzerland Luxembourg
Israel
move the 4 scripts to your main “pwsWD/” folder
2.1 the wrnWarningEU.php script will replace the current one
2.2 the other three scripts are new (renamed) scripts.
wait until the cached data is invalid
or delete the chaced data jsondata/warningXXX.arr
This polygon-only emphasis seems to be counter to simplicity in determining if a specific location has an alert – a client app/program/device would have to determine if your location is within or outside of a polygon in order to signal an alert for you.
The US National Weather Service uses two versions for fixed-area alerts:
forecast, county and/or fire zone code names (ss[Z|C]nnn) (ss=State Abbrev., Z=forecast or fire, nnn=3 digit number)
SAME codes (a 5 digit number) used with NOAA/EC Weather Radios to trigger audible alerts
Some multi-zone urgent alerts (for flood, severe weather, tornado) will include a polygon in addition to the zones/SAME codes to highlight the specific area involved.
I think that the international MET offices going to polygon-only alerts are likely shortchanging their clients by causing increased complexity in determining if an alert applies to you… just my thoughts.
BTW, Wim has developed a method to use the EMMA_ID codes (where available) and finding in/out of the alert polygon if no EMMA_ID or NUTS code is available. Bravo, Wim!
Hello Wim
We have actually some meteoalarms in my region, but no meteoalarms will be shown in the PWS Dashboard with the new files of meteoalarm_polygon.zip.
In the configuration of PWS Dashboard, what I have to configure in the geocode line ?
For now only your station lat-lon is used as the warnings are for your local area not for all areas of Switzerland
As some stations need another adjacent area (f.i. near the border of a country),
I am developing code to check more locations.
But I have to lower the needed time to process the switzerland data as currently it reaches about 1 second on your server
You should leave the area codes as is.
If Switzerland re-introduces the area-codes they will be used immidiatly wihout to have to use the lat-lon code
Thank you for clarfying the point with lat-lon only for the station in the local area.
Do you think it will be possible to setup not only the own station lat-lon, I would like to cover some more regions around my station lat-lon, like with the multiple area codes in the setup.
Thank you very much.
Yes, I already answered that multiple times.
Please next time read my answers as in my previous post
Use translate.google on the Chrome browser to translate it to ones native language.
Da einige Stationen ein weiteres angrenzendes Gebiet benötigen (z. B. in der Nähe einer Landesgrenze):
Ich entwickle Code, um weitere Standorte zu überprüfen.
Aber ich muss die benötigte Zeit zum Verarbeiten der Schweiz verkürzen, da sie derzeit bei Ihrem Aufschlag etwa 1 S
Answering the same questions is a waste of time i prefer to spent for writing adapting scripts.
You posted 7 times in this topic. Better read the answers you get and do fa forum search first before asking similar questions time after time.