fixing ndt boundary conditions tile and domain bounds, adding debug prints
[wrf-fire-matlab.git] / vis3d / check_ros.m
blob5dc0dc4187f6c552af2850590e595d6dd1b34406
1 function err=check_ros(fuel)
2 % err=check_ros(fuel)
3 % check relative error between fortran and matlab
4 % example: fuels; big(check_ros(fuel)) should return of order 1e-5
5 nfuels=length(fuel);
6 for k=1:nfuels
7     nwinds=length(fuel(k).wind);
8     for j=1:nwinds
9         speed=fuel(k).wind(j);
10         ros=fire_ros(fuel(k),speed,0);
11         err(k,j,1)=(fuel(k).ros_wind(j)-ros)/(ros+eps);
12     end
13     nslopes=length(fuel(k).slope);
14     for j=1:nslopes
15         tanphi=fuel(k).slope(j);
16         ros=fire_ros(fuel(k),0,tanphi);
17         err(k,j,2)=(fuel(k).ros_slope(j)-ros)/(ros+eps);
18     end
19 end