function ep_lookPrr620(id, NumOfDays)
% EP_LOOKPRR600 - Opens and graphs the files \oasis\eqpac\ep1\spec.noon,
% spec.0m.1230, spec.0m.dark.
%
% Requires: READEQPAC

% Peter Strutton
% 29 Dec 1998; Brian Schlining

% Prompt for input if no input arguments are specified
if nargin < 2
   NumOfDays = 30;
end

% Set the path to the data file depending on what type of machine this function is run from
switch lower(id)
case 'ep1'
   loc = '0 155W';
   FileName = 'ep1_specprr_full.nc';
   lon = -155;
case 'ep2'
   loc = '2S 170W';
   FileName = 'ep2_specprr_full.nc';
   lon = -170;
otherwise
   loc = [];
   return
end


FileLoc = fullfile(getOasisPath, 'eqpac', 'netcdf', FileName);
PathS = fullfile(getOasisPath, 'eqpac', id);

ep = netcdf(FileLoc);
X  = ep_cmplNc(ep);
ncquit(ep);

if NumOfDays < 45
   Placement = 0;
else
   Placement = 2;
end

% Trim to NumOfDays
DEnd    = max(X.t);                    % Get the last date
i       = find(X.t >= (DEnd - NumOfDays));   % Find all dates within specified period

fig1 = figure;
set(fig1,'Units','normalized','Position',[0,0.4,0.5,0.5],'Name','PRR-620')
plot(X.t(i),X.Es(i,:))
legend('Ed412', 'Ed443', 'Ed490', 'Ed510', 'Ed555', 'Ed670', 'PAR',Placement);
title(['Ed[3m+] from a PRR-620 at 10:00 and 12:00[local]' loc])
ylabel('Irradiance [\muW cm^-^2 nm^-^1]');
%xlabel('Date');
if NumOfDays < 50
   dtick = 6;
else
   dtick = 3;
end
datetick('x',dtick)
setfontsize(7)
XLim = get(gca, 'XLim');

% Read spec.0m.dark
FileLoc = fullfile(PathS, 'spec.0m.dark');
X       = readeqpac(FileLoc, NumOfDays);

fig3    = figure;
set(fig3,'Units','normalized','Position',[0.4,0.1,0.5,0.5],'Name','PRR-620 at 0000 local')
if ~isempty(X)
plot(X(:,1),X(:,2:8))
end
legend('Ed412', 'Ed443', 'Ed490', 'Ed510', 'Ed555', 'Ed670', 'PAR',Placement);
ylabel('Irradiance [\muW cm^-^2 nm^-^1]');
xlabel('Date');
title('Ed[3m+] from a PRR-620 at 00:00[local] 0 155W')
if NumOfDays < 50
   dtick = 6;
else
   dtick = 3;
end

datetick('x',dtick)
setfontsize(7)
%E1 = max(X(:, 2:8)')';
%E2 = min(X(:, 2:8)')';
set(gca, 'XLim', XLim);
%set(gca, 'XLim', XLim, 'YLim', [prctile(E2, 3) prctile(E1, 97)]);
