subroutine wheadsubdaily(inump,inbest,infirst,rlat,rlon,rdep, + isy,isd,iey,ied,imjdn0,indata, + chorigin,chnote,chname) c c writes to unit 40 a GLOUP dailies format header c c unit 40 should have been opened with c c open(40,'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,i real*4 rlat,rlon,rdep character*61 chorigin character*74 chnote,chname character*80 chdescrip(7) 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 chdescrip(1)='G L O B A L U N D E R S E A '// + 'P R E S S U R E D A T A' chdescrip(2)=' DAILY VALUES of PRESSURE in millibars' chdescrip(3)=' FORTRAN FORMAT (i6,i5,i4,2i2,2f8.2)' chdescrip(4)=' ' chdescrip(5)=' 1: Line count 2: Year 3:'// + 'Day of year' chdescrip(6)=' 4: Flag for mean 5: Flag for filter (0 is good)' chdescrip(7)=' 6: Daily mean 7: Doodson X0 filtered value' do i=1,7 write(40,10)chdescrip(i) enddo 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 7 format(I4.4,' ',I3.3,' ',' Start date', + ' (year, day)') c end date: as for start date write(40,8)iey,ied 8 format(I4.4,' ',I3.3,' ',' End date ', + ' (year, day)') c Modified Julian Day Number of day before first record c integer number of data entries write(40,9)imjdn0,indata 9 format(i6,1X,I7,' MJDN of day before first record; 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 Year Day 1 2 Mean DoodX0 '// + ' ' 10 format(a80) end