Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- samplespt

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
samplespt
Synopsis
/infobank/programs/dsmpl/samplespt/samplespt.for
Description
  Program to sample shotpoints to every Nth value.

       
COMMENTS
  Writes the first entry of a line. 

  Writes every even Nth numbered shotpoint entry interpolating,
  if necessary. 
  Writes the last shotpt entry of a line. 
  Repeats, if there are multiple lines.
    
PROMPTS
  Enter input  file name:

    as DRS standard format for edited shot point file:
       (i4,i3, 3(i2), i1, t16, a5, t22, i5)
       (iyr,ida, ihr, imin, isec, iten, aline, ishotpt)
    or FIXTBL format:
       (i4,i3, 3(i2), i1, t16, a5, t29, i5)
           (t22, i5) are CDP's
  Enter output file name:
       Output format is the same as the input format.
       The data is desampled such that, if the desired rate is 10,
       and the shot point data looks like:
  .         31
  .         35
  .         37
  .         41
  .         47
  .         50
  .         52
       The output would be:
  .         31
  .         40
  .         50
  .         52
       It throws out consecutive duplicate shotpt numbers.
  Enter sample INTEGER rate:
    
SUBROUTINES
  vesc        (external include)

  openem      (external shareable)
  howlong     (external shareable)
  converttime (external shareable)
  forerror    (external shareable)
    
AUTHOR
  Carolyn Degnan

     
  Changed input/output format to reflect changes in standard: line number
  changed from a3 to a5        Ed Maple              5/21/85
  Added check so that before writing the last shot of a line, it checks that
  that it hasn't already been written for falling on the even shot sample rate
                               Carolyn Degnan        4/15/88
  Removed calls to percentage
                               Michael Hamer         5/03/99
    
Reads
      read (90, fmt, iostat = ierr, err = 3, end = 4)
     *    iyr, ida, ihr, imin, isec, iten, aline, ishot
Writes
          write (91, fmt) iyr, ida1, ihr1, imin1, isec1, iten1,
     *        aline1, ishot1
      write (91, fmt) iyr, idanu, ihrnu, iminnu, isecnu, 
     *              itennu, aline, jlimit
      write (91, fmt) iyr, ida, ihr, imin, isec, iten, aline, ishot
      write (91, fmt) iyr, ida, ihr, imin, isec, iten, aline, ishot
          write (91, fmt) iyr, ida1, ihr1, imin1, isec1, iten1,
     *        aline1, ishot1
      write (6, 21) iread, iwrite, numrderr, numduperr
Opens
Calls
      call openem (1, -1)
      call converttime ('COMPRESS', ida1, ihr1, imin1, isec1, iten1, 
     *                  itmthis, ErrorFlag)
      call converttime ('COMPRESS', ida1, ihr1, imin1, isec1, iten1, 
     *                  itm1, ErrorFlag)
      call converttime ('COMPRESS', ida, ihr, imin, isec, iten, itm2, 
     *                  ErrorFlag)
      call converttime ('EXPAND', idanu, ihrnu, iminnu, isecnu, 
     *                  itennu, itmnu, ErrorFlag)
      call converttime ('COMPRESS', ida, ihr, imin, isec, iten, itm2, 
     *                  ErrorFlag)
      call converttime ('COMPRESS', ida, ihr, imin, isec, iten, itm2, 
     *                  ErrorFlag)
      call forerror (ierr)

Skip footer navigational links

Coastal and Marine Science Centers:  Pacific   St. Petersburg   Woods Hole  
InfoBank   Coastal and Marine Geology Program   Geologic Information   Ask-A-Geologist   USGS Disclaimer  


Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: http://walrus.wr.usgs.gov/infobank/programs/dsmpl/samplespt/samplespt.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:38:15 PDT 2013  (chd)