We study the energy consumption optimization of a reverse osmosis water desalination process producing a constant permeate flow in the presence of feed concentration fluctuation. We propose a time-varying optimal operation strategy that can significantly reduce the specific energy consumption compared to time-invariant process operation.