A finite-difference model of temperatures and heat flow within a tree stem