function [ meshnod,nlevels]=reads3r(filename)
% reads3r.m
% Read the files in to matlab in proper format
%   This reads   uvt50.s3r
% [ s3r,nlevels ]=reads3r('uvt50');
%  These files have all of the levels for each node
%  Thus to get a single level do:
% n = length(s3r); l = level:nlevel:n;
% density = s3r(l,3);


fid = fopen([filename,'.s3r'],'rt');
if fid~=-1
fgets(fid)
fgets(fid)
nlevels = fscanf(fid,'%f',[1])';
meshnod = fscanf(fid,'%f',[3,inf])';
fclose(fid);
else
meshnod=[];
end

