added sorting to the function so that the rain and discharge dataframes ...

...are sorted in chronological order (in case they aren't already)