Reconstruction of river bed topography from free surface data using a direct numerical approach in one-dimensional shallow water flow