s4pdat.for (File 3)

This file contains a FORTRAN 77 data-retrieval routine to read and print s4p.dat (File 5). 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 s4p.dat.

c****************************************************************
c* FORTRAN 77 data retrieval routine to read and print the               
c* file named "s4p.dat" (File 5).                             
c****************************************************************

              CHARACTER qualt*11
              INTEGER sta, cast, samp, bot 
              REAL pre, ctdtmp, ctdsal, ctdoxy, theta, sal, oxy, silca
              REAL nitrat, nitrit, phspht, tcarb, pco2, pco2tmp
              OPEN (unit=1, file='s4p.dat')
              OPEN (unit=2, file='s4p.data')
              write (2, 5)

c*Writes out column labels*
     
 5            format (2X,'STNNBR',2X,'CASTNO',2X,'SAMPNO',2X,'BTLNBR',2X,
            1 'CTDPRS',4X,'CTDTMP',4X,'CTDSAL',2X,'CTDOXY',5X,'THETA',4X,
            2 'SALNTY',2X,'OXYGEN',2X,'SILCAT',2X,'NITRAT',2X,'NITRIT',2X,
            3 'PHSPHT',2X,'TCARBN',4X,'PCO2',1X,'PCO2TMP',6X,'QUALT1',/,
            5 36X,'DBAR',4X,'ITS-90',4X,'PSS-78',1X,'µmol/KG',4X,'ITS-90',
            6 4X,'PSS-78',1X,6('µmol/KG',1X,),3X,'UATM',3X,'DEG C',
            7 11X,'*',/,25X,'*******',21X,2('*******',1X,),
            8 12X,8('*******',1X,),18X,'*',)

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) sta, cast, samp, bot, pre, ctdtmp,
            1 ctdsal, ctdoxy, theta, sal, oxy, silca, nitrat, nitrit,
            2 phspht, tcarb, pco2, pco2tmp, qualt

 10           format (5X, I3, 7X, I1, 6X, I2, 6X, I2, 1X, F7.1, 1X, F9.4,
            1 1X, F9.4, 1X, F7.2, 1X, F9.4, 1X, F9.4, 1X, F7.1, 1X, F7.2,
            2 1X, F7.2, 1X, F7.2, 1X, F7.2, 1X, F7.1, 1X, F7.2, 1X, F7.2,
            3 1X, A11)
  
               write (2, 20) sta, cast, samp, bot, pre, ctdtmp,
            1 ctdsal, ctdoxy, theta, sal, oxy, silca, nitrat, nitrit,
            2 phspht, tcarb, pco2, pco2tmp, qualt

 20           format (5X, I3, 7X, I1, 6X, I2, 6X, I2, 1X, F7.1, 1X, F9.4,
            1 1X, F9.4, 1X, F7.2, 1X, F9.4, 1X, F9.4, 1X, F7.1, 1X, F7.2,
            2 1X, F7.2, 1X, F7.2, 1X, F7.2, 1X, F7.1, 1X, F7.2, 1X, F7.2,
            3 1X, A11)
      
              GOTO 7
 999        close(unit=1)    
              close(unit=2)
              stop
              end

CDIAC   |  CCSI   |  ESD   |   ORNL   |   Security   |   Contact Us   |   maintained by Alex Kozyr   |   Last modified: 16 Jun 2010