Wind reconstruction algorithm for Viking Lander 1

The wind measurement sensors of Viking Lander 1 (VL1) were only fully operational for the first 45 sols of the mission. We have developed an algorithm for reconstructing the wind measurement data after the wind measurement sensor failures. The algorithm for wind reconstruction enables the processing of wind data during the complete VL1 mission. The heater element of the quadrant sensor, which provided auxiliary measurement for wind direction, failed during the 45th sol of the VL1 mission. Additionally, one of the wind sensors of VL1 broke down during sol 378. Regardless of the failures, it was still possible to reconstruct the wind measurement data, because the failed components of the sensors did not prevent the determination of the wind direction and speed, as some of the components of the wind measurement setup remained intact for the complete mission. This article concentrates on presenting the wind reconstruction algorithm and methods for validating the operation of the algorithm. The algorithm enables the reconstruction of wind measurements for the complete VL1 mission. The amount of available sols is extended from 350 to 2245 sols.


Introduction
The primary goal of the Viking Mission was to investigate the current or past existence of life on Mars. The Viking Lander's payload consisted of instruments designed for meteorological experiments, seismological measurements, and instruments for experiments on the composition of the atmosphere (Chamberlain et al., 1976;Soffen, 1977).

15
VL1 landed on Mars on 20.7.1976. The location of the landing spot was a low plain area named Chryse Planitia, which has a slope rising from south to west. The landing coordinates of VL1 were 22 • N, 48 • W (Soffen, 1977). VL1 operated for 2245 Martian sols, which is much longer than was expected (Soffen, 1977). Thus the data set produced is significant in size. The VL1 data set enables the study of various meteorological phenomena from diurnal variations to seasonal variations in temperature, pressure and wind direction, as well as wind speed.
The state of the wind measurements from the surface of Mars is quite poor, because the wind measurements of other missions to the surface of Mars have either failed or produced a shorter data set than that of VL1. After the Viking Mission there was a twenty year pause before the research on the surface of Mars was finally resumed. The Mars Pathfinder conducted wind measurements on the surface of Mars for 86 sols (Golombek et al., 1999), results of which are presented in (Schofield et al., 1997). The Mars Science Laboratory (MSL) can surpass the extent of the VL1 data set in year 2018, but the wind measurement 5 setup of the MSL is not fully functional due to hardware issues. Thus, the VL1 wind measurement data set remains the longest data set of wind measurements from the surface of Mars at least for the coming years.
This article focuses on the reconstruction of the VL1 wind measurements. The wind reconstruction algorithm is defined in Sec. 3 and the validation methods for the algorithm are presented in Sec. 4.1. The reconstructed data from the VL1 wind measurements is presented in Sec. 5.

10
The significance of this work lies in the fact that other missions on the surface of Mars have not yet succeeded to measure a data set equal to the size of that of VL1. Even though the VL1 landed on Mars 40 years ago, not all the data from the VL1 wind instruments have been analysed and published due to various complications that are described below.
2 Wind measurement setup and sensor malfunctions 2.1 Wind sensors 15 Viking Lander wind measurement setup consisted of two hot-film wind sensors and a quadrant sensor (Chamberlain et al., 1976). The hot-film wind sensors were designed to determine the wind velocity component normal to each of the sensors, and the quadrant sensor was designed to provide information about the wind direction and therefore solve the four-fold ambiguity of the normal components. (Chamberlain et al., 1976).
The wind sensor design is presented in Fig. 1. The hot film wind sensors were mounted at a 90 • angle with respect to each 20 other and the temperature of the films was maintained at 100 • C above the ambient gas temperature. The wind velocity normal to each hot-film sensor could be determined from the power required to maintain the overheat temperature against heat loss due to radiation and conduction. Assuming the wind velocity is a vector v from direction θ, as presented in Fig. 1, the perpendicular wind speed components v x and v y can be determined by v y = |v| sin (θ) (1) 25 v x = |v| cos(θ) There exists a four-fold ambiguity in the wind velocity measured by the two wind sensors. The ambiguity is caused by the wind sensors only measuring the wind velocity component normal to the sensor and it is resolved using the quadrant sensor. (Davey et al., 1973;Sutton et al., 1978) θ v Figure 1. Wind sensor design. The hot-films were mounted at the end of two separate holders, which were set perpendicular to each other. (Davey et al., 1973)

