Influence of synoptic conditions on stratification of the lower 800 m air layer over Moscow is studied on hourly data basis using routine sodar sounding during 7 months. We propose a technique for parallel analysis of pressure fields and geographic types of prevailing air masses (when the type can be determined unambiguously). The salient feature of the analysis is high discreteness in time up to 2-3 hours. This makes it possible to study short-time variations of temperature stratification in detail for the first time. The colder is the air mass, the more often thermal convection and surface inversions take place in warm and cold period of the year, respectively. However, surface inversions are observed rarely in cyclone rears in winter during the hours of air mass invasion. In summer, no synoptically caused distinctions in recurrence of surface inversions were detected. Elevated inversions are always observed more often in centers of anticyclones and at ridge axes; in cold period, they are observed in warm air masses too. Besides the main task of this study, some peculiarities in the air mass transformation over Moscow in different months of the year are discussed