The velocity of a stream decreases from a maximum at the center to a minimum - near zero - at the banks, the velocity profile usually a parabolic function, or a linear function, of velocity versus distance from the bank.
The reason why the velocity is so low near the banks is due to friction, a fact that these tiny fish, milling around in the waters immediately adjacent to the sandy bank, utilize to prevent themselves from being swept downstream and out to sea.
Sudden and random surges in the velocity of the river however force them to adopt a schooling configuration - the top two photos, versus the randomly oriented positions of the fish in the shoal of the last two photos - and actively swim in an upstream direction in order to hold their position at the bank.
The confluence of the Gosthani River, May 10, 2010. Bheemili, Andhra Pradesh.













