diff --git a/.gitignore b/.gitignore
index 7787d3627a3e1b8ab684e871eb1ffb02226ad2b2..72d36c2b470b91c15c8c9c8819a4ad75540a02e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,8 @@
 bin/*
 *.su
 *.bin
+*/.DS*
+*/*/.DS*
 .DS*
 Make_include
 fdelmodc_cuda.tgz
diff --git a/Make_include_template b/Make_include_template
new file mode 100644
index 0000000000000000000000000000000000000000..6d0d98175c624b2cd9899cd774f3a7b7e876d679
--- /dev/null
+++ b/Make_include_template
@@ -0,0 +1,135 @@
+# Makefile for general rules
+
+# To Change the compile environment to your current system you should set:
+#   -1- ROOT variable to the directory where you found this file
+#   -2- if needed use a different compiler (CC) if gcc is not available
+#   -3- on Solaris system use RANLIB=ranlib which is defined below
+
+# the current directory (in vi ":r!pwd")
+ROOT=/Users/jan/src/OpenSource
+
+########################################################################
+# C compiler; change this only if you are using a different C-compiler
+
+#GNU 
+#CC = gcc-mp-5 
+CC = gcc
+FC = gfortran
+# Linux gcc version 4.x
+OPTC = -O3 -ffast-math
+#to include parallelisation with OpenMP
+OPTC += -fopenmp
+
+# for better performing code you can try:
+#OPTC = -O3 -fno-trapping-math -ffast-math -funroll-all-loops -mavx -fomit-frame-pointer -mfpmath=sse -ftree-vectorizer-verbose=1
+# Linux gcc version 3.x
+#OPTC = -O3 -ffast-math -funroll-all-loops -mfpmath=sse
+
+#for double precision use FFTlib and emmod
+#OPTC += -DDOUBLE
+#OPTF += -fdefault-double-8 -fdefault-real-8
+
+#Cray
+#CC=cc
+#FC=ftn
+#OPTC = -O2
+#OPTF = -O2
+
+#Intel 
+#CC = icc
+#FC = ifort
+### Linux
+##OPTC = -O3 -no-prec-div -qopt-report-phase=vec,openmp
+##OPTF = -O3 -no-prec-div -qopt-report-phase=vec,openmp
+#OPTC = -O3 -no-prec-div -xCORE-AVX2
+#OPTF = -O3 -no-prec-div -xCORE-AVX2
+##to include parallelisation with OpenMP
+#OPTC += -qopenmp
+
+# Apple OSX intel 11.1.076 snow leopard 10.6.2
+#OPTC = -O3 -msse3 -no-prec-div -vec-report2 -fno-builtin-__sprintf_chk 
+
+#PGI 
+#CC = pgcc
+#FC = pgf90
+#OPTC = -fast  -Minfo=vect -Mvect=simd:256 -Msafeptr
+#OPTC = -fast  -Minfo=vect -Mvect=simd:256 -Msafeptr -Mprof=lines
+#OPTF = -fast
+#LDFLAGS = -fast -Minfo=vect -Mvect=simd:256 -Msafeptr 
+
+#Pathscale 
+#CC = cc
+#FC = ftn
+#OPTC = -Ofast -OPT:Ofast -fno-math-errno
+#OPTF = -Ofast -OPT:Ofast -fno-math-errno
+
+#Apple OSX clang/gcc (10.9) llvm
+#CC = clang
+#OPTC = -Ofast
+#LDFLAGS = -Ofast
+
+#AMD Open64
+#CC = opencc
+#FC = openf95
+#OPTC = -Ofast
+#OPTF = -Ofast
+#LDFLAGS = -static -Ofast
+
+#############################################################################
+# FOR FFT LIBRARIES
+#AMD ACML 4.4.0
+#AMDROOT = /home/thorbcke/amdsdk/v1.0/acml/open64_64
+#OPTC += -DACML440 -I$(AMDROOT)/include
+#LIBSM = -L$(AMDROOT)/lib -lacml -lfortran -lffio -lrt -lm
+
+#############################################################################
+# Some convenient abbreviations
+
+B = $(ROOT)/bin
+I = $(ROOT)/include
+L = $(ROOT)/lib
+
+########################################################################
+# standard CFLAGS
+CFLAGS = -I$I -I.
+
+#############################################################################
+# the archiver
+AR = ar
+
+#############################################################################
+# ar FLAGS
+ARFLAGS = rv
+
+#############################################################################
+# ranlib definition
+RANLIB = ar -s
+# on Sun SOLARIS use:
+#RANLIB = ranlib
+
+
+.SUFFIXES : .o .c .cc .f .a .F90
+.c.o	:
+	$(CC) -c $(CFLAGS) $(OPTC) $<
+.c.a	:
+	$(CC) -c $(CFLAGS) $(OPTC) $<
+	$(AR) $(ARFLAGS) $@ $*.o
+	rm -f $*.o
+.o.a	:
+	$(AR) $(ARFLAGS) $@ $*.o
+	rm -f $*.o
+.f.o	:
+	$(FC) -c $(FFLAGS) $(OPTF) $<
+.F90.o	:
+	$(FC) -c $(FFLAGS) $(OPTF) $<
+.f.a	:
+	$(FC) -c $(FFLAGS) -I$I $<
+	$(AR) $(ARFLAGS) $@ $*.o
+	rm -f $*.o
+.cc.a	:
+	$(C++) -c $(C++FLAGS) -I$I $<
+	$(AR) $(ARFLAGS) $@ $*.o
+	rm -f $*.o
+.cc.o	:
+	$(C++) -c $(C++FLAGS) $<
+
diff --git a/README b/README
index cbeda68421694176adaf926f954ac3e9f2189ec6..1ed73f9332a0aaad2ab00ced0c4c6504c3aeedb7 100644
--- a/README
+++ b/README
@@ -36,7 +36,7 @@ INSTALLATION
 -------------
 
 1) To compile and link the code you first have to set the ROOT variable in the Make_include file which can be found in the directory where you have found this README.
- You can use Make_include_template as a first start: cp Make_include_template Make_include
+You can use Make_include_template as a first start: cp Make_include_template Make_include
 
 2) Check the compiler and CFLAGS options in the file Make_include and adapt to the system you are using. The default options are set for a the GNU C-compiler on a Linux system. A Fortran or C++ compiler are not needed to compile the code. The Makefile has been tested with GNU make. 
 
diff --git a/doc/fdelmodcManual.pdf b/doc/fdelmodcManual.pdf
index cb1c8055a872ce899fba25ea2303bb170928bb48..a6ec5a39a708ac0c4636ba578292c176ec484a3e 100644
Binary files a/doc/fdelmodcManual.pdf and b/doc/fdelmodcManual.pdf differ
diff --git a/fdelmodc/applySource.c b/fdelmodc/applySource.c
index 68da5e7ffcd7e1a2ecd8ed5733a8c8be0499a102..8e4574f299c49a15ad172dee6e9273edd1de81ae 100644
--- a/fdelmodc/applySource.c
+++ b/fdelmodc/applySource.c
@@ -114,12 +114,10 @@ int applySource(modPar mod, srcPar src, wavPar wav, bndPar bnd, int itime, int i
 		if (verbose>=4 && itime==0) {
 			vmess("Source %d positioned at grid ix=%d iz=%d",isrc, ix, iz);
 		}
-		if (verbose>5) {
-			vmess("Source %d at grid [ix=%d,iz=%d] at itime %d has value %e",isrc, ix,iz, itime, src_ampl);
-		}
 
 		/* cosine squared windowing to reduce edge effects on shot arrays */
 		if ( (src.n>1) && src.window) {
+            scl = 1.0;
 			if (isrc < src.window) {
 				scl = cos(0.5*M_PI*(src.window - isrc)/src.window);
 			}
@@ -138,6 +136,10 @@ int applySource(modPar mod, srcPar src, wavPar wav, bndPar bnd, int itime, int i
 /* this is now set to 1.0 */
 		src_ampl *= (1.0/mod.dx)*l2m[ix*n1+iz];
 
+		if (verbose>5) {
+			vmess("Source %d at grid [ix=%d,iz=%d] at itime %d has value %e",isrc, ix,iz, itime, src_ampl);
+		}
+
 		/* Force source */
 
 		if (src.type == 6) {
diff --git a/fdelmodc/demo/RcvPositions451.txt b/fdelmodc/demo/RcvPositions451.txt
deleted file mode 100644
index b20dccb74d1b9a71adbc2085565aa4d64e158c4a..0000000000000000000000000000000000000000
--- a/fdelmodc/demo/RcvPositions451.txt
+++ /dev/null
@@ -1,451 +0,0 @@
-(-2250.000000, 0.000000)
-(-2240.000000, 0.000000)
-(-2230.000000, 0.000000)
-(-2220.000000, 0.000000)
-(-2210.000000, 0.000000)
-(-2200.000000, 0.000000)
-(-2190.000000, 0.000000)
-(-2180.000000, 0.000000)
-(-2170.000000, 0.000000)
-(-2160.000000, 0.000000)
-(-2150.000000, 0.000000)
-(-2140.000000, 0.000000)
-(-2130.000000, 0.000000)
-(-2120.000000, 0.000000)
-(-2110.000000, 0.000000)
-(-2100.000000, 0.000000)
-(-2090.000000, 0.000000)
-(-2080.000000, 0.000000)
-(-2070.000000, 0.000000)
-(-2060.000000, 0.000000)
-(-2050.000000, 0.000000)
-(-2040.000000, 0.000000)
-(-2030.000000, 0.000000)
-(-2020.000000, 0.000000)
-(-2010.000000, 0.000000)
-(-2000.000000, 0.000000)
-(-1990.000000, 0.000000)
-(-1980.000000, 0.000000)
-(-1970.000000, 0.000000)
-(-1960.000000, 0.000000)
-(-1950.000000, 0.000000)
-(-1940.000000, 0.000000)
-(-1930.000000, 0.000000)
-(-1920.000000, 0.000000)
-(-1910.000000, 0.000000)
-(-1900.000000, 0.000000)
-(-1890.000000, 0.000000)
-(-1880.000000, 0.000000)
-(-1870.000000, 0.000000)
-(-1860.000000, 0.000000)
-(-1850.000000, 0.000000)
-(-1840.000000, 0.000000)
-(-1830.000000, 0.000000)
-(-1820.000000, 0.000000)
-(-1810.000000, 0.000000)
-(-1800.000000, 0.000000)
-(-1790.000000, 0.000000)
-(-1780.000000, 0.000000)
-(-1770.000000, 0.000000)
-(-1760.000000, 0.000000)
-(-1750.000000, 0.000000)
-(-1740.000000, 0.000000)
-(-1730.000000, 0.000000)
-(-1720.000000, 0.000000)
-(-1710.000000, 0.000000)
-(-1700.000000, 0.000000)
-(-1690.000000, 0.000000)
-(-1680.000000, 0.000000)
-(-1670.000000, 0.000000)
-(-1660.000000, 0.000000)
-(-1650.000000, 0.000000)
-(-1640.000000, 0.000000)
-(-1630.000000, 0.000000)
-(-1620.000000, 0.000000)
-(-1610.000000, 0.000000)
-(-1600.000000, 0.000000)
-(-1590.000000, 0.000000)
-(-1580.000000, 0.000000)
-(-1570.000000, 0.000000)
-(-1560.000000, 0.000000)
-(-1550.000000, 0.000000)
-(-1540.000000, 0.000000)
-(-1530.000000, 0.000000)
-(-1520.000000, 0.000000)
-(-1510.000000, 0.000000)
-(-1500.000000, 0.000000)
-(-1490.000000, 0.000000)
-(-1480.000000, 0.000000)
-(-1470.000000, 0.000000)
-(-1460.000000, 0.000000)
-(-1450.000000, 0.000000)
-(-1440.000000, 0.000000)
-(-1430.000000, 0.000000)
-(-1420.000000, 0.000000)
-(-1410.000000, 0.000000)
-(-1400.000000, 0.000000)
-(-1390.000000, 0.000000)
-(-1380.000000, 0.000000)
-(-1370.000000, 0.000000)
-(-1360.000000, 0.000000)
-(-1350.000000, 0.000000)
-(-1340.000000, 0.000000)
-(-1330.000000, 0.000000)
-(-1320.000000, 0.000000)
-(-1310.000000, 0.000000)
-(-1300.000000, 0.000000)
-(-1290.000000, 0.000000)
-(-1280.000000, 0.000000)
-(-1270.000000, 0.000000)
-(-1260.000000, 0.000000)
-(-1250.000000, 0.000000)
-(-1240.000000, 0.000000)
-(-1230.000000, 0.000000)
-(-1220.000000, 0.000000)
-(-1210.000000, 0.000000)
-(-1200.000000, 0.000000)
-(-1190.000000, 0.000000)
-(-1180.000000, 0.000000)
-(-1170.000000, 0.000000)
-(-1160.000000, 0.000000)
-(-1150.000000, 0.000000)
-(-1140.000000, 0.000000)
-(-1130.000000, 0.000000)
-(-1120.000000, 0.000000)
-(-1110.000000, 0.000000)
-(-1100.000000, 0.000000)
-(-1090.000000, 0.000000)
-(-1080.000000, 0.000000)
-(-1070.000000, 0.000000)
-(-1060.000000, 0.000000)
-(-1050.000000, 0.000000)
-(-1040.000000, 0.000000)
-(-1030.000000, 0.000000)
-(-1020.000000, 0.000000)
-(-1010.000000, 0.000000)
-(-1000.000000, 0.000000)
-(-990.000000, 0.000000)
-(-980.000000, 0.000000)
-(-970.000000, 0.000000)
-(-960.000000, 0.000000)
-(-950.000000, 0.000000)
-(-940.000000, 0.000000)
-(-930.000000, 0.000000)
-(-920.000000, 0.000000)
-(-910.000000, 0.000000)
-(-900.000000, 0.000000)
-(-890.000000, 0.000000)
-(-880.000000, 0.000000)
-(-870.000000, 0.000000)
-(-860.000000, 0.000000)
-(-850.000000, 0.000000)
-(-840.000000, 0.000000)
-(-830.000000, 0.000000)
-(-820.000000, 0.000000)
-(-810.000000, 0.000000)
-(-800.000000, 0.000000)
-(-790.000000, 0.000000)
-(-780.000000, 0.000000)
-(-770.000000, 0.000000)
-(-760.000000, 0.000000)
-(-750.000000, 0.000000)
-(-740.000000, 0.000000)
-(-730.000000, 0.000000)
-(-720.000000, 0.000000)
-(-710.000000, 0.000000)
-(-700.000000, 0.000000)
-(-690.000000, 0.000000)
-(-680.000000, 0.000000)
-(-670.000000, 0.000000)
-(-660.000000, 0.000000)
-(-650.000000, 0.000000)
-(-640.000000, 0.000000)
-(-630.000000, 0.000000)
-(-620.000000, 0.000000)
-(-610.000000, 0.000000)
-(-600.000000, 0.000000)
-(-590.000000, 0.000000)
-(-580.000000, 0.000000)
-(-570.000000, 0.000000)
-(-560.000000, 0.000000)
-(-550.000000, 0.000000)
-(-540.000000, 0.000000)
-(-530.000000, 0.000000)
-(-520.000000, 0.000000)
-(-510.000000, 0.000000)
-(-500.000000, 0.000000)
-(-490.000000, 0.000000)
-(-480.000000, 0.000000)
-(-470.000000, 0.000000)
-(-460.000000, 0.000000)
-(-450.000000, 0.000000)
-(-440.000000, 0.000000)
-(-430.000000, 0.000000)
-(-420.000000, 0.000000)
-(-410.000000, 0.000000)
-(-400.000000, 0.000000)
-(-390.000000, 0.000000)
-(-380.000000, 0.000000)
-(-370.000000, 0.000000)
-(-360.000000, 0.000000)
-(-350.000000, 0.000000)
-(-340.000000, 0.000000)
-(-330.000000, 0.000000)
-(-320.000000, 0.000000)
-(-310.000000, 0.000000)
-(-300.000000, 0.000000)
-(-290.000000, 0.000000)
-(-280.000000, 0.000000)
-(-270.000000, 0.000000)
-(-260.000000, 0.000000)
-(-250.000000, 0.000000)
-(-240.000000, 0.000000)
-(-230.000000, 0.000000)
-(-220.000000, 0.000000)
-(-210.000000, 0.000000)
-(-200.000000, 0.000000)
-(-190.000000, 0.000000)
-(-180.000000, 0.000000)
-(-170.000000, 0.000000)
-(-160.000000, 0.000000)
-(-150.000000, 0.000000)
-(-140.000000, 0.000000)
-(-130.000000, 0.000000)
-(-120.000000, 0.000000)
-(-110.000000, 0.000000)
-(-100.000000, 0.000000)
-(-90.000000, 0.000000)
-(-80.000000, 0.000000)
-(-70.000000, 0.000000)
-(-60.000000, 0.000000)
-(-50.000000, 0.000000)
-(-40.000000, 0.000000)
-(-30.000000, 0.000000)
-(-20.000000, 0.000000)
-(-10.000000, 0.000000)
-(0.000000, 0.000000)
-(10.000000, 0.000000)
-(20.000000, 0.000000)
-(30.000000, 0.000000)
-(40.000000, 0.000000)
-(50.000000, 0.000000)
-(60.000000, 0.000000)
-(70.000000, 0.000000)
-(80.000000, 0.000000)
-(90.000000, 0.000000)
-(100.000000, 0.000000)
-(110.000000, 0.000000)
-(120.000000, 0.000000)
-(130.000000, 0.000000)
-(140.000000, 0.000000)
-(150.000000, 0.000000)
-(160.000000, 0.000000)
-(170.000000, 0.000000)
-(180.000000, 0.000000)
-(190.000000, 0.000000)
-(200.000000, 0.000000)
-(210.000000, 0.000000)
-(220.000000, 0.000000)
-(230.000000, 0.000000)
-(240.000000, 0.000000)
-(250.000000, 0.000000)
-(260.000000, 0.000000)
-(270.000000, 0.000000)
-(280.000000, 0.000000)
-(290.000000, 0.000000)
-(300.000000, 0.000000)
-(310.000000, 0.000000)
-(320.000000, 0.000000)
-(330.000000, 0.000000)
-(340.000000, 0.000000)
-(350.000000, 0.000000)
-(360.000000, 0.000000)
-(370.000000, 0.000000)
-(380.000000, 0.000000)
-(390.000000, 0.000000)
-(400.000000, 0.000000)
-(410.000000, 0.000000)
-(420.000000, 0.000000)
-(430.000000, 0.000000)
-(440.000000, 0.000000)
-(450.000000, 0.000000)
-(460.000000, 0.000000)
-(470.000000, 0.000000)
-(480.000000, 0.000000)
-(490.000000, 0.000000)
-(500.000000, 0.000000)
-(510.000000, 0.000000)
-(520.000000, 0.000000)
-(530.000000, 0.000000)
-(540.000000, 0.000000)
-(550.000000, 0.000000)
-(560.000000, 0.000000)
-(570.000000, 0.000000)
-(580.000000, 0.000000)
-(590.000000, 0.000000)
-(600.000000, 0.000000)
-(610.000000, 0.000000)
-(620.000000, 0.000000)
-(630.000000, 0.000000)
-(640.000000, 0.000000)
-(650.000000, 0.000000)
-(660.000000, 0.000000)
-(670.000000, 0.000000)
-(680.000000, 0.000000)
-(690.000000, 0.000000)
-(700.000000, 0.000000)
-(710.000000, 0.000000)
-(720.000000, 0.000000)
-(730.000000, 0.000000)
-(740.000000, 0.000000)
-(750.000000, 0.000000)
-(760.000000, 0.000000)
-(770.000000, 0.000000)
-(780.000000, 0.000000)
-(790.000000, 0.000000)
-(800.000000, 0.000000)
-(810.000000, 0.000000)
-(820.000000, 0.000000)
-(830.000000, 0.000000)
-(840.000000, 0.000000)
-(850.000000, 0.000000)
-(860.000000, 0.000000)
-(870.000000, 0.000000)
-(880.000000, 0.000000)
-(890.000000, 0.000000)
-(900.000000, 0.000000)
-(910.000000, 0.000000)
-(920.000000, 0.000000)
-(930.000000, 0.000000)
-(940.000000, 0.000000)
-(950.000000, 0.000000)
-(960.000000, 0.000000)
-(970.000000, 0.000000)
-(980.000000, 0.000000)
-(990.000000, 0.000000)
-(1000.000000, 0.000000)
-(1010.000000, 0.000000)
-(1020.000000, 0.000000)
-(1030.000000, 0.000000)
-(1040.000000, 0.000000)
-(1050.000000, 0.000000)
-(1060.000000, 0.000000)
-(1070.000000, 0.000000)
-(1080.000000, 0.000000)
-(1090.000000, 0.000000)
-(1100.000000, 0.000000)
-(1110.000000, 0.000000)
-(1120.000000, 0.000000)
-(1130.000000, 0.000000)
-(1140.000000, 0.000000)
-(1150.000000, 0.000000)
-(1160.000000, 0.000000)
-(1170.000000, 0.000000)
-(1180.000000, 0.000000)
-(1190.000000, 0.000000)
-(1200.000000, 0.000000)
-(1210.000000, 0.000000)
-(1220.000000, 0.000000)
-(1230.000000, 0.000000)
-(1240.000000, 0.000000)
-(1250.000000, 0.000000)
-(1260.000000, 0.000000)
-(1270.000000, 0.000000)
-(1280.000000, 0.000000)
-(1290.000000, 0.000000)
-(1300.000000, 0.000000)
-(1310.000000, 0.000000)
-(1320.000000, 0.000000)
-(1330.000000, 0.000000)
-(1340.000000, 0.000000)
-(1350.000000, 0.000000)
-(1360.000000, 0.000000)
-(1370.000000, 0.000000)
-(1380.000000, 0.000000)
-(1390.000000, 0.000000)
-(1400.000000, 0.000000)
-(1410.000000, 0.000000)
-(1420.000000, 0.000000)
-(1430.000000, 0.000000)
-(1440.000000, 0.000000)
-(1450.000000, 0.000000)
-(1460.000000, 0.000000)
-(1470.000000, 0.000000)
-(1480.000000, 0.000000)
-(1490.000000, 0.000000)
-(1500.000000, 0.000000)
-(1510.000000, 0.000000)
-(1520.000000, 0.000000)
-(1530.000000, 0.000000)
-(1540.000000, 0.000000)
-(1550.000000, 0.000000)
-(1560.000000, 0.000000)
-(1570.000000, 0.000000)
-(1580.000000, 0.000000)
-(1590.000000, 0.000000)
-(1600.000000, 0.000000)
-(1610.000000, 0.000000)
-(1620.000000, 0.000000)
-(1630.000000, 0.000000)
-(1640.000000, 0.000000)
-(1650.000000, 0.000000)
-(1660.000000, 0.000000)
-(1670.000000, 0.000000)
-(1680.000000, 0.000000)
-(1690.000000, 0.000000)
-(1700.000000, 0.000000)
-(1710.000000, 0.000000)
-(1720.000000, 0.000000)
-(1730.000000, 0.000000)
-(1740.000000, 0.000000)
-(1750.000000, 0.000000)
-(1760.000000, 0.000000)
-(1770.000000, 0.000000)
-(1780.000000, 0.000000)
-(1790.000000, 0.000000)
-(1800.000000, 0.000000)
-(1810.000000, 0.000000)
-(1820.000000, 0.000000)
-(1830.000000, 0.000000)
-(1840.000000, 0.000000)
-(1850.000000, 0.000000)
-(1860.000000, 0.000000)
-(1870.000000, 0.000000)
-(1880.000000, 0.000000)
-(1890.000000, 0.000000)
-(1900.000000, 0.000000)
-(1910.000000, 0.000000)
-(1920.000000, 0.000000)
-(1930.000000, 0.000000)
-(1940.000000, 0.000000)
-(1950.000000, 0.000000)
-(1960.000000, 0.000000)
-(1970.000000, 0.000000)
-(1980.000000, 0.000000)
-(1990.000000, 0.000000)
-(2000.000000, 0.000000)
-(2010.000000, 0.000000)
-(2020.000000, 0.000000)
-(2030.000000, 0.000000)
-(2040.000000, 0.000000)
-(2050.000000, 0.000000)
-(2060.000000, 0.000000)
-(2070.000000, 0.000000)
-(2080.000000, 0.000000)
-(2090.000000, 0.000000)
-(2100.000000, 0.000000)
-(2110.000000, 0.000000)
-(2120.000000, 0.000000)
-(2130.000000, 0.000000)
-(2140.000000, 0.000000)
-(2150.000000, 0.000000)
-(2160.000000, 0.000000)
-(2170.000000, 0.000000)
-(2180.000000, 0.000000)
-(2190.000000, 0.000000)
-(2200.000000, 0.000000)
-(2210.000000, 0.000000)
-(2220.000000, 0.000000)
-(2230.000000, 0.000000)
-(2240.000000, 0.000000)
-(2250.000000, 0.000000)
diff --git a/fdelmodc/demo/SrcPositions1.txt b/fdelmodc/demo/SrcPositions1.txt
deleted file mode 100644
index 44722ad2c2fcdf610b58af7f57bfe12e19eb86ec..0000000000000000000000000000000000000000
--- a/fdelmodc/demo/SrcPositions1.txt
+++ /dev/null
@@ -1 +0,0 @@
-150.000000 0.000000
diff --git a/fdelmodc/demo/fdelmodc_plane.scr b/fdelmodc/demo/fdelmodc_plane.scr
index 7d5512635d6ac2bd8974cbd170e7dcdddf84b2f8..cf4f1335d47ca76d43e70701085d92fff276dcd6 100755
--- a/fdelmodc/demo/fdelmodc_plane.scr
+++ b/fdelmodc/demo/fdelmodc_plane.scr
@@ -35,7 +35,7 @@ time ../fdelmodc \
 	dtrcv=0.004 \
 	xsrc=1000 zsrc=1700 nshot=1 plane_wave=1 nsrc=301 \
 	src_type=1 tmod=3.0 src_velo=1800 src_angle=5  \
-	ntaper=21 \
+	ntaper=21 src_window=101 \
 	left=4 right=4 bottom=4 top=4 \
 	tsnap1=0.1 tsnap2=3.0 dtsnap=0.1 \
 	sna_type_ss=1 sna_type_pp=1
diff --git a/fdelmodc/demo/matlab/FD_mod_grid.m b/fdelmodc/demo/matlab/FD_mod_grid.m
new file mode 100644
index 0000000000000000000000000000000000000000..fcc86b9cc11f109aa05c9c5a5ae4f0c63a378c45
--- /dev/null
+++ b/fdelmodc/demo/matlab/FD_mod_grid.m
@@ -0,0 +1,138 @@
+function [ Ptsct, Pfinc, Pfsct, f_out] = FD_mod_grid( xS, xR, ntrcv, dtrcv, dx, cgrid, rhogrid, f )
+%Summary of this function goes here
+%   Detailed explanation goes here
+
+% save Velocity and density grid
+dims = size(cgrid);
+fileID =fopen('mod_cp.bin','w+','l');
+fwrite(fileID,cgrid,'float32');
+fclose(fileID);
+fileID =fopen('mod_ro.bin','w+','l');
+fwrite(fileID,rhogrid,'float32');
+fclose(fileID);
+
+% Compute sizes for makemod
+sizez=(dims(1)-1)*dx;
+sizex=(dims(2)-1)*dx;
+origz=-(dims(1)-1)*dx/2
+origx=-(dims(2)-1)*dx/2
+zrcv1=xR(1)-origz; 
+zrcv2=xR(1)-origz; 
+xrcv1=0.0;
+xrcv2=xrcv1+(dims(2)-1)*dx; 
+zsrc=xS(1)-origz;
+xsrc=xS(2)-origx;
+tmod=(ntrcv-1)*dtrcv;
+
+%compute dt for modeling dt < 0.606*dx/Cmax
+Cmax=max(cgrid(:));
+dxmod=dx;
+dtmax=0.606*dxmod/Cmax;
+dtmod=dtrcv/(ceil(dtrcv/dtmax));
+ntwave=16384;
+ntfft=4*ntrcv;
+
+fileID = fopen('run.scr','w+');
+fprintf(fileID,'#!/bin/bash\n');
+fprintf(fileID,'export PATH=$HOME/src/OpenSource/bin:/opt/CWP/bin/:.:$PATH\n');
+fprintf(fileID,'which fdelmodc\n');
+fprintf(fileID,'which surange\n');
+fprintf(fileID,'set -x\n');
+
+fprintf(fileID,'df=0.25\n');
+fprintf(fileID,'dt=%e\n',dtmod);
+fprintf(fileID,'suaddhead < mod_ro.bin ntrpr=%d ns=%d | \\\n',dims(2), dims(1));
+fprintf(fileID,'sushw key=d1,d2,gx,scalco a=%f,%f,%d,-1000 b=0,0,%d,0 > mod_ro.su\n',dx, dx, int32(xrcv1*1000), int32(dx*1000));
+fprintf(fileID,'suaddhead < mod_cp.bin ntrpr=%d ns=%d | \\\n',dims(2), dims(1));
+fprintf(fileID,'sushw key=d1,d2,gx,scalco a=%f,%f,%d,-1000 b=0,0,%d,0 > mod_cp.su\n',dx, dx, int32(xrcv1*1000), int32(dx*1000));
+fprintf(fileID,'makewave w=fw fmin=0 flef=6 frig=94 fmax=100 dt=$dt file_out=wavefw.su nt=%d t0=0.4 scale=0 scfft=1 verbose=1\n', ntwave);
+fprintf(fileID,'makewave w=fw fmin=0 flef=6 frig=94 fmax=100 dt=%f file_out=wavefwdt.su nt=%d t0=0.4 scale=0 scfft=1 verbose=1\n', dtrcv, ntfft);
+fprintf(fileID,'export filecp=mod_cp.su\n');
+fprintf(fileID,'export filero=mod_ro.su\n');
+fprintf(fileID,'export OMP_NUM_THREADS=2\n');
+fprintf(fileID,'fdelmodc \\\n');
+fprintf(fileID,'file_cp=$filecp file_den=$filero \\\n');
+fprintf(fileID,'ischeme=1 \\\n');
+fprintf(fileID,'file_src=wavefw.su verbose=1 \\\n');
+fprintf(fileID,'file_rcv=recvgrid.su \\\n');
+fprintf(fileID,'rec_type_vz=0 rec_type_p=1 rec_int_vz=2 \\\n');
+fprintf(fileID,'xrcv1=%d xrcv2=%d zrcv1=%d zrcv2=%d \\\n',xrcv1,xrcv2,zrcv1,zrcv2);
+fprintf(fileID,'dxrcv=%d \\\n', dx);
+fprintf(fileID,'dtrcv=%e \\\n', dtrcv);
+fprintf(fileID,'xsrc=%d zsrc=%d\\\n', xsrc, zsrc);
+fprintf(fileID,'src_type=1 tmod=%e \\\n', tmod);
+fprintf(fileID,'ntaper=100 \\\n');
+fprintf(fileID,'left=2 right=2 bottom=2 top=2\n\n');
+fprintf(fileID,'\n');
+fprintf(fileID,'makemod file_base=hom.su \\\n');
+fprintf(fileID,'cp0=1500 ro0=3000 sizex=%d sizez=%d dx=%.1f dz=%.1f orig=0,0 verbose=1\n', sizex,sizez, dxmod,dxmod);
+fprintf(fileID,'export filecp=hom_cp.su\n');
+fprintf(fileID,'export filero=hom_ro.su\n');
+fprintf(fileID,'fdelmodc \\\n');
+fprintf(fileID,'file_cp=$filecp file_den=$filero \\\n');
+fprintf(fileID,'ischeme=1 \\\n');
+fprintf(fileID,'file_src=wavefw.su verbose=1 \\\n');
+fprintf(fileID,'file_rcv=recvhom.su \\\n');
+fprintf(fileID,'rec_type_vz=0 rec_type_p=1 \\\n');
+fprintf(fileID,'xrcv1=%d xrcv2=%d zrcv1=%d zrcv2=%d \\\n',xrcv1,xrcv2,zrcv1,zrcv2);
+fprintf(fileID,'dxrcv=%d \\\n', dx);
+fprintf(fileID,'dtrcv=%e \\\n', dtrcv);
+fprintf(fileID,'xsrc=%d zsrc=%d\\\n', xsrc, zsrc);
+fprintf(fileID,'src_type=1 tmod=%e \\\n', tmod);
+fprintf(fileID,'ntaper=100 \\\n');
+fprintf(fileID,'left=2 right=2 bottom=2 top=2\n\n');
+fprintf(fileID,'suop2 recvgrid_rp.su recvhom_rp.su op=diff > recv_rp.su\n');
+fprintf(fileID,'sustrip < recv_rp.su > recv_rp.bin\n');
+fprintf(fileID,'sustrip < recvhom_rp.su > recvhom_rp.bin\n');
+fprintf(fileID,'sustrip < wavefwdt.su > wavefwdt.bin\n');
+fclose(fileID);
+!chmod +x run.scr
+system('./run.scr');
+
+path = getenv('PATH');
+path = [path ':$HOME/src/OpenSource/bin:/opt/CWP/bin/:.:'];
+setenv('PATH', path);
+
+% Scattered field  
+ns=ntrcv;
+ntr=dims(2);
+file='recv_rp.bin';
+fid=fopen(file,'r'); 
+Ptsct=fread(fid,[ns,ntr],'float32');
+fclose(fid);
+
+% Direct field  
+file='recvhom_rp.bin';
+fid=fopen(file,'r'); 
+Ptinc=fread(fid,[ns,ntr],'float32');
+fclose(fid);
+
+df=double(1.0/(ntfft*dtrcv));
+a=round(f/df)+1;
+f_out=(a-1)*df
+fprintf('selected discrete frequency P %f\n', (a-1)*df)
+% f2=a*df %these are the selected discrete frequencies
+Pfft=fft(Ptsct,ntfft);
+Pfsct=Pfft(a,:);
+%
+Pfft=fft(Ptinc,ntfft);
+Pfinc=Pfft(a,:);
+
+ns=ntfft;
+ntr=1;
+file='wavefwdt.bin';
+fid=fopen(file,'r'); 
+Wt=fread(fid,[ns,ntr],'float32');
+fclose(fid);
+
+df=double(1.0/(ntfft*dtrcv));
+c=round(f/df)+1; % select frequencies as close as the one's in Pf
+fprintf('selected discrete frequency W %f\n', (c-1)*df)
+Wfft=fft(Wt,ntfft);
+Wf=Wfft(c,1);
+
+Pfsct = (Pfsct)./(1.0*Wf); % deconvolve for the wavelet
+Pfinc = (Pfinc)./(1.0*Wf); % deconvolve for the wavelet
+
+end
+
diff --git a/fdelmodc/demo/matlab/ForwardCircle.m b/fdelmodc/demo/matlab/ForwardCircle.m
new file mode 100644
index 0000000000000000000000000000000000000000..dd67cc7d51751acbcfebbc2e76f102e621a2a4c4
--- /dev/null
+++ b/fdelmodc/demo/matlab/ForwardCircle.m
@@ -0,0 +1,152 @@
+function [P_inc,P_sct,xR] = ForwardCircle( xS, xR, gsize, dxR, c_0, c_s, rho_0, rho_s, f )
+
+% xS    = source position
+% dxR   = receiver grid size
+% c_0   = wave speed in embedding
+% c_s   = wave speed of scattering object
+% rho_0 = mass density in embedding
+% rho_s = mass density of scattering object
+% f     = temporal frequency;
+
+wavelength = c_0 / f;                   % wavelength
+s          = 1e-16 + 1i*2*pi*f;         % LaPlace parameter
+gam_0      = s/c_0;                     % propagation coefficient 0
+gam_s      = s/c_s;                     % propagation coefficient s
+a          = 40;                        % radius circle cylinder 
+depth      = 20;                        % distance betwen circle and origin
+
+disp(['wavelength = ' num2str(wavelength)]);
+
+% Thorbecke coordinates 
+   xSource1   = xS(1);                   % source position
+   xSource2   = xS(2);
+   xReceiver1 = xR(1);                     % receiver positions
+   nr=(gsize(2)-1)/2;
+   xReceiver2 = (-nr:nr) * dxR;        
+   NR         = size(xReceiver2,2); 
+   
+% Van den Berg coordinates 
+   xS(1) = xSource1;                          
+   xS(2) = xSource2; 
+   
+   xR(1,1:NR) = xReceiver1;
+   xR(2,1:NR) = xReceiver2(1:NR);
+
+% Compute 2D incident field ---------------------------------------------              
+  DIS   = sqrt( (xR(1,:)-xS(1)).^2 + (xR(2,:)-xS(2)).^2 );    
+  p_inc =  1/(2*pi).* besselk(0,gam_0*DIS);
+ 
+  % multiply by  rho_0 and plot
+  P_inc = rho_0 * p_inc ;                % Take care of factor \rho
+
+ % Make grid
+   N1 = gsize(1);                              % number of samples in x_1  
+   N2 = gsize(2);                              % number of samples in x_2 
+   dx = dxR;                                % with meshsize dx
+   x1 = -(N1+1)*dx/2 + (1:N1)*dx;   
+   x2 = -(N2+1)*dx/2 + (1:N2)*dx;
+   [X1,X2] = ndgrid(x1,x2);
+   % Now array subscripts are equivalent with Cartesian coordinates
+   % x1 axis points downwards and x2 axis is in horizontal direction
+   % x1 = X1(:,1) is a column vector in vertical direction
+   % x2 = X2(1,:) is a row vector in horizontal direction
+   R = sqrt(X1.^2 + X2.^2);
+   cgrid  = c_s * (R < a) + c_0 * (R >= a);  
+   rhogrid  = rho_s * (R < a) + rho_0 * (R >= a); 
+  
+   x1 = X1(:,1);   x2 = X2(1,:);
+    set(figure(8),'Units','centimeters','Position',[5 5 18 12]); 
+    subplot(1,2,1)
+       imagesc(x2,x1,cgrid); 
+       title('\fontsize{13} c-grid');
+       xlabel('x_1 \rightarrow'); 
+       ylabel('\leftarrow x_3'); 
+       axis('equal','tight');  
+       colorbar('hor'); colormap jet;
+    subplot(1,2,2)
+       imagesc(x2,x1,rhogrid); 
+       title('\fontsize{13} \rho-grid');
+       xlabel('x_1 \rightarrow'); 
+       ylabel('\leftarrow x_3'); 
+       axis('equal','tight');  
+       colorbar('hor'); colormap jet;
+
+
+
+  
+  
+%-------------------------------------------------------------------------  
+% CHECK EXACT INCIDENT FIELD AND BESSEL FUNCTION REPRESENTATION  for r = a
+%------------------------------------------------------------------------- 
+
+% Transform Cartesian coordinates to polar ccordinates   
+  rS = sqrt(xS(1)^2+xS(2)^2);     phiS = atan2(xS(2),xS(1)); 
+  r  = a;                         phi  = 0:.01:2*pi; 
+  
+% (1) Compute incident wave in closed form --------------------------------
+   DIS         = sqrt(rS^2 + r.^2 - 2*rS*r.*cos(phiS-phi));
+   p_inc_exact =           1/(2*pi) .* besselk(0,gam_0*DIS);
+  dp_inc_exact = - gam_0 *(r-rS*cos(phiS-phi))./DIS ...
+                        .* 1/(2*pi) .* besselk(1,gam_0*DIS);
+
+% (2) Compute incident wave as Bessel series with M+1terms --------------
+   M = 100;                                 % increase M for more accuracy
+  
+   p_inc =         besselk(0,gam_0*rS) .* besseli(0,gam_0*r);       
+  dp_inc = gam_0 * besselk(0,gam_0*rS) .* besseli(1,gam_0*r); 
+  for m = 1 : M;  
+       Ib0 = besseli(m,gam_0*r); 
+      dIb0 =  gam_0 * (besseli(m+1,gam_0*r) + m/(gam_0*r) * Ib0);
+     p_inc =  p_inc + 2 * besselk(m,gam_0*rS)  *  Ib0 .* cos(m*(phiS-phi));                   
+    dp_inc = dp_inc + 2 * besselk(m,gam_0*rS) .* dIb0 .* cos(m*(phiS-phi));
+  end % m_loop
+   p_inc = 1/(2*pi) *  p_inc;
+  dp_inc = 1/(2*pi) * dp_inc;
+  
+% (3) Determine mean error and plot error in domain -----------------------   
+  Error_p = p_inc - p_inc_exact;
+  disp(['normalized norm of error = '  ...
+                  num2str(norm(Error_p(:),1)/norm(p_inc_exact(:),1))]);
+  Error_dp = dp_inc - dp_inc_exact;
+  disp(['normalized norm of error = '  ...
+                  num2str(norm(Error_dp(:),1)/norm(dp_inc_exact(:),1))]);             
+                  
+  set(figure(9),'Units','centimeters','Position',[5 5 18 14]); 
+  subplot(2,1,1)
+    angle = phi * 180 / pi;
+    semilogy(angle,abs(Error_p)./abs(p_inc_exact));     axis tight;
+    xlabel('observation angle in degrees \rightarrow');
+    ylabel('abs(p_{inc}-p_{inc}^{exact}) / abs(p_{inc}^{exact}) \rightarrow'); 
+  subplot(2,1,2)
+    semilogy(angle,abs(Error_dp)./abs(dp_inc_exact));    axis tight;
+    title('\fontsize{12} relative error on circle boundary');   
+    xlabel('observation angle in degrees \rightarrow');
+    ylabel('abs(dp_{inc}-dp_{inc}^{exact}) / abs(dp_{inc}^{exact}) \rightarrow'); 
+     
+%--------------------------------------------------------------------------  
+% COMPUTE SCATTERED FIELD WITH BESSEL FUNCTION REPRESENTATION for r > a
+%-------------------------------------------------------------------------- 
+
+% (4) Compute coefficients of series expansion ----------------------------
+  Z_0  = c_0 * rho_0;   Z_s  = c_s * rho_s;
+  arg0 = gam_0 * a;     args = gam_s *a; 
+  A = zeros(1,M+1); 
+  for m = 0 : M;                      
+    Ib0 = besseli(m,arg0);     dIb0 =  besseli(m+1,arg0) + m/arg0 * Ib0; 
+    Ibs = besseli(m,args);     dIbs =  besseli(m+1,args) + m/args * Ibs; 
+    Kb0 = besselk(m,arg0);     dKb0 = -besselk(m+1,arg0) + m/arg0 * Kb0;
+    A(m+1) = - ((1/Z_s) * dIbs*Ib0 - (1/Z_0) * dIb0*Ibs) ...
+              /((1/Z_s) * dIbs*Kb0 - (1/Z_0) * dKb0*Ibs);
+  end
+  
+% (5) Compute scattered field at receivers (data) -------------------------
+  rR = sqrt(xR(1,:).^2 + xR(2,:).^2);   phiR = atan2(xR(2,:),xR(1,:));  
+  rS = sqrt(xS(1)^2 + xS(2)^2);          phiS = atan2(xS(2),xS(1));
+  p_sct = A(1) * besselk(0,gam_0*rS).* besselk(0,gam_0*rR);
+  for m = 1 : M;
+    factor = 2 * besselk(m,gam_0*rS) .* cos(m*(phiS-phiR));
+    p_sct = p_sct + A(m+1) * factor .* besselk(m,gam_0*rR);
+  end % m_loop
+  p_sct = 1/(2*pi) * p_sct;    
+  P_sct = rho_0    * p_sct;                  % Take care of factor \rho
+end
\ No newline at end of file
diff --git a/fdelmodc/demo/matlab/comparison.m b/fdelmodc/demo/matlab/comparison.m
new file mode 100644
index 0000000000000000000000000000000000000000..796e68149c957dade92e5c00dc3dce0f20e6e361
--- /dev/null
+++ b/fdelmodc/demo/matlab/comparison.m
@@ -0,0 +1,83 @@
+clear all;  close all;  clc;
+
+display('Running test');
+
+xS    = [-100,0];  % source position: 100 m above center 
+xR    = [-60,0];   % central point of receiver array (-50*dxR:50*dxR)
+c_0   = 1500;      % wave speed in embedding
+c_s   = 3000;      % wave speed in scattering object
+rho_0 = 3000;      % mass density of enbedding
+rho_s = 1500;      % mass density of scattering object
+
+dxR   = 0.5;       % receiver grid size
+gsize = [1+240/dxR,1+200/dxR]; % gridsize in [z,x], center of model at coordinate (0,0)
+f_in  = 50;        % selected frequency to compare, returned in Pf
+ntrcv = 256;       % number of time samples in FD modeling
+dtrcv = 0.004;     % dt in receivers
+
+
+% Make grid
+a  = 40;                               % radius circle cylinder 
+N1 = gsize(1);                         % number of samples in x_1  
+N2 = gsize(2);                         % number of samples in x_2 
+dx = dxR;                              % with meshsize dx
+x1 = -(N1+1)*dx/2 + (1:N1)*dx;
+x2 = -(N2+1)*dx/2 + (1:N2)*dx;
+[X1,X2] = ndgrid(x1,x2);
+% Now array subscripts are equivalent with Cartesian coordinates
+% x1 axis points downwards and x2 axis is in horizontal direction
+% x1 = X1(:,1) is a column vector in vertical direction
+% x2 = X2(1,:) is a row vector in horizontal direction
+R = sqrt(X1.^2 + X2.^2);
+cgrid  = c_s * (R < a) + c_0 * (R >= a);  
+rhogrid  = rho_s * (R < a) + rho_0 * (R >= a); 
+   
+% DATA from Thorbecke's finite difference code
+[Ptsct, Pfinc, Pfsct, f_out]=FD_mod_grid( xS, xR, ntrcv, dtrcv, dxR, cgrid, rhogrid, f_in );
+
+f=f_out           % nearest computed discrete frequency
+
+% Compare with analytical solution ---------------------------------------
+[P_inc,P_sct,xR] = ForwardCircle( xS, xR, gsize, dxR, c_0, c_s, rho_0, rho_s, f );
+
+set(figure(1),'Units','centimeters','Position',[1 1 30 10]);
+subplot(1,3,1)
+  plot(xR(2,:),real(Pfinc),'LineWidth',1.2); 
+  title('Real part of P^{inc}'); axis tight; hold on;
+  plot(xR(2,:),real(P_inc),'--r','LineWidth',1.2); 
+  axis tight; hold off;
+subplot(1,3,2)
+  plot(xR(2,:),imag(Pfinc),'LineWidth',1.2); 
+  title('Imaginary part of P^{inc}'); axis tight; hold on;
+  plot(xR(2,:),imag(P_inc),'--r','LineWidth',1.2);
+  axis tight; hold off;
+subplot(1,3,3)
+  plot(xR(2,:), abs(Pfinc),'LineWidth',1.2); 
+  title('Absolute value of P^{inc}'); axis tight; hold on; 
+  plot(xR(2,:), abs(P_inc),'--r','LineWidth',1.2); 
+  axis tight; hold off
+legendtitle1 = sprintf('f=%.2fHz FiniteDiff', f);
+legendtitle2 = sprintf('f=%.2fHz Analytic  ', f);
+legend(legendtitle1,legendtitle2,'Location','Best');
+
+set(figure(2),'Units','centimeters','Position',[9 12 10 10]);
+error = abs(P_sct(:)-Pfsct(:))./abs(Pfsct(:));
+plot(error,'LineWidth',1.2); title('Relative error'); axis tight;
+
+set(figure(3),'Units','centimeters','Position',[1 1 30 10]);
+subplot(1,3,1)
+  plot(xR(2,:),real(Pfsct),'LineWidth',1.2); 
+  title('Real part of P_{sct}'); axis tight; hold on;
+  plot(xR(2,:),real(P_sct),'LineWidth',1.2); 
+subplot(1,3,2)
+  plot(xR(2,:),imag(Pfsct),'LineWidth',1.2); 
+  title('Imaginary part of P^{sct}'); axis tight; hold on;
+    plot(xR(2,:),imag(P_sct),'LineWidth',1.2); 
+subplot(1,3,3)
+  plot(xR(2,:), abs(Pfsct),'LineWidth',1.2); 
+  title('Absolute value of P^{sct}'); axis tight; hold on;
+  plot(xR(2,:), abs(P_sct),'LineWidth',1.2); 
+  axis tight; hold off
+legendtitle1 = sprintf('f=%.2fHz FiniteDiff', f);
+legendtitle2 = sprintf('f=%.2fHz Analytic  ', f);
+legend(legendtitle1,legendtitle2,'Location','Best');
diff --git a/fdelmodc/demo/pars b/fdelmodc/demo/pars
deleted file mode 100644
index e94ff542cafef10cb45d02f42ea2f70e77f69778..0000000000000000000000000000000000000000
--- a/fdelmodc/demo/pars
+++ /dev/null
@@ -1,5 +0,0 @@
-file_cp=syncl_cp.su ischeme=1 file_den=syncl_ro.su file_src=wave.su \
-file_rcv=shot_xsrc-200.su src_type=7 src_orient=1 \
-src_injectionrate=1 rec_type_vz=0 rec_type_p=1 rec_int_vz=2 \
-dtrcv=0.004 rec_delay=0.1 verbose=2 tmod=4.10 dxrcv=10.0 xrcv1=-2250 \
-xrcv2=2250 zrcv1=0 zrcv2=0 xsrc=0 zsrc=1150 ntaper=200 left=2 right=2 top=1 bottom=2
diff --git a/fdelmodc/demo/slurm-145091.out b/fdelmodc/demo/slurm-145091.out
deleted file mode 100644
index 4508d052c8443d0445a32fa59836641237e37973..0000000000000000000000000000000000000000
--- a/fdelmodc/demo/slurm-145091.out
+++ /dev/null
@@ -1,1096 +0,0 @@
-number of threads=2
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************** general info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: tmod    = 4.100000
-    ../fdelmodc: ntsam   = 8201   dt      = 0.000500(5.000000e-04)
-    ../fdelmodc: Acoustic staggered grid, pressure/velocity
-    ../fdelmodc: Forward modelling
-    ../fdelmodc: *******************************************
-    ../fdelmodc: *************** model info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: nz      =      801   nx      =     2401
-    ../fdelmodc: dz      =   2.5000   dx      =   2.5000
-    ../fdelmodc: zmin    =   0.0000   zmax    = 2000.0000
-    ../fdelmodc: xmin    = -3000.0000   xmax    = 3000.0000
-    ../fdelmodc: min(cp) =  2000.000  max(cp) =  2400.000
-    ../fdelmodc: min(ro) =  1000.000  max(ro) =  2000.000
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ******** dispersion and stability *********
-    ../fdelmodc: *******************************************
-    ../fdelmodc: Dispersion criterion is   5 points per wavelength: 
-    ../fdelmodc:  ====> wavelength > 12.500000 m [dx*disp]
-    ../fdelmodc: The maximum frequency in source wavelet must be:
-    ../fdelmodc:  ====> frequency < 160.000000 Hz. [Cmin/dx*disp]
-    ../fdelmodc: Stability criterion for current settings: 
-    ../fdelmodc:  ====> Cp < 3029.999756 m/s [dx*disp/dt]
-    ../fdelmodc:  For wavelet(s) in file_src fmax = 60.546871
-    ../fdelmodc: Optimal discretisation for current model:
-    ../fdelmodc:  With maximum velocity  = 2400.000000 dt <= 6.312500e-04
-    ../fdelmodc:  With maximum frequency = 60.546871 dx <= 6.606452e+00
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* boundary info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ***  1=free 2=pml 3=rigid 4=tapered     ***
-    ../fdelmodc: Top boundary    : 1
-    ../fdelmodc: Left boundary   : 2
-    ../fdelmodc: Right boundary  : 2
-    ../fdelmodc: Bottom boundary : 2
-    ../fdelmodc: taper lenght = 101 points
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* wavelet info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: wav_nt   =   4096   wav_nx      = 1
-    ../fdelmodc: src_type =      7   src_orient  = 1
-    ../fdelmodc: fmax     =    60.55
-    ../fdelmodc: Source type         : Fz 
-    ../fdelmodc: *************** no snapshots **************
-    ../fdelmodc: **************** no beams *****************
-    ../fdelmodc: Total number of linear array receivers: 501
-    ../fdelmodc: Total number of receivers: 501
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* receiver info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ntrcv   = 4101 nrcv    = 501 
-    ../fdelmodc: dtrcv   = 0.001000              
-    ../fdelmodc: dzrcv   = 0.000000 dxrcv   = 10.000000 
-    ../fdelmodc: time-delay = 0.100000 = points = 200
-    ../fdelmodc: Receiver sampling can be => 8.258065e-03
-    ../fdelmodc: Receiver array at coordinates: 
-    ../fdelmodc: zmin    = 0.000000 zmax    = 0.000000 
-    ../fdelmodc: xmin    = -2500.000000 xmax    = 2500.000000 
-    ../fdelmodc: which are gridpoints: 
-    ../fdelmodc: izmin   = 0 izmax   = 0 
-    ../fdelmodc: ixmin   = 200 ixmax   = 2200 
-    ../fdelmodc: Receiver interpolation for P: p->p
-    ../fdelmodc: Receiver interpolation for Vz: vz->vz
-    ../fdelmodc: Receiver types        : Vz p 
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* runtime info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: CPU time for intializing arrays and model = 0.089452
-    ../fdelmodc: Modeling source 0 at gridpoints ix=1200 iz=0
-    ../fdelmodc:  which are actual positions x=0.00 z=0.00
-    ../fdelmodc: Receivers at gridpoint x-range ix=200 - 2200
-    ../fdelmodc:  which are actual positions x=-2500.00 - 2500.00
-    ../fdelmodc: Receivers at gridpoint z-range iz=0 - 0
-    ../fdelmodc:  which are actual positions z=0.00 - 0.00
-OMP: Info #204: KMP_AFFINITY: decoding x2APIC ids.
-OMP: Info #202: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info
-OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39}
-OMP: Info #156: KMP_AFFINITY: 40 available OS procs
-OMP: Info #157: KMP_AFFINITY: Uniform topology
-OMP: Info #179: KMP_AFFINITY: 2 packages x 10 cores/pkg x 2 threads/core (20 total cores)
-OMP: Info #206: KMP_AFFINITY: OS proc to physical thread map:
-OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0 core 0 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 20 maps to package 0 core 0 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to package 0 core 1 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 21 maps to package 0 core 1 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to package 0 core 2 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 22 maps to package 0 core 2 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to package 0 core 3 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 23 maps to package 0 core 3 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 4 maps to package 0 core 4 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 24 maps to package 0 core 4 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 5 maps to package 0 core 8 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 25 maps to package 0 core 8 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 6 maps to package 0 core 9 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 26 maps to package 0 core 9 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 7 maps to package 0 core 10 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 27 maps to package 0 core 10 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 8 maps to package 0 core 11 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 28 maps to package 0 core 11 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 9 maps to package 0 core 12 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 29 maps to package 0 core 12 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 10 maps to package 1 core 0 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 30 maps to package 1 core 0 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 11 maps to package 1 core 1 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 31 maps to package 1 core 1 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 12 maps to package 1 core 2 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 32 maps to package 1 core 2 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 13 maps to package 1 core 3 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 33 maps to package 1 core 3 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 14 maps to package 1 core 4 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 34 maps to package 1 core 4 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 15 maps to package 1 core 8 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 35 maps to package 1 core 8 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 16 maps to package 1 core 9 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 36 maps to package 1 core 9 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 17 maps to package 1 core 10 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 37 maps to package 1 core 10 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 18 maps to package 1 core 11 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 38 maps to package 1 core 11 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 19 maps to package 1 core 12 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 39 maps to package 1 core 12 thread 1 
-OMP: Info #242: KMP_AFFINITY: pid 31464 thread 0 bound to OS proc set {0}
-OMP: Info #242: KMP_AFFINITY: pid 31464 thread 1 bound to OS proc set {1}
-    ../fdelmodc: Hello world from thread 0, on cnode1. (core affinity = 0)
-    ../fdelmodc: Hello world from thread 1, on cnode1. (core affinity = 1)
-    ../fdelmodc: Estimated compute time = 62.21 s. per shot.
-    ../fdelmodc: Estimated total compute time = 62.30 s.
-    ../fdelmodc: Number of samples written to last file = 4001
-    ../fdelmodc: Total compute time FD modelling = 62.53 s.
-
-real	1m2.534s
-user	2m4.720s
-sys	0m0.151s
-number of threads=4
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************** general info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: tmod    = 4.100000
-    ../fdelmodc: ntsam   = 8201   dt      = 0.000500(5.000000e-04)
-    ../fdelmodc: Acoustic staggered grid, pressure/velocity
-    ../fdelmodc: Forward modelling
-    ../fdelmodc: *******************************************
-    ../fdelmodc: *************** model info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: nz      =      801   nx      =     2401
-    ../fdelmodc: dz      =   2.5000   dx      =   2.5000
-    ../fdelmodc: zmin    =   0.0000   zmax    = 2000.0000
-    ../fdelmodc: xmin    = -3000.0000   xmax    = 3000.0000
-    ../fdelmodc: min(cp) =  2000.000  max(cp) =  2400.000
-    ../fdelmodc: min(ro) =  1000.000  max(ro) =  2000.000
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ******** dispersion and stability *********
-    ../fdelmodc: *******************************************
-    ../fdelmodc: Dispersion criterion is   5 points per wavelength: 
-    ../fdelmodc:  ====> wavelength > 12.500000 m [dx*disp]
-    ../fdelmodc: The maximum frequency in source wavelet must be:
-    ../fdelmodc:  ====> frequency < 160.000000 Hz. [Cmin/dx*disp]
-    ../fdelmodc: Stability criterion for current settings: 
-    ../fdelmodc:  ====> Cp < 3029.999756 m/s [dx*disp/dt]
-    ../fdelmodc:  For wavelet(s) in file_src fmax = 60.546871
-    ../fdelmodc: Optimal discretisation for current model:
-    ../fdelmodc:  With maximum velocity  = 2400.000000 dt <= 6.312500e-04
-    ../fdelmodc:  With maximum frequency = 60.546871 dx <= 6.606452e+00
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* boundary info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ***  1=free 2=pml 3=rigid 4=tapered     ***
-    ../fdelmodc: Top boundary    : 1
-    ../fdelmodc: Left boundary   : 2
-    ../fdelmodc: Right boundary  : 2
-    ../fdelmodc: Bottom boundary : 2
-    ../fdelmodc: taper lenght = 101 points
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* wavelet info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: wav_nt   =   4096   wav_nx      = 1
-    ../fdelmodc: src_type =      7   src_orient  = 1
-    ../fdelmodc: fmax     =    60.55
-    ../fdelmodc: Source type         : Fz 
-    ../fdelmodc: *************** no snapshots **************
-    ../fdelmodc: **************** no beams *****************
-    ../fdelmodc: Total number of linear array receivers: 501
-    ../fdelmodc: Total number of receivers: 501
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* receiver info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ntrcv   = 4101 nrcv    = 501 
-    ../fdelmodc: dtrcv   = 0.001000              
-    ../fdelmodc: dzrcv   = 0.000000 dxrcv   = 10.000000 
-    ../fdelmodc: time-delay = 0.100000 = points = 200
-    ../fdelmodc: Receiver sampling can be => 8.258065e-03
-    ../fdelmodc: Receiver array at coordinates: 
-    ../fdelmodc: zmin    = 0.000000 zmax    = 0.000000 
-    ../fdelmodc: xmin    = -2500.000000 xmax    = 2500.000000 
-    ../fdelmodc: which are gridpoints: 
-    ../fdelmodc: izmin   = 0 izmax   = 0 
-    ../fdelmodc: ixmin   = 200 ixmax   = 2200 
-    ../fdelmodc: Receiver interpolation for P: p->p
-    ../fdelmodc: Receiver interpolation for Vz: vz->vz
-    ../fdelmodc: Receiver types        : Vz p 
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* runtime info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: CPU time for intializing arrays and model = 0.046987
-    ../fdelmodc: Modeling source 0 at gridpoints ix=1200 iz=0
-    ../fdelmodc:  which are actual positions x=0.00 z=0.00
-    ../fdelmodc: Receivers at gridpoint x-range ix=200 - 2200
-    ../fdelmodc:  which are actual positions x=-2500.00 - 2500.00
-    ../fdelmodc: Receivers at gridpoint z-range iz=0 - 0
-    ../fdelmodc:  which are actual positions z=0.00 - 0.00
-OMP: Info #204: KMP_AFFINITY: decoding x2APIC ids.
-OMP: Info #202: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info
-OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39}
-OMP: Info #156: KMP_AFFINITY: 40 available OS procs
-OMP: Info #157: KMP_AFFINITY: Uniform topology
-OMP: Info #179: KMP_AFFINITY: 2 packages x 10 cores/pkg x 2 threads/core (20 total cores)
-OMP: Info #206: KMP_AFFINITY: OS proc to physical thread map:
-OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0 core 0 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 20 maps to package 0 core 0 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to package 0 core 1 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 21 maps to package 0 core 1 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to package 0 core 2 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 22 maps to package 0 core 2 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to package 0 core 3 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 23 maps to package 0 core 3 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 4 maps to package 0 core 4 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 24 maps to package 0 core 4 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 5 maps to package 0 core 8 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 25 maps to package 0 core 8 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 6 maps to package 0 core 9 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 26 maps to package 0 core 9 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 7 maps to package 0 core 10 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 27 maps to package 0 core 10 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 8 maps to package 0 core 11 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 28 maps to package 0 core 11 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 9 maps to package 0 core 12 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 29 maps to package 0 core 12 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 10 maps to package 1 core 0 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 30 maps to package 1 core 0 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 11 maps to package 1 core 1 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 31 maps to package 1 core 1 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 12 maps to package 1 core 2 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 32 maps to package 1 core 2 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 13 maps to package 1 core 3 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 33 maps to package 1 core 3 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 14 maps to package 1 core 4 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 34 maps to package 1 core 4 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 15 maps to package 1 core 8 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 35 maps to package 1 core 8 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 16 maps to package 1 core 9 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 36 maps to package 1 core 9 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 17 maps to package 1 core 10 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 37 maps to package 1 core 10 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 18 maps to package 1 core 11 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 38 maps to package 1 core 11 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 19 maps to package 1 core 12 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 39 maps to package 1 core 12 thread 1 
-OMP: Info #242: KMP_AFFINITY: pid 31479 thread 0 bound to OS proc set {0}
-OMP: Info #242: KMP_AFFINITY: pid 31479 thread 1 bound to OS proc set {1}
-OMP: Info #242: KMP_AFFINITY: pid 31479 thread 3 bound to OS proc set {3}
-    ../fdelmodc: Hello world from thread 1, on cnode1. (core affinity = 1)
-    ../fdelmodc: Hello world from thread 0, on cnode1. (core affinity = 0)
-OMP: Info #242: KMP_AFFINITY: pid 31479 thread 2 bound to OS proc set {2}
-    ../fdelmodc: Hello world from thread 3, on cnode1. (core affinity = 3)
-    ../fdelmodc: Hello world from thread 2, on cnode1. (core affinity = 2)
-    ../fdelmodc: Estimated compute time = 34.77 s. per shot.
-    ../fdelmodc: Estimated total compute time = 34.82 s.
-    ../fdelmodc: Number of samples written to last file = 4001
-    ../fdelmodc: Total compute time FD modelling = 34.67 s.
-
-real	0m34.677s
-user	2m18.252s
-sys	0m0.183s
-number of threads=8
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************** general info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: tmod    = 4.100000
-    ../fdelmodc: ntsam   = 8201   dt      = 0.000500(5.000000e-04)
-    ../fdelmodc: Acoustic staggered grid, pressure/velocity
-    ../fdelmodc: Forward modelling
-    ../fdelmodc: *******************************************
-    ../fdelmodc: *************** model info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: nz      =      801   nx      =     2401
-    ../fdelmodc: dz      =   2.5000   dx      =   2.5000
-    ../fdelmodc: zmin    =   0.0000   zmax    = 2000.0000
-    ../fdelmodc: xmin    = -3000.0000   xmax    = 3000.0000
-    ../fdelmodc: min(cp) =  2000.000  max(cp) =  2400.000
-    ../fdelmodc: min(ro) =  1000.000  max(ro) =  2000.000
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ******** dispersion and stability *********
-    ../fdelmodc: *******************************************
-    ../fdelmodc: Dispersion criterion is   5 points per wavelength: 
-    ../fdelmodc:  ====> wavelength > 12.500000 m [dx*disp]
-    ../fdelmodc: The maximum frequency in source wavelet must be:
-    ../fdelmodc:  ====> frequency < 160.000000 Hz. [Cmin/dx*disp]
-    ../fdelmodc: Stability criterion for current settings: 
-    ../fdelmodc:  ====> Cp < 3029.999756 m/s [dx*disp/dt]
-    ../fdelmodc:  For wavelet(s) in file_src fmax = 60.546871
-    ../fdelmodc: Optimal discretisation for current model:
-    ../fdelmodc:  With maximum velocity  = 2400.000000 dt <= 6.312500e-04
-    ../fdelmodc:  With maximum frequency = 60.546871 dx <= 6.606452e+00
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* boundary info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ***  1=free 2=pml 3=rigid 4=tapered     ***
-    ../fdelmodc: Top boundary    : 1
-    ../fdelmodc: Left boundary   : 2
-    ../fdelmodc: Right boundary  : 2
-    ../fdelmodc: Bottom boundary : 2
-    ../fdelmodc: taper lenght = 101 points
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* wavelet info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: wav_nt   =   4096   wav_nx      = 1
-    ../fdelmodc: src_type =      7   src_orient  = 1
-    ../fdelmodc: fmax     =    60.55
-    ../fdelmodc: Source type         : Fz 
-    ../fdelmodc: *************** no snapshots **************
-    ../fdelmodc: **************** no beams *****************
-    ../fdelmodc: Total number of linear array receivers: 501
-    ../fdelmodc: Total number of receivers: 501
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* receiver info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ntrcv   = 4101 nrcv    = 501 
-    ../fdelmodc: dtrcv   = 0.001000              
-    ../fdelmodc: dzrcv   = 0.000000 dxrcv   = 10.000000 
-    ../fdelmodc: time-delay = 0.100000 = points = 200
-    ../fdelmodc: Receiver sampling can be => 8.258065e-03
-    ../fdelmodc: Receiver array at coordinates: 
-    ../fdelmodc: zmin    = 0.000000 zmax    = 0.000000 
-    ../fdelmodc: xmin    = -2500.000000 xmax    = 2500.000000 
-    ../fdelmodc: which are gridpoints: 
-    ../fdelmodc: izmin   = 0 izmax   = 0 
-    ../fdelmodc: ixmin   = 200 ixmax   = 2200 
-    ../fdelmodc: Receiver interpolation for P: p->p
-    ../fdelmodc: Receiver interpolation for Vz: vz->vz
-    ../fdelmodc: Receiver types        : Vz p 
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* runtime info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: CPU time for intializing arrays and model = 0.046825
-    ../fdelmodc: Modeling source 0 at gridpoints ix=1200 iz=0
-    ../fdelmodc:  which are actual positions x=0.00 z=0.00
-    ../fdelmodc: Receivers at gridpoint x-range ix=200 - 2200
-    ../fdelmodc:  which are actual positions x=-2500.00 - 2500.00
-    ../fdelmodc: Receivers at gridpoint z-range iz=0 - 0
-    ../fdelmodc:  which are actual positions z=0.00 - 0.00
-OMP: Info #204: KMP_AFFINITY: decoding x2APIC ids.
-OMP: Info #202: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info
-OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39}
-OMP: Info #156: KMP_AFFINITY: 40 available OS procs
-OMP: Info #157: KMP_AFFINITY: Uniform topology
-OMP: Info #179: KMP_AFFINITY: 2 packages x 10 cores/pkg x 2 threads/core (20 total cores)
-OMP: Info #206: KMP_AFFINITY: OS proc to physical thread map:
-OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0 core 0 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 20 maps to package 0 core 0 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to package 0 core 1 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 21 maps to package 0 core 1 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to package 0 core 2 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 22 maps to package 0 core 2 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to package 0 core 3 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 23 maps to package 0 core 3 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 4 maps to package 0 core 4 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 24 maps to package 0 core 4 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 5 maps to package 0 core 8 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 25 maps to package 0 core 8 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 6 maps to package 0 core 9 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 26 maps to package 0 core 9 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 7 maps to package 0 core 10 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 27 maps to package 0 core 10 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 8 maps to package 0 core 11 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 28 maps to package 0 core 11 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 9 maps to package 0 core 12 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 29 maps to package 0 core 12 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 10 maps to package 1 core 0 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 30 maps to package 1 core 0 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 11 maps to package 1 core 1 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 31 maps to package 1 core 1 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 12 maps to package 1 core 2 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 32 maps to package 1 core 2 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 13 maps to package 1 core 3 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 33 maps to package 1 core 3 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 14 maps to package 1 core 4 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 34 maps to package 1 core 4 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 15 maps to package 1 core 8 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 35 maps to package 1 core 8 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 16 maps to package 1 core 9 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 36 maps to package 1 core 9 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 17 maps to package 1 core 10 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 37 maps to package 1 core 10 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 18 maps to package 1 core 11 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 38 maps to package 1 core 11 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 19 maps to package 1 core 12 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 39 maps to package 1 core 12 thread 1 
-OMP: Info #242: KMP_AFFINITY: pid 31484 thread 0 bound to OS proc set {0}
-OMP: Info #242: KMP_AFFINITY: pid 31484 thread 1 bound to OS proc set {1}
-OMP: Info #242: KMP_AFFINITY: pid 31484 thread 2 bound to OS proc set {2}
-OMP: Info #242: KMP_AFFINITY: pid 31484 thread 6 bound to OS proc set {6}
-OMP: Info #242: KMP_AFFINITY: pid 31484 thread 3 bound to OS proc set {3}
-OMP: Info #242: KMP_AFFINITY: pid 31484 thread 7 bound to OS proc set {7}
-    ../fdelmodc: Hello world from thread 1, on cnode1. (core affinity = 1)
-OMP: Info #242: KMP_AFFINITY: pid 31484 thread 4 bound to OS proc set {4}
-OMP: Info #242: KMP_AFFINITY: pid 31484 thread 5 bound to OS proc set {5}
-    ../fdelmodc: Hello world from thread 0, on cnode1. (core affinity = 0)
-    ../fdelmodc: Hello world from thread 2, on cnode1. (core affinity = 2)
-    ../fdelmodc: Hello world from thread 3, on cnode1. (core affinity = 3)
-    ../fdelmodc: Hello world from thread 7, on cnode1. (core affinity = 7)
-    ../fdelmodc: Hello world from thread 4, on cnode1. (core affinity = 4)
-    ../fdelmodc: Hello world from thread 6, on cnode1. (core affinity = 6)
-    ../fdelmodc: Hello world from thread 5, on cnode1. (core affinity = 5)
-    ../fdelmodc: Estimated compute time = 26.01 s. per shot.
-    ../fdelmodc: Estimated total compute time = 26.05 s.
-    ../fdelmodc: Number of samples written to last file = 4001
-    ../fdelmodc: Total compute time FD modelling = 24.50 s.
-
-real	0m24.502s
-user	3m15.265s
-sys	0m0.205s
-number of threads=12
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************** general info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: tmod    = 4.100000
-    ../fdelmodc: ntsam   = 8201   dt      = 0.000500(5.000000e-04)
-    ../fdelmodc: Acoustic staggered grid, pressure/velocity
-    ../fdelmodc: Forward modelling
-    ../fdelmodc: *******************************************
-    ../fdelmodc: *************** model info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: nz      =      801   nx      =     2401
-    ../fdelmodc: dz      =   2.5000   dx      =   2.5000
-    ../fdelmodc: zmin    =   0.0000   zmax    = 2000.0000
-    ../fdelmodc: xmin    = -3000.0000   xmax    = 3000.0000
-    ../fdelmodc: min(cp) =  2000.000  max(cp) =  2400.000
-    ../fdelmodc: min(ro) =  1000.000  max(ro) =  2000.000
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ******** dispersion and stability *********
-    ../fdelmodc: *******************************************
-    ../fdelmodc: Dispersion criterion is   5 points per wavelength: 
-    ../fdelmodc:  ====> wavelength > 12.500000 m [dx*disp]
-    ../fdelmodc: The maximum frequency in source wavelet must be:
-    ../fdelmodc:  ====> frequency < 160.000000 Hz. [Cmin/dx*disp]
-    ../fdelmodc: Stability criterion for current settings: 
-    ../fdelmodc:  ====> Cp < 3029.999756 m/s [dx*disp/dt]
-    ../fdelmodc:  For wavelet(s) in file_src fmax = 60.546871
-    ../fdelmodc: Optimal discretisation for current model:
-    ../fdelmodc:  With maximum velocity  = 2400.000000 dt <= 6.312500e-04
-    ../fdelmodc:  With maximum frequency = 60.546871 dx <= 6.606452e+00
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* boundary info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ***  1=free 2=pml 3=rigid 4=tapered     ***
-    ../fdelmodc: Top boundary    : 1
-    ../fdelmodc: Left boundary   : 2
-    ../fdelmodc: Right boundary  : 2
-    ../fdelmodc: Bottom boundary : 2
-    ../fdelmodc: taper lenght = 101 points
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* wavelet info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: wav_nt   =   4096   wav_nx      = 1
-    ../fdelmodc: src_type =      7   src_orient  = 1
-    ../fdelmodc: fmax     =    60.55
-    ../fdelmodc: Source type         : Fz 
-    ../fdelmodc: *************** no snapshots **************
-    ../fdelmodc: **************** no beams *****************
-    ../fdelmodc: Total number of linear array receivers: 501
-    ../fdelmodc: Total number of receivers: 501
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* receiver info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ntrcv   = 4101 nrcv    = 501 
-    ../fdelmodc: dtrcv   = 0.001000              
-    ../fdelmodc: dzrcv   = 0.000000 dxrcv   = 10.000000 
-    ../fdelmodc: time-delay = 0.100000 = points = 200
-    ../fdelmodc: Receiver sampling can be => 8.258065e-03
-    ../fdelmodc: Receiver array at coordinates: 
-    ../fdelmodc: zmin    = 0.000000 zmax    = 0.000000 
-    ../fdelmodc: xmin    = -2500.000000 xmax    = 2500.000000 
-    ../fdelmodc: which are gridpoints: 
-    ../fdelmodc: izmin   = 0 izmax   = 0 
-    ../fdelmodc: ixmin   = 200 ixmax   = 2200 
-    ../fdelmodc: Receiver interpolation for P: p->p
-    ../fdelmodc: Receiver interpolation for Vz: vz->vz
-    ../fdelmodc: Receiver types        : Vz p 
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* runtime info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: CPU time for intializing arrays and model = 0.049332
-    ../fdelmodc: Modeling source 0 at gridpoints ix=1200 iz=0
-    ../fdelmodc:  which are actual positions x=0.00 z=0.00
-    ../fdelmodc: Receivers at gridpoint x-range ix=200 - 2200
-    ../fdelmodc:  which are actual positions x=-2500.00 - 2500.00
-    ../fdelmodc: Receivers at gridpoint z-range iz=0 - 0
-    ../fdelmodc:  which are actual positions z=0.00 - 0.00
-OMP: Info #204: KMP_AFFINITY: decoding x2APIC ids.
-OMP: Info #202: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info
-OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39}
-OMP: Info #156: KMP_AFFINITY: 40 available OS procs
-OMP: Info #157: KMP_AFFINITY: Uniform topology
-OMP: Info #179: KMP_AFFINITY: 2 packages x 10 cores/pkg x 2 threads/core (20 total cores)
-OMP: Info #206: KMP_AFFINITY: OS proc to physical thread map:
-OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0 core 0 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 20 maps to package 0 core 0 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to package 0 core 1 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 21 maps to package 0 core 1 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to package 0 core 2 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 22 maps to package 0 core 2 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to package 0 core 3 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 23 maps to package 0 core 3 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 4 maps to package 0 core 4 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 24 maps to package 0 core 4 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 5 maps to package 0 core 8 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 25 maps to package 0 core 8 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 6 maps to package 0 core 9 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 26 maps to package 0 core 9 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 7 maps to package 0 core 10 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 27 maps to package 0 core 10 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 8 maps to package 0 core 11 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 28 maps to package 0 core 11 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 9 maps to package 0 core 12 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 29 maps to package 0 core 12 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 10 maps to package 1 core 0 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 30 maps to package 1 core 0 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 11 maps to package 1 core 1 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 31 maps to package 1 core 1 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 12 maps to package 1 core 2 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 32 maps to package 1 core 2 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 13 maps to package 1 core 3 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 33 maps to package 1 core 3 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 14 maps to package 1 core 4 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 34 maps to package 1 core 4 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 15 maps to package 1 core 8 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 35 maps to package 1 core 8 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 16 maps to package 1 core 9 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 36 maps to package 1 core 9 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 17 maps to package 1 core 10 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 37 maps to package 1 core 10 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 18 maps to package 1 core 11 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 38 maps to package 1 core 11 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 19 maps to package 1 core 12 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 39 maps to package 1 core 12 thread 1 
-OMP: Info #242: KMP_AFFINITY: pid 31502 thread 0 bound to OS proc set {0}
-OMP: Info #242: KMP_AFFINITY: pid 31502 thread 1 bound to OS proc set {1}
-OMP: Info #242: KMP_AFFINITY: pid 31502 thread 3 bound to OS proc set {3}
-OMP: Info #242: KMP_AFFINITY: pid 31502 thread 4 bound to OS proc set {4}
-OMP: Info #242: KMP_AFFINITY: pid 31502 thread 2 bound to OS proc set {2}
-OMP: Info #242: KMP_AFFINITY: pid 31502 thread 5 bound to OS proc set {5}
-OMP: Info #242: KMP_AFFINITY: pid 31502 thread 6 bound to OS proc set {6}
-OMP: Info #242: KMP_AFFINITY: pid 31502 thread 7 bound to OS proc set {7}
-OMP: Info #242: KMP_AFFINITY: pid 31502 thread 8 bound to OS proc set {8}
-OMP: Info #242: KMP_AFFINITY: pid 31502 thread 10 bound to OS proc set {10}
-OMP: Info #242: KMP_AFFINITY: pid 31502 thread 9 bound to OS proc set {9}
-    ../fdelmodc: Hello world from thread 0, on cnode1. (core affinity = 0)
-    ../fdelmodc: Hello world from thread 1, on cnode1. (core affinity = 1)
-    ../fdelmodc: Hello world from thread 2, on cnode1. (core affinity = 2)
-    ../fdelmodc: Hello world from thread 10, on cnode1. (core affinity = 10)
-    ../fdelmodc: Hello world from thread 8, on cnode1. (core affinity = 8)
-    ../fdelmodc: Hello world from thread 5, on cnode1. (core affinity = 5)
-    ../fdelmodc: Hello world from thread 3, on cnode1. (core affinity = 3)
-    ../fdelmodc: Hello world from thread 9, on cnode1. (core affinity = 9)
-    ../fdelmodc: Hello world from thread 4, on cnode1. (core affinity = 4)
-    ../fdelmodc: Hello world from thread 7, on cnode1. (core affinity = 7)
-    ../fdelmodc: Hello world from thread 6, on cnode1. (core affinity = 6)
-OMP: Info #242: KMP_AFFINITY: pid 31502 thread 11 bound to OS proc set {11}
-    ../fdelmodc: Hello world from thread 11, on cnode1. (core affinity = 11)
-    ../fdelmodc: Estimated compute time = 21.74 s. per shot.
-    ../fdelmodc: Estimated total compute time = 21.79 s.
-    ../fdelmodc: Number of samples written to last file = 4001
-    ../fdelmodc: Total compute time FD modelling = 21.50 s.
-
-real	0m21.505s
-user	4m16.133s
-sys	0m1.029s
-number of threads=16
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************** general info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: tmod    = 4.100000
-    ../fdelmodc: ntsam   = 8201   dt      = 0.000500(5.000000e-04)
-    ../fdelmodc: Acoustic staggered grid, pressure/velocity
-    ../fdelmodc: Forward modelling
-    ../fdelmodc: *******************************************
-    ../fdelmodc: *************** model info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: nz      =      801   nx      =     2401
-    ../fdelmodc: dz      =   2.5000   dx      =   2.5000
-    ../fdelmodc: zmin    =   0.0000   zmax    = 2000.0000
-    ../fdelmodc: xmin    = -3000.0000   xmax    = 3000.0000
-    ../fdelmodc: min(cp) =  2000.000  max(cp) =  2400.000
-    ../fdelmodc: min(ro) =  1000.000  max(ro) =  2000.000
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ******** dispersion and stability *********
-    ../fdelmodc: *******************************************
-    ../fdelmodc: Dispersion criterion is   5 points per wavelength: 
-    ../fdelmodc:  ====> wavelength > 12.500000 m [dx*disp]
-    ../fdelmodc: The maximum frequency in source wavelet must be:
-    ../fdelmodc:  ====> frequency < 160.000000 Hz. [Cmin/dx*disp]
-    ../fdelmodc: Stability criterion for current settings: 
-    ../fdelmodc:  ====> Cp < 3029.999756 m/s [dx*disp/dt]
-    ../fdelmodc:  For wavelet(s) in file_src fmax = 60.546871
-    ../fdelmodc: Optimal discretisation for current model:
-    ../fdelmodc:  With maximum velocity  = 2400.000000 dt <= 6.312500e-04
-    ../fdelmodc:  With maximum frequency = 60.546871 dx <= 6.606452e+00
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* boundary info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ***  1=free 2=pml 3=rigid 4=tapered     ***
-    ../fdelmodc: Top boundary    : 1
-    ../fdelmodc: Left boundary   : 2
-    ../fdelmodc: Right boundary  : 2
-    ../fdelmodc: Bottom boundary : 2
-    ../fdelmodc: taper lenght = 101 points
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* wavelet info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: wav_nt   =   4096   wav_nx      = 1
-    ../fdelmodc: src_type =      7   src_orient  = 1
-    ../fdelmodc: fmax     =    60.55
-    ../fdelmodc: Source type         : Fz 
-    ../fdelmodc: *************** no snapshots **************
-    ../fdelmodc: **************** no beams *****************
-    ../fdelmodc: Total number of linear array receivers: 501
-    ../fdelmodc: Total number of receivers: 501
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* receiver info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ntrcv   = 4101 nrcv    = 501 
-    ../fdelmodc: dtrcv   = 0.001000              
-    ../fdelmodc: dzrcv   = 0.000000 dxrcv   = 10.000000 
-    ../fdelmodc: time-delay = 0.100000 = points = 200
-    ../fdelmodc: Receiver sampling can be => 8.258065e-03
-    ../fdelmodc: Receiver array at coordinates: 
-    ../fdelmodc: zmin    = 0.000000 zmax    = 0.000000 
-    ../fdelmodc: xmin    = -2500.000000 xmax    = 2500.000000 
-    ../fdelmodc: which are gridpoints: 
-    ../fdelmodc: izmin   = 0 izmax   = 0 
-    ../fdelmodc: ixmin   = 200 ixmax   = 2200 
-    ../fdelmodc: Receiver interpolation for P: p->p
-    ../fdelmodc: Receiver interpolation for Vz: vz->vz
-    ../fdelmodc: Receiver types        : Vz p 
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* runtime info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: CPU time for intializing arrays and model = 0.046892
-    ../fdelmodc: Modeling source 0 at gridpoints ix=1200 iz=0
-    ../fdelmodc:  which are actual positions x=0.00 z=0.00
-    ../fdelmodc: Receivers at gridpoint x-range ix=200 - 2200
-    ../fdelmodc:  which are actual positions x=-2500.00 - 2500.00
-    ../fdelmodc: Receivers at gridpoint z-range iz=0 - 0
-    ../fdelmodc:  which are actual positions z=0.00 - 0.00
-OMP: Info #204: KMP_AFFINITY: decoding x2APIC ids.
-OMP: Info #202: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info
-OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39}
-OMP: Info #156: KMP_AFFINITY: 40 available OS procs
-OMP: Info #157: KMP_AFFINITY: Uniform topology
-OMP: Info #179: KMP_AFFINITY: 2 packages x 10 cores/pkg x 2 threads/core (20 total cores)
-OMP: Info #206: KMP_AFFINITY: OS proc to physical thread map:
-OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0 core 0 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 20 maps to package 0 core 0 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to package 0 core 1 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 21 maps to package 0 core 1 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to package 0 core 2 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 22 maps to package 0 core 2 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to package 0 core 3 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 23 maps to package 0 core 3 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 4 maps to package 0 core 4 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 24 maps to package 0 core 4 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 5 maps to package 0 core 8 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 25 maps to package 0 core 8 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 6 maps to package 0 core 9 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 26 maps to package 0 core 9 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 7 maps to package 0 core 10 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 27 maps to package 0 core 10 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 8 maps to package 0 core 11 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 28 maps to package 0 core 11 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 9 maps to package 0 core 12 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 29 maps to package 0 core 12 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 10 maps to package 1 core 0 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 30 maps to package 1 core 0 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 11 maps to package 1 core 1 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 31 maps to package 1 core 1 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 12 maps to package 1 core 2 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 32 maps to package 1 core 2 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 13 maps to package 1 core 3 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 33 maps to package 1 core 3 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 14 maps to package 1 core 4 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 34 maps to package 1 core 4 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 15 maps to package 1 core 8 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 35 maps to package 1 core 8 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 16 maps to package 1 core 9 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 36 maps to package 1 core 9 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 17 maps to package 1 core 10 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 37 maps to package 1 core 10 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 18 maps to package 1 core 11 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 38 maps to package 1 core 11 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 19 maps to package 1 core 12 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 39 maps to package 1 core 12 thread 1 
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 0 bound to OS proc set {0}
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 1 bound to OS proc set {1}
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 2 bound to OS proc set {2}
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 3 bound to OS proc set {3}
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 4 bound to OS proc set {4}
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 5 bound to OS proc set {5}
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 6 bound to OS proc set {6}
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 7 bound to OS proc set {7}
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 8 bound to OS proc set {8}
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 9 bound to OS proc set {9}
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 10 bound to OS proc set {10}
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 11 bound to OS proc set {11}
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 13 bound to OS proc set {13}
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 12 bound to OS proc set {12}
-    ../fdelmodc: Hello world from thread 0, on cnode1. (core affinity = 0)
-    ../fdelmodc: Hello world from thread 2, on cnode1. (core affinity = 2)
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 14 bound to OS proc set {14}
-    ../fdelmodc: Hello world from thread 13, on cnode1. (core affinity = 13)
-OMP: Info #242: KMP_AFFINITY: pid 31515 thread 15 bound to OS proc set {15}
-    ../fdelmodc: Hello world from thread 9, on cnode1. (core affinity = 9)
-    ../fdelmodc: Hello world from thread 5, on cnode1. (core affinity = 5)
-    ../fdelmodc: Hello world from thread 6, on cnode1. (core affinity = 6)
-    ../fdelmodc: Hello world from thread 8, on cnode1. (core affinity = 8)
-    ../fdelmodc: Hello world from thread 1, on cnode1. (core affinity = 1)
-    ../fdelmodc: Hello world from thread 10, on cnode1. (core affinity = 10)
-    ../fdelmodc: Hello world from thread 12, on cnode1. (core affinity = 12)
-    ../fdelmodc: Hello world from thread 4, on cnode1. (core affinity = 4)
-    ../fdelmodc: Hello world from thread 7, on cnode1. (core affinity = 7)
-    ../fdelmodc: Hello world from thread 3, on cnode1. (core affinity = 3)
-    ../fdelmodc: Hello world from thread 11, on cnode1. (core affinity = 11)
-    ../fdelmodc: Hello world from thread 14, on cnode1. (core affinity = 14)
-    ../fdelmodc: Hello world from thread 15, on cnode1. (core affinity = 15)
-    ../fdelmodc: Estimated compute time = 20.03 s. per shot.
-    ../fdelmodc: Estimated total compute time = 20.08 s.
-    ../fdelmodc: Number of samples written to last file = 4001
-    ../fdelmodc: Total compute time FD modelling = 18.84 s.
-
-real	0m18.849s
-user	4m59.022s
-sys	0m1.371s
-number of threads=20
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************** general info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: tmod    = 4.100000
-    ../fdelmodc: ntsam   = 8201   dt      = 0.000500(5.000000e-04)
-    ../fdelmodc: Acoustic staggered grid, pressure/velocity
-    ../fdelmodc: Forward modelling
-    ../fdelmodc: *******************************************
-    ../fdelmodc: *************** model info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: nz      =      801   nx      =     2401
-    ../fdelmodc: dz      =   2.5000   dx      =   2.5000
-    ../fdelmodc: zmin    =   0.0000   zmax    = 2000.0000
-    ../fdelmodc: xmin    = -3000.0000   xmax    = 3000.0000
-    ../fdelmodc: min(cp) =  2000.000  max(cp) =  2400.000
-    ../fdelmodc: min(ro) =  1000.000  max(ro) =  2000.000
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ******** dispersion and stability *********
-    ../fdelmodc: *******************************************
-    ../fdelmodc: Dispersion criterion is   5 points per wavelength: 
-    ../fdelmodc:  ====> wavelength > 12.500000 m [dx*disp]
-    ../fdelmodc: The maximum frequency in source wavelet must be:
-    ../fdelmodc:  ====> frequency < 160.000000 Hz. [Cmin/dx*disp]
-    ../fdelmodc: Stability criterion for current settings: 
-    ../fdelmodc:  ====> Cp < 3029.999756 m/s [dx*disp/dt]
-    ../fdelmodc:  For wavelet(s) in file_src fmax = 60.546871
-    ../fdelmodc: Optimal discretisation for current model:
-    ../fdelmodc:  With maximum velocity  = 2400.000000 dt <= 6.312500e-04
-    ../fdelmodc:  With maximum frequency = 60.546871 dx <= 6.606452e+00
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* boundary info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ***  1=free 2=pml 3=rigid 4=tapered     ***
-    ../fdelmodc: Top boundary    : 1
-    ../fdelmodc: Left boundary   : 2
-    ../fdelmodc: Right boundary  : 2
-    ../fdelmodc: Bottom boundary : 2
-    ../fdelmodc: taper lenght = 101 points
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* wavelet info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: wav_nt   =   4096   wav_nx      = 1
-    ../fdelmodc: src_type =      7   src_orient  = 1
-    ../fdelmodc: fmax     =    60.55
-    ../fdelmodc: Source type         : Fz 
-    ../fdelmodc: *************** no snapshots **************
-    ../fdelmodc: **************** no beams *****************
-    ../fdelmodc: Total number of linear array receivers: 501
-    ../fdelmodc: Total number of receivers: 501
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* receiver info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ntrcv   = 4101 nrcv    = 501 
-    ../fdelmodc: dtrcv   = 0.001000              
-    ../fdelmodc: dzrcv   = 0.000000 dxrcv   = 10.000000 
-    ../fdelmodc: time-delay = 0.100000 = points = 200
-    ../fdelmodc: Receiver sampling can be => 8.258065e-03
-    ../fdelmodc: Receiver array at coordinates: 
-    ../fdelmodc: zmin    = 0.000000 zmax    = 0.000000 
-    ../fdelmodc: xmin    = -2500.000000 xmax    = 2500.000000 
-    ../fdelmodc: which are gridpoints: 
-    ../fdelmodc: izmin   = 0 izmax   = 0 
-    ../fdelmodc: ixmin   = 200 ixmax   = 2200 
-    ../fdelmodc: Receiver interpolation for P: p->p
-    ../fdelmodc: Receiver interpolation for Vz: vz->vz
-    ../fdelmodc: Receiver types        : Vz p 
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* runtime info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: CPU time for intializing arrays and model = 0.078822
-    ../fdelmodc: Modeling source 0 at gridpoints ix=1200 iz=0
-    ../fdelmodc:  which are actual positions x=0.00 z=0.00
-    ../fdelmodc: Receivers at gridpoint x-range ix=200 - 2200
-    ../fdelmodc:  which are actual positions x=-2500.00 - 2500.00
-    ../fdelmodc: Receivers at gridpoint z-range iz=0 - 0
-    ../fdelmodc:  which are actual positions z=0.00 - 0.00
-OMP: Info #204: KMP_AFFINITY: decoding x2APIC ids.
-OMP: Info #202: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info
-OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39}
-OMP: Info #156: KMP_AFFINITY: 40 available OS procs
-OMP: Info #157: KMP_AFFINITY: Uniform topology
-OMP: Info #179: KMP_AFFINITY: 2 packages x 10 cores/pkg x 2 threads/core (20 total cores)
-OMP: Info #206: KMP_AFFINITY: OS proc to physical thread map:
-OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0 core 0 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 20 maps to package 0 core 0 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to package 0 core 1 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 21 maps to package 0 core 1 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to package 0 core 2 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 22 maps to package 0 core 2 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to package 0 core 3 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 23 maps to package 0 core 3 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 4 maps to package 0 core 4 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 24 maps to package 0 core 4 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 5 maps to package 0 core 8 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 25 maps to package 0 core 8 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 6 maps to package 0 core 9 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 26 maps to package 0 core 9 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 7 maps to package 0 core 10 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 27 maps to package 0 core 10 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 8 maps to package 0 core 11 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 28 maps to package 0 core 11 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 9 maps to package 0 core 12 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 29 maps to package 0 core 12 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 10 maps to package 1 core 0 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 30 maps to package 1 core 0 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 11 maps to package 1 core 1 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 31 maps to package 1 core 1 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 12 maps to package 1 core 2 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 32 maps to package 1 core 2 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 13 maps to package 1 core 3 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 33 maps to package 1 core 3 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 14 maps to package 1 core 4 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 34 maps to package 1 core 4 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 15 maps to package 1 core 8 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 35 maps to package 1 core 8 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 16 maps to package 1 core 9 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 36 maps to package 1 core 9 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 17 maps to package 1 core 10 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 37 maps to package 1 core 10 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 18 maps to package 1 core 11 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 38 maps to package 1 core 11 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 19 maps to package 1 core 12 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 39 maps to package 1 core 12 thread 1 
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 0 bound to OS proc set {0}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 1 bound to OS proc set {1}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 2 bound to OS proc set {2}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 3 bound to OS proc set {3}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 4 bound to OS proc set {4}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 5 bound to OS proc set {5}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 6 bound to OS proc set {6}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 7 bound to OS proc set {7}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 8 bound to OS proc set {8}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 9 bound to OS proc set {9}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 10 bound to OS proc set {10}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 11 bound to OS proc set {11}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 13 bound to OS proc set {13}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 12 bound to OS proc set {12}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 14 bound to OS proc set {14}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 15 bound to OS proc set {15}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 16 bound to OS proc set {16}
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 17 bound to OS proc set {17}
-    ../fdelmodc: Hello world from thread 8, on cnode1. (core affinity = 8)
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 19 bound to OS proc set {19}
-    ../fdelmodc: Hello world from thread 9, on cnode1. (core affinity = 9)
-OMP: Info #242: KMP_AFFINITY: pid 31542 thread 18 bound to OS proc set {18}
-    ../fdelmodc: Hello world from thread 13, on cnode1. (core affinity = 13)
-    ../fdelmodc: Hello world from thread 15, on cnode1. (core affinity = 15)
-    ../fdelmodc: Hello world from thread 10, on cnode1. (core affinity = 10)
-    ../fdelmodc: Hello world from thread 4, on cnode1. (core affinity = 4)
-    ../fdelmodc: Hello world from thread 3, on cnode1. (core affinity = 3)
-    ../fdelmodc: Hello world from thread 2, on cnode1. (core affinity = 2)
-    ../fdelmodc: Hello world from thread 7, on cnode1. (core affinity = 7)
-    ../fdelmodc: Hello world from thread 6, on cnode1. (core affinity = 6)
-    ../fdelmodc: Hello world from thread 5, on cnode1. (core affinity = 5)
-    ../fdelmodc: Hello world from thread 12, on cnode1. (core affinity = 12)
-    ../fdelmodc: Hello world from thread 17, on cnode1. (core affinity = 17)
-    ../fdelmodc: Hello world from thread 0, on cnode1. (core affinity = 0)
-    ../fdelmodc: Hello world from thread 1, on cnode1. (core affinity = 1)
-    ../fdelmodc: Hello world from thread 19, on cnode1. (core affinity = 19)
-    ../fdelmodc: Hello world from thread 11, on cnode1. (core affinity = 11)
-    ../fdelmodc: Hello world from thread 16, on cnode1. (core affinity = 16)
-    ../fdelmodc: Hello world from thread 14, on cnode1. (core affinity = 14)
-    ../fdelmodc: Hello world from thread 18, on cnode1. (core affinity = 18)
-    ../fdelmodc: Estimated compute time = 19.47 s. per shot.
-    ../fdelmodc: Estimated total compute time = 19.55 s.
-    ../fdelmodc: Number of samples written to last file = 4001
-    ../fdelmodc: Total compute time FD modelling = 17.25 s.
-
-real	0m17.253s
-user	5m41.477s
-sys	0m1.470s
-number of threads=24
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************** general info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: tmod    = 4.100000
-    ../fdelmodc: ntsam   = 8201   dt      = 0.000500(5.000000e-04)
-    ../fdelmodc: Acoustic staggered grid, pressure/velocity
-    ../fdelmodc: Forward modelling
-    ../fdelmodc: *******************************************
-    ../fdelmodc: *************** model info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: nz      =      801   nx      =     2401
-    ../fdelmodc: dz      =   2.5000   dx      =   2.5000
-    ../fdelmodc: zmin    =   0.0000   zmax    = 2000.0000
-    ../fdelmodc: xmin    = -3000.0000   xmax    = 3000.0000
-    ../fdelmodc: min(cp) =  2000.000  max(cp) =  2400.000
-    ../fdelmodc: min(ro) =  1000.000  max(ro) =  2000.000
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ******** dispersion and stability *********
-    ../fdelmodc: *******************************************
-    ../fdelmodc: Dispersion criterion is   5 points per wavelength: 
-    ../fdelmodc:  ====> wavelength > 12.500000 m [dx*disp]
-    ../fdelmodc: The maximum frequency in source wavelet must be:
-    ../fdelmodc:  ====> frequency < 160.000000 Hz. [Cmin/dx*disp]
-    ../fdelmodc: Stability criterion for current settings: 
-    ../fdelmodc:  ====> Cp < 3029.999756 m/s [dx*disp/dt]
-    ../fdelmodc:  For wavelet(s) in file_src fmax = 60.546871
-    ../fdelmodc: Optimal discretisation for current model:
-    ../fdelmodc:  With maximum velocity  = 2400.000000 dt <= 6.312500e-04
-    ../fdelmodc:  With maximum frequency = 60.546871 dx <= 6.606452e+00
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* boundary info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ***  1=free 2=pml 3=rigid 4=tapered     ***
-    ../fdelmodc: Top boundary    : 1
-    ../fdelmodc: Left boundary   : 2
-    ../fdelmodc: Right boundary  : 2
-    ../fdelmodc: Bottom boundary : 2
-    ../fdelmodc: taper lenght = 101 points
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* wavelet info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: wav_nt   =   4096   wav_nx      = 1
-    ../fdelmodc: src_type =      7   src_orient  = 1
-    ../fdelmodc: fmax     =    60.55
-    ../fdelmodc: Source type         : Fz 
-    ../fdelmodc: *************** no snapshots **************
-    ../fdelmodc: **************** no beams *****************
-    ../fdelmodc: Total number of linear array receivers: 501
-    ../fdelmodc: Total number of receivers: 501
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* receiver info ***************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ntrcv   = 4101 nrcv    = 501 
-    ../fdelmodc: dtrcv   = 0.001000              
-    ../fdelmodc: dzrcv   = 0.000000 dxrcv   = 10.000000 
-    ../fdelmodc: time-delay = 0.100000 = points = 200
-    ../fdelmodc: Receiver sampling can be => 8.258065e-03
-    ../fdelmodc: Receiver array at coordinates: 
-    ../fdelmodc: zmin    = 0.000000 zmax    = 0.000000 
-    ../fdelmodc: xmin    = -2500.000000 xmax    = 2500.000000 
-    ../fdelmodc: which are gridpoints: 
-    ../fdelmodc: izmin   = 0 izmax   = 0 
-    ../fdelmodc: ixmin   = 200 ixmax   = 2200 
-    ../fdelmodc: Receiver interpolation for P: p->p
-    ../fdelmodc: Receiver interpolation for Vz: vz->vz
-    ../fdelmodc: Receiver types        : Vz p 
-    ../fdelmodc: *******************************************
-    ../fdelmodc: ************* runtime info ****************
-    ../fdelmodc: *******************************************
-    ../fdelmodc: CPU time for intializing arrays and model = 0.048325
-    ../fdelmodc: Modeling source 0 at gridpoints ix=1200 iz=0
-    ../fdelmodc:  which are actual positions x=0.00 z=0.00
-    ../fdelmodc: Receivers at gridpoint x-range ix=200 - 2200
-    ../fdelmodc:  which are actual positions x=-2500.00 - 2500.00
-    ../fdelmodc: Receivers at gridpoint z-range iz=0 - 0
-    ../fdelmodc:  which are actual positions z=0.00 - 0.00
-OMP: Info #204: KMP_AFFINITY: decoding x2APIC ids.
-OMP: Info #202: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info
-OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39}
-OMP: Info #156: KMP_AFFINITY: 40 available OS procs
-OMP: Info #157: KMP_AFFINITY: Uniform topology
-OMP: Info #179: KMP_AFFINITY: 2 packages x 10 cores/pkg x 2 threads/core (20 total cores)
-OMP: Info #206: KMP_AFFINITY: OS proc to physical thread map:
-OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0 core 0 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 20 maps to package 0 core 0 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to package 0 core 1 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 21 maps to package 0 core 1 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to package 0 core 2 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 22 maps to package 0 core 2 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to package 0 core 3 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 23 maps to package 0 core 3 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 4 maps to package 0 core 4 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 24 maps to package 0 core 4 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 5 maps to package 0 core 8 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 25 maps to package 0 core 8 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 6 maps to package 0 core 9 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 26 maps to package 0 core 9 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 7 maps to package 0 core 10 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 27 maps to package 0 core 10 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 8 maps to package 0 core 11 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 28 maps to package 0 core 11 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 9 maps to package 0 core 12 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 29 maps to package 0 core 12 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 10 maps to package 1 core 0 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 30 maps to package 1 core 0 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 11 maps to package 1 core 1 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 31 maps to package 1 core 1 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 12 maps to package 1 core 2 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 32 maps to package 1 core 2 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 13 maps to package 1 core 3 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 33 maps to package 1 core 3 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 14 maps to package 1 core 4 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 34 maps to package 1 core 4 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 15 maps to package 1 core 8 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 35 maps to package 1 core 8 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 16 maps to package 1 core 9 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 36 maps to package 1 core 9 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 17 maps to package 1 core 10 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 37 maps to package 1 core 10 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 18 maps to package 1 core 11 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 38 maps to package 1 core 11 thread 1 
-OMP: Info #171: KMP_AFFINITY: OS proc 19 maps to package 1 core 12 thread 0 
-OMP: Info #171: KMP_AFFINITY: OS proc 39 maps to package 1 core 12 thread 1 
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 0 bound to OS proc set {0}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 1 bound to OS proc set {1}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 4 bound to OS proc set {4}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 2 bound to OS proc set {2}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 3 bound to OS proc set {3}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 6 bound to OS proc set {6}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 5 bound to OS proc set {5}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 7 bound to OS proc set {7}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 8 bound to OS proc set {8}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 10 bound to OS proc set {10}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 9 bound to OS proc set {9}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 11 bound to OS proc set {11}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 12 bound to OS proc set {12}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 13 bound to OS proc set {13}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 14 bound to OS proc set {14}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 16 bound to OS proc set {16}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 17 bound to OS proc set {17}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 15 bound to OS proc set {15}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 18 bound to OS proc set {18}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 19 bound to OS proc set {19}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 20 bound to OS proc set {20}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 21 bound to OS proc set {21}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 22 bound to OS proc set {22}
-OMP: Info #242: KMP_AFFINITY: pid 31563 thread 23 bound to OS proc set {23}
-    ../fdelmodc: Hello world from thread 1, on cnode1. (core affinity = 1)
-    ../fdelmodc: Hello world from thread 0, on cnode1. (core affinity = 0)
-    ../fdelmodc: Hello world from thread 4, on cnode1. (core affinity = 4)
-    ../fdelmodc: Hello world from thread 11, on cnode1. (core affinity = 11)
-    ../fdelmodc: Hello world from thread 8, on cnode1. (core affinity = 8)
-    ../fdelmodc: Hello world from thread 16, on cnode1. (core affinity = 16)
-    ../fdelmodc: Hello world from thread 14, on cnode1. (core affinity = 14)
-    ../fdelmodc: Hello world from thread 12, on cnode1. (core affinity = 12)
-    ../fdelmodc: Hello world from thread 9, on cnode1. (core affinity = 9)
-    ../fdelmodc: Hello world from thread 23, on cnode1. (core affinity = 23)
-    ../fdelmodc: Hello world from thread 7, on cnode1. (core affinity = 7)
-    ../fdelmodc: Hello world from thread 3, on cnode1. (core affinity = 3)
-    ../fdelmodc: Hello world from thread 22, on cnode1. (core affinity = 22)
-    ../fdelmodc: Hello world from thread 20, on cnode1. (core affinity = 20)
-    ../fdelmodc: Hello world from thread 21, on cnode1. (core affinity = 21)
-    ../fdelmodc: Hello world from thread 19, on cnode1. (core affinity = 19)
-    ../fdelmodc: Hello world from thread 2, on cnode1. (core affinity = 2)
-    ../fdelmodc: Hello world from thread 17, on cnode1. (core affinity = 17)
-    ../fdelmodc: Hello world from thread 5, on cnode1. (core affinity = 5)
-    ../fdelmodc: Hello world from thread 13, on cnode1. (core affinity = 13)
-    ../fdelmodc: Hello world from thread 18, on cnode1. (core affinity = 18)
-    ../fdelmodc: Hello world from thread 10, on cnode1. (core affinity = 10)
-    ../fdelmodc: Hello world from thread 6, on cnode1. (core affinity = 6)
-    ../fdelmodc: Hello world from thread 15, on cnode1. (core affinity = 15)
-    ../fdelmodc: Estimated compute time = 19.21 s. per shot.
-    ../fdelmodc: Estimated total compute time = 19.26 s.
-    ../fdelmodc: Number of samples written to last file = 4001
-    ../fdelmodc: Total compute time FD modelling = 17.50 s.
-
-real	0m17.506s
-user	6m56.045s
-sys	0m2.315s
diff --git a/fdelmodc/fdelmodc.c b/fdelmodc/fdelmodc.c
index 691f8d1409e33a063a4ccdd4b3f7c6b9ac0c24f1..899f78c67894af737539e63a513f1061351f4fee 100644
--- a/fdelmodc/fdelmodc.c
+++ b/fdelmodc/fdelmodc.c
@@ -90,7 +90,7 @@ char *sdoc[] = {
 "   file_beam=beam.su . base name for beam fields ",
 "   dx= ............... read from model file: if dx==0 then dx= can be used to set it",
 "   dz= ............... read from model file: if dz==0 then dz= can be used to set it",
-"   dt= ............... read from file_src: if dt==0 then dt= can be used to set it",
+"   dt= ............... read from file_src: if dt is set it will interpolate file_src to dt sampling",
 "" ,
 " OPTIONAL PARAMETERS:",
 "   ischeme=3 ......... 1=acoustic, 2=visco-acoustic 3=elastic, 4=visco-elastic",
diff --git a/fdelmodc/getParameters.c b/fdelmodc/getParameters.c
index b00449067a96664464c234d35498ed0244229548..bef3b7952088e86f67b4f549ba02e8b08f941b16 100644
--- a/fdelmodc/getParameters.c
+++ b/fdelmodc/getParameters.c
@@ -1163,7 +1163,7 @@ int getParameters(modPar *mod, recPar *rec, snaPar *sna, wavPar *wav, srcPar *sr
 				fprintf(stderr,"    %s: Receiver interpolation for Vz: ",xargv[0]);
 				if(rec->int_vz==0) fprintf(stderr,"vz->vz\n");
 				if(rec->int_vz==1) fprintf(stderr,"vz->vx\n");
-				if(rec->int_vz==2) fprintf(stderr,"vz->txx/tzz\n");
+				if(rec->int_vz==2) fprintf(stderr,"vz->txx/tzz(P)\n");
 				if(rec->int_vz==3) fprintf(stderr,"interpolate to real(no-grid) position of receiver\n");
 			}
             fprintf(stderr,"    %s: Receiver types        : ",xargv[0]);
diff --git a/fdelmodc/recvPar.c b/fdelmodc/recvPar.c
index fcbbcc5c9dd94eb729a62147a9c2bf3a60d64c65..7509bf68d57b31e920459b5c3f4f4d90de079c61 100644
--- a/fdelmodc/recvPar.c
+++ b/fdelmodc/recvPar.c
@@ -370,16 +370,16 @@ int recvPar(recPar *rec, float sub_x0, float sub_z0, float dx, float dz, int nx,
 
     if (ntrcv) {
 		/* Allocate arrays */
-		xrcva = (float *)malloc(nrcv*sizeof(float));
-		zrcva = (float *)malloc(nrcv*sizeof(float));
+		xrcva = (float *)malloc(ntrcv*sizeof(float));
+		zrcva = (float *)malloc(ntrcv*sizeof(float));
 		/* Read in receiver coordinates */
-		for (i=0;i<nrcv;i++) {
+		for (i=0;i<ntrcv;i++) {
 			if (fscanf(fp,"%e %e\n",&xrcva[i],&zrcva[i])!=2) vmess("Receiver Text File: Can not parse coordinates on line %d.",i);
 		}
 		/* Close file */
 		fclose(fp);
 		/* Process coordinates */
-		for (ix=0; ix<nrcv; ix++) {
+		for (ix=0; ix<ntrcv; ix++) {
 			rec->xr[nrec+ix] = xrcva[ix]-sub_x0;
 			rec->zr[nrec+ix] = zrcva[ix]-sub_z0;
 			rec->x[nrec+ix] = NINT((xrcva[ix]-sub_x0)/dx);
diff --git a/fdelmodc/writeRec.c b/fdelmodc/writeRec.c
index 877bbe940f02dd23d9a4f244d589cedcad6ef8fe..167e5f796ca7d4261ff8912a0a0d54eb68710ec9 100644
--- a/fdelmodc/writeRec.c
+++ b/fdelmodc/writeRec.c
@@ -85,7 +85,12 @@ int writeRec(recPar rec, modPar mod, bndPar bnd, wavPar wav, int ixsrc, int izsr
     hdr.ns     = nsam;
     hdr.trwf   = rec.n;
     hdr.ntr    = (ishot+1)*rec.n;
-    hdr.f1     = 0.0;
+    if (mod.grid_dir) { /* reverse time modeling */
+        hdr.f1 = (-mod.nt+1)*mod.dt;
+    }
+    else {
+        hdr.f1 = 0.0;
+    }
     hdr.d1     = mod.dt*rec.skipdt;
     hdr.d2     = (rec.x[1]-rec.x[0])*mod.dx;
     hdr.f2     = mod.x0+rec.x[0]*mod.dx;
diff --git a/fdelmodc/writeSnapTimes.c b/fdelmodc/writeSnapTimes.c
index 37904962cc7e7043deb72c871ccf6be00690e978..2b68a698c0d67fa15af414e96a7d53b781952923 100644
--- a/fdelmodc/writeSnapTimes.c
+++ b/fdelmodc/writeSnapTimes.c
@@ -37,7 +37,7 @@ int writeSnapTimes(modPar mod, snaPar sna, bndPar bnd, int ixsrc, int izsrc, int
 	static int first=1;
 	int n1, ibndx, ibndz, ixs, izs, ize, i, j;
 	int ix, iz, ix2;
-	float *snap, sdx;
+	float *snap, sdx, stime;
 	segy hdr;
 
 	if (sna.nsnap==0) return 0;
@@ -65,7 +65,10 @@ int writeSnapTimes(modPar mod, snaPar sna, bndPar bnd, int ixsrc, int izsrc, int
 		  (itime <= sna.delay+(sna.nsnap-1)*sna.skipdt) ) {
 
 		isnap = NINT((itime-sna.delay)/sna.skipdt);
-		if (verbose) vmess("Writing snapshot(%d) at time=%.4f", isnap+1, itime*mod.dt);
+
+        if (mod.grid_dir)  stime = (-mod.nt+1+itime)*mod.dt;  /* reverse time modeling */
+        else  stime = itime*mod.dt;
+		if (verbose) vmess("Writing snapshot(%d) at time=%.4f", isnap+1, stime);
 	
 		if (first) {
 			append=0;
diff --git a/utils/.DS_Store b/utils/.DS_Store
deleted file mode 100644
index 530388b8e1f09d26fec016d4e15317d054af5447..0000000000000000000000000000000000000000
Binary files a/utils/.DS_Store and /dev/null differ
diff --git a/utils/demo/.DS_Store b/utils/demo/.DS_Store
index d5bdc9c87c37ab1c9211b7d7aee6b3eea28d9302..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 100644
Binary files a/utils/demo/.DS_Store and b/utils/demo/.DS_Store differ
diff --git a/utils/demo/wavelet.scr b/utils/demo/wavelet.scr
index 4385a2cc892b3603b3091df97cbfa06d542424b3..be5395a72b65238e64d539570b201b1928446699 100755
--- a/utils/demo/wavelet.scr
+++ b/utils/demo/wavelet.scr
@@ -44,11 +44,11 @@ sufft < sG2.su | suamp | supsgraph hbox=2 wbox=4 style=normal \
 	labelsize=10 label2='amplitude' label1='frequency' x1end=100 \
 	titlesize=-1 x2end=25 d1num=10 > sg2_ampl.eps
 
-../makewave w=fw fmin=0 flef=0 frig=80 fmax=100 dt=$dt file_out=fw.su nt=4096 t0=0.0 scale=0  t0=0.1 
+../makewave w=fw fmin=0 flef=10 frig=70 fmax=90 dt=$dt file_out=fw.su nt=4096 t0=0.0 scale=0 t0=0.1 scfft=1
 supsgraph < fw.su hbox=2 wbox=4 style=normal \
 	labelsize=10 label2='amplitude' label1='time' \
 	titlesize=-1 d1num=1 d1num=0.05 x1end=0.2 > fw_time.eps
-sufft < fw.su | suamp | supsgraph hbox=2 wbox=4 style=normal \
+sufft < fw.su | suamp | sugain scale=$dt | supsgraph hbox=2 wbox=4 style=normal \
 	labelsize=10 label2='amplitude' label1='frequency' x1end=100 \
 	titlesize=-1 x2end=1.1 d1num=10 > fw_ampl.eps
 
diff --git a/utils/freqwave.c b/utils/freqwave.c
index a9a05b0aed360609012fe9de80ce5d1d0c711b84..156299e18ff222943be57597663f57e906da725a 100644
--- a/utils/freqwave.c
+++ b/utils/freqwave.c
@@ -33,7 +33,7 @@ void hilbertTrans(float *data, int nsam);
 
 void freqwave(float *wave, int nt, float dt, float fp, float fmin, float flef, float frig, float fmax, float t0, float db, int shift, int cm, int cn, char *w, float scale, int scfft, int inverse, float eps, int verbose)
 {
-	int    	iof, nfreq, nf, i, j, sign, optn, stored;
+	int    	it, iof, nfreq, nf, i, j, sign, optn, stored;
 	int		ifmin1, ifmin2, ifmax1, ifmax2;
 	float  	df, fact, alfa, f, max, freq, att, ampl, phase;
 	float  	tt, dum;
@@ -182,6 +182,26 @@ void freqwave(float *wave, int nt, float dt, float fp, float fmin, float flef, f
 			cwave[j].r = 0.0;
 			cwave[j].i = 0.0;
 		}
+		if (shift == 1) {
+		    sign = 1;
+		    cr1fft(cwave, rwave, optn, sign);
+            max = rwave[0]*rwave[0];
+			for (i = 1; i < optn; i++) {
+                if (rwave[i] < 0.0) { it=i; break;}
+            }
+            it = it;
+            dum = 0.0;
+			for (j = 0; j < it; j++) 
+                dum += fabs(rwave[j]);
+            max = dum;
+			for (i = 1; i < optn/2; i++) {
+                dum = dum - fabs(rwave[i-1]) + fabs(rwave[i+it-1]);
+                //fprintf(stderr,"dum=%f i=%d\n", dum, i);
+				if ((dum)>(0.03*max*att/it)) {
+					t0 = (float)i*dt;
+				}
+			}
+		}
 		for (iof = 0; iof < nfreq; iof++) {
 			f = iof*df;
 			tmp.r = cwave[iof].r*cos(2.0*M_PI*f*t0);