Quadrant sensor
The quadrant sensor was designed to provide a secondary measurement to solve the ambiguity in the wind direction. The design of the sensor is presented in Fig. 2. The operating principle of the sensor is based on locating the thermal wake of a heated vertical cylinder. The location of the wake is determined from the temperature distribution about the cylinder using four chromel-constantan thermocouples. These thermocouples were connected in series, and each pair measures the temperature 5 difference across the sensor due to the thermal wake (Davey et al., 1973;Sutton et al., 1978).

SANMET
The data used in the wind reconstruction algorithm is from NASA's Science Analysis of Meteorology (SANMET) program (Buehler, 1974). SANMET calculates the values of various meteorological quantities, such as wind speed, wind direction, temperature and pressure, from the voltage signals of the meteorology instruments. The operating principle and methods used 10 by SANMET program are presented in detail in (Buehler, 1974 (Hess et al., 1977)

VL1 sensor malfunctions
The heater element of the VL1 quadrant sensor was thought to be damaged during the 45th sol (Murphy et al., 1990;Hess et al., 1977). During the sol 46 there exists a sudden change in the behavior of the voltage values of the thermocouple pairs QS1 and QS2, which is shown in Fig. 3. When the quadrant sensor was functioning in the intended way, the voltage values of QS1 and QS2 varied between ±5.0 mV, but after the failure of the heater element the variation range of the voltages changed 5 to approximately ±0.5 mV.
After the failure of the quadrant sensor's heater element, the SANMET process for determining the wind direction was no longer fully reliable. Thus another method for obtaining the wind direction was required and therefore an algorithm for wind data reconstruction was developed. The algorithm assumes that both of the quadrant sensor thermocouples remained functional for the whole VL1 mission. Therefore the instrument can be used whenever the radiance of the Sun is strong enough to heat 10 the quadrant sensor's heater element to a significantly higher temperature than the ambient temperature.
In addition to the failure of the quadrant sensor's heater element, one of the two hot-film wind sensors of VL1 broke down during sols 377-378. The decay of the VL1 wind sensor 2 is illustrated in Fig. 4   In the second segment the reconstructed wind directions, determined using the Nusselt numbers of wind sensors, are used to calibrate the quadrant sensor voltages. The quadrant sensor thermocouple pairs continued working nominally after the heater element failure. The voltages observed by the thermocouples are only weaker and contain more noise, but they have the same 5 dynamic as during sols 1-45, when the heater element was intact. Sec. 3.5 presents a method for calibrating the quadrant sensor voltages with the reconstructed wind directions from sols 46-377.
After calibrating the voltages of the quadrant sensor, the wind directions can be solved for sol 377 and beyond. With the reconstructed wind direction and one stream of intact wind component data the wind speeds can be solved for sol 377 and onwards. The complete VL1 mission was reconstructed using the calibrated quadrant sensor signals, which were calibrated 10 using the Nusselt number wind direction estimates from segment one.

