1 function track_struct = track_fmc(f)
2 %compute some trens about fuels, winds, ROS, etc for a wrfout
4 % f - string, path to a wrfout file
6 % track_struct - matlab struct with information about the wrfout
8 t=nc2struct(f,{'Times'},{});
13 %fprintf('Time : %s \n',ts)
14 s = nc2struct(f,{'FMC_G','ROS','NFUEL_CAT','UF','VF','TIGN_G'},{},i);
15 fuel_mask = s.nfuel_cat ==2;
16 area(i) = sum(sum(s.tign_g<max(s.tign_g(:))));
17 avg_fmc(i) = mean(s.fmc_g(fuel_mask));
18 avg_ros(i) = mean(s.ros(s.ros>0));
19 step_time(i) = datenum(ts(i,:));
20 min_fmc(i) = min(s.fmc_g(fuel_mask));
21 %compute wind magnitude
22 wind_speed = sqrt(s.uf.^2+s.vf.^2);
23 %wind(i) = max(max(s.uf(:)),max(s.vf(:)));
24 wind(i) = max(wind_speed(:));
25 avg_wind(i) = mean(wind_speed(:));
27 %plot reults in days since start
28 %figure,plot(step_time-step_time(1),avg_fmc)
29 track_struct.avg_fmc = avg_fmc;
30 track_struct.step_time = step_time;
31 track_struct.avg_ros = avg_ros;
32 track_struct.min_fmc = min_fmc;
33 track_struct.wind = wind;
34 track_struct.avg_wind = avg_wind;
35 track_struct.area = area;