CONUS-scale longest flow path algorithm