new file: ../femwind_run_fortran_rate_test.log
[wrf-fire-matlab.git] / vis3d / fire2struct.m
blob9f6ae789820df64cce7019a8fb0c5f89e7e9a2a7
1 function p=fire2struct(filename,timesteps)
2 % p=wrfatm2struct(filename)
3 % read WRF NetCDF file atmosphere mesh variables of interest as fields in p
4 % in: 
5 % filename    string, e.g. 'wrfout_d01_0001-01-01_00:00:00'
6 % timesteps   vector of integers; use [] for all
7 % out:
8 % p           structure with several arrays from WRF and few more 
9 if ~exist('timesteps','var'),
10     timesteps=[];
11 end
12 p=nc2struct(filename,{'UAH','VAH','UF','VF','ROS','LFN','R_0',...
13     'XLONG','XLAT','GRNHFX','FGRNHFX','FXLONG','FXLAT','Times'},...
14     {},timesteps);
15 for i=1:size(p.times,2), % make Times readable
16     times{i}=char(p.times(:,i)');
17 end
18 p.times=times;