Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- whfar2meta

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
whfar2meta
Synopsis
/infobank/programs/refmt/whfar2meta/whfar2meta.for
Description
  Program to break down Woods Hole's Post Cruise Information Report html into InfoBank meta files.

       
AUTHOR
  Carolyn Degnan    5/21/2008

  based on whreport2meta

    
Reads
      read (5, '(q,a)') WHIDLength, WHID(1:WHIDLength)
      read (75, '(q,a)', end = 201) ALineLength, ALine(1:ALineLength)
          read (89, '(q,a)', end = 99)
     *        ALineLength, ALine(1:ALineLength)
          read (90, '(q,a)', end = 9999)
     *        ALineLength, ALine(1:ALineLength)
              read (ALine(InfoStart:ALineLength), '(a)') SerialNum
              read (ALine(InfoStart:ALineLength), '(a)') AlternateNum
                  read(ALine(DayStart:DayEnd), '(i1)') IDayStart
                  read(ALine(DayStart:DayEnd), '(i2)') IDayStart
              read(ALine(YearStart:YearEnd), '(i4)') IYearStart
                  read(ALine(DayStart:DayEnd), '(i1)') IDayEnd
                  read(ALine(DayStart:DayEnd), '(i2)') IDayEnd
              read(ALine(YearStart:YearEnd), '(i4)') IYearEnd
              read (ALine(InfoStart:ALineLength), '(f9.5)') North
              read (ALine(InfoStart:ALineLength), '(f9.5)') South
              read (ALine(InfoStart:ALineLength), '(f10.5)') West
              read (ALine(InfoStart:ALineLength), '(f10.5)') East
              read (ALine(InfoStart:ALineLength), '(a)') Remarks
              read (ALine(InfoStart:ALineLength), '(a)') Equipment
              read (ALine(InfoStart:ALineLength), '(a)') Navigation
              read (ALine(InfoStart:ALineLength), '(a)') PartyUSGS
              read (ALine(InfoStart:ALineLength), '(a)')
     *            PartyAffiliate
              read (ALine(InfoStart:ALineLength), '(a)')
     *            RelatedWebSites
