
function met = load_M1_MET(buoy,dep)

%read cumulative file (don't bother reading daily file(s))
 data = read_M1_MET_full(buoy,dep);

%get rid of nonsense time values
 f = find( data(:,1)<datenum([1900 1 0]) | ...
   data(:,1)>now +30 ); %arbitrary 30 d from now
 data(f,:)=[];
 clear f;

%take unique time values only
 [~,i]=unique(data(:,1));
 data=data(i,:);
 clear i;

%sort by time (may not be nec)
 [~,i]=sort(data(:,1));
 data=data(i,:);
 clear i;

%assign to structure
 %data
  met.time = data(:,1);
  met.airTemp = data(:,2);
  met.hum = data(:,3);
  met.airPress = data(:,4) / 1000; %mbar to bar
  met.wSpd = data(:,5) * 0.514444; %knots to m/s
  met.wDir = data(:,6) - 13.29; %magnetic to T
  f = find(met.wDir < 0);
  met.wDir(f) = met.wDir(f) + 360;
 clear data f;
