A dynamic framework for flood risk