subroutine rheadsubdaily(inump,inbest,infirst,rlat,rlon,rdep, + isy,isd,iey,ied,imjdn0,indata, + chorigin,chnote,chname) c c reads from unit 20 a GLOUP dailies format header c c unit 20 should have been opened with c c open(20,'gda000147.dat',form='formatted',access='sequential', c + status='unknown',iostat=istat) c if(istat.ne.0)then c print*,'problem opening gda000147.dat' c stop c endif c c but with 'gda000147.dat' replaced with the chosen file name. c implicit none integer inump,inbest,icr,isy,isd,iey,ied,indata,infirst,imjdn0 real*4 rlat,rlon,rdep character*61 chorigin character*74 chnote,chname 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 e.g. 1974 33 is 2nd Feb, 1974 c iey integer end year, 4 digits c ied integer end day number from 1 to 366 c e.g. 1974 33 is 2nd Feb, 1974 c imjdn0 Modified Julian Day Number of the day before the first c data entry, so the MJDN for each record is imjdn0+incount c where incount is the record number. 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 read(20,'(a80)')chjunk read(20,'(a80)')chjunk read(20,'(a80)')chjunk read(20,'(a80)')chjunk read(20,'(a80)')chjunk read(20,'(a80)')chjunk read(20,'(a80)')chjunk 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 c e.g. 1974 33 is 2nd Feb, 1974 read(20,'(i4.4,1x,i3.3)')isy,isd c end date: as for start date read(20,'(i4.4,1x,i3.3)')iey,ied c Modified Julian Day Number of day before first record c integer number of data entries read(20,'(i6,1x,i7)')imjdn0,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