Coder Social home page Coder Social logo

janthorbecke / opensource Goto Github PK

View Code? Open in Web Editor NEW
127.0 22.0 61.0 75.09 MB

Code for geophysical 3D/2D Finite Difference modelling, Marchenko algorithms, 2D/3D x-w migration and utilities.

License: Other

Makefile 0.46% C 64.06% Shell 10.40% PostScript 20.07% TeX 0.79% Fortran 0.76% Python 0.47% Gnuplot 0.01% C++ 1.91% MATLAB 0.27% HTML 0.01% CMake 0.06% Cuda 0.70% NASL 0.04%
marchenko wave-equation finite-difference modeling geophysics

opensource's Introduction

ACKNOWLEDGEMENT

This work received funding from the European Research Council (grant 742703) and the NWO Domain Applied and Engineering Sciences (grant 13939).

LICENSE

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

A copy of this license can be found in the file 'Common_Public_License.txt' in the directory where you have found this README.

http://www.opensource.org/licenses/cpl1.0.php

SU

Some routines are from Seismic Unix and include the SU LEGAL_STATEMENT in the source code.

Copyright (c) 2017 by the Society of Exploration Geophysicists. For more information, go to http://software.seg.org/2017/00XX . You must read and accept usage terms at: http://software.seg.org/disclaimer.txt before use.

REFERENCES

-0- DOI reference of this software release https://zenodo.org/badge/latestdoi/23060862

-1- If the Finite Difference code has helped you in your research please refer to the following paper in your publications:

Finite-difference modeling experiments for seismic interferometry Jan Thorbecke and Deyan Draganov 2011, Geophysics, Vol. 76, no. 6 (November-December); p H1--H18, doi: 10.1190/GEO2010-0039.1 Download: https://janth.home.xs4all.nl/Publications/Articles/ThorbeckeDraganov2012.pdf

-2- If the Machenko code has helped you in your research please refer to this paper in your publications:

Implementation of the Marchenko method Jan Thorbecke, Evert Slob, Joeri Brackenhoff, Joost van der Neut, and Kees Wapenaar 2017, Geophysics, Vol. 82, no. 6 (November-December); p. WB29--WB45, doi: 10.1190/GEO2017-0108.1 Download: https://janth.home.xs4all.nl/Publications/Articles/ThorbeckeGPY2017.pdf

-3- If you used the code to construct homogenoeus Green's functions, please refer to this paper in your related publications:

Virtual acoustics in inhomogeneous media with single-sided access: Wapenaar, K., Brackenhoff, J., Thorbecke, J., van der Neut, J., Slob, E., and Verschuur, E., 2018, Scientific Reports, Vol. 8, 2497. Download: https://www.keeswapenaar.nl/4_Journals/Nature/SR_18.pdf

-4- When you are using the marchenko_primaries algorithm developed by Lele Zhang please refer to the following papers

Free-surface and internal multiple elimination in one step without adaptive subtraction Lele Zhang and Evert Slob 2019, Geophysics, Vol. 84, no. 1 (January-February); p. A7-A11, doi: 10.1190/GEO2018-0548.1 Download: https://www.keeswapenaar.nl/BeyondInterferometry/geo_19h.pdf

and

Implementation of the Marchenko Multiple Elimination algorithm, Jan Thorbecke, Lele Zhang, Kees Wapenaar, Evert Slob, 2021, Geophysics, Vol. 86, no. 2 (March-April); p. 1-15, doi: 10.1190/GEO2020-0196.1 Download: https://www.keeswapenaar.nl/4_Journals/Geophysics/geo_21b.pdf

-5- If you use the fdacrtmc code of Max Holicki please refer to the following paper:

Acoustic directional snapshot wavefield decomposition Holicki, M., Drijkoningen, G., and Wapenaar, K., 2019, Acoustic directional snapshot wavefield decomposition: Geophysical Prospecting, Vol. 67, 32-51 Download: https://www.keeswapenaar.nl/4_Journals/Geophys.Prosp/GP_19a.pdf

-6- If you use the vmar code of Johno van IJsseldijk please refer to the following paper:

