function [sm tm pm]=kh_mid_points(si,sf,ti,tf,pi,pf)
% function [sm tm pm]=kh_mid_points(si,sf,ti,tf,pi,pf)
%
% Caluclates the mid points of salinity, temperature, and pressure between
% an initial and a final observation.  All terms need to be on neutral density
% levels.
%
% si=salinity initial (neutral density levels*profiles)
% sf=salinity final etc.
%
% Designed for use in calculating terms from Bindoff and McDougall (1994).
% Equations from B&M (1994) p1143
%
% Written by Kieran Helm (17-5-2007)

sm=0.5*[sf+si];
tm=0.5*[tf+ti];
pm=0.5*[pf+pi];

