Diagnostic relations are derived whose satisfaction yields a unique adjustment of observational data such that the balance equation is satisfied. In this formulation both the observed geopotential and velocity fields are incorporated, each according to its relative accuracy. Natural boundary conditions which arise in the variational formulation are discussed along with the conservation properties of the method. Numerical experiments with analytic fields and additive noise are used to verify the formulation for three error models. Reductions in the error variance of the order of one-half are found for both random and persistent errors, including systematic departures from a balanced condition.