Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. Needs["PlotLegends`"]
  2.  
  3. b1BlSmall = {4.17891*^-1, 5.59816*^-1, 7.09626*^-1, 4.17891*^-1};
  4. b1BlLarge = {3.15389*^-1, 4.73084*^-1, 6.85972*^-1, 3.62698*^-1};
  5. b2BlSmall = {9.74949*^-1, 9.74949*^-1, 9.74949*^-1, 9.74949*^-1};
  6. b2BlLarge = {9.74949*^-1, 9.74949*^-1, 9.74949*^-1, 2.00000};
  7.  
  8. C2B = 2.0
  9. pftColor = {Green, Darker[Green], Darker[Darker[Green]], Magenta};
  10.  
  11. size2bl[dbh_,ipft_,a_:1,b_:1,c_:1]:=If[ipft!=4,[Piecewise] b1BlSmall[[ipft]]/C2B*dbh^b2BlSmall[[ipft]] dbh<dbhAdult[[ipft]]
  12. b1BlLarge[[ipft]]/C2B*dbh^b2BlLarge[[ipft]] True
  13.  
  14. ,[Piecewise] (a*b1BlSmall[[ipft]])/C2B*dbh^(b*b2BlSmall[[ipft]]) dbh<dbhAdult[[ipft]]
  15. (a*b1BlLarge[[ipft]])/C2B*dbh^(c*b2BlLarge[[ipft]]) True
  16. ];
  17.  
  18. putzbl[dbh_] := (0.0856*dbh^2 - 0.376)/C2B;
  19.  
  20. Manipulate[
  21. Grid[{{"short range","long range"},{
  22. Plot[{putzbl[dbh],Evaluate@Table[size2bl[dbh,ipft,a,b,c],{ipft,1,4}]},{dbh,0.0,11.0},PlotStyle->{Black,pftColor}],
  23. Plot[{putzbl[dbh],Evaluate@Table[size2bl[dbh,ipft,a,b,c],{ipft,1,4}]},{dbh,0.0,90.0},PlotStyle->{Black,pftColor}]}}],
  24. {{a,1.},0.8,1.2,Appearance->"Labeled"},{{b,1.},0.8,1.2,Appearance->"Labeled"},{{c,1.},0.8,1.2,Appearance->"Labeled"},FrameLabel->{{None,None},{None,"Leaf Biomass(DBH)"}}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement