Code Monkey home page Code Monkey logo

rtm----segyio-devito-'s Introduction

RTM w segyio and devito frameworks

Reverse time migration belongs to the class of two-way full wave migration solutions. Rather than performing imaging by extrapolating the data in depth, as in traditional one-way full wave solutions, RTM solves the wave equation forward in time for the source modeling field and backward in time for the recorded receiver field for that shot. At each time step, the depth image is obtained by cross-correlating the two fields.

Install dependencies

To install devito follow the instructions from Devito documentation. I recommend to set up a python environment with conda as also suggested in the installation web page

git clone https://github.com/devitocodes/devito.git
cd devito
conda env create -f environment-dev.yml
source activate devito
pip install -e .

All other packages (i.e. dask jobqueue, segyio) can be easily installed via pip once you have activated the devito environment. To install them, run the following:

pip install segyio
pip install dask-jobqueue --upgrade

Notes and workarounds

The cluster (OGÚN) I use is managed by Slurm, but, for reasons I am unaware of, it does not allow manually setting the memory of nodes when submitting my computation in a batch mode. Because of this, I implemented a workaround that allowed me to submit my computation (See dask-jobqueue issue #238). However, quite recently I realized that my workaround does not work for latest versions (0.7.0, 0.7.1) of dask-jobqueue. Conversely, those newer versions provide a way to adress the issue by allowing users to skip some lines in the header when configuring the cluster (See dask-jobqueue issue #238 reply). I tried the newly developed solution but I faced a problem, similar to above. The manager set a standard value of 1.5 MB for the memory of nodes, causing the computation to fail. If you face the same problems you can follow these steps:

pip unistall dask-jobqueue
pip install dask-jobqueue==0.4.1

You will soon find out that this bring further problems. However, those problems should be solved by downgrading some packages. Install the following packages in the same way as above

distributed==1.27.0
dask==1.1.4
msgpack==0.6.1

You would then execute the script normally (see Run description)

Get data

In order to run this code, you first need to download the files from SEG wiki. I organized the shot gathers and anisotropic parameters in two separated floders, ModelShots and ModelParameters respectively. You can proceed as follows:

mkdir ModelShots && cd ModelShots
wget http://s3.amazonaws.com/open.source.geoscience/open_data/bptti2007/Anisotropic_FD_Model_Shots_part1.sgy.gz
wget http://s3.amazonaws.com/open.source.geoscience/open_data/bptti2007/Anisotropic_FD_Model_Shots_part2.sgy.gz
wget http://s3.amazonaws.com/open.source.geoscience/open_data/bptti2007/Anisotropic_FD_Model_Shots_part3.sgy.gz
wget http://s3.amazonaws.com/open.source.geoscience/open_data/bptti2007/Anisotropic_FD_Model_Shots_part4.sgy.gz
for i in {1..4}; do gunzip Anisotropic_FD_Model_Shots_part${i}.sgy.gz; done
rm *.gz && cd ..
mkdir ModelParams && cd ModelParams
wget http://s3.amazonaws.com/open.source.geoscience/open_data/bptti2007/ModelParams.tar.gz
gunzip ModelParams.tar.gz
rm *.gz && cd ..

Run

I create a SLURM job file dask_launcher.job. To run, simply submit the batch job

sbatch dask_launcher.job

You can check the progress of the code with:

tail -f dask_launcher.o<jid>

Below, you can see the final image (built only with 5 shots) overlaid with the background velocity model

alt text

rtm----segyio-devito-'s People

Contributors

ofmla avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rtm----segyio-devito-'s Issues

iline xline

good afternoon , I am very interested in your sergio project .I started studying this topic recently , can you please briefly tell me what xline , iline offset adn samples are . As I understand it , xline is the number of stations from which seismic data was taken , samples is the length of the array of this data , but what is offset and iline ?please clarify if I understood correctly about xline and sample

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.