function [dpth]  = apply_fall_rate(a,b,nPts)
% apply_fall_rate: Apply xbt fall rate coefficients to infer depth
%
% DESCRIPTION:	
%		Given a pair of coefficients, apply_fall_rate will calculate the 
% depths of n_pts depth levels for xbt/xctd data which samples at one
% Hz.
%
% 
% INPUT: 
%		a, b: the fall rate coefficients.
%		nPts: length of the desired depth vector
% 
% OUTPUT:
% depth: vector of length nPts containing the depth in meters.
%
% NOTE: This fall rate equation assumes that the sign of b is passed as input
% i.e. z = a.*t + b.* t.^2  
% This convention is opposite the one used in determine_xbt_depth.m but agrees
% with the wmo code tables on the gtspp web page.
%
% http://www.nodc.noaa.gov/GTSPP/document/codetbls/wmocode.htm#tbl1770

j = 0.1.*[1:nPts];
dpth = (a + b.*j).*j;
dpth = dpth(:);

return

