function [sn]=kh_beta_sn(si,sf,ti,tf,pi,pf)
% function [sn]=kh_beta_sn(si,sf,ti,tf,pi,pf)
%
% Caluclates beta*Saliinity'z (alpha*Salinity change on density surfaces
% All terms need to be on neutral density levels.
%
% si=salinity initial (neutral density levels*profiles)
% sf=salinity final etc.
% ti= initial potnetial temperature (needs to be potential temperature)
%
% Designed for use in calculating terms from Bindoff and McDougall (1994).
% Equation from B&M (1994) p1143 (adapted equation 12)
%
% Written by Kieran Helm (17-5-2007)

% Get midpoints
[sm tm pm]=kh_mid_points(si,sf,ti,tf,pi,pf);

% Calculate beta
bet=sw_beta(sm,tm,pm,'ptmp');

% Multiple beta*diffence in temp at mid pressure
sn=bet.*[sf-si];
