Supplement 1. Code developed to assess the effect of spatial heterogeneity on insect fitness as implemented in Matlab 7.10.0 (r2010a).
File List
sigmascalculation.m (md5: 0ca0d3b2c64beb60d104500b80ee45e0)
sigmasmodel.m (md5: 8175827f0420a5f59f4d586b884697ad)
Description
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).