Detecting Regime Transitions of the Nocturnal and Polar Near-Surface Temperature Inversion