Extracting small time-lapse traveltime changes in a reservoir using primaries and internal multiples after Marchenko-based target zone isolation: Van IJsseldijk, J., van der Neut, J., Thorbecke, J., and Wapenaar, K., 2023, Geophysics, Vol. 88 (2), R135-R143. Download: https://keeswapenaar.nl/4_Journals/Geophysics/geo_23a.pdf

-7- A reference to the extrapolation and migration programs is

Design of one-way wavefield extrapolation operators, using smooth functions in WLSQ optimisation. Jan Thorbecke, Kees Wapenaar, Gerd Swinnen, 2004, Geophysics Vol 69, p. 1037-1045 Download: https://www.keeswapenaar.nl/4_Journals/Geophysics/geo_04.pdf

INSTALLATION

See the seperate INSTALL file.

REPRODUCING

Almost all Figures in the papers mentioned above can be reproduced with the sofwtare in this repository. Please see the file REPRODUCE for further instructions

Finite Difference Modeling: FDELMODC

If the compilation has finished without errors and produced an executable called bin/fdelmodc you can run one of the demo programs by running

./fdelmodc_plane.scr

in the directory fdelmodc/demo/

The demo directory contains many scripts which demonstrate the different possibilities of the modeling program.

To reproduce the Figures shown in the GEOPHYICS manuscript "Finite-difference modeling experiments for seismic interferometry" the scripts in FiguresPaper directory can be used. Please read the README in the FiguresPaper directory for more instructions and guidelines.

An extensive manual of fdelmodc can be found in doc/fdelmodcManual.pdf

Marchenko method : MARCHENKO

If the compilation has finished without errors and produced an executable called bin/marchenko you can run one of the demo programs by running a set of scripts that are explained in a README in one of the directories marchenko/demo/oneD or demo/twoD

To reproduce the Figures shown in the GEOPHYICS paper "Implementation of the Marchenko method" the scripts in marchenko/demo/oneD directory can be used. The README in this directory gives more instructions and guidelines.

To reproduce the Figures shown in the Scientific Reports paper "Virtual acoustics in inhomogeneous media with single-sided access" the scripts in marchenko/demo/ScientificReports directory can be used. The README in this directory gives more instructions and guidelines.

To reproduce the Figures shown in the GEOPHYICS paper "Implementation of the Marchenko Multiple Elimination algorithm" the scripts in marchenko/demo/mme directory can be used. The README_PRIMARIES in this directory gives more instructions and guidelines. A bried manual about the MME program 'marchencko_primaries' can be found in doc/MMEmanual.pdf

MDD

The MDD kernels depend on BLAS and LAPACK calls. Free downloads of these libraries can be found on

https://www.netlib.org/blas/index.html https://www.netlib.org/lapack/index.html

MDD with LSQR uses the Fortran90 zLSQR code (for real or complex A) from the Systems Optimization Laboratory of Stanford University

https://stanford.edu/group/SOL/software/lsqr/

MKL libraries

If you are running on x64_86 processors you can download (for free) Intel's highly optimised MKL package:

https://software.intel.com/en-us/mkl/choose-download

These Libraries include highly optimised libraries of BLAS, LAPACK, and FFT(W). Usually the MKL libraries are installed in $MKLROOT. If that variable is not set, you can try to find the correct path by searching for one of the libraries:

find /opt/intel -name libmkl_gf_lp64.so

and adjust MKLROOT in Make_include accordingly. You can also completely disable the use of MKL by commenting out the MKL parts in Make_include.

In case MKL is installed on your system there is no need to install the netlib packages mentioned for MDD.

SEISMIC UNIX

If you want to use the .su files with SU from CWP: git clone https://github.com/JohnWStockwellJr/SeisUnix

==> Please make sure that SU is compiled without XDR (in $CWPROOT/Makefile.config make sure that XDRFLAG is NOT enabled). The SU output files of fdelmodc are all based on local IEEE data. To exclude the XDRFLAG in SU you have to use the following line in $CWPROOT/src/Makefile.config around line 35:

XDRFLAG =

so the XDRFLAG is empty. If you have made that change you have to remake SU with the commands: make remake make xtremake

