fco2wat.for (File 2)
This file contains a FORTRAN 77 data-retrieval routine to read and print all *w.txt files (Files 4-12). 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 *w.txt files.
c****************************************************************
c* FORTRAN 77 data retrieval routine to read and print the files
c* named "*w.txt" (Files 4-12)
c****************************************************************
c*Defines variables*
CHARACTER date*10, time*8
INTEGER course
REAL latdcm, londcm, speed, temp, salt, press, fco2a, fco2b
REAL fco2c, fco2d, fco2e, fco2f, fco2g, fco2h
OPEN (unit=1, file='input.txt')
OPEN (unit=2, file='output.txt')
write (2, 5)
c*Writes out column labels*
5 format (5X,'DATE',9X,'TIME',5X,'LATITUDE',3X,'LONGITUDE',
1 3X,'SPEED',1X,'COURSE',4X,'TEMP',2X,'SALNTY',4X,
2 'PRESS',4X,8('fCO2',4X),/,5X,'GMT',10X,'GMT',8X,
3 'DEG N',6X,'DEG E',7X,'KN',3X,'DEG',5X,'DEG C',
4 2X,'PSS-78',5X,'hPA',5X,8('�atm',4X),/,
5 2X,'DD.MM.YYYY',4X,'HH:MM:SS',66X,'LAB A',3X,
6 'LAB B',3X,'LAB C',3X,'LAB D',3X,'LAB E',3X,
7 'LAB F',3X,'LAB G',3X,'LAB H')
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) date, time, latdcm, londcm, speed,
1 course, temp, salt, press, fco2a, fco2b, fco2c, fco2d,
2 fco2e, fco2f, fco2g, fco2h
10 format (2X, A10, 4X, A8, 4X, F7.4, 4X, F8.4, 4X, F4.1,
1 2X, I3, 5X, F5.2, 3X, F5.2, 3X, F6.1, 1X, F7.2, 1X, F7.2,
2 1X, F7.2, 1X, F7.2, 1X, F7.2, 1X, F7.2, 1X, F7.2, 1X, F7.2)
write (2, 20) date, time, latdcm, londcm, speed,
1 course, temp, salt, press, fco2a, fco2b, fco2c, fco2d,
2 fco2e, fco2f, fco2g, fco2h
20 format (2X, A10, 4X, A8, 4X, F7.4, 4X, F8.4, 4X, F4.1,
1 2X, I3, 5X, F5.2, 3X, F5.2, 3X, F6.1, 1X, F7.2, 1X, F7.2,
2 1X, F7.2, 1X, F7.2, 1X, F7.2, 1X, F7.2, 1X, F7.2, 1X, F7.2)
GOTO 7
999 close(unit=1)
close(unit=2)
stop
end