%      test the conversion to lat lon from x,y
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/testlls.in';
outfile='/home/klinck/SoOcean/Marguerite/grid/Src/testlls.out';

data =load(infile, 'ascii');

x=data(:,1);
y=data(:,2);

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


[m,n]=size(lat);

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

fclose(fid);




