USGS InfoBank banner.  USGS, Coastal and Marine Geology, InfoBank banner.
 USGS Coastal and Marine Geology banner.    Search InfoBank.
USGS InfoBank program -- gravred Skip navigational links
    ________   ________   ______________   ________   _________   _______________   ________  
  tab edge  Home  tab edge  Data  tab edge  Activities  tab edge  FACS  tab edge  Atlas  tab edge  Definitions  tab edge  More  tab edge  
   
InfoBank Programs: by Name   by Data Type   General Tools   GIS   Plotting   Web   USGS Disclaimer   InfoBank Programs   Boothill  
   
Expanded description
Topic Description
Name
gravred
Synopsis
/infobank/programs/grv/gravred/gravred.for
Description
  Program to calculate gravity Free Air Anomaly.
    
Algorithm
  Observed gravity uses IGSN-71 Datum.

  Theoretical gravity is calculated according
  to the Chebychev approximation of the 1967 formula
  (see theogrv formula toward the end of main program).
  If only one valid land tie exists for a cruise,
  create a dummy land tie using a fake time and
  the same gravity value as the existing tie.
    
Usage
  .  1st input file = <cruise_id>.14x gravity land tie table

  .  2nd input file = <cruise_id>.10x gravity data
  .  3rd input file = <cruise_id>.07x navigation data
  .  output file = <cruise_id>.16x gravity data file
  Enter name of input file #1:
  Enter name of input file #2:
  Enter name of input file #3:
  Enter output file name:
  Add eotvos to gravity for DMA? (Y,[N])
  Enter gravity meter number (02, 26, 32, 36, 41, or 53):
  <if imtrid = 41>
      Enter gravity meter FILTER LENGTH in decimal minutes:
  <if imtrid = 53>
      Enter meter constant:
      0.9948 - standard for pre  09/14/87 processing
      0.9972 - standard for post 09/14/87 processing
    
Limitations
  The following offset values (in seconds) are assumed:

      Meter 02 = 120 (Meter 02 = Meter L2)
      Meter 26 = 120
      Meter 32 = obtained from gravity input file
      Meter 32 (1985) = 180
      Meter 36 = 600
      Meter 41 = 0  (was 180 or 300)
      Meter 53 = 600
    
Notes
  Include files:

  drsvt
    
Subroutines
  vescinit            (shared PMG external)         

  openem              (shared PMG external)         
  getsymbol           (shared PMG external)         
  percentage          (shared PMG external)         
  yesno               (shared PMG external)
  getmeter            (internal)                    
  getlandtie          (internal)                    
  getoffset           (internal)                    
  getgravity          (internal)                    
  getnav              (internal)                    
    
Functions
  sin                 (FORTRAN intrinsic function)  

    
Output
  unit=*(write)

  unit=(p)ifilout(write,close)
    
Input
  unit=(p)ifiltie(close)

  unit=(p)ifilgrv(close)
  unit=(p)ifilnav(close)
    
Author
  Clint Steele               12/23/83          .for

  Based on program GRVRED.
            Carolyn Degnan,   08/28/84
  Modified for new times in integer tenths of seconds.
  Corrected handling of offset
  since gravity time was not being correctly offset.
  Finished conversion to integer time from decimal time.
  Eliminated unnecessary gotos used for error processing.
  Redocumented.
  Changed record input section to operate more efficiently.
            Ed Maple,         11/27/84
  Reduced program to internal subroutines.
            Ed Maple,         12/13/84
  Changed read format for meter 32 in subroutine GETGRAVITY
  to read value in column 108 instead of 106.
            Ed Maple,          5/30/85
  Changed form4 to default to offset of 180 seconds for meter 32
  because 1985 meter 32 has no offsets in the data.
            Ed Maple,          6/11/85
  Added Powell Meter SL2 to the main program and subroutines.
  Meter SL2 is referred to as 02.
            B. Blubaugh,       10/21/85   
  Adjusted offset time for meter 32 and 26.
            B. Blubaugh,       2/20/86
  Standardized for and ran static analyzer.
            C. Degnan,         4/20/87
  Added call to PERCENTAGE.
            C. Degnan,         6/10/87
  Changed meter S-53 constant from 0.9948 to 0.9972 as per Byron
  Changed meter S-53 offset to 600 sec as per Byron
            C. Degnan,         9/14/87
  Changed meter S-53 constant to user's choice because using new value
  on previously processed data made faa 30 mgal more than before.
            C. Degnan,         4/22/87
  Added meter S-36 constant and offset from Dan Hemingson, LaCoste & Romberg.
            C. Degnan,         9/6/89
  Added prompt and option to add eotvos to gravity for DMA work only.
            C. Degnan,        10/1/90
  Changed reference from DRS$ to PMG$, CDegnan, 2/19/92

    
Reads
     read ( 5, cfmtconst ) rconst
     read ( ifiltie, cfmttie, iostat = ierr, end = 900 )
*        iyr, kda, khr, kmin, ksec, kten, rgrav ( icount + 1 ),
*        imtrnum
         read ( ifilgrv, cfmtgrv1, iostat = ierr )
*            iyr, ida, ihr, imin, isec, iten, rgrav

         read ( ifilgrv, cfmtgrv2, iostat = ierr ) 
*            iyr, ida, ihr, imin, isec, iten, rgrav
     read ( ifilnav, cfmtnav, iostat = ierr ) 
*        iyr, ida, ihr, imin, isec, iten, rlat, rlong, reotvos, 
*        rcourse, rspeed
    
Writes
                         write ( ifilout, cfmtout, iostat = ierr )
*                            iyr, ida, ihr, imin, isec, iten, 
*                            eotvos, grv, theogrv, faa
    
Calls
 call openem ( 3, 1 )
 call yesno ('Y[N]', AddEot)
 call getmeter ( imtrid )
 call getlandtie
*    ( imtrid, itmcntrl, grvcntrl, icntrlcntrl, lvalidmtr )

     call getoffset ( imtrid, ioffset )
         call getgravity ( imtrid, ioffset, igrvcnt, itmgrv, grv,
*            ierr, lendfile )

                 call getnav ( inavcnt, itmnewnav, eotnew, course,
*                    speed, xlatnew, xlonnew, ierr, lendfile, iyr )
                     call adjustgrv
*                       ( imtrid, igrvcnt, grv, lvalidgrv, rconst )

                         call converttime ('EXPAND', ida, ihr, 
*                                     imin, isec, 
*                                     iten, itmgrv, ErrorFlag) 

                             call forerror ( ierr )
     call percentage ( 0 )
         call forerror ( ierr ) 
             call converttime ('COMPRESS', kda, khr, kmin, ksec, 
*                kten, itime ( icount ), ErrorFlag ) 
         call converttime ('COMPRESS', 366, 23, 59, 59, 9, 
*                          itime ( 2 ), ErrorFlag ) 
     call percentage ( ifilgrv )
             call forerror ( ierr ) 
             call converttime ( 'COMPRESS', ida, ihr, imin, 
*                               isec, iten, itime, ErrorFlag) 
             call forerror ( ierr ) 
             call converttime ( 'COMPRESS', ida, ihr, imin, 
*                               isec, iten, itime, ErrorFlag)
    

Skip footer navigational links

InfoBank   Menlo Park Center   Santa Cruz Center   St. Petersburg Center   Woods Hole Center   Coastal and Marine Geology Program  
 
U. S. Department of the Interior   U. S. Geological Survey   Geologic Information   Ask-A-Geologist   USGS privacy statement   Disclaimer  

URL: /infobank/programs/grv/gravred/gravred.doc.html
Maintainer: Clint Steele
Comments: e-mail
Last modified: Wed Nov 20 15:02:40 PST 2002  (wcs)