The Variational Inverse Method for the General Circulation in the Ocean