# On a Novel Approach to Correcting Temperature Dependencies in Magnetic Observatory Data
## 4 Temperature Correction of Data
### Data for February 2021
All the newly obtained information must be added to the spc.txt file as the line  
\"m2021-02; 2021-02-01 00:00:00; 2021-02-27 01:44:00; \(-\)0.9195; 0.1240\",  
where \"m\" stands for the manual localization mode. The manually set localization interval started from 1 February and was shown by the yellow segment in Figure 6. When going over 1 February, the merging with the January data must be ensured. For this purpose, the temperature correction of the January data was performed with the unified correlation coefficients \(a=-0.9195\) and \(b=0.1240\). As mentioned above, it was sufficient to correct only a fragment of the data starting from the last transition of \(a+bT\) through zero in January--i.e., for the interval from January 20 to February 1 (Figure 6). Once the spc.txt file was generated, it was used directly for temperature correction, including the recalculation of component variations, observed and daily baseline values, and then \(G\). The recalculation of variations at each time point \(t\) was done by including a \(VC(t)\) correction term into the standard calculation, which is derived as follows. If time moment \(t\) does not fall within the localization intervals presented in the spc.txt file, the variometer readings for that time moment are not corrected. For variometer readings falling in time into the localization interval \(i\), the \(VC(t)\) is calculated by the formula  
\[VC(t)=a_{i}+b_{i}T_{t}, \tag{5}\]  
where \(a_{i}\) and \(b_{i}\) are the correlation coefficients for the localization interval \(i\) and \(T_{t}\) is the temperature at time \(t\). Then, the vector length from the variometer readings at time \(t\) is calculated:  
\[VA(t)=\sqrt{Xv(t)^{2}+Yv(t)^{2}+Zv(t)^{2}}. \tag{6}\]  
Finally, the values \(X_{v}(t)\), \(Y_{v}(t)\), and \(Z_{v}(t)\) of the variometer readings at time \(t\) are corrected using the formulas  
\[Xv(t)^{*}=Xv(t)\bigg{(}1-\frac{VC(t)}{VA(t)}\bigg{)}, \tag{7}\]  
\[Yv(t)^{*}=Yv(t)\bigg{(}1-\frac{VC(t)}{VA(t)}\bigg{)}, \tag{8}\]  
\[Zv(t)^{*}=Zv(t)\bigg{(}1-\frac{VC(t)}{VA(t)}\bigg{)}. \tag{9}\]  
The updated values \(X_{v}(t)^{*}\), \(Y_{v}(t)^{*}\), and \(Z_{v}(t)^{*}\) are then used instead of the values \(X_{v}(t)\), \(Y_{v}(t)\), and \(Z_{v}(t)\) in the standard calculations of the observed and daily baseline values and \(G\). Figure 7 shows, in blue, the plot of \(G\) for February 2021 calculated from the corrected variometer readings taking into account the original baseline values. It still had a slight drift in the first half of the month, which was eliminated by recalculating the observed baseline values (in this case, from the absolute measurements made on February 3 and 11). Graph \(G\) for February 2021 derived from the fully corrected data is shown in orange in Figure 7.  
the _G-mean(G)_ plot for 1-8 June in Figure 8 (here, the plot was still biased from zero, as centered \(G\) variations with constant offsets were considered). The problem thus boiled down to adjusting the data in June after the jump. From 8 to 13 June, the temperature was kept constant (see the scale on the right in Figure 8), which did not require a temperature correction. The temperature correction from 13 June 2021 was complicated by the fact that in the second half of June, the graph \(a+bT\) (Figure 8) went upwards, deviating strongly from zero, and remained in this zone throughout July 2021. Figure 6.0 Correlation and localization in June 2021. Notations are the same as in Figure 6.1  
Figure 6.2 Plots \(G\) for February 2021 after correction of variometer readings (blue) and the subsequent correction of the baseline values (orange). The vertical lines indicate when the absolute measurements are made. Consequently, in this case, it was not possible to match the temperature corrections in June and July by analogy with the mechanism described above for the January-February data. This situation was among those in which the localization interval cannot be bound to the points of the \(a+bT\) transition through zero. In this case, the algorithm provided the following procedure.