Thermodynamics of saline and fresh water mixing in estuaries