Writes
      write (WHID, '(5x)')
      write (ALine, '(2048x)')
              write (ID, '(7x)')
                  write (WHHtmlName, '(2048x)')
                  write (IBHtmlName, '(2048x)')
              write (76, '(a, 2x, a)')
     *            WHID(1:WHIDLength), ID(1:IDLength)
      write (OutName, '(2048x)')
          write (91, '(a,t10,a)') CapID(1:IDLength),
     *    'United States Geological Survey, Woods Hole, Massachusetts'
          write (ALine, '(2048x)')
                  write (90, '(a)')
     *                ALine(KeyStart:KeyEnd)//ALine(InfoStart:InfoEnd)
          write (ALine, '(2048x)')
              write (SerialNum, '(80x)')
              write (91, '(a,t10,a)') 
     *            CapID(1:IDLength), ALine(InfoStart:ALineLength)
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (AlternateNum, '(80x)')
              write (FileSuffix, '(80x)')
              write (91, 911) 
     *            CapID(1:IDLength),
     *                IMonthStart, IDayStart, IYearStart, JDayStart,
     *                IMonthEnd, IDayEnd, IYearEnd, JDayEnd
              write (91, 912) 
     *            IYearStart, JDayStart, CapID(1:IDLength),
     *            APortStart(1:PortStartLength)
              write (91, 913) 
     *            IYearEnd, JDayEnd, CapID(1:IDLength),
     *            APortEnd(1:PortEndLength)
              write (91, '(a,t10,a)') 
     *            CapID(1:IDLength), ALine(InfoStart:ALineLength)
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
              write (FileSuffix, '(80x)')
                  write (91, '(a,t10,a,t30,a)') 
     *                CapID(1:IDLength),
     *                SerialNum(1:SerialNumLength),
     *                ALink(1:ALinkLength)
                  write (91, '(a,t10,a,t30,a)')
     *                CapID(1:IDLength),
     *                AlternateNum(1:AlternateNumLength),
     *                ALink(1:ALinkLength)
              write (91, '(a,t10,a,t30,a)') 
     *            CapID(1:IDLength),
     *            HyphenID(1:CapIDLength),
     *            ALink(1:ALinkLength)
              write (91, '(a,t10,f9.5,t20,f9.5,t30,f10.5,t41,f10.5)') 
     *            CapID(1:IDLength), North, South, East, West
                  write (CleanString, '(2048x)')
                  write (Remarks, '(2048x)')
                      write (91, '(a,t10,a)')
     *                    CapID(1:IDLength), Remarks(MinCol:MaxCol)
                      write (91, '(a)')
     *                    Remarks(MinCol:MaxCol)
                  write (CleanString, '(2048x)')
                  write (RelatedWebSites, '(2048x)')
                          write (91, '(a,t10,a)')
     *                        CapID(1:IDLength),
     *                        RelatedWebSites(MinCol:MaxCol)
                          write (91, '(a)')
     *                        RelatedWebSites(MinCol:MaxCol)
                      write (91, '(a)')
     *                    RelatedWebSites(MinCol:MaxCol)
                  write (CleanString, '(2048x)')
                  write (Equipment, '(2048x)')
                      write (91, '(a,t10,a)')
     *                    CapID(1:IDLength), Equipment(MinCol:MaxCol)
                      write (91, '(a)')
     *                    Equipment(MinCol:MaxCol)
                  write (CleanString, '(2048x)')
                  write (Navigation, '(2048x)')
                          write (91, '(a,t10,a)')
     *                        CapID(1:IDLength),
     *                        Navigation(MinCol:MaxCol)
                          write (91, '(a)')
     *                        Navigation(MinCol:MaxCol)
                      write (91, '(a)')
     *                    Navigation(MinCol:MaxCol)
              write (CleanString, '(2048x)')
              write (ALine, '(2048x)')
                  write (91, '(a,t10,a)')
     *                CapID(1:CapIDLength), ALine(MinCol:MaxCol)
                  write (91, '(a)')
     *                ALine(MinCol:MaxCol)
