Downloading Andalusian meteo data

Tue 11 December 2012

Filed under Blog

Tags python tips meteo

Many networks of automated meteo stations are around. In some places, the data are easy to access and therefore use. In some others, you have to go through a number of hoops. In Andalusia, it's a mixed bag: a number of independent networks are available for agricultural and environmental monitoring. While there's a system that allows you to query all these networks, it's hardly in an operational state if you want to download all the data in all the stations between two dates because you want to for example, interpolate some weather fields.

Two of the networks (RIA, Red de InformaiĆ³n Agraria and RAIF, Red de Alerta e InformaciĆ³n Fitosanitaria) have individual websites where you can select and download information for a given station and period of interest. In this post, I introduce some code that allows you use these websites to automatically download data. Note that there might well be other networks whose data is accessible in a similar way (in Andalusia or elsewhere) but I'm not aware of them.

The main idea is that the websites serve a file in reaction to a form submission. The code is in github, and it basically consists of one file, GetRia.py. Its use is extremely simple: you just execute GetRia.py, and it will download the data from all stations on both networks since 1/1/2000. The data will be saved in text files that will appear in your current working directory.

Easy no? ;-)


Comments


EO & DA Ramblings © J Gomez-Dans Powered by Pelican and Twitter Bootstrap. Icons by Font Awesome and Font Awesome More