Determining the transition between DWF and WWF based on water quality measurements