A study of the thermal structure of the mesosphere and lower thermosphere