function data = read_WHOI_buoy(dfl,ddd)
%{
Reads whitespace delimited, headerless text file of WHOI UOP buoy data

Assumes 19 columns with the following format:
year month day yday hr BPR ATMP SST WNDE WNDN HRH SWR LWR RN CND sal wnd_spd wnd_dir rain_rate

Returns N x 15 array of jd plus cols 6:19
%}

try
    raw = load(dfl);
    [r, c] = size(raw);
    data = NaN(r, 15);
    data(:,1) = raw(:,4) + double(raw(:,5)/24); % jd timestamp
    data(:,2:15) = raw(:,6:19);
    data(data==-999) = NaN;
    % reverse wind direction to meteorological standard
    data(:,14) = data(:,14) + 180;
    ii = find(data(:,14)>=360); data(ii,14) = data(ii,14) - 360;
catch % if dfl doesn't exist, return empty array
    disp(['Buoy file ',dfl(end-16:end),' not found']);
    data = NaN(24, 15);
    data(:,1) = ddd + (0:1:23)/24;
end;