The attached script will do that, it calculate the trend based on the last-hour change in rain. Please unzip and test.