stainv.for (File 2)
This file contains a FORTRAN 77 program to read and print a5sta.dat (File 4). 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 a5sta.dat.
c*****************************************************************
c* This is a Fortran 77 retrieval code to read and format the
c* station inventory file named a5sta.dat (File 4).
c*****************************************************************
c*Defines variables*
INTEGER stat, cast, depth
REAL latdcm, londcm
CHARACTER expo*8, sect*3, date*10, time*4
OPEN (unit=1, file='a5sta.dat')
OPEN (unit=2, file='a5stat.dat')
write (2, 5)
c*Writes out column labels*
5 format (4X, 'STATION INVENTORY: R/V HESPERIDES, WOCE A5',/,
1 4X,'EXPOCODE',1X,'SECT',1X,'STNBR',2X,'CAST',
2 9X,'DATE',2X,'TIME',3X,'LATITUDE',3X,'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 (A12, 2X, A3, 3X, I3, 5X, I1, 3X, A10, 2X, A4, 4X,
1 F7.3, 4X, F8.3, 3X, I4)
write (2, 20) expo, sect, stat, cast, date, time,
1 latdcm, londcm, depth
20 format (A12, 2X, A3, 3X, I3, 5X, I1, 3X, A10, 2X, A4, 4X,
1 F7.3, 4X, F8.3, 3X, I4)
GOTO 7
999 close(unit=5)
close(unit=2)
stop
end