Clear-sky UV index and ozone
|UV index forecast maps : Europe | The Netherlands | Dutch Caribbean | World|
UV index and ozone at a location
Automatically retrieving the UV index and ozone at a location
Automatically retrieving the UV index and ozone forecast at a locationAt times we get requests how to automatically retrieve the UV index and ozone forecast data from this web site. The data is not available via FTP, but can be accessed using web browsers only. Some web browsers can be used easily from within script or batchfiles.
For automatic purposes, the wget browser can be very useful; this browser exists for both UNIX/Linux and Windows. For more information, see the WGET home page. This browser, however, gives HTML coded output and that may not be useful for further processing.
Text based browsers can be very suitable to extract information on web pages. In particular the simple broswer lynx often does a good job. It is available for UNIX/Linux and for Windows; see the LYNX home page. Because lynx is so simple and easy, it is used below to give an example.
If you plan to use any information you obtain from the TEMIS website publicly, you will need to add some form of credits, for example:
Copyright © KNMI/ESA; http://www.temis.nl/And please inform us where and how you use the data.
lynx -nolist -dump \ "http://www.temis.nl/uvradiation/nrt/uvindex.php?lon=5.18&lat=52.1" \ > output_file.txtThis writes the forecast to the text file
The thus created output contains the same introductory text as the tool used on this website, and so it basically contains more info than you need for automatic processing. To reduce the text output to the bare necessities, you can use another web script:
lynx -nolist -dump \ "http://www.temis.nl/uvradiation/nrt/uvibare.php?lon=5.18&lat=52.1" \ > output_file.txtAgain, this writes the forecast to the text file
Another text-based console browser is Elinks (see Elinks homepage) which works similar to lynx but gives in its output more details, e.g. lines around table entries. Basic saving, omitting all
elinks -no-numbering -no-references -dump \ "http://www.temis.nl/uvradiation/nrt/uvibare.php?lon=5.18&lat=52.1" > output_file.txtAgain, this writes the forecast to the text file
26 June 2017
data product contact: Jos van Geffen & Ronald van der A
Copyright © KNMI / TEMIS