function s = rho(P, T, S)
%  1.  NAME
%
%  rho - Calculate sigma or sigma-theta
%
%  2.  SYNOPSIS
%
%  s = rho(T, S )
%
%  3.  DESCRIPTION
%
%  Calculates density anomally sigma or theta sigma.
%
%  This function was called rho and not sigma because there is already a
%  sigma function in Matlab.
%
%  4.  PARAMETERS
%
%     P  Vector of pressure (in dbar).
%
%     T  Vector of temperature or potential temperature (in deg C).
%
%     S  Vector of salinity (in ppm).
%
%  5.  RETURNS
%
%     s  Sigma (in kg/m^3) relative to 1000.0 kg/m^3.
%
%  6.  AUTHORS
%
%  Pierre Jaccard, Geophysical Institute, University of Bergen, 1999
%

s = 1000.0 * (( 1.0 ./ ...
		(0.702 + ...
		100.0*(17.5273 + 0.1101*T - 0.000639*T.*T - 0.039986*S - 0.000107*T.*S) ...
		./ ...
		(0.1*P + 5880.9 + 37.592*T - 0.34395*T.*T + 2.2524*S))) - 1.0);

return;






