A set of 44 sonic velocity well logs from the southern San Joaquin Valley are combined with soil textural data to derive a three-dimensional compressional velocity model. The compaction of a granular medium containing fines provides a conceptual framework for constructing a forward model and defining governing parameters. An iterative quasi-Newton algorithm that allows for bounds on the variables is used to estimate the 18 model parameters. The inversion reduces the misfit to the well log velocities by over an order of magnitude. The resulting velocity model contains a 30% increase in velocity from the surface to a depth of 700 meters. Lateral variations of around 10% occur within the layers of the model, reflecting the textural heterogeneity in the subsurface.