subroutine rheadsub(inump,inbest,infirst,rlat,rlon,rdep, + isy,isd,rsh,iey,ied,reh,rsampl,indata, + chorigin,chnote,chname,chdescrip) c c reads from unit 20 a GLOUP format header, including c descriptions of columns 6-11 c c unit 20 should have been opened with c c open(20,'ghf000147.dat',form='formatted',access='sequential', c + status='unknown',iostat=istat) c if(istat.ne.0)then c print*,'problem opening ghf000147.dat' c stop c endif c c but with 'ghf000147.dat' replaced with the chosen file name. c implicit none integer inump,inbest,icr,isy,isd,iey,ied,indata,infirst real*4 rlat,rlon,rdep,rsh,reh,rsampl character*61 chorigin character*74 chnote,chname character*76 chdescrip(5) character*80 chjunk c c inump integer number of pressure sensors c inbest integer: If there are more than 1 pressure sensors on c the instrument, this is the file index for the best c pressure data (0 if the best is in this file) c infirst integer: If this is part of a series at one site, and is c not the first, this is the file index of the first. c Otherwise it is 0. c rlat real latitude in decimal degrees north c e.g. -41.5 = 41 degrees 30 minutes south c rlon real longitude in decimal degrees east (-180.0 to +180.0) c e.g. -8.25 = 8 degrees 15 minutes west c rdep real depth in metres c isy integer start year, 4 digits c isd integer start day number from 1 to 366 c rsh real start hour, decimal hours(0.-23.999), GMT (UT) c e.g. 1974 33 13.500 is 1:30 pm, 2nd Feb, 1974 c iey integer end year, 4 digits c ied integer end day number from 1 to 366 c reh real end hour, decimal hours(0.-23.999), GMT (UT) c e.g. 1974 33 13.500 is 1:30 pm, 2nd Feb, 1974 c rsampl real sampling interval in decimal hours c indata integer number of data entries c chorigin character*61 description of who collected the data c e.g. Proudman Oceanographic Laboratory c chnote character*74 note, eg 'IAPSO number 1.4.19', or 'none' c chname character*74 name, eg 'myr9296.a1d.a' c chdescrip character*76 descriptions of contents of columns 6-12 c read(20,'(a80)')chjunk read(20,'(a80)')chjunk read(20,'(a4,a76)')chjunk(1:4),chdescrip(1) read(20,'(a4,a76)')chjunk(1:4),chdescrip(2) read(20,'(a4,a76)')chjunk(1:4),chdescrip(3) read(20,'(a4,a76)')chjunk(1:4),chdescrip(4) read(20,'(a4,a76)')chjunk(1:4),chdescrip(5) c integer number of pressure sensors read(20,'(i6)'),inump c if more than one pressure sensor on the instrument, and c this file does not contain the best pressure record, gives c the index of the file with the best record. read(20,'(i6)'),inbest c If this is part of a series at one site, and is c not the first, this is the file index of the first. c Otherwise it is 0. read(20,'(i6)')infirst c latitude in decimal degrees north c e.g. -41.5 = 41 degrees 30 minutes south read(20,'(f9.4)')rlat c longitude in positive decimal degrees east c e.g. 361.75 = 8 degrees 15 minutes west read(20,'(f9.4)')rlon c depth in metres read(20,'(f9.4)')rdep c start date: 4 digit integer year, integer day c number from 1 to 366, decimal hours, GMT (UT) c e.g. 1974 33 13.500 is 1:30 pm, 2nd Feb, 1974 read(20,'(i4.4,1x,i3.3,1x,f6.3)')isy,isd,rsh c end date: as for start date read(20,'(i4.4,1x,i3.3,1x,f6.3)')iey,ied,reh c sampling interval in decimal hours c integer number of data entries read(20,'(f6.3,1x,i7)')rsampl,indata c description of who collected the data c e.g. Proudman Oceanographic Laboratory read(20,'(a19,a61)')chjunk(1:19),chorigin c Notes e.g. 'IAPSO number 1.4.19', or 'none' read(20,'(a6,a74)')chjunk(1:6),chnote c Name e.g. 'myr9296.a1d.a' read(20,'(a6,a74)')chjunk(1:6),chname read(20,'(a80)')chjunk end