ZFP

The fdacrtmc and the 3D Marchenko code makes use of ZFP compression to store snaphots in CPU memory or do effient IO. This package is included in this repository for your convenience. The latest package and detailed explanation can be found on:

https://github.com/LLNL/zfp

and written by Peter Lindstrom

FDACRTMC

fdacrtmc uses FFTW and the wisdom computations are stored on disk for re-usage. This directory is defined in fdacrtmc.h

#ifndef WISDOMDIR #define WISDOMDIR "/tmp/fftw/" #endif

For the code to run properly the directory /tmp/fftw/ must exist. It is also possible to compile the fdacrtmc code that defines WISDOMDIR. In fdacrtmc/Makefile add:

CFLAGS += -DWISDOMDIR="/directory/that/exists"

or you can change the name of WISDOMDIR in fdacrtmc.h

The Finite Different based RTM code (FDACRTMC) will not be installed if MKL is not available. This code depends on FFTW and we do want to include the full FFTW source code package to this. Our aim is to keep the compilation of the code in the GitLab repository as simple as possible with the smallest number of external libraries.

UPDATES AND LATEST VERSION

The latest version of the source code and manual can be found at:

git clone https://gitlab.com/geophysicsdelft/OpenSource.git

This repository has a mirror on:

https://github.com/JanThorbecke/OpenSource.git

opensource's People

Contributors

jabrackenhoff avatar janthorbecke avatar jbrackenhoff avatar koffieklopper avatar ohnoj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opensource's Issues

Intel MKL

Hey Guys!

I am new in GitHub, and also in Linux. I am gonna use this software in my thesis, and I am trying to run the code, but I have some problems with Intel MKL, saying:

/usr/bin/ld: cannot find -lmkl_gf_lp64
/usr/bin/ld: cannot find -lmkl_sequential
/usr/bin/ld: cannot find -lmkl_core

If you can help me, I will be appreciated.

Thanx

Make extrap error

Hello, Jan!

I got the following error when I making the program extrap on Ununtu18 with Intel CPU. However, I made it successfully on MacOS.

This error seems to be related to MKL, but other programs were successfully made.

How should I solve this problem?

Best regards.

