Geophysical modeling and inversion