1 function ts = choose_time_step(f)
2 %lists time steps in wrfout for user selection
3 %input : f - string, path to wrfout file
4 %output : ts - string, timestep
6 t=nc2struct(f,{'Times'},{}); nframes=size(t.times,2);
7 alltimes=char(t.times');
9 fprintf('%d : %s \n',i,alltimes(i,:))
11 in_t = input_num('Which step to use? ',nframes);
12 ts = alltimes(in_t,:);