GithubHelp home page GithubHelp logo

tianyining / att_training Goto Github PK

View Code? Open in Web Editor NEW

This project forked from migg-ntu/att_training

3.0 0.0 0.0 122 KB

Adjoint-state Traveltime Tomography (trainning version)

License: BSD 3-Clause "New" or "Revised" License

Fortran 96.37% Shell 3.63%

att_training's Introduction

Adjoint-state Traveltime Tomography (Trainning Version)

Repository size

The code is for adjoint-state traveltime tomography (ATT) in the Cartesian coordinates. This simple version is mainly for training purpose.

The details of the algorithm can be found at Tong, P. (2021). Adjoint-state traveltime tomography: Eikonal equation-based methods and application to the Anza area in southern California. Journal of Geophysical Research: Solid Earth, 126, e2021JB021818. https://doi.org/10.1029/2021JB021818.

Requirements

In order to run the codes, you have to install GNU Fortran [Operating system setup tutorials in Chinese]:

# Fedora
$ sudo dnf install gcc-gfortran
    
# CentOS
$ sudo yum install gfortran
    
# Ubuntu/Debian
$ sudo apt install gfortran
    
# macOS
$ brew install gfortran

Generic Mapping Tools (GMT) is used to plot figures. Refer to [GMT reference book in Chinese] for GMT installation and usage.

Part I: Data

$ cd data

Prepare your data in dataInFormat_D_xyz following the designed format. I use syntheticData.f90 to generate synthetic earthquakes and seismic stations.

$ cd dataSelection/0_commandCenter/

Set the parameters in parametersData.F90. You can select the regions for earthquakes and seismic stations. The two regions can be different.

$ ./workflowStep.sh

Part II: CommandCenter

$ cd ../../../commandCenter

You should have the following files ready at ../data/:

  1. sources
  2. receivers
  3. nevtstaray
  4. evtstaminmax
  5. traveltimeReceiverGathers

Set the parameters in parametersGenerator.F90. The dimension of the forward grid, number of multiple grids, iteration number and some others can be defined here. You can compile and execute parametersGenerator.F90 at this time.

$ gfortran -o xpara parametersGenerator.F90
$ ./xpara
$ rm xpara

Part III: Model

cd ../model

If this is for a recovery test, you can set up the target velocity model by editing velocity3d_true.F90.

$ gfortran -o xvel velocity3d_true.F90
$ ./xvel
$ rm xvel

Otherwise, just define the initial model for seismic tomography by editing velocity3d.F90.

$ gfortran -o xvel velocity3d.F90
$ ./xvel
$ rm xvel

Part IV: Mesh

cd ../mesh

Edit memeshgenerator.F90 to adjust the size of the inversion grid. The following three parameters should be properly set.

invx = 12
invy = 3
invz = 11

In general, we sample one-wavelength anomaly by 5 grid points or the grid interval is about one fourth of the anomaly wavelength.

$ gfortran -o xmesh meshgenerator.F90
$ ./xmesh
$ rm xmesh regmesh.mod

Part V: CommandCenter

cd ../commandCenter

# Run it if this is a recovery test
$ ./workflow_obstime.sh

$ ./workflow_inversion.sh

The obtained velocity model is located at ../inversion/ as velocity3d015.

Part VI: Figure

You can display the results along the cross-section set by lineEnds:

$ ./plot-cross-section.sh

The Bash script will call zCutVelocity.f90 and the gmt script vcut.gmt.

att_training's People

Contributors

core-man avatar

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.