function m_lookHr(infile, NumOfDays)
% m_lookHr   - QC plot of Hydrorad data

% Prompt for input if no input arguments are specified
if nargin < 2
    NumOfDays = 7;
end
colormapS = palette5(64);

YLim = [300 775];

id = infile.mooring(:);


prop = readProperties(fullfile(getOasisPath, 'cfg', 'mooring.properties'));
%prop = readProperties('//tornado.shore.mbari.org/brian/matlab/work/mooring/mooring.properties');
XLim = [now-NumOfDays now];

v = var(infile);
n = ncnames(v);

dataTypes = {'Ed', 'Lu', 'Channel'};

for k = 1:length(dataTypes)
    
    goodVar = [strmatch(dataTypes{k}, n)]; 
    
    for i = 1:length(goodVar)
        
        V     = v{goodVar(i)};
        N     = char(ncnames(V));
        d     = dim(V); % get the dimensions
        
        X     = utc2sdn(infile{char(ncnames(d{2}))}(:)); % Time
        Y     = infile{char(ncnames(d{1}))}(:); % Wavelength
        
        maxCLim = getProperty(prop, [lower(dataTypes{k}) '.clim']);
        if isempty(maxCLim)
            CLim = [0 max(Y)];
        else
            CLim = [0 sscanf(maxCLim, '%f')];
        end
        
        if findstr(lower(N), 'air')
            depth = 0;
            CLim = CLim * 7;
        else
            depth = infile{char(ncnames(d{3}))}(:);
        end
        lat   = infile{char(ncnames(d{4}))}(:);
        lon   = infile{char(ncnames(d{5}))}(:);
        if isempty(lat) | isempty(lon)
            loc = [];
        else
            loc = getLocationString(lat, lon);
        end
        
        figure;
        
        good = find(X >= now-NumOfDays);
        X = X(good);
        if ~isempty(good)
            Z = infile{N}(:, good, :, :, :);   % Data
            Z(find(Z == infile{N}.missing_value(:))) = NaN;
        else
            Z = NaN;
        end
        
        if length(Z) > 1
            surf(X, Y, Z)
        else
            plot3(now, 450, 0);
        end
        
        
        view([30 30])
        shading flat
        set(gca, 'XLim', XLim, 'XGrid', 'on', 'YLim', YLim, 'ZLim', CLim, 'CLim', CLim)
        colormap(colormapS);
        colorbar2
        daytick('x');
        ylabel('\bf{\lambda (nm)}')
        xlabel('\bf{Date}')
        zlabel(['\bf{' V.symbol(:) '(' V.units(:) ')}']);
        title(['\bf{' infile.instrumentType(:) ' ' dataTypes{k} ' at ' upper(id) ' at ' num2str(depth) 'm (' loc{1} ')}'])
        setfontsize(7)
        set(gcf, 'PaperPosition', [0 0 3.75 3.25])
        
        
    end
end