Calibration of the wind sensors
The wind direction can be obtained from the Nusselt numbers. This is because the Nusselt numbers are dependent of the wind components normal to the hot-film sensors. The first segment of the wind reconstruction algorithm relies on the assumption that the wind sensors get similar values for Nusselt numbers during the period of interest as during the sols 1-45. The values 15 of Nusselt numbers for both wind sensors were examined from arbitrary sols from the sol interval 46-377 of the VL1 mission.
The results from this spot check were encouraging as the Nusselt numbers of the wind sensors remained the same order of magnitude during the examined sols. The method of using the Nusselt numbers for estimating the wind direction was first studied by (Murphy et al., 1990). The method used here is similar to method used in (Murphy et al., 1990), but it contains less subjectivity in the process as the wind directions are not reconstructed mechanically by hand. 20 The reconstruction algorithm begins by computing first the calibration functions F i , for different wind velocity classes, from the Nusselt numbers Nu 1 and Nu 2 measured by the wind sensors. The calibration functions F i are defined the same way as in (Murphy et al., 1990): After calculating the values for F by Eq.
(3), they were binned into one degree sized bins. Then, a 12th order polynomials 25 were fitted to the binned values calculated with Eq.
(3). The equation for the calibration function F i was obtained from the fitting process. Various values for the order n of fitted polynomial were examined and the most functional value was determined to be n = 12. For this value of n, the mean absolute difference of the reconstructed angle, and the SANMET-provided "correct" angle from sols 1-45 was the smallest.
Because the Nusselt numbers depend on the wind velocity, the velocities were divided into four different velocity classes.

