Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- whdates

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
whdates
Synopsis
/infobank/programs/refmt/whreport2meta/whdates.for
Description
  Subroutine to make a .dates file for whreport2html

       
AUTHOR
  Clint Steele    11/3/2006

  set for post-cruise '7. Start Date'
  added for pre-cruise '6. Start Date' - CDegnan, 9/26/2007

    
Reads
          read (90, '(q,a)', end=99) 
     *        StartLineLength, StartLine(1:StartLineLength) 
              read (StartLine(5:Comma-1), '(i)') StartDay
              read (StartLine(Comma+1:StartDash-1), '(i)') StartYear
              read (StartLine(Dash(1)-4:Dash(1)-1), '(i)') 
     *            StartYear
              read (StartLine(Dash(1)+1:Dash(2)-1), '(i)')
     *            StartingMonth
              read (StartLine(Dash(2)+1:StartLineLength), '(i)')
     *            StartDay
          read (90, '(/,q,a)', end=99) 
     *        EndLineLength, EndLine(1:EndLineLength)
              read (EndLine(5:Comma-1), '(i)') EndDay
              read (EndLine(Comma+1:EndDash-1), '(i)') EndYear
             read (EndLine(Dash(1)-4:Dash(1)-1), '(i)')
     *           EndYear
             read (EndLine(Dash(1)+1:Dash(2)-1), '(i)')
     *           EndingMonth
             read (EndLine(Dash(2)+1:EndLineLength), '(i)')
     *           EndDay
          read (90, '(q,a)', end=99) StartPortLength,
     *        StartPort(1:StartPortLength)
            read (90, '(q,a)', end=99) StartPortLength,
     *          StartPort(1:StartPortLength)
            read (90, '(/,q,a)', end=99) EndPortLength,
     *          EndPort(1:EndPortLength)
Writes
          write (91, '(a,t10,
     *        i2.2,a,i2.2,a,i4.4,
     *        t21,a,i3.3,a,
     *        i2.2,a,i2.2,a,i4.4,
     *        t45,a,i3.3,a)') 
     *        CapID(1:CapIDLength), 
     *        StartingMonth, '/', StartDay, '/', StartYear,
     *        '(JD ',StartJDay,') -->
     *        EndingMonth, '/', EndDay, '/', EndYear,
     *        '(JD ',EndJDay,')'
            write (92, '(i4.4,i3.3,a,
     *        t16,a,t37,a,t45,a,a)')
     *        StartYear, StartJDay, '0000000',
     *        '  0.00000    0.00000',
     *        CapID(1:CapIDLength),
     *        'IN PORT LEAVE ', StartLine(StartDash+1:StartLineLength)
            write (92, '(i4.4,i3.3,a,
     *        t16,a,t37,a,t45,a,a)')
     *        EndYear, EndJDay, '0000000',
     *        '  0.00000    0.00000',
     *        CapID(1:CapIDLength),
     *        'IN PORT ARRIVE', EndLine(EndDash+1:EndLineLength)
            write (StartPort, '(4096x)')
            write (EndPort, '(4096x)')
            write (92, '(i4.4,i3.3,a,
     *        t16,a,t37,a,t45,a,a)')
     *        StartYear, StartJDay, '0000000',
     *        '  0.00000    0.00000',
     *        CapID(1:CapIDLength),
     *        'IN PORT LEAVE  ', StartPort(1:StartPortLength)
            write (92, '(i4.4,i3.3,a,
     *        t16,a,t37,a,t45,a,a)')
     *        EndYear, EndJDay, '0000000',
     *        '  0.00000    0.00000',
     *        CapID(1:CapIDLength),
     *        'IN PORT ARRIVE ', EndPort(1:EndPortLength)
Opens
      open (unit = 91,
     *              access = 'sequential',
     *              form = 'formatted',
     *              status = 'unknown',
     *              name = OutName(1:OutNameLength)//'.dates')
      open (unit = 92,
     *              access = 'sequential',
     *              form = 'formatted',
     *              status = 'unknown',
     *              name = OutName(1:OutNameLength)//'.ports')
Calls
      call stringlen (ALine, ALineLength)
      call stringlen (CapID, CapIDLength)
      call stringlen (OutName, OutNameLength)
              call changecase ('CAPITALS', StartMonth)
          call julianday ('JULIAN', StartJDay, 
     *        StartYear, StartingMonth, StartDay)
              call changecase ('CAPITALS', EndMonth)
          call julianday ('JULIAN', EndJDay,
     *        EndYear, EndingMonth, EndDay)
            call stringlen (StartPort(1:StartPortLength), 
     *                      StartPortLength)
            call stringlen (EndPort(1:EndPortLength), EndPortLength)

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