Link to USGS home page
USGS Home
Contact USGS
Search USGS
Coastal & Marine Geology InfoBank

USGS InfoBank program -- whdates

Skip navigational links
Search InfoBank
Home tab Atlas tab Activities tab FACS tab Geology School tab More tab Activities tabs
   
InfoBank Programs: by Name   by Topic  
   
Expanded description
Topic Description
Name
whdates
Synopsis
/infobank/programs/refmt/whprereport2meta/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

    
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')

    
Reads
     read (90, '(q,a)', end=99) 
*        StartLineLength, StartPort(1:StartLineLength) 
     read (StartPort(5:Comma-1), '(i)') StartDay
     read (StartPort(Comma+1:StartDash-1), '(i)') StartYear
     read (90, '(/,q,a)', end=99) 
*        EndLineLength, EndPort(1:EndLineLength)
     read (EndPort(5:Comma-1), '(i)') EndDay
     read (EndPort(Comma+1:EndDash-1), '(i)') EndYear
    
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 ', StartPort(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', EndPort(EndDash+1:EndLineLength)

    
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)

    

Skip footer navigational links


InfoBank   Menlo Park Center   Santa Cruz Center   St. Petersburg Center   Woods Hole Center   Coastal and Marine Geology Program   Geologic Information   Ask-A-Geologist   USGS Disclaimer  

FirstGov button   Take Pride in America button