ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c program DEPTH_FORMAT2002.FOR c c Read averaged CTD data file (*.AVE05) and write out time c and depth data for use in INTELLIFISH (after interpolation) c for final CTD tow navigation c c for *.AVE05 input files from V2002-NZAPLUME cruise c c Jan 2003 S.Walker c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc real pave,z,t1ave,cave,sal,ptemp,pden,dtheta,alt real nephN1,pH,H2S,MET integer julday,hrpart,minpart,secpart integer nrec,hrprev,scannum,midtime character*30 infile_z,outfile_z character*70 hdrlin character*8 dtave character*1 c c--- format if input data file ---------------------------- c write (2,11) dtave,pave,z,t1ave,cave,sal,ptemp,pden,dtheta, c ! alt,nephN1,pH,H2S,MET,midtime c11 format (1x,a8,1x,13(1x,f12.6),1x,i6) c---------------------------------------------------------- type *,' ' TYPE *,' INPUT FILES... ' type *,' Enter DEPTH input file name : ' read (5,2) infile_z type *,' ' TYPE *,' OUTOUT FILES... ' type *,' Enter DEPTH output file name : ' read (5,2) outfile_z 2 format (a) 12 format (i) type *,' ' type *,' Enter JULIAN DAY at start of tow: ' read (5,12) julday open (unit=12,file=infile_z,status='old') open (unit=22,file=outfile_z,status='unknown') iend = 0 16 format (70a) 160 read (12,16) hdrlin nrec = 0 hrprev = 0 c--- format if input data file ---------------------------- c write (2,11) dtave,pave,z,t1ave,cave,sal,ptemp,pden,dtheta, c ! alt,nephN1,pH,H2S,MET,midtime c11 format (1x,a8,1x,13(1x,f12.6),1x,i6) c---------------------------------------------------------- 100 read (12,11,end=200) dtave,pave,z,t1ave,cave,sal,ptemp,pden, ! dtheta,alt,nephN1,pH,H2S,MET,midtime 11 format (1x,a8,1x,13(1x,f12.6),1x,i6) nrec = nrec + 1 decode (8,4,dtave) hrpart,c,minpart,c,secpart 4 format (i2,a1,i2,a1,i2) if ((nrec .gt. 1) .and. (hrpart .lt. hrprev)) ! julday = julday + 1 if (z .lt. 1.0) goto 100 write (22,166) julday,hrpart,minpart,secpart,z 166 format (1x,i3,1x,i2,1x,i2,1x,i2,1x,f6.1) hrprev = hrpart goto 100 200 type *,' End of DEPTH data file found...' type *,' ' close (unit=11) close (unit=21) type *,' Format conversion complete...' stop end