# Pythonic solution for determining annual chance flooding

I would like to create a function to determine annual chance of flooding given a specific ground elevation. The data I have available to me are water surface elevations at 5 specific recurrence intervals (10yr, 25yr, 50yr, 100yr, and 500yr). My initial approach was to run a linear regression using a log10 of the water surface values as the y axis and a log10 value for each interval. This did not yield very reliable results. Since then I have began exploring a piecewise linear interpolation solution. y = f(x) as it is described in the scipy interp1d. I can not seem to get this to work either.

I have seen this solution in Excel using Trend and some other functions, but I will need to run this over well over 1 million records. Again the idea is if you have a ground elevation of 556.345, where does it best fit between 5 intervals. How can I do this?

-
Does "did not yield very reliable results" mean that you expect a program to predict the future? – Jochen Ritzel Jan 26 '11 at 2:28
^^^ The program should more or less correctly predict the known past. – 9000 Jan 26 '11 at 2:32
I think you're looking for a method rather than Python code. – Rafe Kettler Jan 26 '11 at 3:15