A routing model for continental-scale hydrology