pmeldat.for (File 2)
This file contains a FORTRAN 77 data retrieval routine that may be used to read and print any of the 13 data files (Files 3-15). The following is a listing of this program. For additional information regarding variable definitions and format statements, please see the description for pmel8689.dat-rt3_89.dat(Files 3-15).
c***************************************************************
c* This is a FORTRAN 77 retrieval code to read and print the
c* Carbon Dioxide concentrations data in surface water and
c* atmosphere: PMEL cruises 1986-1989
c***************************************************************
c*Defines variables*
INTEGER DAY, YEAR
CHARACTER CRUISE*19, MONTH*3, FLAG*1
REAL DAYGMT, LAT, LONG, DIST, TEMP, WARM, SAL, APRE
REAL XCO2A, XCO2SW, FCO2A, FCO2SW
OPEN (unit=1, file='file.in')
OPEN (unit=2, file='file.out')
WRITE (2, 5)
c*Writes out column labels*
5 FORMAT (8x,'CRUISE NAME',2X,'CRUISE DATE',2X,'DAY GMT',3X,
1 'LATIT',5X,'LONGIT',2X,'DISTAN',4X,'TEMP',1X,'WARMING',2X,
2 'SALINITY',1X,'ATM.PRE',1X,'X(CO2)a',1X,'X(CO2)w',1X,
3 'f(CO2)a',1x,'f(CO2)w',1X,'QF',/,20X,'day mon year',10X,
4 'dec.deg',4X,'dec.deg',6X,'km',3X,'deg.C',3X,'deg.C',7X,
5 'ppt',4X,'mbar',5X,'ppm',5X,'ppm',4X,'uatm',4X,'uatm',//)
c*Sets up a loop to read and format all the data in the file*
7 CONTINUE
READ (1, 10, end=999) CRUISE, DAY, MONTH, YEAR, DAYGMT, LAT,
1 LONG, DIST, TEMP, WARM, SAL, APRE, XCO2A, XCO2SW, FCO2A,
2 FCO2SW, FLAG
10 FORMAT (A19, 2X, I2, 1X, A3, 1X, I4, 2X, F7.3, 1X, F7.3, 3X,
1 F8.3, 1X, F7.1, 1X, F7.2, 1X, F7.2, 2X, F8.3, 2X, F6.1, 1X,
2 F7.2, 1X, F7.2, 1X, F7.2, 1X, F7.2, 2X, A1)
WRITE (2, 20) CRUISE, DAY, MONTH, YEAR, DAYGMT, LAT,
1 LONG, DIST, TEMP, WARM, SAL, APRE, XCO2A, XCO2SW, FCO2A,
2 FCO2SW, FLAG
20 FORMAT (A19, 2X, I2, 1X, A3, 1X, I4, 2X, F7.3, 1X, F7.3, 3X,
1 F8.3, 1X, F7.1, 1X, F7.2, 1X, F7.2, 2X, F8.3, 2X, F6.1, 1X,
2 F7.2, 1X, F7.2, 1X, F7.2, 1X, F7.2, 2X, A1)
GOTO 7
999 CLOSE(unit=1)
CLOSE(unit=2)
STOP
END