A computer code for forward calculation and inversion of the H/V   spectral ratio under the diffuse field assumption
  During a quarter of a century, the main characteristics of the horizontal-to-vertical spectral ratio of ambient noise HVSRN have been extensively used for site effect assessment. In spite of the uncertainties about the optimum theoretical model to describe these observations, several schemes for inversion of the full HVSRN curve for near surface surveying have been developed over the last decade.   In this work, a computer code for forward calculation of H/V spectra based on the diffuse field assumption (DFA) is presented and tested.It takes advantage of the recently stated connection between the HVSRN and the elastodynamic Green's function which arises from the ambient noise interferometry theory.   The algorithm allows for (1) a natural calculation of the Green's functions imaginary parts by using suitable contour integrals in the complex wavenumber plane, and (2) separate calculation of the contributions of Rayleigh, Love, P-SV and SH waves as well. The stability of the algorithm at high frequencies is preserved by means of an adaptation of the Wang's orthonormalization method to the calculation of dispersion curves, surface-waves medium responses and contributions of body waves.   This code has been combined with a variety of inversion methods to make up a powerful tool for passive seismic surveying. 
Antonio Garc\'ia-Jerez, Jos\'e Pi\~na-Flores, Francisco J.   S\'anchez-Sesma, Francisco Luz\'on and Mathieu Perton
physics.geo-ph