%      test the conversion to x,y from lat lon
global SECS COSROT SINROT ONCE
global UTMXOFF UTMYOFF XOFF YOFF ROTANGLE IZONE ISPHERE
global AXIS BXIS AK0 RADSEC

infile='/home/klinck/SoOcean/Marguerite/grid/Src/Test/testxy.in';
outfile='/home/klinck/SoOcean/Marguerite/grid/Src/testxy.out';

data =load(infile, 'ascii');

lat=data(:,1);
lon=data(:,2);

[x,y]=ll2grid(lat,lon);

[m,n]=size(x);

fid=fopen(outfile,'w');
for i=1:n
    fprintf(fid,'%6.0f %6.0f %10.5f %10.5f \n',x(i),y(i),lat(i),lon(i));
end

fclose(fid);


 

