Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- facs2overview

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

  a .organization file,
  a .project file,
  a .operationarea file,
  a .chief_from_overviewlog file,  
  a .infospecialist file,
  a .activitytype file,
  a .purpose file,
  a .platform file,
  a .dates file,
  a .ports file,
  a .equipmentused_from_overviewlog file,  
  a .derivatives file,
  a .summary file, and
  a .notes file
       
AUTHOR
  Clint Steele   12/7/2000

  break up records exceeding 80 characters for output - CDegnan, 04/25/2005
  added keys to handle overview_log version 4 - CDegnan, 11/18/2010
  removed trimming output to 80 characters - CDegnan, 12/10/2010
  Copied section someone added to break up equipment list, and
  tailored it to do the same for crew list. - CDegnan, 04/22/2011
  edited for semicolon - Sumy TOm, Oct/31/2011
  corrected file suffix from .basisnumber to .projectnumber - CDegnan, 06/26/2012
 corrected handling of multi crew list separated by semicolons - CDegnan, 07/02/2012
    
PROMTS
  'Enter non-hyphenated ActivityID'

    
INPUT
  (Topic, Information)

  (a,t,a)
    
OUTPUT
  (ActivityID, Information...)

  (a, t10, 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(Tab+1:ALineLength),
     *                  '(i2,1x,i2,1x,i4)') 
     *                  StartMonth, StartDay, StartYear
                  read (ALine(Tab+1:ALineLength),
     *                  '(i2,1x,i2,1x,i4)') 
     *                  EndMonth, EndDay, EndYear
                  read (90, '(q,a)', end = 99)
     *                ALineLength, ALine(1:ALineLength)
                  read (90, '(q,a)', end = 99)
     *                ALineLength, ALine(1:ALineLength)
Writes
      write (BigID, '(10x)')
      write (InFile, '(4096x)')
      write (OutFile, '(4096x)')
          write (91, '(a)') ALine(1+Quote1:ALineLength-Quote2)
          write (OutTemp, '(4096x)')
                  write (OutTemp, '(4096x)')
                  write (91, 20) Year, StartJDay,
     *                BigID,
     *                ALine(Tab+1+Quote1:ALineLength-Quote2)
                  write (OutTemp, '(4096x)')
                  write (91, 21) Year, EndJDay,
     *                BigID,
     *                ALine(Tab+1+Quote1:ALineLength-Quote2)
                  write (OutTemp, '(4096x)')
                  write (OldLine, '(4096x)')
                  write (OldLine, 22) BigID,
     *                 ALine(Tab+1+Quote1:ALineLength-Quote2)//
     *                 ' (JD ',StartJDay,') -->
                  write (91, '(a)') 
     *                 OldLine(1+Quote1:OldLineLength-Quote2)
                  write (OutTemp, '(4096x)')
                  write (91, 23) OldLine(1:OldLineLength+1), 
     *                 ALine(Tab+1+Quote1:ALineLength-Quote2)//
     *                ' (JD ',EndJDay,')'
                          write (91, 77) BigID, BLine(1:SemiColon-1)
                              write (91, 77) BigID, BLine(1:BLineLength)
                          write (91, 87) BigID, BLine(1:SemiColon-1)
                              write (91, 87) BigID, BLine(1:BLineLength)
                              write (91, 8) BigID,
     *                            Output(PrevSemiColon+1:SemiColon-1)                                 
                          write (91, 8) BigID,
     *                        Output(SemiColon+1:OutputLength)
                          write (91, 8) BigID,
     *                        ALine(StartCol+Quote1:ALineLength-Quote2)
                                      write (91, 8) BigID,
     *                                    Output(PrevSemiColon+1:
     *                                    SemiColon-1)
                                  write (91, 8) BigID,
     *                                ALine(MinCol+Quote1:MaxCol-Quote2)
                                      write (91, 8) BigID,
     *                                    Output(PrevSemiColon + 1:
     *                                    SemiColon-1)
                                  write (91, 9) BigID,
     *                                ALine(MinCol+Quote1:MaxCol-Quote2)
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)//
     *                         OutTemp(1:OutTempLength))
                  open (unit = 91,
     *                  access = 'append',
     *                  form = 'formatted',
     *                  status = 'unknown',
     *                  name = OutFile(1:OutFileLength)//
     *                         OutTemp(1:OutTempLength))
                  open (unit = 91,
     *                  access = 'sequential',
     *                  form = 'formatted',
     *                  status = 'unknown',
     *                  name = OutFile(1:OutFileLength)//
     *                         OutTemp(1:OutTempLength))
                  open (unit = 91,
     *                  access = 'sequential',
     *                  form = 'formatted',
     *                  status = 'unknown',
     *                  name = OutFile(1:OutFileLength)//
     *                         OutTemp(1:OutTempLength))
                  open (unit = 91,
     *                  access = 'sequential',
     *                  form = 'formatted',
     *                  status = 'unknown',
     *                  name = OutFile(1:OutFileLength)//
     *                         OutTemp(1:OutTempLength))
                  open (unit = 91,
     *                  access = 'sequential',
     *                  form = 'formatted',
     *                  status = 'unknown',
     *                  name = OutFile(1:OutFileLength)//
     *                         OutTemp(1:OutTempLength))
                  open (unit = 91,
     *                  access = 'sequential',
     *                  form = 'formatted',
     *                  status = 'unknown',
     *                  name = OutFile(1:OutFileLength)//
     *                         OutTemp(1:OutTempLength))
