function ep_lookMisc(id, NumOfDays)
% EP_LOOKMISC - Graphs the contents of \oasis\eqpac\ep1\spec.misc
%
% Requires: READEQPAC

% Brian Schlining
% 29 Dec 1998

% 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 = 'spec.misc';
FileLoc = fullfile(getOasisPath, 'eqpac', id, FileName);

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

X       = readeqpac(FileLoc, NumOfDays);
[r c] = size(X);
if c == 3
   X = [X(:,1) ones(length(X(:,1)), 2)*NaN X(:, 2:3)];
   [r c] = size(X);
end
if c ~= 9
   X = [X ones(r, 9-c)*NaN]; 
   [r c] = size(X);
end
pitch = X(:,2);
roll = X(:,3);
temp = X(:,4);
depth = X(:,5);
pitch1230 = X(:,6);
roll1230 = X(:,7);
temp1230 = X(:,8);
depth1230 = X(:,9);

fig1    = figure;
set(fig1,'Name','Pitch and Roll of Surface Angle Sensors')
subplot(3,1,1)
pH(1)   = plot(X(:,1),pitch,'r');     % Pitch at Noon
hold on
pH(3)   = plot(X(:,1),pitch1230,'b');     % Pitch at 12:30
pH(2)   = plot(X(:,1),roll,'r:');    % Roll at Noon
pH(4)   = plot(X(:,1),roll1230,'b:');    % Roll at 12:30
legend('Pitch at Noon', 'Pitch at 12:30','Roll at Noon','Roll at 12:30',2)
%xlabel('Date')
ylabel('Angle (degrees)')
title('Pitch and Roll of Surface Angle Sensors')
%set(gca,'XLim',[min(X(:,1)) now])
if NumOfDays < 50
   dtick = 6;
else
   dtick = 3;
end
hold off
datetick('x',dtick)


%fig2 = figure;
subplot(3,1,2)
%set(fig2,'Name','Temperature and Depth of 20m PRR')
pH(1)   = plot(X(:,1),temp,'r');     % Temp at Noon
hold on
pH(2)   = plot(X(:,1),temp1230,'b');     % Temp at 12:30
legend('Temp at Noon','Temp at 12:30',0)
ylabel('Temp [C]')
%xlabel('Date')
%set(gca,'XLim',[min(X(:,1)) now])
if NumOfDays < 50
   dtick = 6;
else
   dtick = 3;
end
hold off
datetick('x',dtick)



subplot(3,1,3)
pH(1)   = plot(X(:,1),depth,'r');     % Depth at Noon
hold on
pH(2)   = plot(X(:,1),depth1230,'b');     % Depth at 12:30
legend('Depth at Noon','Depth at 12:30',0)
ylabel('Depth [m]');
xlabel('Date')
%set(gca,'XLim',[min(X(:,1)) now])
if NumOfDays < 50
   dtick = 6;
else
   dtick = 3;
end
hold off
datetick('x',dtick)
YLim = get(gca,'YLim');
if YLim(1) < 15
   YLim(1) = 15;
end
if YLim(2) > 33
   YLim(2) = 33;
end

set(gca,'YLim',sort(YLim));
setfontsize(7)

