ts_readslice.R only prints variables info
[wrf-fire-matlab.git] / cycling / plot_full_sim.m
blob33d69c6d0b999a16e3dcf54c8b8c6d32aa12e232
1 function [ plotters ] = plot_full_sim(wrfout, ts )
2 % inputs:
3 %   wrfout - path to a wrfout file
4 %   ts - time_step in wrfout
5 %plots fire cone
7 [fire_name,save_name,prefix,perim] = fire_choice()
9 % fire_choice = input_num('which fire? Patch: [0], Camp: [1], Cougar: [3]',1);
10 cycle = input_num('Which cycle? ',0)
11 % if fire_choice == 1
12 %     fire_name = 'Camp fire';
13 %     save_name = 'camp';
14 %     prefix='../campTIFs/';
15 % elseif fire_choice == 0
16 %     fire_name = 'Patch Springs fire';
17 %     save_name = 'patch';
18 %     prefix='../TIFs/';
19 % else
20 %     fire_name = 'Cougar Creek fire';
21 %     save_name = 'cougar';
22 %     prefix = '../cougarTIFs/';
23 % end
25 fig_num = input_num('Figure number? ',113);
26 % make reduced structure
27 if exist('ts','var')
28     w = read_wrfout_tign(wrfout,ts);
29 else
30     w = read_wrfout_tign(wrfout);
31 end
32 % special case
33 %w = read_wrfout_tign(wrfout,'2013-08-17_07:00:00');
34 red = subset_domain(w);
37 % figures
38 fig.fig_map=0;
39 fig.fig_3d=0;
40 fig.fig_interp=0;
43 time_bounds = [red.start_datenum red.end_datenum];
44 p = sort_rsac_files(prefix);
45 if ~exist('g_full.mat','file')
46     g = load_subset_detections(prefix,p,red,time_bounds,fig);
47     save g_full.mat g
48 else
49     load g_full.mat
50 end
52 title_string = sprintf('%s , cycle %i',fire_name,cycle);
53 plot_state(fig_num,red,title_string,red.tign,g,time_bounds(1:2))
54 save_str = sprintf('%s_full_sim_cyc_%d',save_name,cycle)
55 savefig(save_str);
56 saveas(gcf,[save_str '.png']);
58 end