Open channel’s free surface.

A few years ago, as part of my BSc studies, I wrote a Fortran 90/95 program which defines the profile of free surface of water when flowing inside an open trapezoidal channel. Firstly, the program takes as input a few physical characteristics of the channel and calculates the critical and normal depth of the flow, as well as the slope type of the canal; mild, steep or horizontal. Afterwards, the user feeds the program with an initial depth of the flow and then the equation of gradually varied flow is solved with the use of the numerical method “Runge-Kutte 4th order”. The different depths of water calculated at later space steps of the channel, are stored inside a .txt file so as one can easily process them in MS Excel. The code can be downloaded here: freesurface.f90