The application of inverse methods to problems in ocean circulation