function ep_lookPco2(id, NumOfDays)
% EP1PCO2LOOK - Opens and plots the file \oasis\ep1\co2
%
% 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
FileName = 'co2';

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

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

% Read co2
X    = readeqpac(FileLoc, NumOfDays);

% Plot it
fig1 = figure;
set(fig1,'Name','delta pCO2')
plot(X(:,1),X(:,2));
ylabel('delta pCO2 [\muatm]');
xlabel('Date');
if NumOfDays < 50
   dtick = 6;
else
   dtick = 3;
end

datetick('x',dtick)

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

% Read co2.cal
Y    = readeqpac(FileLoc, NumOfDays);

% Make sure the data is monotonic
Y = sortrows(Y,1);
X = sortrows(X,1);

% Plot it
try
   CO = interp1(Y(:,1),Y(:,2),X(:,1));
catch
   CO = NaN*ones(size(X(:,1)));
end


CO = X(:,2) - CO;
hold on
plot(X(:,1), CO, 'r')
legend('pCO_2 (uncalibrated)','pCO_2 (calibrated)',0)
title(['pCO_2 at ' loc])

setfontsize(7)








