Mechanical power input from buoyancy and wind to the circulation in an ocean model