Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- facs2samples

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

  to a .sampling file.
       
AUTHOR
  Clint Steele   8/6/2001

    
PROMTS
  'Enter non-hyphenated ActivityID'

    
INPUT
  (a,t,a,t,a,t,a,t,a,t,a,t,a,t,a)

  (EquipmentCode, StationID, SampleID, Day, Time,
   LatitudeString, LongitudeString, Depth, Comment) 
    
OUTPUT
  (Time, Latitude, Longitude, ActivityID, EquipmentCode,

   Depth, SampleID, StationID, Comment)
  (a,t16,a,t26,a,t37,a,t45,a,t70,a,t80,a,t90,a,a)

    
Reads
      read (5, '(q,a)', end=999)
     *      IDLength, ID(1:IDLength)
      read (ID(IDLength-3:IDLength-2), '(i2)') Year
      read (5, '(i1)', end=99) Mode
          read (90, '(q,a)', end = 199)
     *        ALineLength, ALine(1:ALineLength)
          read (90, '(q,a)', end = 99)
     *        ALineLength, ALine(1:ALineLength)
              read (ALine(Tabs(5)+1:Tabs(6)-1), '(i2,1x,f6.3)')
     *            LatDeg, LatMin
              read (ALine(Tabs(5)+1:Tabs(6)-1), '(f)') Latitude
              read (ALine(Tabs(6)+1:Tabs(7)-1), '(f)') Longitude
              read (ALine(Tabs(6)+1:Tabs(7)-1), '(i2,1x,f6.3)')
     *            LongDeg, LongMin          
              read (ALine(Tabs(6)+1:Tabs(7)-1), '(i3,1x,f6.3)')
     *            LongDeg, LongMin
                  read (ALine(Tabs(8)+1:ALineLength), '(f)') Depth
                  read (ALine(Tabs(7)+1:Tabs(8)-1), '(f)') Depth
          read (ALine(Tabs(3)+1:Tabs(4)-1), '(i)') Day
              read (ALine(Tabs(4)+1:Tabs(5)-1), '(i)') Time
Writes
      write (BigID, '(10x)')
      write (InFile, '(1024x)')
      write (OutFile, '(1024x)')
              write (Comment, '(1024x)')
              write (Comment, '(1024x)')
          write (91, 8)
     *        Year,                           ! Year
     *        Day,                            ! Julian Day
     *        Time,                           ! Hour & Minute
     *        '000',                          ! Seconds
     *        Latitude,                       ! Latitude
     *        Longitude,                      ! Longitude
     *        BigID,                          ! ActivityID
     *        ALine(1:Tabs(1)-1),             ! EquipmentCode
     *        Depth,                          ! Depth
     *        ALine(Tabs(2)+1:Tabs(3)-1),     ! SampleID
     *        ALine(Tabs(1)+1:Tabs(2)-1),     ! StationID
     *        Comment(1:CommentLength)        ! Comment
Opens
      open (unit = 90,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'old',
     *      name = InFile(1:InFileLength),
     *      err = 2)
      open (unit = 91,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = OutFile(1:OutFileLength))
Calls
      call changecase ('SMALLS', ID(1:IDLength))
      call changecase ('CAPITALS', BigID(1:IDLength))
      call getcentury (Year, Century)
      call stringlen (InFile, InFileLength)
      call showlines (90,5)
      call stringlen (OutFile, OutFileLength)
          call stringlen (Comment, CommentLength)

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