Clear-sky UV index and ozone
at a location

go to TEMIS Home Page

UV index
main page


UV archive
overview
UV index forecast maps : Europe  |  The Netherlands  |  Dutch Caribbean  |  World

UV index forecast at your location  |  UV index archive

 

 
UV index and ozone at a location


Information on the resolution of the data


 

Automatically retrieving the UV index and ozone forecast at a location

At 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.

 
IMPORTANT NOTE

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; https://www.temis.nl/
And please inform us where and how you use the data.

 


 
To retrieve, for example, the forecast for De Bilt (longitude=5.18, latitude=52.1) with lynx, you can give the following command (using a backward slash as continuation character to split the otherwise long line; the quotes are needed to keep the full argument as one item):

  lynx -nolist -dump \
    "https://www.temis.nl/uvradiation/nrt/uvindex.php?lon=5.18&lat=52.1" \
    > output_file.txt
This writes the forecast to the text file  output_file.txt  for further use.
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 \
    "https://www.temis.nl/uvradiation/nrt/uvibare.php?lon=5.18&lat=52.1" \
    > output_file.txt
Again, this writes the forecast to the text file  output_file.txt  for further use. See this file for an example of the output.
For both cases above:
*  The "-dump" option takes care that lynx ends after getting the page.
*  The "-nolist" option removes a list of links on the page.

For expert users we have also the location tool giving a simple ascii table. This can also be called as above, in which case the "-nolist" option is not really needed.

 
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 \
    "https://www.temis.nl/uvradiation/nrt/uvibare.php?lon=5.18&lat=52.1"
    > output_file.txt
Again, this writes the forecast to the text file  output_file.txt  for further use. See this file for an example of the output.
 

 


last modified: 24 November 2020
data product contact: Jos van Geffen & Ronald van der A
Copyright © KNMI / TEMIS