10.6084/m9.figshare.3552657.v1 Timothy C. Bonebrake Timothy C. Bonebrake Curtis A. Deutsch Curtis A. Deutsch Supplement 1. Code developed to assess the effect of spatial heterogeneity on insect fitness as implemented in Matlab 7.10.0 (r2010a). Wiley 2016 biodiversity elevation insects climate change global warming tolerance thermal adaptation macrophysiology latitude macroecology Environmental Science Ecology 2016-08-09 11:42:43 Dataset https://wiley.figshare.com/articles/dataset/Supplement_1_Code_developed_to_assess_the_effect_of_spatial_heterogeneity_on_insect_fitness_as_implemented_in_Matlab_7_10_0_r2010a_/3552657 <h2>File List</h2><p> <a href="sigmascalculation.m">sigmascalculation.m</a> (md5: 0ca0d3b2c64beb60d104500b80ee45e0)<br> <a href="sigmasmodel.m">sigmasmodel.m</a> (md5: 8175827f0420a5f59f4d586b884697ad) </p><h2>Description</h2><p> The sigmascalculation.m and sigmasmodel.m files are code developed to assess the effect of spatial heterogeneity on insect fitness as implemented in Matlab 7.10.0 r2010a. A grid of temperature data is inputted into sigmascalculation.m and the code calculates spatial heterogeneity for each point on the grid (in this case, the grid is a half degree global grid). The sigmasmodel.m file inputs tave (average temperature), xt (seasonality or sigma_t), and sigmas (spatial heterogeneity or the result from sigmascalculation.m) to calculate physiology metrics ctmax (critical thermal maximum), ctmin (critical thermal minimum), and topt (thermal optimum). </p>