function [tn]=kh_alpha_tn(si,sf,ti,tf,pi,pf)
% function [tn]=kh_alpha_tz(si,sf,ti,tf,pi,pf)
%
% Caluclates alpha*ptmp'z (alpha*potential tempe 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 (equation 12)
%
% Written by Kieran Helm (17-5-2007)

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

% Calculate alpha
al=sw_alpha(sm,tm,pm,'ptmp');

% Multiple alpha*diffence in temp at mid pressure
tn=al.*[tf-ti];
