function hdfwarn(status)
%Use the last error generated by the HDF library as a warning.

if status==-1
  msg = '';
  error_code = hdfhe('value',1);
  msg = sprintf('The NCSA HDF library reported the following error: \n%s',hdfhe('string',error_code));
  warning(msg)
end
return;
