Commit dca74c11 authored by Florian Wittkamp's avatar Florian Wittkamp

Adjusted WRITE_MEASURED_DATA

parent b445a5cc
......@@ -2078,7 +2078,7 @@ int main(int argc, char **argv){
/* Write synthetic filtered seismogramms to disk */
if (SEISMO && TIME_FILT && WRITE_FILTERED_DATA){
if (SEISMO && TIME_FILT && WRITE_FILTERED_DATA==2){
if(WAVETYPE==1 || WAVETYPE==3){
if ((ADJOINT_TYPE==1)|| (ADJOINT_TYPE==3)){
catseis(sectionvx, fulldata_vx, recswitch, ntr_glob, MPI_COMM_NTR);
......
......@@ -29,7 +29,7 @@ double calc_misfit(float **sectiondata, float **section, int ntr, int ns, int LN
extern int TRKILL, NORMALIZE, F_LOW_PASS, TIMEWIN;
extern char TRKILL_FILE[STRING_SIZE];
extern int VELOCITY;
extern int WRITE_FILTERED_DATA;
int i,j;
float l2;
int h;
......@@ -202,13 +202,14 @@ double calc_misfit(float **sectiondata, float **section, int ntr, int ns, int LN
}
}
if(WRITE_FILTERED_DATA==2){
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;
......
......@@ -62,40 +62,40 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio
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);
sprintf(vxf,"%s_dx.su.obs.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(vyf,"%s_dy.su.obs.filtered.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);
sprintf(vzf,"%s_dz.su.obs.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
}
} else {
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(vxf,"%s_vx.su.obs.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(vyf,"%s_vy.su.obs.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
if(WAVETYPE==2 || WAVETYPE==3) {
sprintf(vzf,"%s_vz.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(vzf,"%s_vz.su.obs.filtered.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(curlf,"%s_curl.su.measured.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(pf,"%s_p.su.obs.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(divf,"%s_div.su.obs.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(curlf,"%s_curl.su.obs.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
break;
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);
sprintf(vxf,"%s_dx.su.syn.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(vyf,"%s_dy.su.syn.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);
sprintf(vzf,"%s_dz.su.syn.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(vyf,"%s_vy.su.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(vxf,"%s_vx.su.syn.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(vyf,"%s_vy.su.syn.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(vzf,"%s_vz.su.syn.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);
sprintf(pf,"%s_p.su.syn.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(divf,"%s_div.su.syn.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
sprintf(curlf,"%s_curl.su.syn.filtered.shot%d.it%d",SEIS_FILE,ishot,iter);
break;
default:
......
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