1 function new_pts = fixpoints2grid(r,pts)
2 %function moves scattered points to closest locations on fire grid
4 % r, red,w -- struct comtaining fxlong,fxlat from a wrfout or
6 % pts nx2 matrix with rows [lat lon]
8 % new_pts - indices i,j for closest locations on the fire mesh
13 [new_pts(i,1),new_pts(i,2),new_pts(i,3),new_pts(i,4)] = fixpt(r,pts(i,1:2));