The Indian Ocean general circulation is estimated by fitting the MIT Ocean General Circulation Model to the annual mean climatological hydrography and surface forcing, using the model and its computer-generated adjoint. Open boundary conditions are implemented to the west of the Indonesian Archipelago and near 30S. The approach simultaneously optimizes the initial conditions of the hydrographic fields, surface fluxes, and the open boundary conditions (temperature, salinity, and horizontal velocities). Compared to previous results obtained in a closed domain, the estimated velocity field shows a marked improvement near the southern boundary, with a reasonably strong Agulhas Current leaving the model domain. The Indonesian throughflow (ITF) is estimated as 2.7 Sv (1 Sv is 106 m3/s) westward, which is on the low end of the range of previous estimates. The model is able to sharpen fronts in surface salinity, compared to climatology, and suggests that the low surface salinity values in the eastern equatorial region arise from advection out of the Bay of Bengal rather than from the ITF. Consistent with the closed-domain results, the meridional overturning is dominated by a shallow (above 500 m), wind-driven cell of 16 Sv maximum, which carries the bulk of the southward heat transport. We have defined generalizations of meridional heat and freshwater transports appropriate in the presence of a throughflow. The estimated meridional heat transport has a maximum of 0.8 PW at 12S, maximum freshwater transport is 0.29 Sv southward at 9S. The meridional transport divergences are well balanced by the surface heat and freshwater fluxes, indicating near-steady state and small influence of the ITF.