function [s, idiel] = QCData(s, mission, gdata, QCtype)
% Provides several methods for QCing diel data. More methods can be added.
% Ben Werb 6/3/24

idiel = gdata.StartProf(mission):gdata.EndProf(mission); % QC from spreadsheet
if ismember(QCtype,'manualflag')
    QC = char(strsplit(char(gdata.QC(mission)),','));
    QC = str2num(QC)';
    idiel(QC) = [];
elseif ismember(QCtype,'AUTO')
    % Auto QC, maybe include 4?
    try
    s.pH25atm(s.pH25atm_QC ~= 0) = [];
    s.tc(s.tc_QC ~= 0) = [];
    s.psal(s.psal_QC ~= 0) = [];
    s.doxy(s.doxy_QC ~= 0) = [];
    s.pH25atm(s.pH25atm_QC ~= 0) = [];
    catch
        sprintf(['pH25atm size : ' num2str(size(s.pH25atm))...
            ', ph25atm QC size: ' num2str(size(s.pH25atm_QC))...
            ' , continuing w/o QC'])
    end
elseif ismemer(QCtype, 'none')
    
end
