A radio occultation experiment consists in the analysis of the perturbations induced by the atmosphere on an electromagnetic signal propagating through it. The most relevant phenomena that affect a radio signal passing through a medium are refraction and absorption. The bending effects on the signal associated with refraction are related to the refractive index of the atmosphere (i.e., its real part), which in turn is linked to the atmospheric mass density, pressure, and temperature. Refraction causes a Doppler frequency shift of the signal traversing the atmosphere. A time series of frequency Doppler shifts is processed to identify the bending effects and, therefore, the atmospheric thermodynamic profiles, that is, a series of values obtained as a function of the radial distance from the center of the planet.Several methodologies have been developed to process radio occultation data. An approach is based on ray-tracing algorithms, and it is well suited for oblate refractive environments, such as Jupiter (Lindal et al., 1981), Saturn (Schinder et al., 2015), and Neptune (Lindal, 1992). Radio occultations of terrestrial planets and icy moons of the Solar System have been processed under the assumption of spherical symmetry of their atmospheres. Fjeldbo et al. (1971) proposed this method to obtain a simplified geometry of the Abstract Among the techniques for atmospheric sounding, radio occultation enables an in depth investigation of vertical profiles from the ionosphere to the troposphere by measuring the radio frequency signal associated to the propagation medium. A precise characterization of the atmospheric layers requires a thorough processing of the raw radio tracking data to estimate the thermodynamic properties of the atmosphere and their related uncertainties. In this work, we present a method to retrieve refractivity, density, pressure, and temperature profiles with the associated uncertainties by analyzing a set of raw radio tracking data occulted by the atmosphere. This technique is also well suited to process two-way Doppler measurements that are not acquired during dedicated occultation campaigns. The NASA mission Mars Reconnaissance Orbiter (MRO) provided a significant amount of radio occultation data that were not planned for atmospheric sounding, but were caused by the spacecraft orbit geometry. Our analysis of one of these occultation profiles with the proposed method allows indicating that MRO occultation datasets provide crucial information regarding Mars' troposphere that can be used as input of general circulation models.Plain Language Summary A solid technique to investigate the structure of a celestial body atmosphere is based on the analysis of the signals induced by the properties of this medium on the spacecraft radio links that pass through the atmosphere during communications with the Earth. A thorough study of these measurements, that is, radio occultation, allows estimating the vertical profiles of atmospheric density, pressure, and temperature. We present here a method to retrieve t...