Temperature distribution tabulation implemented

This simple change accelerates the execution time of the script
by a factor of 2, in some naive tests.