Skip to content

An automatic differentiation based (AD-based) multimodal surface wave inversion tools

License

Notifications You must be signed in to change notification settings

liufeng2317/ADsurf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADsurf: Multimodal surface wave inversion with automatic differentiation

   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.


Installation

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


Examples

The follwing is an example of how to inversion with ADsurf. More examples and details will found in Jupyter notebook

1) Preparing the dispersion data

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
... ...

2) Setting the model paramters and inversion paramters

Details of all the paramters can be fond in jupyter notebooks

the key paramters including

  • Learning rate : the step size for inversion
  • damp: including the damping of verticle and horizontal(only for 2-D and 3-D inversion)
  • layering method: the initializing method provide by ADsurf.

3) Model initializing

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.

4) Inversion

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.

5) result saving

You can save all the intermediate processes and results of the inverson.


Related Knowledges

Please refer to the article for theoretical details: Multimodal surface wave inversion with automatic differentiation

1) Determinant Misfit Function v.s. Traditional Misift Function

2) Automatic Differentiation and Computational Graph

3) Efficiency of 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))

4)Analysis of inversion uncertainties

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.


Contributing

Contributions are welcome .disba and Computer Programs in Seismology (CPS).

License

The ADsurf package is distributed under the MIT license (free software).

Citation

If you find ADsurf useful, please cite the following reference:

Feng Liu, Junlun Li, Lei Fu, Laiyu Lu, Multimodal surface wave inversion with automatic differentiation, Geophysical Journal International, Volume 238, Issue 1, July 2024, Pages 290–312, https://doi.org/10.1093/gji/ggae155

Contact

Liu Feng @ USTC, Email: [email protected]

@software{LiuFeng2317,
  author       = {Feng Liu},
  title        = {ADsurf},
  month        = July,
  year         = 2023,
  version      = {v1.0.0},
}

About

An automatic differentiation based (AD-based) multimodal surface wave inversion tools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages