function [time,Hs,Hl] = read_ec_upd(path, period)
warning off
z = dir([path 'nsa30qcecorE10*']);
Archive = [];
for i = 1:length(z)
    x = rd_netcdf([path z(i).name]);
    y = attribute_list([path z(i).name]);
    time = double(x.base_time)/60/60/24 + datenum([1970 1 1 0 0 0]) + double(x.time/60/60/24);
    % QC
    Hs = x.sensible_heat_flux;
    Hl = x.latent_heat_flux;
    QCs = x.qc_sensible_heat_flux;
    QCl = x.qc_latent_heat_flux;
    
    QCs(QCs > 0) = NaN;
    QCs(QCs == 0) = 1;
    
    QCl(QCl > 0) = NaN;
    QCl(QCl == 0) = 1;
    
    Hs = single(QCs).*Hs;
    Hl = single(QCl).*Hl;
    
    % accumulate
    Archive = [Archive; time double(Hs) double(Hl)];
end

Archive(Archive == - 9999) = NaN;
Archive(Archive(:,1) < datenum(period(1,:)) | Archive(:,1) > datenum(period(2,:))+ 1 - 30/24/60,:) = [];
clear mex

% interpret
time = Archive(:,1);
Hs = Archive(:,2);
Hl = Archive(:,3);
