ADsurf is a computationally efficient python program for the multimodal surface wave inversion and implementation for Pytorch. The implementation follows a open source python project named disba which is an efficient tools for modeling of surface wave dispersion and implements from Computer Programs in Seismology(CPS)). We have reconstruct the forward-pass that it can solve the inverse gradients by AD automatically, and a new determint misfit function used in our program to make it applicable to multimodal dispersion curves inversion.
Step1: We recommend building a new environment to run the code, and anaconda can be used to help you:
conda create --name ADsurf python==3.8
Step2: Some requirements package need to be installed:
pip install -r requirements.txt
Step3: We recommend using the GPU version of Pytorch to maximize the efficiency of the surface wave inversion.
conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
More details can be found in Pytorch instal
The follwing is an example of how to inversion with ADsurf. More examples and details will found in Jupyter notebook
the observed dispersion data need to be orginized by a 2-D matrix: the first column is the period (s)
or frequency (Hz)
; and the second column is the observed phase velocity (km/s)
;
period (s) | Phase Velocity (km/s) |
---|---|
0.1 | 2.19482374 |
0.10403065 | 2.19485283 |
0.10822376 | 2.19489002 |
0.11258588 | 2.19494247 |
0.11712383 | 2.19501066 |
0.12184468 | 2.19510221 |
... | ... |
Details of all the paramters can be fond in jupyter notebooks
the key paramters including
Learning rate
: the step size for inversiondamp
: including the damping of verticle and horizontal(only for 2-D and 3-D inversion)layering method
: the initializing method provide by ADsurf.
We provide two commond used layering method named Layering by ratio(LR) and Layering by Number (LN) for uses, more details can be found in Cox and Teague (2016)
However, it should be noted that linear inversion inevitably tends to fall into local minima, and to address this problem we try to initialise several initial velocity models simultaneously for simultaneous inversion (Monte Carlo method).
More detail and comparation will discuss in Inversion part.
we have built a complete object-oriented programs:
inversion_model = inversion(
model_param = model_parameter,
inv_param = inversion_parameter,
init_model=initial_model,
pvs_obs=pvs_obs,
vsrange_sign="mul",
vsrange=[0.1,2],
AK135_data=[],
device="Cuda"
)
The misfit decay with the iteration, We should note that although we have up to 2000 iterations here, the number can be reduced to 100 or less with parameter adjustment.
Although you can choose between inversion using the MonteCarlo multi-initial velocity model and inversion using just the single-initial velocity model, we recommend that you use the Monte Carlo inversion because you can get better results with little additional computational overhead.
You can save all the intermediate processes and results of the inverson.
Please refer to the article for theoretical details: Multimodal surface wave inversion with automatic differentiation
We compared the computational efficiency of ADsurf and finite difference methods (FD) for inversion (it should be noted that we used the Determinant Misfit Function(DMF))
We provide a more detailed description of how to use ADsurf to assess the inversion uncertainty due to the initial model and observations in the APPENDIX-E section of the main text.
Contributions are welcome .disba and Computer Programs in Seismology (CPS).
The ADsurf package is distributed under the MIT license (free software).
If you find ADsurf useful, please cite the following reference:
Liu Feng @ USTC, Email: liufeng2317@mail.ustc.edu.cn
@software{LiuFeng2317,
author = {Feng Liu},
title = {ADsurf},
month = July,
year = 2023,
version = {v1.0.0},
}