Opens
      open (unit = 75,
     *    access = 'sequential',
     *    form   = 'formatted',
     *    status = 'old',
     *    name = '/infobank/programs/keep/ids_list.keep')
          open (unit = 76,
     *        access = 'sequential',
     *        form   = 'formatted',
     *        status = 'unknown',
     *        name = '/infobank/tmp/whfar2meta_id.temp')
          open (unit = 91,
     *        access = 'sequential',
     *        status = 'new',
     *        iostat = FileExists, 
     *        err    = 301,
     *        form   = 'formatted',
     *        name   = '/infobank/'//
     *            ID(1:1)//'/'//ID(1:IDLength)//'/meta/'//
     *            SmallHyphenID(1:IDLength+3)//'.organization')
          open (unit = 91,
     *        access = 'sequential',
     *        status = 'new',
     *        iostat = FileExists, 
     *        err    = 999,
     *        form   = 'formatted',
     *        name   = '/infobank/'//
     *            ID(1:1)//'/'//ID(1:IDLength)//'/meta/'//
     *            SmallHyphenID(1:IDLength+3)//'.organization_far')
          open (unit = 89,
     *        access = 'sequential',
     *        form   = 'formatted',
     *        status = 'old',
     *        name   = '/infobank/programs/dbase/wh/cmgp/'//
     *        'far_'//
     *        WHID(1:5)//'.html')
          open (unit = 90,
     *        access = 'sequential',
     *        form   = 'formatted',
     *        status = 'unknown',
     *        name   = '/infobank/tmp/whfar2meta.temp')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *            err    = 1002,
     *            name   = OutName(1:OutNameLength)//'.platform')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *            err    = 999,
     *            name   = OutName(1:OutNameLength)//'.platform_far')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *            err    = 1008,
     *            name   = OutName(1:OutNameLength)//'.dates')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *            err    = 999,
     *            name   = OutName(1:OutNameLength)//'.dates_far')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *            err    = 1009,
     *            name   = OutName(1:OutNameLength)//'.ports')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *            err    = 999,
     *            name   = OutName(1:OutNameLength)//'.ports_far')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *            err    = 1010,
     *            name   =
     *            OutName(1:OutNameLength)//'.operationarea')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *            err    = 999,
     *            name   =
     *            OutName(1:OutNameLength)//'.operationarea_far')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *            err    = 1001,
     *            name = OutName(1:OutNameLength)//'.akas')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *            err    = 999,
     *            name = OutName(1:OutNameLength)//'.akas_far')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *            err    = 1011,
     *            name   = OutName(1:OutNameLength)//'.navarea')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *            err    = 999,
     *            name   = OutName(1:OutNameLength)//'.navarea_far')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *            err    = 1020,
     *            name   = OutName(1:OutNameLength)//'.notes')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *           err    = 999,
     *            name   =
     *            OutName(1:OutNameLength)//'.notes_far')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *            err    = 1021,
     *            name   = OutName(1:OutNameLength)//'.equipmentused')
              open (unit = 91,
     *            access = 'sequential',
     *            form   = 'formatted',
     *            status = 'new',
     *            iostat = FileExists, 
     *           err    = 999,
     *            name   =
     *            OutName(1:OutNameLength)//'.equipmentused_far')
          open (unit = 91,
     *        access = 'sequential',
     *        form   = 'formatted',
     *        status = 'new',
     *        iostat = FileExists, 
     *        err    = 501,
     *        name   = OutName(1:OutNameLength)//'.'//
     *            FileSuffix(1:FileSuffixLength))
          open (unit = 91,
     *        access = 'sequential',
     *        form   = 'formatted',
     *        status = 'new',
     *        iostat = FileExists, 
     *        err    = 503,
     *        name   = OutName(1:OutNameLength)//'.'//
     *            FileSuffix(1:FileSuffixLength)//'_far')
Calls
              call stringlen (ID, IDLength)
              call changecase ('SMALLS', ID)
              call changecase ('CAPITALS', CapID)
                  call stringlen (WHHtmlName, WHHtmlNameLength)
                  call stringlen (IBHtmlName, IBHtmlNameLength)
      call stringlen (OutName, OutNameLength)
          call stringlen (OutName, OutNameLength)
          call changecase ('SMALLS', SmallHyphenID)
              call stringlen (SerialNum, SerialNumLength)
              call changecase ('SMALLS', ALine(InfoStart:ALineLength))
              call changecase ('TITLE', ALine(InfoStart:ALineLength))
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call stringlen (AlternateNum, AlternateNumLength)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call stringlen (APortStart, PortStartLength)
              call stringlen (APortEnd, PortEndLength)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call stringlen (Remarks, RemarksLength)
              call stringlen (Equipment, EquipmentLength)
              call stringlen (Navigation, NavigationLength)
              call stringlen (PartyUSGS, PartyUSGSLength)
              call stringlen (PartyAffiliate, PartyAffiliateLength)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call stringlen (RelatedWebSites, RelatedWebSitesLength)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
              call basicoutput (OutName, CapID, FileSuffix, ALine)
                  call stringlen (ALink, ALinkLength)
                  call stringlen (ALink, ALinkLength)
              call stringlen (ALink, ALinkLength)
                  call stringlen (Remarks, RemarksLength)
                  call stringlen (RelatedWebSites,
     *                RelatedWebSitesLength)
                  call stringlen (Equipment, EquipmentLength)
                  call stringlen (Navigation, NavigationLength)
      call stringlen (OutName, OutNameLength)
      call stringlen (CapID, CapIDLength)
      call stringlen (FileSuffix, FileSuffixLength)
      call stringlen (ALine, ALineLength)
              call stringlen (ALine, ALineLength)

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