how does temperature inversion take place