Commit 958d3001 authored by niklas.thiel's avatar niklas.thiel

BUGFIX reading measured seismogramms

parent b3092561
...@@ -1464,8 +1464,7 @@ int main(int argc, char **argv){ ...@@ -1464,8 +1464,7 @@ int main(int argc, char **argv){
timedomain_filt(sectionvy_obs,F_LOW_PASS,ORDER,ntr_glob,ns,1); timedomain_filt(sectionvy_obs,F_LOW_PASS,ORDER,ntr_glob,ns,1);
} }
if (ADJOINT_TYPE==4){ if (ADJOINT_TYPE==4){
if (WAVESEP==1) {inseis(fprec,ishot,sectionp_obs,ntr_glob,ns,5,iter); inseis(fprec,ishot,sectionp_obs,ntr_glob,ns,9,iter);
}else {inseis(fprec,ishot,sectionp_obs,ntr_glob,ns,9,iter);}
timedomain_filt(sectionp_obs,F_LOW_PASS,ORDER,ntr_glob,ns,1); timedomain_filt(sectionp_obs,F_LOW_PASS,ORDER,ntr_glob,ns,1);
} }
} }
...@@ -1970,8 +1969,7 @@ int main(int argc, char **argv){ ...@@ -1970,8 +1969,7 @@ int main(int argc, char **argv){
if (WAVETYPE==2 || WAVETYPE==3) { if (WAVETYPE==2 || WAVETYPE==3) {
catseis(sectionvz, fulldata_vz, recswitch, ntr_glob, MPI_COMM_WORLD); catseis(sectionvz, fulldata_vz, recswitch, ntr_glob, MPI_COMM_WORLD);
} }
catseis(sectionp, fulldata_p, recswitch, ntr_glob, MPI_COMM_WORLD); catseis(sectionp, fulldata_p, recswitch, ntr_glob, MPI_COMM_WORLD);
if (MYID==0) saveseis_glob(FP,fulldata_vx,fulldata_vy,fulldata_vz,fulldata_p,fulldata_curl,fulldata_div,recpos,recpos_loc,ntr_glob,srcpos,ishot,ns,iter,1);
/* wavefield separation */ /* wavefield separation */
if (WAVESEP==1) { if (WAVESEP==1) {
...@@ -1990,14 +1988,11 @@ int main(int argc, char **argv){ ...@@ -1990,14 +1988,11 @@ int main(int argc, char **argv){
} }
h++; h++;
} }
// /* for testing */
// sprintf(pf,"%s_pup.su.shot%i",SEIS_FILE,ishot);
// if(myid_ntr==0){
// outseis_glob(FP,fopen(pf,"w"), 0, fulldata_p,recpos,recpos_loc,ntr_glob,srcpos,1,ns,SEIS_FORMAT,ishot,0);
// }
} }
} }
} }
if (MYID==0) saveseis_glob(FP,fulldata_vx,fulldata_vy,fulldata_vz,fulldata_p,fulldata_curl,fulldata_div,recpos,recpos_loc,ntr_glob,srcpos,ishot,ns,iter,1);
break; break;
} /* end of switch (SEISMO) */ } /* end of switch (SEISMO) */
...@@ -2073,8 +2068,7 @@ int main(int argc, char **argv){ ...@@ -2073,8 +2068,7 @@ int main(int argc, char **argv){
/* read seismic data from SU file p */ /* read seismic data from SU file p */
/* --------------------------------- */ /* --------------------------------- */
if(ADJOINT_TYPE==4){ /* if ADJOINT_TYPE */ if(ADJOINT_TYPE==4){ /* if ADJOINT_TYPE */
if (WAVESEP==1) { inseis(fprec,ishot,sectionread,ntr_glob,ns,5,iter); inseis(fprec,ishot,sectionread,ntr_glob,ns,9,iter);
}else { inseis(fprec,ishot,sectionread,ntr_glob,ns,9,iter);}
if ((TIME_FILT==1 )|| (TIME_FILT==2)){ if ((TIME_FILT==1 )|| (TIME_FILT==2)){
timedomain_filt(sectionread,F_LOW_PASS,ORDER,ntr_glob,ns,1); timedomain_filt(sectionread,F_LOW_PASS,ORDER,ntr_glob,ns,1);
} }
...@@ -3597,8 +3591,7 @@ int main(int argc, char **argv){ ...@@ -3597,8 +3591,7 @@ int main(int argc, char **argv){
/* read seismic data from SU file p */ /* read seismic data from SU file p */
/* --------------------------------- */ /* --------------------------------- */
if(ADJOINT_TYPE==4){ /* if ADJOINT_TYPE */ if(ADJOINT_TYPE==4){ /* if ADJOINT_TYPE */
if (WAVESEP==1) {inseis(fprec,ishot,sectionread,ntr_glob,ns,5,iter); inseis(fprec,ishot,sectionread,ntr_glob,ns,9,iter);
}else {inseis(fprec,ishot,sectionread,ntr_glob,ns,9,iter);}
if ((TIME_FILT==1 )|| (TIME_FILT==2)){ if ((TIME_FILT==1 )|| (TIME_FILT==2)){
timedomain_filt(sectionread,F_LOW_PASS,ORDER,ntr_glob,ns,1); timedomain_filt(sectionread,F_LOW_PASS,ORDER,ntr_glob,ns,1);
} }
......
...@@ -197,18 +197,15 @@ void pup(float **data_p, float **data_vy, FILE *fp, int ntr_glob, int **recpos, ...@@ -197,18 +197,15 @@ void pup(float **data_p, float **data_vy, FILE *fp, int ntr_glob, int **recpos,
data_p[k][1]=0; /*first sample need to be set to 0 to avoid artefacts after integrating from velocity to displacement*/ data_p[k][1]=0; /*first sample need to be set to 0 to avoid artefacts after integrating from velocity to displacement*/
} }
// /* save pup*/ /* save pup*/
// if (VERBOSE==1) { fprintf(FP,"Write PUP data to file...\n "); } if (VERBOSE==1) {
// fprintf(FP,"Write PUP data to file...\n ");
// if (sw == 1) {
// sprintf(pf,"%s_pup.su.shot%i",SEIS_FILE,ishot); if (sw == 1) sprintf(pf,"%s_pup.su.shot%i",SEIS_FILE,ishot);
// } if (sw == 2) sprintf(pf,"%s_pup.su.step.shot%i",SEIS_FILE,ishot);
//
// if (sw == 2) { /* for step length calculation*/ outseis_glob(fp,fopen(pf,"w"), 0, data_p,recpos,recpos_loc,ntr_glob,srcpos,1,ns,SEIS_FORMAT,ishot,0);
// sprintf(pf,"%s_pup.su.step.shot%i",SEIS_FILE,ishot); }
// }
//
// outseis_glob(fp,fopen(pf,"w"), 0, data_p,recpos,recpos_loc,ntr_glob,srcpos,1,ns,SEIS_FORMAT,ishot,0);
free_matrix(filtwk, 1,ny_pot/2,1,nx_pot/2); free_matrix(filtwk, 1,ny_pot/2,1,nx_pot/2);
free_matrix(filtwk_full, 1,ny_pot,1,nx_pot); free_matrix(filtwk_full, 1,ny_pot,1,nx_pot);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment