function ep_lookCtd(id, NumOfDays)
% EP_LOOKCTD - Opens the files \oasis\eqpac\ep1\temp.0m and plots the
% shutter operations
%
% Requires: READEQPAC

% Brian Schlining
% 29 Dec 1998

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

FileName = 'temp.0m';
% Set the path to the data file depending on what type of machine this function is run from
FileLoc = fullfile(getOasisPath, 'eqpac', id, FileName);

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

XLim = [now-NumOfDays now];

X       = readeqpac(FileLoc, NumOfDays);
fig1    = figure;
set(fig1,'Name','CTD at 0 m depth')
S       = salin_(X(:,3)/4.2914,X(:,2),0);
aH = plotyy(X(:,1),X(:,2),X(:,1),S);
set(fig1,'CurrentAxes',aH(1))
ylabel('Temperature [^oC]')
set(aH(1),'XTick',[]);
set(fig1,'CurrentAxes',aH(2))
ylabel('Salinity [psu]')
xlabel('Date')

title(['CTD at 0 m depth at ' loc])

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

datetick('x',dtick)


XLim = get(aH(2),'XLim');
set(aH(1),'XLim',XLim)
YLim = get(aH(2),'YLim');
if YLim(1) < 34.0
   YLim(1) = 34.0;
end
if YLim(2) > 36
   YLim(2) = 37;
end
set(aH(2),'YLim',YLim);
setfontsize(7)
