% This a Matlab script that calls the BAO sodar plotting
% function with the yesterday's date.

try
    cd('/home/dwelsh/src/Matlab');
    
    dd = clock;
    edn=datenum(dd(1),dd(2),dd(3),dd(4),dd(5),dd(6));
    dv=datevec(edn-1);    
    by = dv(1);
    bm = dv(2);
    bd = dv(3);
    ey = dv(1);
    em = dv(2);
    ed = dv(3);
    
    retval = BAOPLTsodar_loop_func(by,bm,bd,ey,em,ed);
    
catch ME
    dd = clock;
    fid = fopen( '/home/dwelsh/logs/bao_sodar_try.log','a');
    fprintf(fid,'%4d-%02d-%02d %02d:%02d:%02d %s\n',...
        dd(1),dd(2),dd(3),dd(4),dd(5),dd(6),ME.message);
    exit
end

exit

