Inverse Modeling of the Ocean and Atmosphere is a graduate-level textbook for students of oceanography and meteorology, and anyone interested in combining computer models and observations of the hydrosphere or solid earth. The scientific emphasis is on the formal testing of models, formulated as rigorous hypotheses about the errors in all the information: dynamics, initial conditions, boundary conditions and data. The products of successful inversions include four-dimensional multivariate analyses or maps of, for example, ocean circulation fields such as temperature, pressure and currents; analyses of residuals in the dynamics, inputs and data; error statistics for all the analyses, and assessments of the instrument arrays or observing systems. A step-by-step development of maximally-efficient inversion algorithms, using ideal models, is complemented by computer codes and comprehensive details for realistic models. Variational tools and statistical concepts are concisely introduced, and applications to contemporary research models, together with elaborate observing systems, are examined in detail. The book offers a review of the various alternative approaches, and further advanced research topics are discussed. Derived from the author's lecture notes, this book constitutes an ideal course companion for advanced undergraduates and graduate students, as well as being a valuable reference source for researchers and managers in the theoretical earth sciences, civil engineering, and applied mathematics. Tutors are also directed towards the author's ftp site where they may download complementary overheads for class teaching.