cp ts_smoke_by_xr.py ts_smoke.py
[wrf-fire-matlab.git] / vis3d / spread.m
blob78f64affe2aa07ffa1d0ae881edb7a90855f538a
1 function spread(p,v)
2 % spread(p,v)
3 % display fire spread in variable v of array of structures p
4 % p(i) needs to have fields v and times
5 % example:
6 %   w=wrfout file name
7 %   p=nc2struct(w,{'FIRE_AREA','Times'},{})
8 %   spread(p,'fire_area')
9     if ~exist('v','var')
10         v='fire_area';
11     end
12     for i=1:length(p),for j=1:size(p(i).fire_area,3)
13         contour(p(i).(v)(:,:,j))
14         title([v,' ',char(p(i).times(:,j)')],'interpreter','none')
15         colorbar
16         drawnow
17         pause(0.1)
18     end
19 end