30
For each velocity class the calibration function was obtained using the method described earlier. Tab. 1 presents the different velocity classes for which the calibration functions F i were determined. The wind velocities, which were greater than 50 ms −1 ,  The coefficients a i of the polynomial were obtained from the calibration function fit. The roots θ i of Eq. (4) were used as candidate angles for wind direction. This set of angles usually contains either two-fold or four-fold ambiguity, which is resolved using either the quadrant sensor signals, or time continuity. It is possible that for a certain sample there are no roots for Eq. (4) of the calibration functions, therefore the candidate angles for wind direction can not be solved. In this situation an error value is placed as the value of the particular sample.   Fig. 10. The quadrant sensor thermocouple pair QS 1 has positive voltage values, when the wind is from TC-1 to TC-2. Respectively the thermocouple pair QS 2 has positive voltage values, when the wind is from TC-3 to TC-4.
The ambiguity of the wind direction is settled by selecting from the set of candidate angles the specific angle that is in the correct wind quadrant, as determined by the quadrant sensor voltages. If there are many candidate angles in the same wind 5 quadrant, the wind direction is arbitrarily selected to be the smallest angle from the set of candidate angles.
If the quadrant sensor voltages did not exceed the threshold value, time continuity is used for determining the wind direction.
Time continuity works as follows: the chosen candidate angle is the one nearest to the last determined angle, but only if the time difference between that one and the current one is less than one hour. This principle is sufficient when the elapsed time between the measurement samples is not too long, as wind often exhibits continuous behavior. However, if the time between 10 the two samples exceeds the threshold of one hour, the use of time continuity is likely not valid and in these cases the Dynamic Wind Table ( Figure 10. The orientation of VL1's wind sensor assembly, adapted from (Murphy et al., 1990). The degree coordinate axis refers to the Martian planetary directions. The abbreviations TC and WS stand for thermocouple and wind sensor respectively.

Dynamic Wind Table
Time continuity was used for approximately 60% of the reconstructed angles of VL1 during sols 46-377. DWT was developed to determine the wind direction when the use of time continuity was not possible. Notably, DWT is capable of taking into account the Mars' seasonal variations in wind direction.
DWT's was implemented using a hash table, with LLT in hours as the key. The value of the table is a queue containing the 5 mean value of the reconstructed angles for the corresponding hour. When reconstructing a new sol, new values for hourly mean wind direction were calculated and then added to the DWT's queue. DWT's queue for hourly mean wind direction will hold data at most from the last 10 reconstructed sols. The structure of the DWT is presented in Fig. 11.
When the use of time continuity was required due to the quadrant sensor voltages being too low, the time difference in hours between current sample and last measured sample was solved. If the time difference of samples is more than one hour, the 10 time value was used to obtain the mean wind direction of the hour from those of the last 10 sols where data from the hour in question was recorded. A maximum allowed rate of wind direction change was defined to prevent error values filling the DWT.
If the allowed rate of change is exceeded, the wind direction is not added to the DWT, thus preventing outliers from distorting the "correct" average values.

Bias correction of the quadrant sensor voltages 15
The bias corrections of the thermocouple pairs QS1 and QS2 do not stay constant during the VL1 mission. There exists a drift in both of the pairs' voltages. Therefore a diurnal bias correction for QS1 and QS2 is required to distinguish more reliably the The criterion for nighttime was defined to be that the sample is measured between 00:00-06:00 LLT, and the criterion for light wind conditions was that the wind velocity is less than 0.8 ms −1 . The voltage values of the samples, which meet these two criteria, were filtered from all the measured samples, and the diurnal mean values of voltages were calculated. A linear 5 fit was made to the calculated mean voltages to obtain the diurnal bias correction for those sols where the wind direction is reconstructed. The diurnal mean voltage values of the thermocouple pairs and linear fit are presented in Figs. 12 and 13. Even though the thermocouple pairs QS1 and QS2 are almost identical, the bias voltage of QS1 changed more during sols 46-377 than QS2 bias voltage.

10
In the second segment of the wind reconstruction algorithm, the recalibration of the quadrant sensor signals is required. For calibrating the voltages of the quadrant sensor, a second calibration function, called R, was defined as which is the ratio of the thermocouple voltages V QS 1 and V QS 2 . When the calibration function R is plotted as a function of wind direction, a tangential function is observed, as shown in Fig. 14  can not detect the wind flow from this direction. For fitting a tangential function into the R-data of the quadrant sensor the following model was used The fitting of Eq. (6) is a nonlinear optimization problem, for which the least-squares method (LSQ) was used. The task was to minimize the squared difference between data and the model values. The results of fitting Eq. (6) into the quadrant sensor 5 data is shown in Figs. 14 and 15. The fit in Fig. 15 is not as good as in Fig. 14, because in the data of Fig. 15 there exists artifacts caused by yet unknown reasons. In general the shape of the data in Fig. 15 seems similar to the data in Fig. 15. The values obtained for parameters A, B and C during sol intervals 1-45 and 46-376 are presented in Tab. 3. Table 3. The values of parameters A, B and C obtained from the LSQ-fits. of VL1 mission, it is assumed that the data for that period is correct and can be used as a reference for the comparison. The behaviour of the algorithm was tracked for every reconstructed sol, and data for the error analysis were gathered simultaneously with the reconstruction. The key indicator for the performance of the algorithm is the absolute difference between SANMET and reconstructed angles

5
The angle difference of Eq. (7) were calculated for every measurement sample of the reconstructed sols, and for each sol for the VL1 mission are shown in Fig. 18. The mean value of the mean of the angle differences is 12.8 • and the mean value of the standard deviations is 11.5 • . By visually inspecting Fig. 18 the means of the angle difference vary mostly in the range from 5 • to 15 • , which is quite reasonable variation for determining the correct point of compass for the Martian tides.
The reconstruction of wind direction is very accurate during the first 45 sols of VL1 mission. The reconstructed wind speed shows reasonable behaviour as the wind speed begin to increase after the sunrise around the seventh hour of LLT. The 5 standard deviations in the reconstructed wind speed are much larger compared to the SANMET wind speeds. In general, the hourly mean of the reconstructed wind speed is greater than the SANMET determined mean value. However, the SANMET determined mean value for wind speed sets in the error limit of the reconstructed wind speed in all hours, except 20 and 21. In  The method, how a particular measurement sample was determined, was also recorded during the reconstruction process.

10
In total of 45 VL1 sols were reconstructed for the analysis. During these sols 53,070 samples were measured. During the reconstruction process 52,570 samples (99.1%) were determined using the look-up table in Tab 2, 500 samples (0.9%) were obtained using time continuity. The look-up table was used for the majority of the time to determine the wind direction as there was no threshold value for voltage signals, because the signals were bias-corrected and assumed therefore to be correct. The situations, when time continuity was applied in the reconstruction process, occurred during nighttime hours (00:00-06:00), 15 when the Sun's radiation was not strong enough to heat the quadrant sensor. In Figs. 23, 24, the histograms of the mean difference of reconstructed and SANMET angles as well as the standard deviation of the angle difference are presented.

Slope winds of VL1 area
Another validation method for the reconstruction algorithm is based on the physical fact that there should exist slope winds in the reconstructed wind data. The VL1 landed on a slope rising to south and west. In this case the slope winds in VL1 20 18 Geosci. Instrum. Method. Data Syst. Discuss., doi:10.5194/gi-2016-41, 2017 Manuscript under review for journal Geosci. Instrum. Method. Data Syst.  observing the slope wind are a terrain sloping over a large area, strong diurnal temperature variations and weak ambient winds which are typical on Mars in summer (Savijärvi and Siili, 1993).

Reconstructed sols of VL1
The algorithm was used to reconstruct all available VL1 sols, and the results from the reconstruction are presented in this section. The statistical distribution of wind directions is shown in a histogram in Fig. 26, for studying the existence of slope winds in the VL1 area. In the figure the wind directions are divided into 10 degree sized bins. The distribution of the wind directions determined by SANMET is shown in Fig. 26 as a comparison with the reconstructed wind directions. The SANMET 5 method for determining the wind direction is not reliable, because it does not take into account the decay of the quadrant sensor heater element and likewise the failure of one of the wind sensors.
Two clear peaks are visible in Fig. 26 at the reconstructed wind directions. One peak is located between 80 • -120 • and the other is in interval 240 • -300 • . The peak, which is in the angle range 80 • -120 • is much sharper compared to the peak in range 240 • -300 • . The peak in range 240 • -300 • corresponds to the nocturnal wind, which is directed downslope and the peak in range 10 80 • -120 • is the daytime anabatic upslope wind.
Two arbitrarily selected sols from the VL1 mission are presented to illustrate the reconstructed wind measurements. The sols selected are 74 and 1408. The quadrant sensor of VL1 had failed before the sol 74 in Fig. 27, but both of the wind sensors were still intact. During the sol 1408, both the quadrant sensor heater and one of the hot-film wind sensors had already failed.
Thus the SANMET wind speed in Fig. 28 contains only erroneous values.

Summary and discussion
The article focused on developing an algorithm to reconstruct the wind measurements during the complete VL1 mission. VL1 performed wind direction and speed measurements on the surface of Mars for 2245 sols, thus the dataset produced by the wind reconstruction is significant in its size.
The wind measurement system of VL1 consisted of two orthogonal hot-film wind sensors and a quadrant sensor for solving 5 the ambiguity in wind direction. The quadrant sensor failed during sol 45 and one of the wind sensors broke down during sol 378, thus only one of these three instruments remained fully intact for the VL1 mission. However, with the algorithm described in this report, it was possible to reconstruct the wind measurements with a reasonable accuracy. The wind reconstruction was completed in two segments. In the first segment the quadrant sensor signals from sols 1-45 were used to calibrate Nusselt numbers of the hot-film wind sensors. The wind sensors were then used to estimate wind directions during sols 46-377. With the estimated wind directions the quadrant sensor was recalibrated and was then used to reconstruct all the wind directions from VL1 mission. The reconstruction of wind speed was also possible with one wind velocity component and the wind direction. The results from the reconstruction of the wind speeds are not always very reliable, 5 because the reconstruction of wind speed required both knowledge of the wind direction, and the wind velocity component from the nominally working wind sensor. The wind directions contain variable amounts of error between different sols. Therefore, the reconstruction quality of the wind speed is weaker for sols with more error in the wind direction.
The developed algorithm for wind reconstruction shows the presence of slope winds in the VL1 area. The precision of the algorithm compared to the data measured by fully functional VL1 wind measurement instruments is reasonable. On average 10 the mean of the absolute difference between wind direction was determined to be 12.8 • .
The new wind reconstruction algorithm developed in this article extends the amount of available sols of VL1 from 350 to 2245 sols. The reconstruction of wind measurement data enables the study of both short term phenomena, such as daily variations in wind conditions or dust devils, as well as the study of long term phenomena, such as the seasonal variations in Martian tides.