from IrishStationDataServer import StationDataServer import glob,os # create a data server object for the Belmullet station # (the data is in /home/rca/obs/IrishStationData/synop # have a look there to see which stations are available) for station in glob.glob('/home/rca/obs/Irish_station_data/synop/*'): print station d = StationDataServer(os.path.basename(station)) # see what range of dates is available in this dataset d.getDateRange() # get the data for temp,windir,windspeed,rh,precip = d.getData(1992, 3, 27, 13) print temp,windir,windspeed,rh,precip # if you just want the precip: precip = d.getData(1983, 11, 2, 9)[4] print precip # get a list containing ALL the dates and times for the June-August season of 1983 dates = d.getDateList(Year=1983, Season='JJA') # get the precip correspoinding to first date and time # note the cool shorthand notation with * !! temp,windir,windspeed,rh,precip = d.getData(*dates[0]) print temp,windir,windspeed,rh,precip