cd main		; make 
make[1]: Entering directory '/home/wei/fdelmodc/extrap/main'
gcc -I/home/wei/fdelmodc/include -I. -O3 -ffast-math -fopenmp -DMKL -I/home/wei/intel/mkl/include -I/home/wei/intel/mkl/include/fftw  migr.c -L/home/wei/fdelmodc/lib -lgenfft -Wl,-rpath /home/wei/intel/mkl/lib/intel64 -Wl,--start-group -L/home/wei/intel/mkl/lib/intel64 -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread -lm -ldl -L/home/wei/fdelmodc/lib -lextrap2d  -lgenfft -lm  -o migr.tmp
/home/wei/fdelmodc/lib/libgenfft.a(cc1fft.o): In function `cc1fft':
cc1fft.c:(.text+0x68): undefined reference to `DftiFreeDescriptor'
cc1fft.c:(.text+0x7a): undefined reference to `DftiCreateDescriptor_s_1d'
cc1fft.c:(.text+0x87): undefined reference to `DftiErrorClass'
cc1fft.c:(.text+0x95): undefined reference to `DftiCommitDescriptor'
cc1fft.c:(.text+0xa2): undefined reference to `DftiErrorClass'
/home/wei/fdelmodc/lib/libgenfft.a(cc1fft.o): In function `Rcc1fft':
cc1fft.c:(.text+0x178): undefined reference to `DftiFreeDescriptor'
cc1fft.c:(.text+0x18a): undefined reference to `DftiCreateDescriptor_s_1d'
cc1fft.c:(.text+0x197): undefined reference to `DftiErrorClass'
cc1fft.c:(.text+0x1a5): undefined reference to `DftiCommitDescriptor'
cc1fft.c:(.text+0x1b2): undefined reference to `DftiErrorClass'
/home/wei/fdelmodc/lib/libgenfft.a(cc1fft.o): In function `cc1fft_':
cc1fft.c:(.text+0x288): undefined reference to `DftiFreeDescriptor'
cc1fft.c:(.text+0x29a): undefined reference to `DftiCreateDescriptor_s_1d'
cc1fft.c:(.text+0x2a7): undefined reference to `DftiErrorClass'
cc1fft.c:(.text+0x2b5): undefined reference to `DftiCommitDescriptor'
cc1fft.c:(.text+0x2c2): undefined reference to `DftiErrorClass'
/home/wei/fdelmodc/lib/libgenfft.a(cc1fft.o): In function `cc1fft':
cc1fft.c:(.text+0x53): undefined reference to `DftiComputeForward'
cc1fft.c:(.text+0xce): undefined reference to `DftiComputeBackward'
/home/wei/fdelmodc/lib/libgenfft.a(cc1fft.o): In function `Rcc1fft':
cc1fft.c:(.text+0x163): undefined reference to `DftiComputeForward'
cc1fft.c:(.text+0x1de): undefined reference to `DftiComputeBackward'
/home/wei/fdelmodc/lib/libgenfft.a(cc1fft.o): In function `cc1fft_':
cc1fft.c:(.text+0x273): undefined reference to `DftiComputeForward'
cc1fft.c:(.text+0x2ee): undefined reference to `DftiComputeBackward'
/home/wei/fdelmodc/lib/libgenfft.a(rc1fft.o): In function `rc1fft':
rc1fft.c:(.text+0x4a): undefined reference to `DftiComputeForward'
rc1fft.c:(.text+0x57): undefined reference to `DftiErrorClass'
rc1fft.c:(.text+0xc8): undefined reference to `DftiFreeDescriptor'
rc1fft.c:(.text+0xda): undefined reference to `DftiCreateDescriptor_s_1d'
rc1fft.c:(.text+0xe7): undefined reference to `DftiErrorClass'
rc1fft.c:(.text+0x105): undefined reference to `DftiSetValue'
rc1fft.c:(.text+0x112): undefined reference to `DftiErrorClass'
rc1fft.c:(.text+0x130): undefined reference to `DftiSetValue'
rc1fft.c:(.text+0x13d): undefined reference to `DftiErrorClass'
rc1fft.c:(.text+0x14f): undefined reference to `DftiCommitDescriptor'
rc1fft.c:(.text+0x15c): undefined reference to `DftiErrorClass'
rc1fft.c:(.text+0x174): undefined reference to `DftiErrorMessage'
rc1fft.c:(.text+0x1a4): undefined reference to `DftiErrorMessage'
rc1fft.c:(.text+0x1d4): undefined reference to `DftiErrorMessage'
rc1fft.c:(.text+0x204): undefined reference to `DftiErrorMessage'
rc1fft.c:(.text+0x234): undefined reference to `DftiErrorMessage'
/home/wei/fdelmodc/lib/libgenfft.a(rc1fft.o):rc1fft.c:(.text+0x265): more undefined references to `DftiErrorMessage' follow
/home/wei/fdelmodc/lib/libgenfft.a(crmfft.o): In function `crmfft':
crmfft.c:(.text+0x1e3): undefined reference to `DftiComputeBackward'
crmfft.c:(.text+0x3f3): undefined reference to `DftiErrorClass'
crmfft.c:(.text+0x42c): undefined reference to `DftiFreeDescriptor'
crmfft.c:(.text+0x43e): undefined reference to `DftiCreateDescriptor_s_1d'
crmfft.c:(.text+0x44b): undefined reference to `DftiErrorClass'
crmfft.c:(.text+0x46e): undefined reference to `DftiSetValue'
crmfft.c:(.text+0x47b): undefined reference to `DftiErrorClass'
crmfft.c:(.text+0x49e): undefined reference to `DftiSetValue'
crmfft.c:(.text+0x4ab): undefined reference to `DftiErrorClass'
crmfft.c:(.text+0x4c2): undefined reference to `DftiCommitDescriptor'
crmfft.c:(.text+0x4d1): undefined reference to `DftiErrorClass'
collect2: error: ld returned 1 exit status
Makefile:26: recipe for target 'migr' failed
make[1]: *** [migr] Error 1
make[1]: Leaving directory '/home/wei/fdelmodc/extrap/main'
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2

Installation problem-NetCDF

Hi,
After installing the software, I try the ./fdelmodc_plane.scr. Error comes:
file_base defined for NetCDF output, but code not compiled for NetCDF support: recompile with -D_NETCDF.

It seems like I need to recompile the codes. Does anyone know how to modify the makefile?
Thx!

A compilation error using gfortran 11.2.0

Dear sir,
I tried to install your code on Ubuntu 22.04. The default version of gcc and gfortran is 11.2.0. And I get this error message when make the MDD:

gfortran ......
/usr/bin/ld: deconvolve.o:(.bss+0x0): multiple definition of `cB'; mdd.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status

