Commit a98a59f2 authored by laura.gassner's avatar laura.gassner

fixed bugs in snapmerge.c and exchange_par.c, and made a few other minor adjustments.

parent e3375c7d
...@@ -22,34 +22,40 @@ ...@@ -22,34 +22,40 @@
*/ */
#include "fd.h" #include "fd.h"
#include "../src/fd.h"
void model_acoustic(float **rho, float **pi){ void model_acoustic(float **rho, float **pi){
/*--------------------------------------------------------------------------*/
/* extern variables */ /* extern variables */
extern int NX, NY, NXG, NYG, POS[3], MYID, FDORDER;
extern int NX, NY, NXG, NYG, POS[3], MYID;
extern float DH, DT; extern float DH, DT;
extern char MFILE[STRING_SIZE]; extern char MFILE[STRING_SIZE];
extern char INV_MODELFILE[STRING_SIZE]; extern char INV_MODELFILE[STRING_SIZE];
extern char TAPER_FILE_NAME[STRING_SIZE], TAPER_FILE_NAME_RHO[STRING_SIZE];
/* local variables */ /* local variables */
float piv, vp, rhov; float piv, vp, rhov, taperv, **taper;
int i, j, ii, jj, l; int i, j, ii, jj, l, nd;
char modfile[STRING_SIZE]; char modfile[STRING_SIZE];
FILE *flfile; FILE *flfile;
int nodes; int nodes;
char cline[256]; char cline[256];
float *fldepth, *flrho, *flvp; float *fldepth, *flrho, *flvp, *fltaper;
nd = FDORDER/2 + 1;
/*read FL nodes from File*/ /*read FL nodes from File*/
nodes=4; nodes=5;
fldepth=vector(1,nodes); fldepth=vector(1,nodes);
flrho=vector(1,nodes); flrho=vector(1,nodes);
flvp=vector(1,nodes); flvp=vector(1,nodes);
fltaper=vector(1,nodes);
taper=matrix(-nd+1,NY+nd,-nd+1,NX+nd);
flfile=fopen("model_true/flnodes.toy_example_ac.start","r"); flfile=fopen("model_true/flnodes.toy_example_ac.start","r");
if (flfile==NULL) err(" FL-file could not be opened !"); if (flfile==NULL) err(" FL-file could not be opened !");
...@@ -57,7 +63,7 @@ void model_acoustic(float **rho, float **pi){ ...@@ -57,7 +63,7 @@ void model_acoustic(float **rho, float **pi){
for (l=1;l<=nodes;l++){ for (l=1;l<=nodes;l++){
fgets(cline,255,flfile); fgets(cline,255,flfile);
if (cline[0]!='#'){ if (cline[0]!='#'){
sscanf(cline,"%f%f%f",&fldepth[l], &flrho[l], &flvp[l]); sscanf(cline,"%f%f%f%f",&fldepth[l], &flrho[l], &flvp[l], &fltaper[l]);
} }
else l=l-1; else l=l-1;
...@@ -82,21 +88,21 @@ void model_acoustic(float **rho, float **pi){ ...@@ -82,21 +88,21 @@ void model_acoustic(float **rho, float **pi){
printf("depth: %f m: double node\n",fldepth[l]);}} printf("depth: %f m: double node\n",fldepth[l]);}}
else{ else{
for (j=(int)(fldepth[l]/DH)+1;j<=(int)(fldepth[l+1]/DH);j++){ for (j=(int)(fldepth[l]/DH)+1;j<=(int)(fldepth[l+1]/DH);j++){
vp=0.0; vp=0.0;
vp=(DH*(j-1)-fldepth[l])*(flvp[l+1]-flvp[l])/(fldepth[l+1]-fldepth[l])+flvp[l]; vp=(DH*(j-1)-fldepth[l])*(flvp[l+1]-flvp[l])/(fldepth[l+1]-fldepth[l])+flvp[l];
vp=vp*1000.0; vp=vp*1000.0;
piv=vp; piv=vp;
/* only the PE which belongs to the current global gridpoint /* only the PE which belongs to the current global gridpoint
is saving model parameters in his local arrays */ is saving model parameters in his local arrays */
if ((POS[1]==((i-1)/NX)) && if ((POS[1]==((i-1)/NX)) &&
(POS[2]==((j-1)/NY))){ (POS[2]==((j-1)/NY))){
ii=i-POS[1]*NX; ii=i-POS[1]*NX;
jj=j-POS[2]*NY; jj=j-POS[2]*NY;
pi[jj][ii]=piv; pi[jj][ii]=piv;
} }
} }
...@@ -122,9 +128,53 @@ void model_acoustic(float **rho, float **pi){ ...@@ -122,9 +128,53 @@ void model_acoustic(float **rho, float **pi){
} }
} }
/* loop over global grid - taper */
for (i=1;i<=NXG;i++){
for (l=1;l<nodes;l++){
if (fldepth[l]==fldepth[l+1]){
if ((i==1) && (MYID==0)){
printf("depth: %f m: double node\n",fldepth[l]);}}
else{
for (j=(int)(fldepth[l]/DH)+1;j<=(int)(fldepth[l+1]/DH);j++){
taperv=0.0;
taperv=(DH*(j-1)-fldepth[l])*(fltaper[l+1]-fltaper[l])/(fldepth[l+1]-fldepth[l])+fltaper[l];
/* only the PE which belongs to the current global gridpoint
is saving model parameters in his local arrays */
if ((POS[1]==((i-1)/NX)) &&
(POS[2]==((j-1)/NY))){
ii=i-POS[1]*NX;
jj=j-POS[2]*NY;
taper[jj][ii]=taperv;
}
}
}
}
for (j=(int)(fldepth[nodes]/DH)+1;j<=NYG;j++){
taperv=0.0;
taperv=fltaper[nodes];
/* only the PE which belongs to the current global gridpoint
is saving model parameters in his local arrays */
if ((POS[1]==((i-1)/NX)) &&
(POS[2]==((j-1)/NY))){
ii=i-POS[1]*NX;
jj=j-POS[2]*NY;
taper[jj][ii]=taperv;
}
}
}
free_vector(fldepth,1,nodes); free_vector(fldepth,1,nodes);
free_vector(flrho,1,nodes); free_vector(flrho,1,nodes);
free_vector(flvp,1,nodes); free_vector(flvp,1,nodes);
free_vector(fltaper,1,nodes);
/**************************************************/ /**************************************************/
...@@ -160,56 +210,54 @@ void model_acoustic(float **rho, float **pi){ ...@@ -160,56 +210,54 @@ void model_acoustic(float **rho, float **pi){
} }
/* loop over global grid */ /* loop over global grid */
for (i=1;i<=NXG;i++){ for (i=1;i<=NXG;i++){
for (l=1;l<nodes;l++){ for (l=1;l<nodes;l++){
if (fldepth[l]==fldepth[l+1]){ if (fldepth[l]==fldepth[l+1]){
if ((i==1) && (MYID==0)){ if ((i==1) && (MYID==0)){
printf("depth: %f m: double node\n",fldepth[l]);}} printf("depth: %f m: double node\n",fldepth[l]);
else{ }
for (j=(int)(fldepth[l]/DH)+1;j<=(int)(fldepth[l+1]/DH);j++){ }else{
for (j=(int)(fldepth[l]/DH)+1;j<=(int)(fldepth[l+1]/DH);j++){
rhov=0.0;
rhov=0.0;
rhov=(DH*(j-1)-fldepth[l])*(flrho[l+1]-flrho[l])/(fldepth[l+1]-fldepth[l])+flrho[l];
rhov=rhov*1000.0; rhov=(DH*(j-1)-fldepth[l])*(flrho[l+1]-flrho[l])/(fldepth[l+1]-fldepth[l])+flrho[l];
rhov=rhov*1000.0;
/* only the PE which belongs to the current global gridpoint
is saving model parameters in his local arrays */ /* only the PE which belongs to the current global gridpoint
if ((POS[1]==((i-1)/NX)) && is saving model parameters in his local arrays */
(POS[2]==((j-1)/NY))){ if ((POS[1]==((i-1)/NX)) && (POS[2]==((j-1)/NY))){
ii=i-POS[1]*NX; ii=i-POS[1]*NX;
jj=j-POS[2]*NY; jj=j-POS[2]*NY;
rho[jj][ii]=rhov; rho[jj][ii]=rhov;
// pi[jj][ii]=piv;
}
} }
} }
} }
}
for (j=(int)(fldepth[nodes]/DH)+1;j<=NYG;j++){
for (j=(int)(fldepth[nodes]/DH)+1;j<=NYG;j++){ rhov=0.0;
rhov=flrho[nodes]*1000.0;
rhov=0.0;
rhov=flrho[nodes]*1000.0;
/* only the PE which belongs to the current global gridpoint
is saving model parameters in his local arrays */
/* only the PE which belongs to the current global gridpoint if ((POS[1]==((i-1)/NX)) && (POS[2]==((j-1)/NY))){
is saving model parameters in his local arrays */ ii=i-POS[1]*NX;
if ((POS[1]==((i-1)/NX)) && jj=j-POS[2]*NY;
(POS[2]==((j-1)/NY))){
ii=i-POS[1]*NX;
jj=j-POS[2]*NY;
rho[jj][ii]=rhov; rho[jj][ii]=rhov;
}
} }
} }
}
free_vector(fldepth,1,nodes); free_vector(fldepth,1,nodes);
free_vector(flrho,1,nodes); free_vector(flrho,1,nodes);
free_vector(flvp,1,nodes); free_vector(flvp,1,nodes);
sprintf(modfile,"%s_rho_it0.bin",INV_MODELFILE); sprintf(modfile,"%s_rho_it0.bin",INV_MODELFILE);
writemod(modfile,rho,3); writemod(modfile,rho,3);
...@@ -218,7 +266,7 @@ void model_acoustic(float **rho, float **pi){ ...@@ -218,7 +266,7 @@ void model_acoustic(float **rho, float **pi){
MPI_Barrier(MPI_COMM_WORLD); MPI_Barrier(MPI_COMM_WORLD);
sprintf(modfile,"%s_rho_it0.bin.%i%i",INV_MODELFILE,POS[1],POS[2]); sprintf(modfile,"%s_rho_it0.bin.%i%i",INV_MODELFILE,POS[1],POS[2]);
remove(modfile); remove(modfile);
sprintf(modfile,"%s_vp_it0.bin",INV_MODELFILE); sprintf(modfile,"%s_vp_it0.bin",INV_MODELFILE);
writemod(modfile,pi,3); writemod(modfile,pi,3);
MPI_Barrier(MPI_COMM_WORLD); MPI_Barrier(MPI_COMM_WORLD);
...@@ -226,5 +274,23 @@ void model_acoustic(float **rho, float **pi){ ...@@ -226,5 +274,23 @@ void model_acoustic(float **rho, float **pi){
MPI_Barrier(MPI_COMM_WORLD); MPI_Barrier(MPI_COMM_WORLD);
sprintf(modfile,"%s_vp_it0.bin.%i%i",INV_MODELFILE,POS[1],POS[2]); sprintf(modfile,"%s_vp_it0.bin.%i%i",INV_MODELFILE,POS[1],POS[2]);
remove(modfile); remove(modfile);
sprintf(modfile,"%s",TAPER_FILE_NAME);
writemod(modfile,taper,3);
MPI_Barrier(MPI_COMM_WORLD);
if (MYID==0) mergemod(modfile,3);
MPI_Barrier(MPI_COMM_WORLD);
sprintf(modfile,"%s.%i%i",TAPER_FILE_NAME,POS[1],POS[2]);
remove(modfile);
sprintf(modfile,"%s",TAPER_FILE_NAME_RHO);
writemod(modfile,taper,3);
MPI_Barrier(MPI_COMM_WORLD);
if (MYID==0) mergemod(modfile,3);
MPI_Barrier(MPI_COMM_WORLD);
sprintf(modfile,"%s.%i%i",TAPER_FILE_NAME_RHO,POS[1],POS[2]);
remove(modfile);
free_matrix(taper,-nd+1,NY+nd,-nd+1,NX+nd);
} }
...@@ -32,15 +32,11 @@ ...@@ -32,15 +32,11 @@
"QUELLTYP" : "3", "QUELLTYP" : "3",
"QUELLTYP values (point_source): explosive=1;force_in_x=2;force_in_y=3;rotated_force=4" : "comment", "QUELLTYP values (point_source): explosive=1;force_in_x=2;force_in_y=3;rotated_force=4" : "comment",
"SRCREC" : "1",
"SRCREC values : read source positions from SOURCE_FILE=1, PLANE_WAVE=2" : "comment",
"SOURCE_FILE" : "./source/sources.dat", "SOURCE_FILE" : "./source/sources.dat",
"RUN_MULTIPLE_SHOTS" : "1", "RUN_MULTIPLE_SHOTS" : "1",
"PLANE_WAVE_DEPTH" : "0.0", "Acoustic Computation" : "comment",
"PHI" : "0.0", "ACOUSTIC" : "1",
"TS" : "0.032",
"Model" : "comment", "Model" : "comment",
"READMOD" : "0", "READMOD" : "0",
...@@ -91,23 +87,11 @@ ...@@ -91,23 +87,11 @@
"IDY" : "1", "IDY" : "1",
"SNAP_FORMAT" : "3", "SNAP_FORMAT" : "3",
"SNAP_FILE" : "./snap/waveform_forward", "SNAP_FILE" : "./snap/waveform_forward",
"Receiver array" : "comment",
"REC_ARRAY" : "0",
"REC_ARRAY_DEPTH" : "70.0",
"REC_ARRAY_DIST" : "40.0",
"DRX" : "4",
"Monitoring the simulation" : "comment", "Monitoring the simulation" : "comment",
"LOG_FILE" : "log/2layer.log", "LOG_FILE" : "log/2layer.log",
"LOG" : "1", "LOG" : "1",
"Checkpoints" : "comment",
"CHECKPTREAD" : "0",
"CHECKPTWRITE" : "0",
"CHECKPTFILE" : "tmp/checkpoint_fdveps",
"General inversion parameters" : "comment", "General inversion parameters" : "comment",
"INVMAT1" : "1", "INVMAT1" : "1",
......
...@@ -32,15 +32,11 @@ ...@@ -32,15 +32,11 @@
"QUELLTYP" : "3", "QUELLTYP" : "3",
"QUELLTYP values (point_source): explosive=1;force_in_x=2;force_in_y=3;rotated_force=4" : "comment", "QUELLTYP values (point_source): explosive=1;force_in_x=2;force_in_y=3;rotated_force=4" : "comment",
"SRCREC" : "1",
"SRCREC values : read source positions from SOURCE_FILE=1, PLANE_WAVE=2" : "comment",
"SOURCE_FILE" : "./source/sources.dat", "SOURCE_FILE" : "./source/sources.dat",
"RUN_MULTIPLE_SHOTS" : "1", "RUN_MULTIPLE_SHOTS" : "1",
"PLANE_WAVE_DEPTH" : "0.0", "Acoustic Computation" : "comment",
"PHI" : "0.0", "ACOUSTIC" : "1",
"TS" : "0.032",
"Model" : "comment", "Model" : "comment",
"READMOD" : "0", "READMOD" : "0",
...@@ -91,30 +87,17 @@ ...@@ -91,30 +87,17 @@
"IDY" : "1", "IDY" : "1",
"SNAP_FORMAT" : "3", "SNAP_FORMAT" : "3",
"SNAP_FILE" : "./snap/waveform_forward", "SNAP_FILE" : "./snap/waveform_forward",
"Receiver array" : "comment",
"REC_ARRAY" : "0",
"REC_ARRAY_DEPTH" : "70.0",
"REC_ARRAY_DIST" : "40.0",
"DRX" : "4",
"Monitoring the simulation" : "comment", "Monitoring the simulation" : "comment",
"LOG_FILE" : "log/2layer.log", "LOG_FILE" : "log/2layer.log",
"LOG" : "1", "LOG" : "1",
"Checkpoints" : "comment",
"CHECKPTREAD" : "0",
"CHECKPTWRITE" : "0",
"CHECKPTFILE" : "tmp/checkpoint_fdveps",
"General inversion parameters" : "comment", "General inversion parameters" : "comment",
"ITERMAX" : "10", "ITERMAX" : "10",
"DATA_DIR" : "su/measured_data/DENISE_real", "DATA_DIR" : "su/measured_data/DENISE_real",
"INVMAT1" : "1", "INVMAT1" : "1",
"INVMAT" : "0", "INVMAT" : "0",
"INVTYPE" : "2",
"QUELLTYPB" : "1", "QUELLTYPB" : "1",
"MISFIT_LOG_FILE" : "L2_LOG.dat", "MISFIT_LOG_FILE" : "L2_LOG.dat",
"VELOCITY" : "0", "VELOCITY" : "0",
...@@ -173,10 +156,6 @@ ...@@ -173,10 +156,6 @@
"Minimum number of iteration per frequency" : "comment", "Minimum number of iteration per frequency" : "comment",
"MIN_ITER" : "0", "MIN_ITER" : "0",
"Cosine taper" : "comment",
"TAPER" : "0",
"TAPERLENGTH" : "10",
"Definition of gradient taper geometry" : "comment", "Definition of gradient taper geometry" : "comment",
"SWS_TAPER_GRAD_VERT" : "0", "SWS_TAPER_GRAD_VERT" : "0",
"SWS_TAPER_GRAD_HOR" : "0", "SWS_TAPER_GRAD_HOR" : "0",
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
"TAU" : "0.0966", "TAU" : "0.0966",
"General inversion parameters" : "comment", "General inversion parameters" : "comment",
"ITERMAX" : "1", "ITERMAX" : "100",
"DATA_DIR" : "su/measured_data/toy_example_ac", "DATA_DIR" : "su/measured_data/toy_example_ac",
"INVMAT1" : "1", "INVMAT1" : "1",
"INVMAT" : "0", "INVMAT" : "0",
...@@ -124,10 +124,9 @@ ...@@ -124,10 +124,9 @@
"SRTRADIUS" : "3.0", "SRTRADIUS" : "3.0",
"FILTSIZE" : "1", "FILTSIZE" : "1",
"SWS_TAPER_FILE" : "1", "SWS_TAPER_FILE" : "1",
"TAPER_FILE_NAME" : "taper.bin", "TAPER_FILE_NAME" : "taper/taper.bin",
"TAPER_FILE_NAME_U" : "taper_u.bin", "TAPER_FILE_NAME_U" : "taper/taper_u.bin",
"TAPER_FILE_NAME_RHO" : "taper_rho.bin", "TAPER_FILE_NAME_RHO" : "taper/taper_rho.bin",
"Upper and lower limits for model parameters" : "comment", "Upper and lower limits for model parameters" : "comment",
"VPUPPERLIM" : "5000", "VPUPPERLIM" : "5000",
...@@ -156,4 +155,16 @@ ...@@ -156,4 +155,16 @@
"FC_END" : "70.0", "FC_END" : "70.0",
"FC_INCR" : "10.0", "FC_INCR" : "10.0",
"ORDER" : "4", "ORDER" : "4",
"ZERO_PHASE" : "1",
"Trace killing" : "comment",
"TRKILL" : "0",
"TRKILL_FILE" : "./trace_kill/trace_kill.dat",
"Time windowing and damping" : "comment",
"TIMEWIN" : "0",
"PICKS_FILE" : "./picked_times/PickedTimes",
"TWLENGTH_PLUS" : "4.0",
"TWLENGTH_MINUS" : "0.01",
"GAMMA" : "100000",
} }
#FLNODE #FLNODE
#converted by MOCOX V1.2 from final.mod.gremlin #converted by MOCOX V1.2 from final.mod.gremlin
# 0.0000 1 0 6371.0000 # 0.0000 1 0 6371.0000
# depth rho vp # depth rho vp taper
# in m in g/cm^3 in km/s # in m in g/cm^3 in km/s
#4 #5
0.0000 1.0200 1.4800 0.0000 1.0200 1.4800 0
500.0000 1.0200 1.4800 500.0000 1.0200 1.4800 0
500.0000 2.0010 1.5000 500.0000 2.0010 1.5000 0
2000.0000 2.0010 2.5000 550.0000 2.0010 1.5000 1
2000.0000 2.0010 2.5000 1
...@@ -40,5 +40,7 @@ mpirun -np 4 nice -19 ../bin/denise in_and_out/toy_example/toy_example_ac_INV.js ...@@ -40,5 +40,7 @@ mpirun -np 4 nice -19 ../bin/denise in_and_out/toy_example/toy_example_ac_INV.js
make clean make clean
# rm jacobian/toy_example/*.old.*.* rm jacobian/toy_example/*toy_example*.*.*.*
# rm model/toy_example/*.bin.*.* rm model/*.bin.*.*
rm model/toy_example/*.bin.*.*
rm taper/*.bin.*.*
\ No newline at end of file
...@@ -38,13 +38,15 @@ float intseis_s, intseis_sd; ...@@ -38,13 +38,15 @@ float intseis_s, intseis_sd;
float *picked_times=NULL; float *picked_times=NULL;
float **intseis_section=NULL, **intseis_sectiondata=NULL; float **intseis_section=NULL, **intseis_sectiondata=NULL;
float **intseis_sectiondata_envelope=NULL, **intseis_section_envelope=NULL, **intseis_section_hilbert=NULL, **dummy_1=NULL, **dummy_2=NULL; float **intseis_sectiondata_envelope=NULL, **intseis_section_envelope=NULL, **intseis_section_hilbert=NULL, **dummy_1=NULL, **dummy_2=NULL;
if(LNORM==8){ if(LNORM==8){
intseis_section_envelope = matrix(1,ntr,1,ns); intseis_section_envelope = matrix(1,ntr,1,ns);
intseis_sectiondata_envelope = matrix(1,ntr,1,ns); intseis_sectiondata_envelope = matrix(1,ntr,1,ns);
intseis_section_hilbert = matrix(1,ntr,1,ns); intseis_section_hilbert = matrix(1,ntr,1,ns);
dummy_1 = matrix(1,ntr,1,ns); dummy_1 = matrix(1,ntr,1,ns);
dummy_2 = matrix(1,ntr,1,ns); dummy_2 = matrix(1,ntr,1,ns);
} }
intseis_section = matrix(1,ntr,1,ns); /* declaration of variables for integration */ intseis_section = matrix(1,ntr,1,ns); /* declaration of variables for integration */
intseis_sectiondata = matrix(1,ntr,1,ns); intseis_sectiondata = matrix(1,ntr,1,ns);
if(TIMEWIN) picked_times = vector(1,ntr); /* declaration of variables for TIMEWIN */ if(TIMEWIN) picked_times = vector(1,ntr); /* declaration of variables for TIMEWIN */
...@@ -53,13 +55,12 @@ if(TIMEWIN) picked_times = vector(1,ntr); /* declaration of variables for TIMEWI ...@@ -53,13 +55,12 @@ if(TIMEWIN) picked_times = vector(1,ntr); /* declaration of variables for TIMEWI
umax=ntr*ns; umax=ntr*ns;
zero(&sectiondiff[1][1],umax); zero(&sectiondiff[1][1],umax);
/* TRACE KILLING */ /* TRACE KILLING */
int ** kill_tmp, *kill_vector; /* declaration of variables for trace killing */ int ** kill_tmp, *kill_vector; /* declaration of variables for trace killing */
char trace_kill_file[STRING_SIZE]; char trace_kill_file[STRING_SIZE];
FILE *ftracekill; FILE *ftracekill;
if(TRKILL==1){ if(TRKILL==1){
/* sectiondiff will be set to zero */ /* sectiondiff will be set to zero */
umax=ntr*ns; umax=ntr*ns;
zero(&sectiondiff[1][1],umax); zero(&sectiondiff[1][1],umax);
...@@ -76,9 +77,9 @@ if(TRKILL==1){ ...@@ -76,9 +77,9 @@ if(TRKILL==1){
fscanf(ftracekill,"%d",&kill_tmp[i][j]); fscanf(ftracekill,"%d",&kill_tmp[i][j]);
} }
} }
fclose(ftracekill); fclose(ftracekill);
h=1; h=1;
for(i=1;i<=ntr;i++){ for(i=1;i<=ntr;i++){
kill_vector[h] = kill_tmp[recpos_loc[3][i]][ishot]; kill_vector[h] = kill_tmp[recpos_loc[3][i]][ishot];
...@@ -86,16 +87,13 @@ if(TRKILL==1){ ...@@ -86,16 +87,13 @@ if(TRKILL==1){
} }
} /* end if(TRKILL)*/ } /* end if(TRKILL)*/
RMS=0.0; RMS=0.0;
Lcount=1; Lcount=1;
/* Integration of measured and synthetic data */ /* Integration of measured and synthetic data */
for(i=1;i<=ntr;i++){ for(i=1;i<=ntr;i++){
intseis_s=0; intseis_s=0;
intseis_sd=0; intseis_sd=0;
if (VELOCITY==0){ /* only integtration if displacement seismograms are inverted */ if (VELOCITY==0){ /* only integtration if displacement seismograms are inverted */
for(j=1;j<=ns;j++){ for(j=1;j<=ns;j++){
intseis_s += section[i][j]; intseis_s += section[i][j];
...@@ -113,25 +111,22 @@ for(i=1;i<=ntr;i++){ ...@@ -113,25 +111,22 @@ for(i=1;i<=ntr;i++){
/* TIME WINDOWING */ /* TIME WINDOWING */
if(TIMEWIN==1){ if(TIMEWIN==1){
time_window(intseis_section, picked_times, iter, ntr_glob,recpos_loc, ntr, ns, ishot); time_window(intseis_section, picked_times, iter, ntr_glob,recpos_loc, ntr, ns, ishot);
time_window(intseis_sectiondata, picked_times, iter, ntr_glob,recpos_loc, ntr, ns, ishot); time_window(intseis_sectiondata, picked_times, iter, ntr_glob,recpos_loc, ntr, ns, ishot);
} }
/* NORMALIZE TRACES */ /* NORMALIZE TRACES */