Commit 04449613 authored by Florian Wittkamp's avatar Florian Wittkamp

Bugfix: Writing filtered and windowed seismograms

Will write filtered and windowed displacement seismograms to disk.
parent 012efcd9
...@@ -202,6 +202,14 @@ double calc_misfit(float **sectiondata, float **section, int ntr, int ns, int LN ...@@ -202,6 +202,14 @@ double calc_misfit(float **sectiondata, float **section, int ntr, int ns, int LN
} }
} }
for(i=1;i<=ntr;i++){
for(j=1;j<=ns;j++){
sectiondata[i][j]=intseis_sectiondata[i][j];
section[i][j]=intseis_section[i][j];
}
}
l2=L2; l2=L2;
/* printf("\n MYID = %i IN CALC_MISFIT: L2 = %10.12f \n",MYID,l2); */ /* printf("\n MYID = %i IN CALC_MISFIT: L2 = %10.12f \n",MYID,l2); */
......
...@@ -32,6 +32,7 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio ...@@ -32,6 +32,7 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio
extern int SEISMO, SEIS_FORMAT, RUN_MULTIPLE_SHOTS, WAVETYPE, VERBOSE,FORWARD_ONLY; extern int SEISMO, SEIS_FORMAT, RUN_MULTIPLE_SHOTS, WAVETYPE, VERBOSE,FORWARD_ONLY;
extern char SEIS_FILE[STRING_SIZE]; extern char SEIS_FILE[STRING_SIZE];
extern int VELOCITY;
char vxf[STRING_SIZE], vyf[STRING_SIZE],vzf[STRING_SIZE], curlf[STRING_SIZE], divf[STRING_SIZE], pf[STRING_SIZE]; char vxf[STRING_SIZE], vyf[STRING_SIZE],vzf[STRING_SIZE], curlf[STRING_SIZE], divf[STRING_SIZE], pf[STRING_SIZE];
int nsrc=1; int nsrc=1;
...@@ -60,22 +61,38 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio ...@@ -60,22 +61,38 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio
break; break;
case 3: case 3:
if(VELOCITY==0){
sprintf(vxf,"%s_dx.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(vyf,"%s_dy.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter);
if(WAVETYPE==2 || WAVETYPE==3) {
sprintf(vzf,"%s_dz.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter);
}
} else {
sprintf(vxf,"%s_vx.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter); sprintf(vxf,"%s_vx.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(vyf,"%s_vy.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter); sprintf(vyf,"%s_vy.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter);
if(WAVETYPE==2 || WAVETYPE==3) { if(WAVETYPE==2 || WAVETYPE==3) {
sprintf(vzf,"%s_vz.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter); sprintf(vzf,"%s_vz.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter);
} }
}
sprintf(pf,"%s_p.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter); sprintf(pf,"%s_p.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(divf,"%s_div.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter); sprintf(divf,"%s_div.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(curlf,"%s_curl.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter); sprintf(curlf,"%s_curl.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter);
break; break;
case 4: case 4:
if(VELOCITY==0){
sprintf(vxf,"%s_dx.su.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(vyf,"%s_dy.su.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
if(WAVETYPE==2 || WAVETYPE==3) {
sprintf(vzf,"%s_dz.su.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
}
} else {
sprintf(vxf,"%s_vx.su.filtered.shot%d.it%d",SEIS_FILE,ishot,iter); 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); sprintf(vyf,"%s_vy.su.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
if(WAVETYPE==2 || WAVETYPE==3) { if(WAVETYPE==2 || WAVETYPE==3) {
sprintf(vzf,"%s_vz.su.filtered.shot%d.it%d",SEIS_FILE,ishot,iter); 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(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(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); sprintf(curlf,"%s_curl.su.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
......
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