I noticed when I used gfortran 4.8.5 to complie it, everything is fine. So maybe the new version of gfortran has stricter syntax.

Then I check the code and find there are two same variable definitions in MDD/deconvolve.c and MDD/mdd.c

微信截图_20220620182051

微信截图_20220620182059

I change the variable name in deconvolve.c to solve the problem.
I want to know if this change will affect the operation of the program. If it doesn't, I suggest you to fix this bug.

threadAffinity missing and typo in fdelmodc.c (threadAfficity)

Hi Jan,

I've tried to compile your code, but I have encountered two issues:

  1. in the fdelmodc/Makefile, there is a reference to threadAffinity.c, but the file does not exist (maybe you forgot to commit it);
  2. in fdelmodc/fdelmodc.c, you use threadAfficity instead of threadAffinity (lines 15 and 508).

Cheers,
-Filippo

Issue with trace headers after run modeling

Dear Sir Jan,

I tried to run your model.sh example in ~/OpenSource/marchenko3D/demo/marchenko3D/oneD in my machine.

The output of cp3d.su that I obtained looks like this:
cp3d su

Which is I think not really correct. The numbers are weird.

I noticed these messages during the modeling is executed:
modeling

Am I missing the requirements to run the modeling?

Regards,
Mirumuz

Installation Error

I am trying to install OpenSource on my Mac M1. But I'm facing an issue where some gfortran symbols are said to be undefined. I have installed gfortran and it seems to be working fine.
error.txt
error

Trying to run acoustic SH4

Dear Sir,

We are trying to run acousticSH4( ) for SH wave modeling. But the output results shows zero and nan values.
Kindly help in correcting the execution.
Attached herewith is the snap of input parameters.
acousticSH4_inputs

Mistake cc1fft.c

Hello Jan!!
I Would like to use Marchenko Migration in Colombia Complex Area, it is about the University Project, I followed the instruction but had the next mistake.
My Processor is AMD and OS: Ubuntu18
Thanks Regards

make
make[1]: Entering directory '/home/zignal/OpenSource-master/FFTlib'
mkdir -p /home/zignal/OpenSource-master/lib
mkdir -p /home/zignal/OpenSource-master/include
cp -rp genfft.h /home/zignal/OpenSource-master/include/genfft.h
gcc -c -I/home/zignal/OpenSource-master/include -I. -O3 -ffast-math -fopenmp -DMKL -I/include -I/include/fftw -I/home/zignal/OpenSource-master/zfp/include cc1fft.c

. cc1fft.c:3:10: fatal error: mkl_dfti.h: No such file or directory**

include "mkl_dfti.h"
compilation terminated.
/Make_include:124: recipe for target '/home/zignal/OpenSource-master/lib/libgenfft.a(cc1fft.o)' failed
make[1]: *** [/home/zignal/OpenSource-master/lib/libgenfft.a(cc1fft.o)] Error 1
make[1]: Leaving directory '/home/zignal/OpenSource-master/FFTlib'
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2

Little Bug

Hello,Thorbecke, I find a little bug in Code "fdacrtmc" ,in file "boundaries.c" ,The PML in acoustic scheme has a bug.The location is line 293,code is "for(iz=mod->iePz,ipml=0 ; izieZzb ; iz++) " ,Max lose "ipml++",and it causes a false reflection in the lower right corner of the simulated area.
image

            A Marchenko learner from China,thanks!!!

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.