Skip to content
Snippets Groups Projects
Commit 56ebf2fe authored by Jan Thorbecke's avatar Jan Thorbecke
Browse files

time bookkeeping for reverse time modeling

parent b1b57836
No related branches found
No related tags found
No related merge requests found
file_cp=syncl_cp.su ischeme=1 file_den=syncl_ro.su file_src=wave.su \
file_rcv=shot_xsrc-200.su src_type=7 src_orient=1 \
src_injectionrate=1 rec_type_vz=0 rec_type_p=1 rec_int_vz=2 \
dtrcv=0.004 rec_delay=0.1 verbose=2 tmod=4.10 dxrcv=10.0 xrcv1=-2250 \
xrcv2=2250 zrcv1=0 zrcv2=0 xsrc=0 zsrc=1150 ntaper=200 left=2 right=2 top=1 bottom=2
...@@ -90,7 +90,7 @@ char *sdoc[] = { ...@@ -90,7 +90,7 @@ char *sdoc[] = {
" file_beam=beam.su . base name for beam fields ", " file_beam=beam.su . base name for beam fields ",
" dx= ............... read from model file: if dx==0 then dx= can be used to set it", " dx= ............... read from model file: if dx==0 then dx= can be used to set it",
" dz= ............... read from model file: if dz==0 then dz= can be used to set it", " dz= ............... read from model file: if dz==0 then dz= can be used to set it",
" dt= ............... read from file_src: if dt==0 then dt= can be used to set it", " dt= ............... read from file_src: if dt is set it will interpolate file_src to dt sampling",
"" , "" ,
" OPTIONAL PARAMETERS:", " OPTIONAL PARAMETERS:",
" ischeme=3 ......... 1=acoustic, 2=visco-acoustic 3=elastic, 4=visco-elastic", " ischeme=3 ......... 1=acoustic, 2=visco-acoustic 3=elastic, 4=visco-elastic",
......
...@@ -85,7 +85,12 @@ int writeRec(recPar rec, modPar mod, bndPar bnd, wavPar wav, int ixsrc, int izsr ...@@ -85,7 +85,12 @@ int writeRec(recPar rec, modPar mod, bndPar bnd, wavPar wav, int ixsrc, int izsr
hdr.ns = nsam; hdr.ns = nsam;
hdr.trwf = rec.n; hdr.trwf = rec.n;
hdr.ntr = (ishot+1)*rec.n; hdr.ntr = (ishot+1)*rec.n;
hdr.f1 = 0.0; if (mod.grid_dir) { /* reverse time modeling */
hdr.f1 = (-mod.nt+1)*mod.dt;
}
else {
hdr.f1 = 0.0;
}
hdr.d1 = mod.dt*rec.skipdt; hdr.d1 = mod.dt*rec.skipdt;
hdr.d2 = (rec.x[1]-rec.x[0])*mod.dx; hdr.d2 = (rec.x[1]-rec.x[0])*mod.dx;
hdr.f2 = mod.x0+rec.x[0]*mod.dx; hdr.f2 = mod.x0+rec.x[0]*mod.dx;
......
...@@ -37,7 +37,7 @@ int writeSnapTimes(modPar mod, snaPar sna, bndPar bnd, int ixsrc, int izsrc, int ...@@ -37,7 +37,7 @@ int writeSnapTimes(modPar mod, snaPar sna, bndPar bnd, int ixsrc, int izsrc, int
static int first=1; static int first=1;
int n1, ibndx, ibndz, ixs, izs, ize, i, j; int n1, ibndx, ibndz, ixs, izs, ize, i, j;
int ix, iz, ix2; int ix, iz, ix2;
float *snap, sdx; float *snap, sdx, stime;
segy hdr; segy hdr;
if (sna.nsnap==0) return 0; if (sna.nsnap==0) return 0;
...@@ -65,7 +65,10 @@ int writeSnapTimes(modPar mod, snaPar sna, bndPar bnd, int ixsrc, int izsrc, int ...@@ -65,7 +65,10 @@ int writeSnapTimes(modPar mod, snaPar sna, bndPar bnd, int ixsrc, int izsrc, int
(itime <= sna.delay+(sna.nsnap-1)*sna.skipdt) ) { (itime <= sna.delay+(sna.nsnap-1)*sna.skipdt) ) {
isnap = NINT((itime-sna.delay)/sna.skipdt); isnap = NINT((itime-sna.delay)/sna.skipdt);
if (verbose) vmess("Writing snapshot(%d) at time=%.4f", isnap+1, itime*mod.dt);
if (mod.grid_dir) stime = (-mod.nt+1+itime)*mod.dt; /* reverse time modeling */
else stime = itime*mod.dt;
if (verbose) vmess("Writing snapshot(%d) at time=%.4f", isnap+1, stime);
if (first) { if (first) {
append=0; append=0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment