Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- facs2operation

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
facs2operation
Synopsis
/infobank/programs/refmt/facs2operation/facs2operation.for
Description
  Program to convert a .operation_log file 

  to a set of .onoff. files.
       
COMMENTS
  The resulting .onoff. files should be:

     edited to contain the proper EquipmentNames and 
     renamed into the appropriate .onoff.<EquipmentName
       directories and files.
    
AUTHOR
  Clint Steele   12/7/2000

    
PROMTS
  'Enter non-hyphenated ActivityID'

    
INPUT
  (EquipmentCode, ID, 

   StartDay, StartHour, StartMin, StartComment, 
   EndDay, EndHour, EndMin, EndComment, Depth)
  (a,t,a,t,a,t,a,t,a,t,a,t,a,t,a,t,a,t,a,t,a)
    
OUTPUT
  (Year, Day, Hour, Min, Sec, Tenths, Lat, Long, ActivityID, 

   EquipmentType, Depth, DepthUnits, ID, Comments)
  (i4.4, i3.3, 3i2.2, i1.1, t16, f9.5, t26, f10.5, t37, a, 
   t45, a24, t70, f6.1, t78, a1, t80, a9, t110, a)

    
Reads
      read (5, '(q,a)', end=999)
     *      IDLength, ID(1:IDLength)
          read (90, '(q,a)', end = 199)
     *        ALineLength, ALine(1:ALineLength)
          read (ID(3:4), '(i2)') Year
          read (ID(4:5), '(i2)') Year
          read (90, '(q,a)', end = 99)
     *        ALineLength, ALine(1:ALineLength)
              read (ALine(Tabs(10)+1:ALineLength), '(f)') Depth
              read (ALine(Tabs(10)+1:ALineLength), '(i)') IDepth
              read (ALine(Tabs(2)+1:Tabs(3)-1), '(i)') StartDay
              read (ALine(Tabs(3)+1:Tabs(4)-1), '(i)') StartHour
              read (ALine(Tabs(4)+1:Tabs(5)-1), '(i)') StartMinute
              read (ALine(Tabs(6)+1:Tabs(7)-1), '(i)') EndDay
              read (ALine(Tabs(7)+1:Tabs(8)-1), '(i)') EndHour
              read (ALine(Tabs(8)+1:Tabs(9)-1), '(i)') EndMinute
Writes
      write (BigID, '(10x)')
      write (InFile, '(1024x)')
      write (OutFile, '(1024x)')
              write (91, 8) Year, 
     *            StartDay, StartHour, StartMinute, 
     *            BigID, 
     *            ALine(1:Tabs(1)-1),             ! EquipmentCode
     *            Depth,
     *            ALine(Tabs(1)+1:Tabs(2)-1),    ! EquipmentID
     *            ALine(Tabs(5)+1:Tabs(6)-1)   ! StartComment
              write (91, 8) Year, 
     *            EndDay, EndHour, EndMinute, 
     *            BigID, 
     *            ALine(1:Tabs(1)-1),             ! EquipmentCode
     *            Depth,
     *            ALine(Tabs(1)+1:Tabs(2)-1),    ! EquipmentID
     *            ALine(Tabs(9)+1:Tabs(10)-1)   ! Comment
Opens
      open (unit = 90,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'old',
     *      name = InFile(1:InFileLength),
     *      err = 2)
              open (unit = 91,
     *          access = 'append',
     *          form = 'formatted',
     *          status = 'unknown',
     *          name = OutFile(1:OutFileLength)//
     *                 'onoff.'//ALine(1:Tabs(1)-1))
              open (unit = 91,
     *          access = 'append',
     *          form = 'formatted',
     *          status = 'unknown',
     *          name = OutFile(1:OutFileLength)//
     *                 'onoff.'//ALine(1:Tabs(1)-1))
Calls
      call changecase ('SMALLS', ID(1:IDLength))
      call changecase ('CAPITALS', BigID(1:IDLength))
      call stringlen (InFile, InFileLength)
      call stringlen (OutFile, OutFileLength)
      call getcentury (Year, Century)

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/refmt/facs2operation/facs2operation.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:38:32 PDT 2013  (chd)