8.2 stainv.for (File 2)

This file contains a FORTRAN 77 data retrieval routine to read and print three station inventory files: p16ap17a.sta (File 4), p17ep19s.sta (File 5), and p19c.sta (File 6). The following is a listing of this program. For additional information regarding variable definitions, variable lengths, variable types, units, and codes, please see the description for files 4, 5, and 6 on page 38.

c********************************************************************
c* FORTRAN 77 data retrieval routine to read and print the files    *
c* named "p16ap17a.sta", p17ep19s.sta, and p19c.sta (Files 4, 5, 6) *
c********************************************************************
c*Defines variables*

       INTEGER  stat, cast, depth
       REAL latdcm, londcm
       CHARACTER expo*10, sect*9, date*10, time*4
       OPEN (unit=1, file='input.sta')
       OPEN (unit=2, file='output.sta')
       write (2, 5)

c*Writes out column labels*

 5     format (1X, 'STATION INVENTORY: R/V KNORR',/,
     1 1X,'EXPOCODE',3X,'SECT',6X,'STNBR',2X,'CAST',9X,
     2 'DATE',2X,'TIME',2X,'LATITUDE',2X,'LONGITUDE',2X,
     3 'DEPTH',/)

c*Sets up a loop to read and format all the data in the file*

       read (1, 6)
 6     format (//////////)

 7     CONTINUE
       read (1, 10, end=999) expo, sect, stat, cast, date, time,
     1 latdcm, londcm, depth

 10    format (A10, 2X, A9, 3X, I3, 5X, I1, 3X, A10, 2X, A4, 3X,
     1 F7.3, 3X, F8.3, 3X, I4)

       write (2, 20) expo, sect, stat, cast, date, time,
     1 latdcm, londcm, depth

 20    format (A10, 2X, A9, 3X, I3, 5X, I1, 3X, A10, 2X, A4, 3X,
     1 F7.3, 3X, F8.3, 3X, I4)

       GOTO 7
 999   close(unit=5)
       close(unit=2)
       stop
       end

CDIAC   |  CCSI   |  ESD   |   ORNL   |   Security   |   Contact Us   |   maintained by Alex Kozyr   |   Last modified: 16 Jun 2010