1 function a = area_ellipse(wrfout)
2 % function a = area_ellipse(wrfout)
3 % function for comparing area and orientations
4 % of stellite data and model forecasts
6 % wrfout - string, path to wrfout file from wrf
8 % a struct with who knows what in it
10 [fire_name,save_name,prefix] = fire_choice()
12 w = read_wrfout_tign(wrfout);
13 red = subset_domain(w,1);
21 time_bounds = [red.start_datenum red.end_datenum];
22 p = sort_rsac_files(prefix);
23 if ~exist('g_ellipse.mat','file')
24 g = load_subset_detections(prefix,p,red,time_bounds,fig);
27 load_new = input_num('re-load detections from scratch? ',0,1);
29 g = load_subset_detections(prefix,p,red,time_bounds,fig);
37 %fite ellipse, plot results
39 e_data = detection_ellipse(g,red);
41 e_forecast = forecast_ellipse(red,t);
42 contour(red.fxlong,red.fxlat,red.tign,'k')
45 a.e_forecast = e_forecast;
47 eig_data = diag(a.e_data.d);
48 eig_forecast = diag(a.e_forecast.d);
49 eig_ratio = eig_forecast./eig_data;
51 fprintf('Forecast Area / Sat Area = %f \n',e_forecast.area/e_data.area);
52 fprintf('Forecast det / Sat det = %f \n',e_forecast.ellipse_area/e_data.ellipse_area);
53 fprintf('Forecast eigenvalues / Sat eignevalues %f %f \n',eig_ratio(1),eig_ratio(2));