1 function gd = ground_detects(red)
2 %function collects gound and water detections from fire product mask
3 %locations are interpolated to the grid
4 % red = subset_domain(w)
5 if exist('g_ground.mat','file')
17 wat_msk = g(i).data == 3;
18 lan_msk = g(i).data == 5;
19 wat_time = g(i).time*ones(sum(wat_msk),1);
20 lan_time = g(i).time*ones(sum(lan_msk),1);
21 water = [water;[g(i).lat(wat_msk),g(i).lon(wat_msk),wat_time]];
22 land= [land;[g(i).lat(lan_msk),g(i).lon(lan_msk),lan_time]];
24 land = [fixpoints2grid(red,land),land(:,3)];
25 water = [fixpoints2grid(red,water),water(:,3)];
26 land = unique(land,'rows');
27 water = unique(water,'rows');