When solar energy is sufficient then water pump will operate at maximum rpm resulting maximum output through solar through MPPT & VFD.
When solar energy is weak then VFD is taking DC source from solar & balance AC power from grid to operate the pump at maximum rpm to result maximum output.When solar energy is absent then if you wish then grid can operate pump by usual ways such as in night time.