NAME

     vsamp - resample a  velocity  worktape  in  preparation  for
     prestack depth migration algorithm sammig.


SYNOPSIS

     vsamp [ -Nfile_vsm ] [ -Ofile_vsamp ]  [  -Zfile_irreg  ]  [
     -Tfile_twt ] [ -dxvdxv ] [ -dzvdzv ] [ -xvoxvo ] [ -zvozvo ]
     [ -zmaxzmax ] [ -freffref ] [ -vsrvsr ] [  -dzeqldzeql  ]  [
     -FlDtEl ] [ -V ] [ -? ]


DESCRIPTION

     vsamp is designed to read in a  smoothed  velocity  worktape
     and  resample  it  at irregular depths. This irregular depth
     grid is defined by the input velocity file and a user speci-
     fied  number  of  points per wavelength at a given reference
     frequency. The resampling is done  in  such  a  manner  that
     vertical traveltimes are preserved.

     The input regularly gridded velocity worktape is assumed  to
     represent  the  velocity  field  averaged  over  an  area (-
     dxgrid/2:+dxgrid/2)  (-dzgrid/2:+dzgrid/2)  centered   about
     each  grid point.  Interpolation for resampling is done in a
     manner that preserves vertical two way travel times  in  the
     following manner:

     1) if the first trace is at  grid  location  ixgrid=1,   the
     input  velocity  worktape represents an average of the velo-
     city field at the grid point:
        (x=xvo+(ixgrid-1)*dxgrid,z=zvo+(izgrid-1)*dzgrid).

     2)   calculate   the   vertical   two   way   travel    time
     twtgrid(izgrid,ix)
        at each depth  point  (xvo+(ixgrid-1)*dxgrid,zvo+(izgrid-
     1)*dzgrid)).
        The two way travel time is  integrated  from  a  floating
     datum,  zdatum,   defined by the trace header word FlDtEl if
     the -FlDtEl option is given. If -FlDtEl  is  not  specified,
     the  two  way  travel time is integrated from the top of the
     model, zmin.

     3) calculate an irregular grid zeta(izeta) which samples the
     depth field using vsr points per wavelength.

     4) calculate a 2nd irregular grid zetamid(izeta) that  falls
     half way between the nodes of zeta(izeta).

     5)     calculate     the      vertical      travel      time
     twt(zetamid(izeta),ixgrid)  by  linearly  interpolating  the
     travel    times    from    the    regular    grid    values,
     twt(zeta(izeta),ixgrid).

     6) calculate  an  effective  velocity  v(izeta,ix)  centered
     about  the depth point ((ixgrid-1)*dxgrid,zeta(izeta)) using
     the formula:

        vsamp(izeta)=(zetamid(izeta+1)-zetamid(izeta))/(twt(zetamid(izeta+1)-twt(zetamid(izeta)).

     Both the irregularly sampled output  velocity  worktape  and
     the  ascii  file  (following  the  -Z option) containing the
     irregular depths will be used by routines  kray  and  tiray,
     2D  Kirchhoff depth migration ray trace algorithms. Breaking
     this module out of the MBS algorithm itself serves two  pur-
     poses:  the interpreter is able to QC his/her depth sampling
     and input velocity worktape, and the algorithm developer  is
     able  to  decouple  the  details  of model smoothing and ray
     tracing from the migration algorithm proper.


     vsamp gets both its data and  its  parameters  from  command
     line arguments.  These arguments specify the input, outputs,
     and certain floating point values to  override  the  current
     restrictions on seismic trace header integer values.

  Command line arguments
     -N file_vsm
          Enter the input velocity file  name  immediately  after
          typing -N unless the input is from a pipe in which case
          the -N entry must be omitted.  This input  file  should
          include the complete path name if the file resides in a
          different              directory.               Example
          -N/export/data1/white_river/vsm  tells  the  program to
          look     for     file      'vsm'      in      directory
          '/export/data1/white_river'.

     -O file_vsamp
          Enter the output resampled velocity data  set  name  or
          file  immediately after typing -O unless output is to a
          pipe  in which case the -O entry must be omitted.   The
          output  data  set also requires the full path name (see
          above).  The first sample and trace of the output velo-
          city  worktape correspond to the first sample and trace
          of the input velocity worktape, that is, to  the  argu-
          ments following the -xvo and -zvo keywords.

     -Z file_irreg
          Enter the output depth  sample  file  name  immediately
          after  typing -Z. The file following the -Z option will
          be the input file following the -Z option  in  routines
          kray, tiray, sammig  and zstretch. This output data set
          requires the full path name (see above).

     -T file_twt
          Enter the output two way travel time file name  immedi-
          ately   after   typing   -T.  The  two  way  traveltime
          (measuered in ms) is calculated for each input velocity
          trace.  This  file  will  be  used  in  stretching  the
          migrated data set (crps, common offset or stacked  sec-
          tions)  to  time in program tstretch.  This output data
          set requires the full path name (see above).

     -dxv dxv
          Enter the  spatial  increment  between  traces  on  the
          seismic  velocity  worktape.  Default  is calculated by
          multiplying trace header word DX1000*.001 where  DX1000
          has  been  filled  in  by one of the MBS velocity model
          building programs.

     -dzv dzv
          Enter  the  depth  increment  between  samples  on  the
          seismic  velocity  worktape.  Def ault is calculated by
          multiplying trace header word  DZ1000*.001 where DZ1000
          has  been  filled  in  by one of the MBS velocity model
          building programs.

     -xvo xvo
          Enter the x position of the first trace of the  seismic
          velocity  worktape in m (ft). For prestack depth migra-
          tion, this coordinate must be consistent with  that  of
          the  RecInd  of the seismic data fed into routine prep-
          mig. For example, if the first trace  of  the  velocity
          model  corresponds to seismic station location (RecInd)
          500 and the distance between station  locations  (dsta)
          is 26.6667m, then xvo = 13333.35m. To force the user to
          ponder the model/seismic data relationship, there is no
          default. xvo will be saved in lineheader word MnTrOf.

     -zvo zvo
          Enter the z position of the first sample of the seismic
          velocity worktape in m (ft). This will be the elevation
          of the top of the velocity model.  For  prestack  depth
          migration,  this coordinate must be be greater than the
          seismic source and receiver  elevations  (header  words
          GrpElv and SrPtEl) extracted from routine prepmig. Folk
          traditions require that zvo be  positive  for  a  value
          lying  above sea level. zvo will be saved in lineheader
          word MxRSEL. As above, no default.

     -zmax zmax
          Enter the maximum depth (below sea level) to be  resam-
          pled,  and to be imaged by subsequent migration program
          sammig. Velocities generated below the  extent  of  the
          input  velocity model will be assigned a value equal to
          that at the bottom of the input  model.  Careful  folks
          will observe that 'up' is positive when defining topog-
          raphy with the -zvo option,  'down'  is  positive  when
          defining  maximum  depth  with  the  -zmax option. Very
          good. Don't be stressed out, routine vsamp will  define
          a new variable zmin=-zvo, to make things consistent. As
          above, no default.

     -fref fref
          Enter the reference frequency at which the -vsr (verti-
          cal  samling  rate) option is specified. Defaults to 50
          Hz.

     -vsr vsr
          Enter the vertical  sampling  rate  per  wavelength  at
          reference  frequency,  fref,  to  resample the velocity
          worktape. Since we are dealing with 2 way  propagation,
          the  default  is  twice the Nyquist of one way propaga-
          tion, that is, 4 points per wavelength.

     -dzeql dzeql
          Enter the constant resampling depth increment. If  this
          value  is  present  and  positive  , an equally sampled
          depth grid will result. It this value is  negative,  an
          equally  sampled  grid will be generated with dzeql set
          to be the depth  increment  in  the  input  file  trace
          headers.  If  dzeql=0  or  the option is not invoked an
          irregularly sampled depth grid and  velocity  model  as
          defined by the -fref and -vsr option will be generated.
          Default value is 0., i.e. go  generate  an  irregularly
          sampled grid.

     -maxzeta maxzeta
          Enter the maximum  number  of  irregular  depth  points
          allowed   in   the   output  velocity  model  (Default:
          maxzeta=2000).

     -FlDtEl
          Enter the command line argument  -FlDtEl  to  set   two
          way  travel  time  outputin file file_twt to be zero at
          the floating datum detph, zdatum(ixgrid),   correspond-
          ing to the trace header word  FlDtEl.

     -V   Enter the command line argument '-V' to obtain  verbose
          output.

     -?   Enter the command line  argument  '-?'  to  get  online
          help.   The program terminates after the help screen is
          printed.


NOTES

     NOTE 1:  In order to stage data for P/SV migration the  user
     will need to invoke the constant reference grid (-dz) option
     such that subsequent rayfans willbe traced onto a consistent
     grid.


BUGS

     No bugs known at present.


SEE ALSO

     vsm, kray, tiray, sammig, zstretch, tstretch


AUTHOR

     K. J. Marfurt (APR,  1992)   extracted  from  S.  H.  Gray's
     algorithm  smallmig  /  smigA. Interpolation to preserve two
     way travel time preservation suggested by  N.  D.  Whitmore.
     (Updated, August, 1996 by K. J. Marfurt, Amoco EPTG)



COPYRIGHT

     copyright 2001, Amoco Production Company
               All Rights Reserved
          an affiliate of BP America Inc.




































Man(1) output converted with man2html