function orca_adi(svp_root,svg_root,fz_root,out_root);
%
% Call orca_adi(svp_root,svg_root,fz_root,out_root);
%
% Runs orca_adi on the various platforms.
%
fid_in=fopen('orca_adi_in','wt');
if fid_in < 0, 
	disp('orca_adi_in not written.  Check that it is not busy'); 
else
	fprintf(fid_in,'%s',[svp_root,'.svp']); fprintf(fid_in,'\n');
	fprintf(fid_in,'%s',[svg_root,'_svg']); fprintf(fid_in,'\n');
	fprintf(fid_in,'%s',[fz_root,'_fz']); fprintf(fid_in,'\n');
	fprintf(fid_in,'%s',[out_root]); fprintf(fid_in,'\n');
	fclose(fid_in);
	if (isunix | strcmp(computer,'PCWIN'))
		if (exist('system','builtin') == 0)
         !orca_adi
		else
		   syserr=system('orca_adi');
         if syserr ~= 0
            disp('An error occurred during the system call to orca_adi')
            disp('Make sure that the orca_adi binary executable is in your execution path')
            disp('A ''bin'' directory containing binary executables was supplied with this package')
         end
      end
	else
		disp(' ');
		disp(['RDA can only execute orca_adi on a UNIX or PC platform at present.  Copy the files:'])
		disp(['    ',[svp_root,'.svp']]);
		disp(['    ',[svg_root,'_svg']]);
		disp(['    ',[fz_root,'_fz']]);
		disp(['    ','orca_adi_in']);
		disp(['from ADI directory to a UNIX platform, run orca_adi, and copy back the ']);
		disp(['output _adi and _ptr files.']);
		disp(' ');
	end
end
%
% COPYRIGHT (c) 2008
% 
% Applied Research Laboratories, The University of Texas at Austin
% (ARL:UT)
% All rights reserved.
% 
% This material may be reproduced by or for the U.S. Government
% only. This notice must appear in all copies of this file and its
% derivatives. Further distribution outside the U.S. Government is
% prohibited without the explicit written authorization from the
% Director of the Environmental Sciences Laboratory, ARL:UT.
% 
% THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
% EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE
% IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
% PURPOSE, OR NONINFRINGEMENT.
% 
% IN NO EVENT WILL ARL:UT BE LIABLE FOR ANY DAMAGES WHATSOEVER ARISING
% OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN IF ARL:UT HAS
% BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
