Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- filterm

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
filterm
Synopsis
/infobank/programs/filt/misc/filterm.for
Description
  Program to filter single fields.  

   
  Assumes evenly spaced data.
  Driver for FILTERIT subroutines by Robert Walraven (U.C. Davis).
       
PROMPTS
  Enter input file name:

  no filtering --     lower = 0          upper = 1
  low pass     --     lower = 0      0 < upper 
  high pass    -- 0 < lower < 1          upp
  band pass    --       0 < lower < upp
  band stop    --       0 < upper < low
  Enter LOWER frequency of filter:
  Enter UPPER frequency of filter:
  Enter size of Gibbs phenomenon (50 is usually good):
  SHOWCOEF calculates number of points (order) in filter =
  Designate the REAL field you want filtered (a,f,a):
                                        ex:  (a11,f9.2,a53)
  XXXX = lower filter limit
  XXXX = upper filter limit
  XXXX = Gibbs value
  XXXX = # points (order) in filter
  Enter input  file name:
  Enter output file name:
    
SUBROUTINES
  vesc       (external include)

  openem     (external shareable)
  howlong    (external shareable)
  showcoef   (external)
  showlines  (external shareable)
  whatfmt    (external shareable)
  filterit   (external)
    
AUTHOR
  Clint Steele              .for             12/26/84

  Modified by Carolyn Degnan, 03/07/85
  to handle our new headers upon second pass thru input file.
  Modified by Carolyn Degnan, 09/05/86
  to use the # points (order) suggested by SHOWCOEF
  instead of prompting for it
  Modified by Carolyn Degnan, 09.04/90
  to pad data with values at start and end during filtering
  to avoid the left-over noise tails;
  increased precision to real * 8;
  added declarations to all modules; and
  ran MAT.
    
SEE_ALSO
  besio

  filterit

    
Reads
      read (InputUnit, cFmt)
     *    iDa, iHr, iMin, iSec, iTen, yinfirst, bin
      read (InputUnit, cFmt)
     *    iDa, iHr, iMin, iSec, iTen, garbage, bin
      read (*, '(i3,3i2,i1)') iDa, iHr, iMin, iSec, iTen
      read (5, '(q, a)') iLen, flow
      read (5, '(q, a)') iLen, fhigh
      read (5, '(q, a)') iLen, gibbs
      read (5, '(q, a)') iLen, iorder
          read (InputUnit, cFmt, iostat = ErrorFlag)
     *        iDa, iHr, iMin, iSec, iTen, garbage, bin
          read (InputUnit, cFmt)
     *        iDa, iHr, iMin, iSec, iTen, garbage, bin
Writes
      write (6, 10) rDefault
      write (6, 20) rDefault
      write (6, 30) rDefault
      write (6, 40) iDefault
          write (OutputUnit, cFmt)
     *        iDa, iHr, iMin, iSec, iTen, yin(jcount), bin
Opens
Calls
      call openem (1, 1)
      call showlines (InputUnit, 5)
      call whatfmt (InputUnit, cFmt)
      call converttime ('COMPRESS', iDa, iHr, iMin, iSec, iTen,
     *                  iTime1, cErr)
      call converttime ('COMPRESS', iDa, iHr, iMin, iSec, iTen,
     *                  iTime2, cErr)
      call converttime ('EXPAND', iDa, iHr, iMin, iSec, iTen,
     *                  iTimeDiff, cErr)
      call converttime ('COMPRESS', iDa, iHr, iMin, iSec, iTen,
     *                  iTime, cErr)
      call showcoef (flow, fhigh, gibbs, iorder, percent)
      call showcoef (flow, fhigh, gibbs, iorder, percent)
              call percentage (InputUnit)
                  call forerror (ErrorFlag)
      call filterit (yin, yin, icount,
     *               flow, fhigh, gibbs,
     *               nterms, iflag)
      call percentage (0)
          call percentage (InputUnit)
      call percentage (0)
          call kaiser (coef, nterms, a)
       call const ( norder, fcut1, fcut2, itype, acheb )
           call pole ( ii, norder, itype, acheb )
           call trnsfm ( ii, norder )
           call nxttrm ( a, b, ii, norder )
      call rfltlw (n, f, ikind, y, z, npts)
      call rfltlw (n, fhigh, ikind, y, z, npts)
       call kaiser ( coef, nterms, a )
          call kaiser (coef, icount, gibbs)

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/filt/misc/filterm.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:37:07 PDT 2013  (chd)