An efficient procedure is presented for analyzing oceanographic observations with the aid of a general circulation model. Poorly known model parameters, such as eddy-mixing coefficients, surface forcing and tracer boundary fluxes, can be calculated by fitting model results to observations. Optimal estimates for all model fields, including the observed ones, can then be computed by running the model with the best-fit values of the calculated parameters. Information about the resolution and the error-covariances of the model parameters can be computed. This information is shown to be very valuable for critically evaluating how well the data determine the parameter's values. An adjoint model, similar in structure to the numerical model, uses information on model-data misfit to improve estimates of the unknown model parameters, and improve the fit to observations. The procedure is illustrated using simulated data and a simple, barotropic, nonlinear, quasi-geostrophic model. Examples are discussed in which friction parameters, wind forcing, and the steady-state circulation are determined from simulated vorticity and streamfunction observations.