As simulations of 21st-century climate start to include components with longer timescales,such as ice sheets, the initial conditions for those components will become critical to the forecast.This paper describes an algorithm for specifying the initial state of an ice-sheet model, given spatiallycontinuous observations of the surface elevation, the velocity at the surface and the thickness of theice. The algorithm can be viewed as an inverse procedure to solve for the viscosity or the basal dragcoefficient. It applies to incompressible Stokes flow over an impenetrable boundary, and is based upontechniques used in electric impedance tomography; in particular, the minimization of a type of costfunction proposed by Kohn and Vogelius. The algorithm can be implemented numerically using only theforward solution of the Stokes equations, with no need to develop a separate adjoint model. The onlyrequirement placed upon the numerical Stokes solver is that boundary conditions of Dirichlet, Neumannand Robin types can be implemented. As an illustrative example, the algorithm is applied to shear flowdown an impenetrable inclined plane. A fully three-dimensional test case using a commercially availablesolver for the Stokes equations is also presented.