function O=oxysat(T,s)
% OXYSAT -	oxygen saturation value (ml/l)
%
% USAGE -	O = oxysat(T,s)
%		T - temperature C
%		s - salinity psu
%
% REFERENCE -	Weiss, R.F., 1970: The solubility of nitrogen, oxygen and
%		argon in water and seawater. Deep-Sea Res., 17, 721-735.
%

% PROGRAM - 	MATLAB code by c.m.duncombe rae
%
% CREATED -	Dec 1997
%
% PROG MODS -	
%		2007/12/23 - updated and corrected help text
%  2008/01/11
%	* print warning
%
% DISCLAIMER -	No responsibility can be accepted for failure or 
%		incorrect operation of this code. No guarantee, express 
%		or implied, is given. 
%

disp('Oxygen saturation function is based on t68');

A1 = -173.4292; A2 = 249.6339; A3 = 143.3483; A4 = -21.8492;
B1 = -0.033096; B2 = 0.014259; B3 = -0.00170;

T = T+273.15;
O = exp( A1 + A2.*(100./T) + A3.*log(T./100) + A4.*(T./100) + ...
	s.*( B1 + B2.*(T./100) + B3.*(T./100).*(T./100)));

return;

