function ep_lookFlr(id, NumOfDays)
% EP_LOOKFLR - Opens and graphs the file /oasis/eqpac/ep1/wetstar

% Peter Strutton
% 22 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
FileName = 'wetstar';
FileLoc = fullfile(getOasisPath, 'eqpac', id, FileName);


switch lower(id)
case 'ep1'
   loc = '0 155W';
case 'ep2'
   loc = '2S 170W';
otherwise
   loc = [];
end

% Open and read the file
fid = fopen(FileLoc,'r');
OK = 1;
while OK                         % Trash the header
   S = fgetl(fid);
   if ~strcmp(S(1),'#')
      break
   end
end
i = 1;
while ~feof(fid)                 % Read the data
   XS   = fgetl(fid);            % Get a line from the file
   XBuf = sscanf(XS,'%f')';      % Read the data from the line
   if length(XBuf) == 2
      X(i,:) = [XBuf NaN];       % Account for missing data
   else
      X(i,:) = XBuf;
   end
   i = i + 1;
end
fclose(fid);

[rX cX] = size(X);                  % Get it's size
D       = dy2date(X(:,1));          % Convert decimal years to serial date numbers
DEnd    = max(D);                   % Get the last date
i       = find(D >= (DEnd - NumOfDays));  % Find all dates within specified period

% Create the graph
figH = figure;
set(figH,'Name','Wetstar fluorescence')
plot(D(i),X(i,2),'b')               % Plot the surface fluorometer
hold('on')
j       = find(~isnan(X(i,3)));     % Skip rows of data with NaN's
plot(D(i(j)),X(i(j),3),'r')         % Plot the 20 m fluorometer
%plot(data(length(data)-no_of_days*8:length(data),1),data(length(data)-no_of_days*8:length(data),2));
hold off
ylabel('Fluorescence [v]');
xlabel('Date');
title(['Wetstar Fluorescence at ' loc])
%hold on
legend('0 m','20 m',0)

if NumOfDays < 40
   dtick = 6;
else
   dtick = 3
end

datetick('x',dtick)

setfontsize(7)









