Commit 9ddce20f authored by Florian Wittkamp's avatar Florian Wittkamp

Write windowed seismograms to disk

Write measured and synthetic seismograms after the application of time windowing and frequency filtering  to disk if TIME_FILT and WRITE_FILTERED_DATA is set to 1. The string „su.filtered“ will be added to the filename.
parent aeebd624
......@@ -2075,6 +2075,30 @@ int main(int argc, char **argv){
saveseis_glob(FP,fulldata_vx,fulldata_vy,fulldata_vz,fulldata_p,sectionpdiff,sectionpdiff,recpos,recpos_loc,ntr_glob,srcpos,ishot,ns,iter,3);
}
}
/* Write synthetic filtered seismogramms to disk */
if (SEISMO && TIME_FILT && WRITE_FILTERED_DATA){
if(WAVETYPE==1 || WAVETYPE==3){
if ((ADJOINT_TYPE==1)|| (ADJOINT_TYPE==3)){
catseis(sectionvx, fulldata_vx, recswitch, ntr_glob, MPI_COMM_NTR);
}
if ((ADJOINT_TYPE==1)|| (ADJOINT_TYPE==2)){
catseis(sectionvy, fulldata_vy, recswitch, ntr_glob, MPI_COMM_NTR);
}
if (ADJOINT_TYPE==4){
catseis(sectionp, fulldata_p, recswitch, ntr_glob, MPI_COMM_NTR);
}
}
if(WAVETYPE==2 || WAVETYPE==3){
catseis(sectionvz, fulldata_vz, recswitch, ntr_glob, MPI_COMM_NTR);
}
if(myid_ntr==0){
saveseis_glob(FP,fulldata_vx,fulldata_vy,fulldata_vz,fulldata_p,sectionpdiff,sectionpdiff,recpos,recpos_loc,ntr_glob,srcpos,ishot,ns,iter,4);
}
}
}
......
......@@ -70,6 +70,17 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio
sprintf(curlf,"%s_curl.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter);
break;
case 4:
sprintf(vxf,"%s_vx.su.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(vyf,"%s_vy.su.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
if(WAVETYPE==2 || WAVETYPE==3) {
sprintf(vzf,"%s_vz.su.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
}
sprintf(pf,"%s_p.su.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(divf,"%s_div.su.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(curlf,"%s_curl.su.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
break;
default:
declare_error("saveseis_glob: Unkown type_switch");
break;
......
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