function EF=efintrp(t,p);
% The data below are total production and ef ratios generated from the Laws model at the
% indicated temperatures. The units of production are mg N per cubic meter per day.
% This Matlab program calculates ef ratios as a function of total production and temperature.
% The two-dimensional interpolation is done using the program
% interp2. Note that the interpolation uses temperature and the log of total production as the two independent variables.
% FYI - The interpolated ef value is 0.3455 at a
% temperature of 19 degrees and total production of 10 mg N per cubic meter per day.
P=9:-1:-5;
P=2.^P;
P=log(P);
efm2=[.682 .684 .681 .68 .678 .674 .666 .654 .624 .563 .45 .288 .196 .139 .15];
ef0=[.684 .68 .68 .68 .679 .67 .664 .644 .6065 .533 .402 .2445 .1893 .1434 .159];
ef5=[.681 .684 .6815 .6797 .6736 .665 .645 .608 .539 .423 .27 .196 .145 .163 .177];
ef10=[.664 .674 .67 .663 .66 .639 .602 .538 .432 .291 .203 .146 .169 .178 .187];
ef15=[.447 .447 .46 .459 .458 .458 .462 .418 .301 .208 .148 .167 .177 .188 .19];
ef20=[.305 .307 .305 .306 .305 .312 .319 .284 .205 .154 .166 .178 .187 .19 .19];
ef25=[.203 .203 .203 .205 .208 .214 .228 .16 .1627 .16 .177 .188 .186 .186 .185];
ef30=[.1415 .144 .147 .154 .164 .183 .176 .161 .163 .177 .188 .189 .188 .181 .187];
ef35=[.129 .129 .135 .163 .178 .177 .158 .165 .178 .185 .188 .187 .186 .18 .182];
ef=[efm2' ef0' ef5' ef10' ef15' ef20' ef25' ef30' ef35'];
T=[-2 0 5 10 15 20 25 30 35];
EF=interp2(T,P,ef,t,log(p));