1 function [ign_lons,ign_lats,ign_times] = ignitions(file)
3 % [ign_lons,ign_lats,ign_times] = ignitions(file)
6 % Prints the ingition coordinates and times from fire arrival time
9 % file matlab file with:
10 % fxlon,fxlat: lon-lat meshgrid
11 % Z: fire arrival time mesh
13 % Developed in Matlab 9.2.0.556344 (R2017a) on MACINTOSH.
14 % Angel Farguell (angel.farguell@gmail.com), 2019-04-09
15 %-------------------------------------------------------------------------
20 % compute local minima
22 LM(2:end-1,2:end-1)=max(min(A(3:end,1:end-2),min(A(1:end-2,3:end),min(A(3:end,3:end),min(A(1:end-2,1:end-2),min(A(1:end-2,2:end-1),min(A(3:end,2:end-1),min(A(2:end-1,1:end-2),A(2:end-1,3:end))))))))-A(2:end-1,2:end-1),0);
23 % find where local minima
25 % Longitudes, Latitudes, and Times
26 ign_lons = r.fxlon(ii)
27 ign_lats = r.fxlat(ii)
28 ign_time_num = A(ii)*double(r.tscale)+r.time_scale_num(1);
29 ign_times = datetime(ign_time_num,'ConvertFrom','epochtime','Epoch','1969-12-31 17:00:00')