A dynamic hydrological method to calculate instream flow and its application