Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- timedata

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
timedata
Synopsis
/infobank/programs/dbase/validator/timedata.for
Description
  Subroutine to verify that a file is in the standard time/data format.


       
Reads
          read (TempUnit, '(q,a)', end = 99)
     *                ALineLength, ALine(1:ALineLength)
              read (ALine(1:14), '(i4,i3,3i2,i1)') 
     *                    Year, Day, Hour, Minute, Second, Tenth
Writes
              write (Message, 25) InFile(1:InFileLength),
     *                    RecordCount,
     *                    'data beyond column 15 is required'
                  write (Message, 25) InFile(1:InFileLength),
     *                        RecordCount,
     *                        'blanks in '//
     *                        'time field'//
     *                        ' (columns 1-14)'
                  write (Message, 25) InFile(1:InFileLength),
     *                        RecordCount,
     *                        'column 15 must be blank'
                      write (Message, 25) InFile(1:InFileLength),
     *                            RecordCount,
     *                            'time field (columns 1-14) '//
     *                            'must contain integers'
                  write (Message, 25) InFile(1:InFileLength),
     *                        RecordCount,
     *                        'year field (columns 1-4) '//
     *                        'must fall within 1940 - 2039 range'
                      write (Message, 25) InFile(1:InFileLength),
     *                            RecordCount,
     *                            'day field (columns 5-7) '//
     *                            'must fall within 000 - 366 range'//
     *                            ' on leap years'
                      write (Message, 25) InFile(1:InFileLength),
     *                            RecordCount,
     *                            'day field (columns 5-7) '//
     *                            'must fall within 000 - 365 range'//
     *                            ' on non-leap years'
                  write (Message, 25) InFile(1:InFileLength),
     *                        RecordCount,
     *                        'hour field (columns 8-9) '//
     *                        'must fall within 00 - 23 range'
                  write (Message, 25) InFile(1:InFileLength),
     *                        RecordCount,
     *                        'minute field (columns 10-11) '//
     *                        'must fall within 00 - 59 range'
                  write (Message, 25) InFile(1:InFileLength),
     *                        RecordCount,
     *                        'second field (columns 12-13) '//
     *                        'must fall within 00 - 59 range'
                  write (Message, 25) InFile(1:InFileLength),
     *                        RecordCount,
     *                        'tenths field (column 14) '//
     *                        'must fall within 0 - 9 range'
Opens
      open (unit   = TempUnit,
     *      access = 'sequential',
     *      form   = 'formatted',
     *      status = 'unknown',
     *      name   = InFile(1:InFileLength))
Calls
          call stringlen (ALine(1:ALineLength), 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/dbase/validator/timedata.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:37:39 PDT 2013  (chd)