subroutine wheadsub(inump,inbest,infirst,rlat,rlon,rdep, + isy,isd,rsh,iey,ied,reh,rsampl,indata, + chorigin,chnote,chname,chdescrip) c c writes to unit 40 a GLOUP format header, including c descriptions of columns 6-10 c c unit 40 should have been opened with c c open(40,'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) 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 write(40,10)' GLOBAL UNDERSEA PRESSURE DATA FO'// + 'RTRAN format(i6,i2,i5,i4,f7.3,5f8.2)' write(40,10)' 1: Line count 2: Flag (good data = 0) 3: '// + 'Year 4: Day (1st Jan = 1) 5: Hour ' write(40,10)' 6: '//chdescrip(1) write(40,10)' 7: '//chdescrip(2) write(40,10)' 8: '//chdescrip(3) write(40,10)' 9: '//chdescrip(4) write(40,10)'10: '//chdescrip(5) c integer number of pressure sensors write(40,1),inump 1 format(i6,' Number of pressure sensors on this', + ' instrument') 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. write(40,2),inbest 2 format(i6,' File index of best pressure', + ' record (0 if it is this file)') 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. write(40,3)infirst 3 format(i6,' File index of 1st deployment', + ' at this site (0 if this is 1st)') c latitude in decimal degrees north c e.g. -41.5 = 41 degrees 30 minutes south write(40,4)rlat 4 format(F9.4,' North latitude (degrees, -90 to +90)') c longitude in positive decimal degrees east c e.g. 361.75 = 8 degrees 15 minutes west write(40,5)rlon 5 format(F9.4,' East longitude (degrees -180 to +180)') c depth in metres write(40,6)rdep 6 format(F9.4,' Depth (metres)') 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 write(40,7)isy,isd,rsh 7 format(I4.4,' ',I3.3,' ',F6.3,' Start date', + ' (year, day, hour)') c end date: as for start date write(40,8)iey,ied,reh 8 format(I4.4,' ',I3.3,' ',F6.3,' End date ', + ' (year, day, hour)') c sampling interval in decimal hours c integer number of data entries write(40,9)rsampl,indata 9 format(F6.3,1X,I7,' Sample interval (hours); N', + 'umber of data entries') c description of who collected the data c e.g. Proudman Oceanographic Laboratory write(40,10)'Data collected by: '//chorigin c Notes e.g. 'IAPSO number 1.4.19', or 'none' write(40,10)'Note: '//chnote c Name e.g. 'myr9296.a1d.a' write(40,10)'Name: '//chname write(40,10)' Count f Year Day Hour 6 7 8'// + ' 9 10 ' 10 format(a80) end