c********************************************************************** c* This is a Fortran 77 retrieval code to read and format the underway* c* surf. seawater xCO2 and hydrographic measurements from the WOCE * c* Indian Ocean survey cruises (*water.dat files) * c********************************************************************** c*Defines variables* INTEGER flag REAL jday, equitmp, atmpre, eqxco2, lat, lon REAL temp, sal, xco2sst, eaxco2 CHARACTER sect*11, date*8, time*8 OPEN (unit=1, file='input.dat') OPEN (unit=2, file='output.dat') write (2, 5) c*Writes out column labels* 5 format (2X,'SECTION',7X,'DATE',6X,'TIME',5X,'JULIAN',2X, 1 'EQUIL_TMP',2X,'ATM_PRES',3X,'XCO2_DRY_AIR',4X,'XCO2',2X, 2 'LATIT',3X,'LONGIT',3X,'SUR_TMP',2X,'SUR_SAL',1X, 3 'XCO2_DRY_AIR', 1X, 'EST_ATM_XCO2',/,5X,'#',11X,'GMT',7X, 4 'GMT',6X,'DATE',5X,'DEG_C',6X,'ATM',4X,'AT_EQUIL_TMP_PPM', 5 1X,'QC_FL',3X,'DCM',6X,'DCM',5X,'DEG_C',5X,'PSS',4X, 6 'AT_SST_PPM',2X,'DRY_AIR_PPM',/) 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) sect, date, time, jday, equitmp, 1 atmpre, eqxco2, flag, lat, lon, temp, sal, xco2sst, eaxco2 10 format (1X, A11, 2X, A8, 2X, A8, 2X, F7.3, 3X, F7.4, 4X, 1 F7.5, 5X, F7.3, 8X, I1, 2X, F8.4, 1X, F8.4, 2X, F7.4, 2X, 2 F7.4, 4X, F7.3, 5X, F7.3) write (2, 20) sect, date, time, jday, equitmp, 1 atmpre, eqxco2, flag, lat, lon, temp, sal, xco2sst, eaxco2 20 format (1X, A11, 2X, A8, 2X, A8, 2X, F7.3, 3X, F7.4, 4X, 1 F7.5, 5X, F7.3, 8X, I1, 2X, F8.4, 1X, F8.4, 2X, F7.4, 2X, 2 F7.4, 4X, F7.3, 5X, F7.3) GOTO 7 999 close(unit=5) close(unit=2) stop end