Calls
      call changecase ('SMALLS', ID(1:IDLength))
      call changecase ('CAPITALS', BigID(1:IDLength))
      call stringlen (InFile, InFileLength)
      call stringlen (OutFile, OutFileLength)
      call stringlen (ALine(1:ALineLength), ALineLength)
      call getcentury (Year, Century)
      call stringlen (ALine(1:ALineLength), ALineLength)
      call stringlen (ALine(1:ALineLength), ALineLength)
      call changecase ('SMALLS', LowLine(1:ALineLength))
          call locatequotes (Quote1, Quote2, ALine(1:ALineLength))
          call stringlen (OutTemp, OutTempLength)
                  call stringlen (OutTemp, OutTempLength)
                  call locatequotes (Quote1, Quote2, 
     *                ALine(Tab+1:ALineLength))
                  call stringlen (OutTemp, OutTempLength)
                  call locatequotes (Quote1, Quote2,
     *                ALine(Tab+1:ALineLength))
                  call stringlen (OutTemp, OutTempLength)
                  call locatequotes (Quote1, Quote2,
     *                ALine(Tab+1:ALineLength))
                  call julianday ('JULIAN', StartJDay,
     *                StartYear, StartMonth, StartDay)
                  call stringlen (OldLine, OldLineLength)
                  call locatequotes (Quote1, Quote2,
     *                OldLine(1:OldLineLength))
                  call stringlen (OutTemp, OutTempLength)
                  call locatequotes (Quote1, Quote2,
     *                ALine(Tab+1:ALineLength))
                  call julianday ('JULIAN', EndJDay,
     *                EndYear, EndMonth, EndDay)
                  call stringlen (BLine, BLineLength)
                      call locatesemicolons (SemiColon,
     *                    BLine(1:BLineLength))
                              call stringlen (BLine, BLineLength)
                  call stringlen (ALine(1:ALineLength), ALineLength)
                  call locatequotes (Quote1, Quote2,
     *                ALine(StartCol:ALineLength))
                  call stringlen (BLine, BLineLength)
                      call locatesemicolons (SemiColon,
     *                    BLine(1:BLineLength))
                              call stringlen (BLine, BLineLength)
                  call stringlen (ALine(1:ALineLength), ALineLength)
                      call locatequotes
     *                    (Quote1, Quote2, ALine(StartCol:ALineLength))
                          call translate (OutTemp(1:OutTempLength)//'s',
     *                        ALine(StartCol+Quote1:ALineLength-Quote2),
     *                        Output, OutputLength, 'main')
                          call locatequotes
     *                        (Quote1, Quote2, ALine(MinCol:MaxCol))
                                  call translate 
     *                               (OutTemp(1:OutTempLength)//'s',
     *                               ALine(MinCol+Quote1:ALineLength),
     *                               Output, OutputLength, 'main')
                                  call translate
     *                                (OutTemp(1:OutTempLength)//'s',
     *                                ALine(MinCol+Quote1:ALineLength),
     *                                Output, OutputLength, 'main')
      call stringlen (String, Length)

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