xbt jan94 11jan-07feb94 Use xbt to get profile for temperature. Correct for spikes, interpolate to standard depths, calculate potential temperature relative to 0 dbar. The mark 12 version of the Sippican software is used to obtain and process the data. water temperature as a function of depth at standard depths: in situ temperature potential temperature Between stations and in transits behind stations. Drop probe from hand held launcher. This is a two person operation. One person on deck takes out 2 xbt's with them. The person inside starts the program (c:\mk-12>) and views the first xbt trace since there is the possiblity of the wire grounding, spiking, and incorrect density changed. The inside viewer calls for a second xbt if it looks outside the range of 'normal'. Convert raw values with Sippican mark 12 software on a dos machine. mk-12-acquition -> *.sip mkpta-post trace viewing (use *.sip) Interpolation and potential temperature programs are included below under COMMENTS. none XBT's used dated aug93. The Spartons appeared to have been abused and did not function well. (1case=12xbt's) Use jan94 cruise: ?t7:65 ?t6:73 event log suggest 75 as does # of profiles in /data1 temperature, potential temperature, xbt Sippican raw (.sip) format, Sippican export (.exp) format, modified export files (.mexp), and temperature and potential temperature relative to 0 dbar interpolated to standard depths (.std). all files are ascii. The .sip files are in the format described by Sippican documents. The .exp files are created by Sippican software (mk 12) producing five header lines describing the case, and then a blank line, and two lines with column labels. The observations are reported as depth (meters) and temperature (degrees C). The .mexp files have the same structure as the .exp files except one of the header lines has been changed to identify the person who modified the data and some lines have a third temperature value, which is the original observation. The modified temperature is put into column 2. The .std file has four header lines identifying the station, the observer, latitude and longitude (degrees, minutes, [NEWS]). Three data columns give depth (meters), potential temperature relative to 0 dbar (degrees C) and in situ temperature (degrees C). The .std and .mexp files are also converted into lter header format (designated .hstd and .hmexp, reapectively). The data are the same, just the format is changed to allow the files to be read as with the standard format software. The data are submitted to the data system in UNIX tar format. The tar file was written to an MSDOS formatted floppy disk with the command - mwrite. All of the data files are ascii and have not been compressed. Files online lter. evtxxx.sip, .exp, .mexp, .std, where xxx is the event number assigned by the bridge. The files in the data syatem are called evtxxx.hstd and evtxxx.hmexp. The original files can be obtained on request. Raymond C. Smith Karen S. Baker Phil Handley none none Phil Handley Karen S. Baker 05Apr94 MK-12 Oceanographic data Acquisition System/ Users Manual Sippican 7 barnabas road; marion, MA 02738-9983 These records need to be compared to the temperature profiles from BOPS. All changes are made to the .mexp files and the .sip and .exp files are left unmodified. The original observations are left in the file, but pushed to the right. One point spikes are interpolated by hand. The hree to four values at the surface are changed to the next deeper temperature. A temperature spike is interpreted as the probe hitting the bottom and values below this point are deleted. The bottom spike is not always clearly evident. Some spiky records are due to the wire hitting the ice or the ship because of wind. The modified temperature values are averaged over three adjacent depths and these averaged values are interpolated by cubic splines to standard depths. The spline fitting routine is from the book, Numerical Recipes. The potential temperature relative to the surface is also calculated. The following program is used to bin average and interpolate the data to standard depths. It has been used in a Sun UNIX environment, but should work with minor modifications on any system supporting FORTRAN 77. program stdepxbt c c read an xbt file (export file) and average the adjacent 3 values c to smooth a bit. Then, interpolate to standard depths. c parameter(maxvals=3000,nstd=42) c real depth(maxvals),temp(maxvals) real avgdepth(maxvals),avgtemp(maxvals),avgtemp2der(maxvals) real stddepth(nstd),stdtemp(nstd),stdptemp(nstd) c integer readunit, writeunit, datainunit, dataoutunit c character header(5)*80, inputfile*80, dir*20, dummy*1 character outputfile*80 c data readunit,writeunit,datainunit,dataoutunit /5,6,10,20/ c data stddepth/ 0., 10., 20., 30., 50., 75., & 100., 125., 150., 200., 250., 300., & 400., 500., 600., 700., 800., 900., & 1000., 1100., 1200., 1300., 1400., 1500., & 1750., 2000., 2500., 3000., 3500., 4000., & 4500., 5000., 5500., 6000., 6500., 7000., & 7500., 8000., 8500., 9000., 9500.,10000./ c reference salinity for potential temp data s0 /34.00/ c open(writeunit,file='stdepxbt.prt',status='unknown') c numargs = iargc() c if(numargs .ne. 1) then write(*,*) ' incorrect usage. ' write(*,*) ' stdepxbt file ' stop endif c dir='/usr/users/lter/Xbt/' ireturn = getarg(1,inputfile) c leninfile=index(inputfile,' ')-1 c open(readunit,file=dir//inputfile(1:leninfile),status='old') c open(writeunit,file='stdepxbt.prt',status='unknown') c c write(writeunit,*) ' input file = ',inputfile(1:leninfile) c idot=index(inputfile,'.') outputfile=dir//inputfile(1:idot)//'std' c write(writeunit,*) ' data out file = ', & outputfile(1:idot+23) c open(dataoutunit,file=outputfile(1:idot+23),status='unknown') c do 1 i=1,5 read(readunit,2) header(i) 2 format(a80) write(writeunit,2) header(i) 1 continue c icolon=index(header(1),':')+1 c c write(dataoutunit,*) header(1)(icolon:) c icolon=index(header(5),':')+1 c write(dataoutunit,*) header(5)(icolon:) c icolon=index(header(2),':')+1 c write(dataoutunit,*) header(2)(icolon:) c icolon=index(header(3),':')+1 c write(dataoutunit,*) header(3)(icolon:) c icolon=index(header(4),':')+1 c write(dataoutunit,*) header(4)(icolon:) c read(readunit,'(a1)') dummy read(readunit,'(a1)') dummy read(readunit,'(a1)') dummy c do 10 i=1,maxvals read(readunit,*,end=15) depth(i),Temp(i) lastgood=i 10 continue c 15 continue c call average(depth,temp,avgdepth,avgtemp,lastgood,lastavg) c write(*,*) ' lastavg = ',lastavg write(*,*) ' nstd = ',nstd c call stdint(avgdepth,avgtemp,stddepth,stdtemp,avgtemp2der, & lastavg,nstd,laststd) c write(*,*) ' laststd = ',laststd c calculate potential temperature do 18 i=1,laststd stdptemp(i)=theta(s0,stdtemp(i),stddepth(i),0.) 18 continue c do 20 i=1,laststd write(dataoutunit,21) stddepth(i),stdptemp(i),stdtemp(i) write(* , 21) stddepth(i),stdptemp(i),stdtemp(i) 21 format(3f8.3) 20 continue c stop end subroutine average(depth,val, avgdepth,avgval,lendata,lenavg) c c average the depth and values over navg values c c depth is the depth array c val is the data array to average c c avgdepth = averaged depth array c avgval = values averaged over navg points c real depth(lendata),val(lendata) real avgdepth(lendata),avgval(lendata) c logical dbug c data navg/3/ c data dbug/.true./ data dbug/.false./ c lenavg=lendata/navg c c write(*,*) ' lenavg = ',lenavg c write(*,*) ' lendata = ',lendata c do main part of loop without tail part do 1 i=1,lenavg dsum=0. vsum=0. do 2 j=1,navg dsum=dsum+depth(navg*(i-1)+j) vsum=vsum+ val(navg*(i-1)+j) 2 continue avgdepth(i)=dsum/navg avgval(i) =vsum/navg 1 continue c get the length of the tail to average last=mod(lendata,navg) c write(*,*) ' last = ',last c take care of tail part if(last .gt. 0) then dsum=0. vsum=0. do 5 j=1,last dsum=dsum+depth(navg*lenavg+j) vsum=vsum+ val(navg*lenavg+j) 5 continue c increase length of average lenavg=lenavg+1 c avgdepth(lenavg)=dsum/last avgval(lenavg) =vsum/last c endif c if(dbug) then c do 90 i=1,lenavg write(*,91) depth(1+navg*(i-1)), val(1+navg*(i-1)), & avgdepth(i),avgval(i) 91 format(' orig = ',2f8.3,' avg = ',2f8.3) c do 93 j=2,navg write(*,92) depth(j+navg*(i-1)), val(j+navg*(i-1)) 92 format(' orig = ',2f8.3) 93 continue 90 continue c endif c return end C *** Installed and tested by E.Oka according to UNESCO *** C *** Tech. Papers 44 (1983). *** C REAL FUNCTION THETA(S,T0,P0,PR) C *********************************************************** C To compute local potential temperature at PR using Bryden 1973 C polynomial for adiabatic lapse rate and Runge-Kutta 4-th order C integration algorithm. C Ref.: Bryden,H.,1973, Deep-Sea Res., 20, 401-408 C Fofonoff,N.,1977, Deep-Sea Res., 24, 489-491 C Units: C pressure P0 decibars C temperature T0 deg. Celsius (IPTS-68) C salinity S (PSS-78) C reference pressure PR decibars C potential temp. THETA deg. Celsius C Checkvalue: THETA=36.89073 C, S=40 (PSS-78), T0=40 C, C P0=10000 decibars, PR=0 decibars C ************************************************************ C Set-up intermediate temperature and pressure variables P=P0 T=T0 H=PR-P XK=H*ATG(S,T,P) T=T+0.5*XK Q=XK P=P+0.5*H XK=H*ATG(S,T,P) T=T+0.29289322*(XK-Q) Q=0.58578644*XK+0.121320344*Q XK=H*ATG(S,T,P) T=T+1.707106781*(XK-Q) Q=3.414213562*XK-4.121320344*Q P=P+0.5*H XK=H*ATG(S,T,P) THETA=T+(XK-2.0*Q)/6.0 RETURN END subroutine stdint(depth,val,std,valstd, & val2der,nvals,nstd,nlast) c c interpolate a set of observations to standard depths c using cubic splines (routines from Numerical Recipes) c c parameter (nvals=1000,nstd=30) c dimension std(nstd),valstd(nstd) dimension depth(nvals),val(nvals),val2der(nvals) c c top=1.e40 bottom=1.e40 vmax=20. c c set second deriv of spline = 0 at top and bottom c set up the spline interpolation call spline(depth,val,nvals,top,bottom,val2der) c c do 40 i=1,nstd c mark values as missing valstd(i)=-999.0 c checks for standard values shallower c than the last observation depth if(depth(nvals) .gt. std(i)) ns=i 40 continue c set to next deeper standard depth ns=min(ns,nstd) c c write(*,*) ' deepest averaged value ',nvals,depth(nvals) c write(*,*) ' deepest standard depth ',ns,std(ns) c do 50 i=1,ns call splint(depth,val,val2der,nvals,std(i),valstd(i)) 50 continue c nlast=ns c return end c The next two routines are taken from Numerical Recipes SUBROUTINE SPLINE(X,Y,N,YP1,YPN,Y2) PARAMETER (NMAX=3000) DIMENSION X(N),Y(N),Y2(N),U(NMAX) IF (YP1.GT..99E30) THEN Y2(1)=0. U(1)=0. ELSE Y2(1)=-0.5 U(1)=(3./(X(2)-X(1)))*((Y(2)-Y(1))/(X(2)-X(1))-YP1) ENDIF DO 11 I=2,N-1 SIG=(X(I)-X(I-1))/(X(I+1)-X(I-1)) P=SIG*Y2(I-1)+2. Y2(I)=(SIG-1.)/P U(I)=(6.*((Y(I+1)-Y(I))/(X(I+1)-X(I))-(Y(I)-Y(I-1)) * /(X(I)-X(I-1)))/(X(I+1)-X(I-1))-SIG*U(I-1))/P 11 CONTINUE IF (YPN.GT..99E30) THEN QN=0. UN=0. ELSE QN=0.5 UN=(3./(X(N)-X(N-1)))*(YPN-(Y(N)-Y(N-1))/(X(N)-X(N-1))) ENDIF Y2(N)=(UN-QN*U(N-1))/(QN*Y2(N-1)+1.) DO 12 K=N-1,1,-1 Y2(K)=Y2(K)*Y2(K+1)+U(K) 12 CONTINUE RETURN END c SUBROUTINE SPLINT(XA,YA,Y2A,N,X,Y) DIMENSION XA(N),YA(N),Y2A(N) KLO=1 KHI=N 1 IF (KHI-KLO.GT.1) THEN K=(KHI+KLO)/2 IF(XA(K).GT.X)THEN KHI=K ELSE KLO=K ENDIF GOTO 1 ENDIF H=XA(KHI)-XA(KLO) IF (H.EQ.0.) PAUSE 'Bad XA input.' A=(XA(KHI)-X)/H B=(X-XA(KLO))/H Y=A*YA(KLO)+B*YA(KHI)+ * ((A**3-A)*Y2A(KLO)+(B**3-B)*Y2A(KHI))*(H**2)/6. RETURN END
Datafile Form V1.2 for describing a data file.