c******************************************************************** c* FORTRAN 90 data retrieval routine to read and print the file * c* named "a15sta.txt" (File 5). * c******************************************************************** c*Defines variables* INTEGER stat, cast, depth REAL latdcm, londcm CHARACTER expo*10, sect*4, date*10, time*4 OPEN (unit=1, file='a15sta.txt') OPEN (unit=2, file='a15stat.txt') write (2, 5) c*Writes out column labels* 5 format (3X,'STATION INVENTORY: R/V KNORR', 1 1X,'CRUISE DATES 04/03/1994 TO 05/21/1994',/, 2 3X,'EXPOCODE',6X,'SECT',2X,'STNBR',2X,'CAST',9X, 3 'DATE',2X,'TIME',2X,'LATITUDE',2X,'LONGITUDE',2X, 4 '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 (1X, A10, 6X, A4, 3X, I4, 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 (1X, A10, 6X, A4, 3X, I4, 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