Advances in Meteorology
Volume 2019 (2019), Article ID 4164097, 13 pages
https://doi.org/10.1155/2019/4164097

Research Article

Meteorological Temperature and Humidity Prediction from Fourier-Statistical Analysis of Hourly Data

Alejandro Castañeda-Miranda,1,2 M. de Icaza-Herrera,¹ and Víctor M. Castaño¹

¹Centro de Física Aplicada y Tecnología Avanzada, Universidad Nacional Autónoma de México, Boulevard Juriquilla 3001, Santiago de Querétaro, Querétaro 76230, Mexico
²Centro de Creatividad e Innovación 4.0, Universidad Tecnológica de Querétaro, Av. Pie de la Cuesta 2501, Colonia Unidad Nacional, Santiago de Querétaro, Querétaro 76148, Mexico

Correspondence should be addressed to Víctor M. Castaño; meneses@unam.mx

Received 23 January 2019; Revised 8 April 2019; Accepted 22 April 2019; Published 18 August 2019

Academic Editor: Harry D. Kambezidis

Copyright © 2019 Alejandro Castañeda-Miranda et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

The temperature readings for all the 365 days and the 24 hours may be fitted through a 3 × 3 matrix (the so-called T-matrix). The mean square deviation between this fit and the actual meteorological measurements is smaller than three degrees Celsius. Four entries of this (nonsymmetric) matrix may be fixed by other means, leaving only five independent components. However, the same method applied to the humidity measurements produces a larger mean square deviation. A strong stochastical connection is found between the T-temperature matrix and the U-humidity matrix. The computer program, in C, may be used to adjust a (2M + 1) × (2m + 1) matrix simply by changing the arguments at the command line and has been tested with m and M ranging from zero to 11 (eleven) (more than 24 readings per day are necessary for larger values of m). The physical meaning of these constants is given only in the case m = M = 1. Our results have also been connected to fundamental cosmological properties: Earth’s orbit, the ecliptic angle, and the latitude of Querétaro (or whatever geographical location is chosen). A separate program calculates the angular position of the Sun as measured in the sky of Querétaro, to determine the length of the day or the mean value of the solar cosine. This work introduces several new variables which happen to be stochastically connected.

1. Introduction

Statisticians must face problems at three different levels. The first one concerns the connection between meaningful statistical data and probability distributions. The second, first documented and discussed by Simon de Laplace [1] in his “Essai philosophique sur les probabilities,” is related somehow with “corrupted” data, due to some particular interest in influencing the facts. Examples may be found in medicine at all levels, whether in the accounts of pharmacological substances or reports on weight and shape of the body control, and even in surgery. Politics has also made contributions in this second level. The third is related with “accidentally” corrupted data: the operators do not endeavor to make careful readings because, on the average, the final results must be meaningful anyway. Currently, the solar radiation prediction proposes machine learning algorithms to predict the hourly solar irradiance [2], but the historical data are fundamental for a correct operation [3]. Additionally, the daily basis in spatial-temporal analysis uses single datasets that provide data for a certain region, valid for a certain time period [4]. Consequently, new and efficient methodologies are required, to be able to achieve the inference for nontrivial models within an affordable time [5], including embedded, distributed, and parallel computing of inferential processes and anomalies from global or local distributions [6]. Recently, the wind speed prediction using Wind Speed and Turbulence Intensity-based Recursive uses artificial neural network [7] but requires that the maximum time-resolution of turbulence intensity should be longer than the prediction interval [8]. Likewise, the temperature prediction uses the artificial neural network model and it was able to predict the indoor temperature [9], but the majority of previous studies applying either ambient or ground have tended to emphasize the structural improvement of individual forecasting models without considering the periodicity of data [10]. In this approach, annual average soil temperatures are determined by air temperature, solar radiance, wind speed, and relative humidity [11]. The objective of this paper is to provide the theoretical framework to meaningfully analyze data on temperature and humidity in general. Thus, the present work was carried out choosing the case of Querétaro as a particular example, but this model can be used in other sites, i.e., their approach is universal and may be applied to other sites as such. Therefore, this scheme for Fourier-statistical analysis of hourly data considers daily temperature variations as superposition of annual average temperatures prediction (long-term climate impact) and daily temperature amplitude predictions (short-term climate impact) for various climates on agricultural production [9] and for meteorological temperature and humidity prediction on environmental-scale applications. The results of this work are useful for establishing a solar energy research program, for the buildings and road construction industries, for agriculture, and for all those people whose work depends on weather.

2. Theoretical Considerations

2.1. Statistical Fit

The fitting principle is very simple; any place on the Earth is subjected to two types of physical conditions according to their predictability: the systematic type, as the flight of the Sun through the sky, which can be described to a high degree of accuracy, and the stochastic type related to physical conditions varying randomly day after day, such as the horizontal air transport (wind) coming from the oceans or from the polar circle and the precipitations, including phenomena such as the storms or tornados. The resultant weather depends thus on such superposition. The daily systematic changes should produce systematic variations in the weather variables, such as the temperature or the humidity, following an approximate periodical behavior. The objective of this paper is mainly related to the systematic part so that when we speak of “variables,” we really mean the causal part. In Section 3, we shall propose an operational definition of this “causal part” concerning the meteorological measurements of temperature and humidity. The Sun’s flight will be taken as causal. Since the variables are periodic (more precisely, approximately periodic, since the Sun’s trajectory along the sky is slightly different each 24 hr period) in time, they can be expanded in a Fourier series whose m-th partial sum is as follows:

where is the angular frequency in radians, is the frequency, and is the time period. We expect that for a small number , our m-order Fourier expansion, either on temperature or on humidity, can reproduce accurately the meteorological measurements. Our very first step was to write a computer program to calculate numerically, from the raw data, the Fourier coefficients and , defined by the usual Fourier integrals as follows:

where the time period is 24 hours. The program runs fast, and it is easy to obtain all the (2m + 1) coefficients. A similar analysis was made by Carson [12] in his pioneering work. We realized that a large amount of coefficients were necessary to obtain a good fit and decided to try a different method: to fit a “trigonometric polynomial” of a fixed degree m by the least-squares method, that is, to choose the coefficients and so that the squared distance between and the measured variable at time , added over all the measurements, is a minimum. This total distance is given by

where ni represents the number of measurements made to obtain the experimental pair (ti, Ti) and N is the total number of data. Normally, , but frequently, on holidays, the temperature or humidity measurement is lacking so that . If we are working with averaged numbers, over a period of a month, for example, ni is the number of experimental points used to establish the average value of Ti. The definition of is the standard deviation between the experimental data Ti and the “expected” . The following equations result from the condition of minimum and are represented by

From equations (6) and (7), we can constitute a system of 2m + 1 equations with 2m + 1 as the unknown variable and it may be written in the matrix form as follows:

where the matrix E is defined by

The inhomogeneous vector F is described by

And the vector C, corresponding to the Fourier coefficients to be fitted, is represented by

It is the solutions C to equation (8), obtained through Cramer’s rule, that will be tabulated in this work along with the corresponding value of the mean square deviation σ given by equation (5). There is an important difference between the least-squares approach, based on equations (6) and (7) and the first one, which employs the Fourier coefficients given by equations (2)–(4). Suppose that we have adjusted a trigonometric polynomial of degree m using the Fourier coefficients of the equations (2)–(4). If now a polynomial of degree m + 1 is desired, all we have to do is to calculate the Am + 1 and Bm + 1 coefficients using equations (2)–(4). On the contrary, if we have already fitted an m-degree trigonometric polynomial using equations (4) and (5) and a polynomial of degree m + 1 is desired, all the (2m + 1) + 1 coefficients must be calculated. A word of caution should be mentioned concerning the least-squares approach. The numbers of hourly readings averaged or not are always, at the most, 24. If the number 2m + 1 of coefficients fitted equals the number of readings, the trigonometric polynomial, although passing through all the experimental points, shows unacceptably strong variations of temperature or humidity. Smooth and acceptable variations are obtained only with small m numbers. Anyway, our physical interpretation will be restricted to m = 1.

2.2. Statistical Considerations

The hourly readings of temperature and humidity are sometimes subjected to important fluctuations along the day. Furthermore, as the readings of consecutive days, corresponding to the same time, are compared, more fluctuations may be revealed. It is a usual practice, however, to calculate monthly averages for each one of the 24 hrs. This procedure leads to a smooth variation, along the day, of both temperature and humidity, but has a drawback that only twelve averages are obtained for the whole year, one for each month, a fact that prevents us from obtaining a detailed variation along the whole year. Instead, we have defined an l-average, for l is a nonnegative integer. Let i stand for a i-th day of the year, 1 ≤ i ≤ 365. The l-average of temperature at time t for the i-th day, T (t, i, l), is the average of the temperature readings at time t corresponding to the days i − l, i − l + 1,…,i + l. Since our data are limited to the weather data of 1994, T (t, 365, 1) is the average calculated over those days whose numbers are 364, 365, and 366, that is, days with numbers 364, 365, and 1, the integer reduction modulo 365. Our programs receive directly the number l in the command line and their running time is not sensitive to the value chosen for l. We have found that l = 5 produces already smooth curves. The program may certainly be run with l = 0. For practical reasons, we shall not present our results concerning the Fourier coefficients and as they appear in equation (1), but in terms of and (in degrees) defined by

That is, according to

Our Fourier polynomials are thus given by

Table 1, because of space limitations, contains only the Fourier coefficients for the 15th day of each month with l = 15 and m = 0, 1, 2, and 3, with the corresponding values of the mean square deviation σ calculated from the year extension of equation (5). The σ values should be compared with the yearly average of temperature <T> = 18.3 C. There are several variables which measure the atmosphere’s water content. These are, for example, the two temperatures from the psychrometer (actual and dew temperatures), the humidity H deduced from the previous temperatures and connected with the wetting power of the atmosphere, the water-vapor density ρe, possibly the simplest to “understand,” ranging from 0.7 to 17.1 g/m³, and the water-vapor partial pressure pe whose values ranged from 0.95 to 23.85 mb (1 mb = 100 Pa) during 1994 in Querétaro. These last two variables are connected by the Clapeyron’s equation of state for ideal gases: , where T is the absolute temperature and is the molecular weight of water. The last variable, for reasons to be given below, seems to be the most useful variable. Table 2 gives the Fourier coefficients for the water pressure pe and for m = 0, 1, 2, and 3, with the corresponding values of the mean square deviation . The values should be compared with the yearly average of water-vapor pressure <pe> = 11.8 mb.

Table 1: Fourier parameters for the temperature T.

15th month
m = 0
m = 1
m = 2
m = 3

C₀
C₀
C₁
δ₁
C₀
C₁
δ₁
C₂
δ₂
C₀
C₁
δ₁
C₂
δ₂
C₃
δ₃

Jan
14.5
14.2
6.7
−123
14.3
6.6
−123
1.4
64
14.3
6.6
−123
1.4
64
0.1
147

Feb
17.2
16.9
7.1
−117
17.0
7.0
−117
1.5
64
17.0
7.0
−117
1.5
64
0.4
90

Mar
18.8
18.5
7.5
−123
18.6
7.4
−123
1.3
69
18.6
7.4
−123
1.3
69
0.4
89

Apr
20.1
20.4
6.6
−123
20.4
6.7
−123
1.2
52
20.3
6.7
−123
1.2
52
0.5
96

May
22.8
22.0
6.5
−129
22.0
6.5
−128
1.2
74
22.0
6.5
−128
1.2
72
0.3
73

Jun
19.6
19.2
5.2
−132
19.2
5.2
−131
1.2
74
19.2
5.2
−131
1.2
71
0.5
84

Jul
20.0
19.9
5.9
−131
19.9
5.9
−131
1.2
63
19.9
5.9
−131
1.2
63
0.4
79

Aug
19.1
18.8
5.1
−132
18.8
5.0
−132
1.2
58
18.8
5.0
−132
1.3
58
0.3
93

Sep
18.0
18.1
5.4
−131
18.2
5.4
−132
1.2
57
18.1
5.4
−132
1.2
57
0.4
100

Oct
17.7
17.6
6.1
−131
17.7
6.0
−132
1.3
57
17.7
6.0
−132
1.3
58
0.4
86

Nov
17.6
17.2
6.5
−133
17.1
6.5
−131
1.3
61
17.1
6.6
−131
1.3
60
0.2
64

Dec
16.8
16.4
7.1
−125
16.4
7.0
−124
1.5
59
16.4
7.0
−124
1.5
58
0.4
109

σ = 
4.65
1.63
1.45
1.43

The C coefficients are given in °C and the phase δ in degrees; m is the number of harmonics, and σ is the mean square deviation computed from equation (3).

Table 2: Fourier parameters for the water-vapor pressure pe.

15th month
m = 0
m = 1
m = 2
m = 3

C₀
C₀
C₁
δ₁
C₀
C₁
δ₁
C₂
δ₂
C₀
C₁
δ₁
C₂
δ₂
C₃
δ₃

Jan
9.3
9.2
1.5
163
9.3
1.5
164
0.3
−13
9.3
1.5
165
0.3
−16
0.3
−48

Feb
9.9
9.9
1.4
149
9.9
1.4
149
0.4
−17
9.9
1.4
149
0.4
−18
0.1
−2

Mar
10.4
10.5
2.1
146
10.5
2.1
146
0.5
−88
10.5
2.1
146
0.5
−89
0.3
−35

Apr
11.6
11.7
2.3
137
11.7
2.3
135
1.2
−81
11.7
2.3
135
1.2
−82
0.5
−11

May
13.0
13.4
2.6
111
13.4
2.5
114
1.1
−51
13.4
2.5
115
1.2
−54
0.6
−25

Jun
13.8
13.9
1.8
133
14.0
1.8
135
0.8
−34
14.0
1.7
135
0.8
−35
0.4
−95

Jul
12.8
13.0
3.0
136
13.0
3.0
137
1.0
−48
13.0
3.0
137
1.0
−49
0.3
−50

Aug
13.4
13.5
2.4
141
13.5
2.3
142
1.0
−18
13.5
2.3
143
1.0
−19
0.5
−108

Sep
12.5
12.5
2.7
146
12.5
2.7
147
0.7
−32
12.5
2.7
147
0.8
−32
0.3
−94

Oct
12.5
12.4
2.5
168
12.4
2.5
168
0.6
−31
12.4
2.5
169
0.7
−32
0.4
−102

Nov
10.5
10.7
2.7
151
10.7
2.7
153
0.7
−23
10.7
2.7
152
0.7
−26
0.4
−49

Dec
9.8
9.8
2.6
160
9.8
2.5
161
0.8
−14
9.8
2.5
161
0.8
−14
0.4
−99

σ = 
1.87
0.99
0.88
0.86

The C coefficients are given in mb and the phase δ in degrees; m is the number of harmonics, and σ is the mean square deviation computed from equation (3).

3. Materials and Methods

3.1. Fourier Fitting the Fourier Coefficients

After fitting a trigonometric polynomial of degree m, equation (14), to the meteorological data of each one of the 365 days, we obtain a matrix of size 365 × (2m + 1). Each one of its columns gives the daily variation along the year of the corresponding coefficient. The systematic part should repeat year after year, so that we can fit, for each one of the 2m + 1 columns, the 365 data by another trigonometric polynomial of degree M, obtaining 2M + 1 coefficients. The complete fit involves then a matrix (2M + 1) × (2m + 1). There is no problem in running the program on the data with large values of m and M, let us say, m = 10 and M = 20. In this case, the fit is better and the mean quadratic deviation decreases, but the physical meaning of each coefficient becomes darker: as bigger values of m and M are chosen, not only the systematic, but also the stochastic variations of weather are fitted. The limit on the number m mentioned at the end of Section 2 is not applicable to number M, since in this case, we have 365 data to be fitted. Tables 3 and 4 give these fitted matrices to the temperature and water-vapor pressure, for m = 0, 1, 2 and M = 0, 1, 2. The meaning of Tables 3 and 4 is as follows: let us suppose the Fourier expansion of the water-vapor pressure for the k-th day of the year corresponding to m = 1 is desired, that is described by

where , since the phase is given in degrees and the time t in seconds. According to Table 4, we can calculate , , and for M = 0, 1, 2. If we choose M = 1, we obtain

where . Table 4 also indicates that the mean square deviation between equation (15), obtained through equations (16)–(18), for k = 1, 2, 3,…, 365, and the whole set of measured pe values is .

Table 3: Yearly matrices T for m = 0, 1, 2 and M = 0, 1, 2.

m = 0
m = 1
m = 2

M = 0
18.58
σ = 5.0685
18.33 6.34 −127.8
σ = 2.6496
18.35
6.33 −127.3 1.31
σ = 2.5557
62.8

M = 1
18.58
2.46
159.6
σ = 4.7764
18.33 6.34 −127.8
2.41 0.97 6.5
160.2 36.8 45.2
σ = 1.9685
18.35 2.40 160.4
6.33 −127.3 1.31 0.98
6.5 0.17 37.5 46.5
−3.9
σ = 1.8374
62.8 6.3 130.3

M = 2
18.58
2.46
159.6
1.12
−121.4
σ = 4.7147
18.33 6.34 −127.8
2.41 0.97 6.5
160.2 36.8 45.2
1.17 0.22 2.5
−133.9 −115.8 110.8
σ = 1.7940
18.35 2.40 160.4 1.13 −136.5
6.33 −127.3 1.31 0.98
6.5 0.17 37.5 46.5
−3.9 0.28 1.6 0.09
−116.1 98.9 −18.8
σ = 1.6482
62.8 6.3 130.3 3.0 −29.0

Table 4: Yearly matrices pe for m = 0, 1, 2 and M = 0, 1, 2.

m = 0
m = 1
m = 2

M = 0
11.62
σ = 2.5020
11.70 2.32 145.1
σ = 1.9944
11.71
2.29 146.2 0.81 −38.5
σ = 1.9618

M = 1
11.62
2.08
−164.9
σ = 1.9745
11.70 2.32 145.1
2.16 0.42 18.8
−167.4 −128.1 −28.6
σ = 1.1984
11.71
2.17
−167.2
2.29 146.2 0.81 −38.5 0.40 18.2
0.24 27.7 −128.4 −29.5 168.6
−62.1
σ = 1.1221

M = 2
11.62
2.08
−164.9
0.30
−151.1
σ = 1.9643
11.70 2.32 145.1
2.16 0.42 18.8
−167.4 −128.1 −28.6
0.31 0.31 5.4
−130.2 −122.0 79.4
σ = 1.1616
11.71
2.17
−167.2
0.30
−130.8
2.29 146.2 0.81 −38.5 0.40
18.2 0.24 27.7 −128.4 −29.5
168.6 −62.1 0.32 4.9 0.16
17.7 −125.2 66.7 −95.2 10.4
σ = 1.0751

3.2. Thermodynamical Interpretation

In this section, the analysis of our statistical results concerning temperature and humidity, both as daily and yearly functions, is studied in connection to the motion of the Sun along the sky of Querétaro. As we have previously stated, we are interested in the causal part of our variables. It is known [13] that the temperature of the atmosphere decreases as a function of altitude up to the tropopause where the temperature has a minimum. We are interested in a vertical column of atmosphere, of unit cross section, lying above the surface and whose upper bound is approximately at an altitude of some 20 km, slightly above the tropopause, which is located at a height of about 17 km in the tropics [13]. A small fraction of the atmosphere lies above 20 km since the pressure at such height is 0.06 atm [14]. The first law of thermodynamics “for any infinitesimal change” according to Planck [15] is as follows:

where Q stands for the heat added to the system and W for the work done on the system. As a first approximation, we assume that, on average, equal quantities of air, in the same thermodynamic state, enter to and exit from our system so that the system is closed. We also assume that W = 0 since the work done on the system involves the pressure at the top, high above the tropopause, where the pressure is very low. We will also include in our system a layer of the ground below the surface, whose thickness is to be determined, on which no work is performed, either.

3.3. Heat Input Balance

The heat added to our system has its main source from the radiated heat by the Sun while going through the sky of Querétaro. The heat radiated by our system to the outer space, due to its temperature, the so-called “radiation at long wavelengths,” is a negative contribution. We shall assume in this approximation that the thermal loss may be completely accounted for by the Stefan–Boltzmann radiation law. The results will show to what extent is this hypothesis valid. The solar radiation intensity at the top of the atmosphere is given by the so-called solar constant Sco = 1360 W/m². This is an average value, for not only the solar activity is continuously changing [16] (neglected in this work), but also the distance between the Earth and the Sun varies, and with it, the intensity, which goes as the square of the inverse distance. In the following , t is the time along the year. Let us write for the zenith angle, that is, the angle between the zenith and the unit vector locating the position of the Sun in the sky of Querétaro at time t. The total power from the Sun is given by

where α ∈ <0, 1>, the so-called albedo, represents the fraction from the solar radiation intensity which is reflected back by the Earth’s atmosphere. However, 1 − α should not be confused with the absorptivity [17] defined for a system submitted to black body radiation, mainly because the solar radiation at the Earth is not isotropic. It is known that the atmosphere absorbs a small amount from the solar energy, being essentially transparent, so that the main absorption occurs at the ground [18, 19]. The clouds, on the other side [19], increase the reflectivity of the atmosphere and, in this way, increase the value of our α parameter.

3.4. Earth’s Translational and Rotational Motion

The Earth moves along an elliptical orbit whose eccentricity is e = 0.01678 [20], with a variable orbital speed, complying with Kepler’s law of equal areas in equal times. However, this ellipse is not fixed but rotates slowly: its big axis, called apsis, advances 11 seconds of arc each year. The direction of this apsis is given by the directed vector from the Sun to the perihelion of the Earth’s orbit. The Earth rotates around the poles axis with a constant angular velocity [21]. The direction of this axis may be given with respect to the orbit of the Earth so that two angles are necessary. The first angle, ϑ, is measured from this direction to that perpendicular to the orbit. According to Baize [20], we have ϑ = 23°26″40.62″″, whose time variation gives rise to the nutation of the Earth (neglected in this work). The second angle, ϕ, connected with the projection of this direction along the plane of the orbit—the line of solstices—whose time variation produces the so-called precession of the equinoxes, is specified by recording the angle between the winter solstice and the perihelion. According to Baize [20], ϕ = 10°20″15.18″″ and ϕ = 50.26″″ per year. The town of Querétaro extends from 20°30″ to 20°54″ of north latitude and from 100°17″ to 100°36″ of west longitude. We have taken average values for these angles, 20.7 for the (north) latitude and 100.44 for the (west) longitude. The longitude is used in this work only to connect the civil time, used to record the meteorological variables, with the solar time.

3.5. Heat Output

The emitted power, that is, the thermal loss per unit time, may be written as

We are not assuming the ground to behave as a gray body [16, 22, 23] so that 1 − β is not the corresponding emissivity. If the temperature of the ground is T, it certainly emits thermal radiation whose intensity is given by , but it also receives thermal radiation from the atmosphere, whose temperature changes continuously with height. Such an exchange of heat, being interior to our system (ground plus atmosphere), gives a null contribution. The approximation behind equation (21) is that the temperature T of the ground is a parameter identifying the thermodynamic state of our system. If β stands for the probability of an emitted photon to be reabsorbed, 1 − β should represent the probability of it going to the outer space. Equation (21) is an average of all these thermal losses from our system to the outer space. Since water vapor absorbs strong radiation at those wavelengths associated with the Earth’s temperature [13, 18, 19, 24–27], our β, connected with the probability of being absorbed by the atmosphere, is also related with the atmosphere’s absorptivity. An important difference between α and β is that the first one is connected with short wave length coming from the Sun, corresponding to the Sun’s temperature of 5985 K [24], while the second with the long wave length radiation from the Earth. Clear days should be connected with small values of α and β while the cloudy ones with the opposite. The total heat input per unit time is given by the sum of equations (20) and (21), obtained as follows:

The time-integral of equation (22) corresponding to a very long period of time should vanish since, on average, our system radiates as much energy as it receives. Failure to fulfill this requirement should warm up or cool down the Earth, which is contrary to the constant values of temperature averages. α and β are functions of the time t but will be, in the sequel, substituted each by the appropriate average. As a first approximation, we shall suppose that such time-integral, extended to the time duration of any day, vanishes:

The time-integral of equation (23), corresponding to a very long period of time should vanish since, on average, our system radiates as much energy as it receives. Failure to fulfill this requirement should warm up or cool down the Earth, which is contrary to the constant values of temperature averages. α and β are functions of the time t but will be, in the sequel, substituted each by the appropriate average. As a first approximation, we shall suppose that such time-integral, extended to the time duration of any day, vanishes:

where τ = 86400 s is the time duration of a day. It follows

where the above equation follows from a Fourier expansion of and of in the form given by equation (15): is the C₀ coefficient for and (R for “radiation”), that for . The ratio γ given by equation (25) is shown in Figure 1. The most striking fact is that α and β are approximately equal since this ratio varies around γ = 1. There is a sharp maximum around day number 349, with γ = 1.38, and a flat minimum around day number 173 with γ = 0.90. Since we expect α and β to increase with the water-vapor content in the atmosphere, which has its maximum value around day number 170 and its minimum value at the beginning or end of the year, we see that α increases more rapidly than β. The and coefficients may be approximated by the corresponding daily averages of cos[θ₀(t)] and of T⁴(t). According to equation (25), γ depends on the ratio of two quantities which may be obtained easily. Figure 1 states clearly that the ratio, in the sense of equation (25), of the recorded temperatures (numerator) to the available solar energy (denominator) is large in winter or small in summer. These facts are consistent with a positive (negative) heat input in winter (summer). However, the main wind transport in winter and summer is in the east-west direction, and the wind component along the south-north direction is small and alternates along the day. To account for these differences, we must accept that the air, coming from equal latitudes, is warmer in winter and colder in summer. In Figure 1, the plot of equation (25) asserts that temperatures are low in summer, and this is true because of the rains and of the clouds covering the sky, thus preventing the temperature to increase. Our meteorological data concerning the clouds are scarce: For each month, the number no of overcast days, nh of half-overcast days, and nc of clear days are tabulated. For Tables 1 and 2, we plotted nc(i) + (3/4)nh(i)  + (1/2)no and obtained a figure similar to Figure 1, where we have chosen the ratios 1, 3/4, and 1/2 arbitrarily. This fact may be considered in the opposite sense: γ⁻¹ could be used as an objective measure of cloudiness. We shall return to this problem as follows.

Figure 1: β fluctuates around a fixed value by large values of α obtained in winter.

3.6. Internal Energy Us of the Ground

The solar heating of the ground rises its temperature, rising also the temperature below the surface. The heat propagates first downwards, warming the lower layers, and then upwards, during the night. The temperature of the ground as a function of time and depth may be denoted by T(y, t), where the ground corresponds to the negative values of y and the boundary between the ground and the atmosphere to y = 0. Joseph Fourier discovered “Fourier analysis” precisely working with heat problems in 1807 [28], and his book “La Theorie Analytique de la Chaleur” includes interesting geophysical problems as the discussion of “the terrestrial temperatures” or the penetration depth of the temperature changes. The French Academy rejected for 17 years the publication of Fourier’s work in the Memoires of Academie des Sciences, and finally in 1824, Fourier, already Secretary of the Academy, published in those Memoires [29] his work, in the same form as had been subjected in 1811. To determine T (y, t), we assume that the ground temperature satisfies the Fourier law of temperature diffusion [28, 30] and is represented by

where χ is the thermal conductivity of the ground, ρs is its density, and cvs is its constant-volume specific heat. We suppose the surface temperature of the ground to vary as a Fourier harmonic as

The temperature distribution should also satisfy the condition as follows:

The solution to equation (26) satisfying equations (27) and (28) is given by

where from equation (29), we obtain

Since heat equation (26) is a linear differential equation, for a surface temperature given by a Fourier series as in equation (1), with terms corresponding to frequencies ω, 2ω, 3ω,…, the temperature distribution in the ground should be given by the sum of the corresponding terms, having each one the form of equation (29). Let us stand for the specific internal energy of the ground. From the first law of thermodynamics, equation (19), we have

We assume the ground to be rigid so that the work done on it is neglectable. The added heat Q may be written in terms of the constant-volume specific heat cvs to have

where dT is the infinitesimal temperature change. Assuming cvs to be constant along the small interval of ground temperature changes, the energy Us is given by Us = cvsT, where we have placed the integration additive constant equal to zero. The total energy of the ground, corresponding to the n-th harmonic, may be written as follows:

where we have used equations (29)–(32) to calculate the integral. If the surface temperature has several harmonics, the internal energy of the ground will be a sum of terms having the form of equation (33), one for each harmonic. Carson [12] has verified the validity of the heat equation concerning the space-time distribution of temperatures, equation (26), and the Fourier decomposition of the solution, although he has pointed out that small deviations were observed near the ground surface. We assume that these deviations are neglectable.

4. Results and Discussion

4.1. Thermal State of the Atmosphere

According to [24], the chemical composition of the atmospheric air is approximately fixed for the first 100 km, that is, there is a fixed proportion of chemical species. The more abundant ones are nitrogen (N₂), oxygen (O₂), and argon (Ar). There are also gases with varying proportions such as the water vapor (H₂O) and carbon dioxide (CO₂). From the thermodynamic point of view, this means that the thermodynamic state at each point in the atmosphere may be determined by giving two thermodynamic variables, which we chose to be the absolute temperature T and the pressure (water also requires the proportion of vapor, liquid, and solid). Our first attempt to obtain the internal energy of the atmosphere depended on the barometric equation (33) and the adiabatic convection model for the temperature of the atmosphere [13] which establishes a connection between pressure and temperature. From this, a given ground surface temperature was sufficient to calculate the vertical profiles of pressure and temperature. The internal energy is obtained from a simple calculation. However, to follow the daily variations of temperature, neglecting even the radiated heat, the equations required the Sun to deliver 6 times more energy than ours. We realized that our model submitted the atmosphere to a uniform temperature shift as an instantaneous response at all heights. For this reason, we sought a temperature distribution propagating upwards, whose amplitude is a decreasing function of height. Let Ta(y, t) be the temperature of the atmosphere at altitude y and time t. We assume that its average Tp(y) with respect to time is the mean temperature as function of height reported by meteorologists and that corresponds to the so-called lapses rate. We may thus write Ta(y, t) as

where T(y, t) is connected with the daily oscillation of temperature produced by the Sun and transmitted through the atmosphere mainly by convection. The temperature distribution given by equation (34) should reduce at the surface of the ground to equation (27) and satisfy a limiting condition similar to that imposed by equation (28) and is represented by

The temperature changes at the surface of the ground should propagate upwards, to the atmosphere, and, although having pretty complicated details because of the convection-like transport, should have, in the average, a simple space-time behavior. For this reason, we assume that Ta(y, t) may be written as:

This temperature distribution, having the same form as equation (29), satisfies the imposed conditions. However, in the preceding case, the yn was connected with known thermal properties by means of equation (30). There is no such connection in this case, although we still assume that Yn = Y₁/√n. The physical interpretation of Yn is simple: it is the height in the atmosphere where the temperature oscillation equals the oscillation at the ground surface times exp(−1). If equation (31) proves to be useful, Yn becomes an interesting parameter since it measures the thickness of the lower atmosphere which is submitted to the daily temperature variations. Concerning the atmospheric pressure we shall assume that its logarithm is a linear function of height. This assumption is not only consistent with the table published by Petterssen [13] or that by Battan [18], taken from reference [14], but also physically acceptable as follows:

We have obtained the slope µ = 1.445 × 10⁻⁴ m⁻¹ by fitting a least-squares straight line to the data published by Battan [28]. The equations (36) and (37) allow us to calculate the internal energy Ua of the atmosphere. The pressure changes along the column are given by the barometric equation defined by

Since the largest atmospheric pressures are close to 1 atm, we can take Clapeyron’s equation of state for ideal gases defined by

where p is the pressure, ρ is the density, R is the gas constant, T is the temperature and is the molar mass of the gas. Substituting the density ρ from equation (38) in the barometric equation (39), we obtain

Comparing equations (37) and (40), we obtain µ as follows:

4.2. Internal Energy Ua of the Atmosphere

Since the energy per unit volume is ρcvT, the total energy Ua in the atmosphere is given by

This integral may be evaluated readily after substituting p(y) from equation (37) and Ta(y, t) given by equation (36). The result is

Assume that the argument of angle is . The total energy of the atmosphere, in this first approximation, is the sum of an average energy, given by the first term of equation (43) and a perturbation produced by the daily solar heating, given by the second. The time derivative fn(t) of the sum of equations (33) and (43) is

Finally, if the surface temperature of the ground is given by a Fourier expansion, written as equation (14), the first law of thermodynamics for our system may be written by equating equation (23) to the sum of the corresponding terms given by equation (44); the result is

where it involves three unknown parameters: α, β, and Y₁. We shall not try to write equation (45) for a choice of three different times t1, t2, and t3 and solve the system since the results would depend strongly in that choice. Rather, we consider the right hand side of equation (45) as a given function of α and β, as stressed by equation (23) and choose the values of these parameters so that the distance between and f is defined by

The equation (46) is a minimum. Here, τ is the time duration of a day and is given by τ = b − a, according to equation (1). This definition allows the use of Fourier methods to solve this problem. In fact, let the mathematical rule associated , the scalar product between any two integrals functions, be defined by

It follows that . Our object is to determine α and β so that for a given value of Y₁, the squared distance given by equation (46) is a minimum. Equating to zero the derivatives of d² with respect to α and β, we obtain

Since and , the system of equation (48) may be written as

where . The determination of α and β depends on the calculation of the five different scalar products appearing in equation (49), a very simple problem if we have Fourier expansions, in the form given by equation (1), for , , and f(t). In fact, if Φ(1) and Φ(2) are Fourier expansions of two different functions, their scalar product is given by

After writing equation (44) in the form of equation (1), it follows that the Fourier expansion of f(t) depends on that of T(t). To obtain expansion of T⁴, the temperature entries originally given in °C are transformed into absolute temperatures and squared twice, and from these data, the Fourier coefficients were determined. Finally, is calculated from our program. Equation (50) enables us to obtain α and β for each day of the year. Since we do not know the value of Y₁, we should run our programs for different values and then choose the one which seems to give the best results. It is true that Y₁ is a parameter in equation (46) and that we could also obtain its value by equating the derivative of d² with respect to Y₁ to zero. However, the Y₁ should be chosen so that the resulting albedo α values are acceptable. We wrote our program to determine α and β and also the distance d(α, β) given by equation (46) for a given value of Y₁. From the tabulated values, a second program determined the year average of these three variables, determining also their maxima and minima and the day of their occurrence. These two programs were iterated for 1000 different values of Y₁, ranging from 10 to 20,000 m. The list of Y₁ values was chosen so that the ratio of one Y₁ value to the preceding one was a constant, that is, Y₁(n) = const × qn. Concerning y₁, defined through equation (30), we took the values of ρscvs and χs/ρscvs published by Petterssen [13]: ρscvs = 0.4 Cal/K·cm² and χs/ρscvs = 0.01 cm²/s, which correspond to y₁ = 16.6 cm. The resulting values of 1 − α(i) and 1 − β(i), where i is the day number, are increasing functions of Y₁. Their behavior as a function of the i, for the different tested values of Y₁, is qualitatively the same: β fluctuates around a fixed value, without showing a clear fixed tendency, as shown in Figure 2.

Figure 2: β fluctuates around a fixed value (gamma ratio).

In Figure 2, while α, on the contrary, begins the year with high values, decreasing steadily and reaching a minimum by the middle of the year, when it begins to increase up to the end of the year. If we accept that β fluctuates around a fixed value, then the large values of α obtained in winter are independent of our thermodynamic model developed in previous sections since they were already apparent in Figure 1.

The ratio , of the root mean square deviation of 1 − α to average, ranges from 0.21 to 0.22 when the height Y₁ ranges from 700 to 3000 m. A particularly striking feature is that α ≈ ß for approximately 200 days, a fact consistent with the previous figure where we plotted their ratio γ(i). As we analyzed the results corresponding to the list of values for Y₁, we remarked that neither the distance d(α, β) given by equation (46) nor the mean square deviation σ(α) were sensitive functions to choose a good value of Y₁. The criterion finally adopted is as follows: the total fraction of energy reflected by the Earth, the albedo, is, in a first approximation, the sum of that reflected by the ground plus that by the clouds. The first one, for a north latitude of 20° according to Kung et al. [31], is αg = 0.158. The clouds contribution is variable and ranges, according to Houghton, from 0.05 to 0.85 [16, 33] although he gives average values from 0.3 to 0.7. We have chosen Y₁ so that the smallest albedo is α = 0.158. This choice leads us to Y₁ = 908 m. The following results were obtained with Y₁ = 900 m:  = 0.536 and σ(1 − α) = 0.115, while the corresponding values for β are as follows: 1 − β = 0.493 and σ(1 − β) = 0.061. That the root means square deviation of β is smaller than that of α confirms the lack of a clear tendency of its yearly variation, fluctuating around an average value, as compared with the previously noted yearly behavior of α with next assumptions listed as follows:

(1)The thickness of the lower layer of the atmosphere submitted to the daily heating is Y₁ = 900 m. The meaning of this value is as fllows: if the Fourier C₁ coefficient, giving the lowest-order daily variation of temperature is six degrees, that is, if C₁ = 6°C, then the Fourier coefficient C₁(y), according to equation (36), for the coefficient of daily temperature variation at y = Y₁ m is ≈ C₁ × exp(−1) 2°.(2)For the ground, this distance is 16.6 cm, with a similar meaning.(3)The daily energy change of the atmosphere is ♣(4)The corresponding daily change for the ground is ♣(5)The largest heat input, possibly due to the wind transport, is approximately ♣(6)The mean quadratic distance between f(t) and is of the order of 0.12 × (1 − α) × Sco × τ. ♣

Here, α, the albedo, is connected with the clouds and β, related to the probability of reabsorption, is also connected with the water amount in the atmosphere. Up to this point, we have chosen α and β as constants along the day, but they should depend on the water amount of the atmosphere. The partial pressure pe of the water vapor is, at least in principle, related to the amount of water lying above us. α and β should increase with increasing pe. We are interested now in determining new and β such that

We can determine pe(t) from the temperature and humidity readings and then fit Fourier polynomials [24–28] and determine again the value of these parameters by least squares. The plot of and β shows again that and β take essentially the same values for the summer days but that takes very small values, and even negative ones, in winter.

5. Conclusions

This paper presents a tool of Fourier-statistical analysis that has been used in a meteorological behavior for understanding the predicted values of temperature and humidity concerning the hourly data. Although we have defined γ as a consequence of our equation (24), we can still keep that definition even if the supposed equilibrium hypothesis is false. However, our results are consistent with χs/ρscvs = 0.0022 cm²/s and so they are closer to those reported by Carson [12]. Carson reports 40 different results concerning χs/ρscvs and points that 6 of them are connected with results which deviate from the others. The average of his other 34 measurements is χs/ρscvs = 0.53 cm²/s [33–38]. It is expected that this work will be useful for people who are interested in studying and researching meteorological temperature and humidity prediction from Fourier-statistical analysis of hourly data. In the performed study, the Fourier analysis can theoretically and practically analyze the data processed, where the length of time—years or just a year’s—data would determine the wanted coefficients. However, from just a year’s data, we can reach the average trend and isolate the stochastic part of the variables, i.e., the Fourier-statistical analysis is not considered for not being periodic and for the following events: the environmental disturbances induced by men, the natural disasters, the climate change, the ecological processes (the transformation of natural habitats into agricultural and urban land), and biodiversity loss, among others. This study shows that meteorological historical sequences may be employed for the training of neural networks with some predictability capabilities [7–10]. Furthermore, the key features of meteorological temperature and humidity behavior are investigated by this technique.

Nomenclature

: | Fourier coefficients
: | Fourier coefficients
: | Daily hours
: | Fourier coefficients
: | Constant volume specific heat
: | Barometric equation
: | Infinitesimal change thermodynamics
: | Elliptical orbit whose eccentricity is along the movement of the Earth
: | Frequency
: | Inhomogeneous vector
: | Trigonometric polynomial of degree
: | Molecular weight of water
: | Total number of data
: | Clear days
: | Half-overcast days
: | Number of measurements made to obtain the experimental pair (ti, Ti)
: | Clapeyron’s equation
: | Fourier expansion of the water-vapor pressure
: | Heat added to the system
: | Radiation
: | Solar constant
: | Time in seconds
: | Ground temperature
: | Yearly average of temperature
: | l-average of temperature at time t for the i-th day
: | Locating the position of the Sun in the sky
: | Work done on the system
: | Thickness of the lower atmosphere submitted to the daily temperature variations
: | Fraction from the solar radiation which is reflected back by the Earth’s atmosphere
: | Probability of an emitted photon to be reabsorbed
: | Mean square deviation
: | Sun’s trajectory along the sky is slightly different each 24 hr period
: | Zenith angle
: | Water-vapor density
: | Sample density
: | Time duration of a day
: | Angular frequency
: | Total distance
: | Thermal conductivity of the ground.

Data Availability

The computer programs and data are available upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

The authors thank Rene Preza-Cortés, Genoveva Hernández-Padrón, and Adrián Oskam for their technical support. The financial support of COZCyT (ZAC-2009-C01-121774) and CONCYTEQ (QRO- 2005-C01-15218) is also gratefully acknowledged.

References

P. Simon de Laplace, “Essai philosophique sur les probabilit´es,” in Imprimeur-Libraire pour les Mathematiques, quai des Augustins, vol. 57, Mme Ve Courcier, Paris, France, 1814.

A. Khosravi, R. N. N. Koury, L. Machado, and J. J. G. Pabon, “Prediction of hourly solar radiation in Abu Musa island using machine learning algorithms,” Journal of Cleaner Production, vol. 176, pp. 63–75, 2018.

G. M. Yagli, D. Yang, and D. Srinivasan, “Automatic hourly solar forecasting using machine learning models,” Renewable and Sustainable Energy Reviews, vol. 105, pp. 487–498, 2019.

S. Neumaier and A. Polleres, “Enabling spatio-temporal search in open data,” Journal of Web Semantics, vol. 55, pp. 21–36, 2019.

S. Castruccio and M. G. Genton, “Principles for statistical inference on big spatio-temporal data from climate models,” Statistics & Probability Letters, vol. 136, pp. 92–96, 2018.

Y. Shi, M. Deng, X. Yang, and J. Gong, “Detecting anomalies in spatio-temporal flow data by constructing dynamic neighbourhoods,” Computers, Environment and Urban Systems, vol. 67, pp. 80–96, 2018.

F. Li, G. Ren, and J. Lee, “Multi-step wind speed prediction based on turbulence intensity and hybrid deep neural networks,” Energy Conversion and Management, vol. 186, pp. 306–322, 2019.

J. Wang and Y. Li, “An innovative hybrid approach for multi-step ahead wind speed prediction,” Applied Soft Computing, vol. 78, pp. 296–309, 2019.

A. Castañeda-Miranda and V. M. Castaño, “Smart frost control in greenhouses by neural networks models,” Computers and Electronics in Agriculture, vol. 137, pp. 102–114, 2017.

A. Akbar, A. Kuanar, J. Patnaik, A. Mishra, and S. Nayak, “Application of artificial neural network modeling for optimization and prediction of essential oil yield in turmeric (Curcuma longa L.),” Computers and Electronics in Agriculture, vol. 148, pp. 160–178, 2018.

L. Xing, L. Li, J. Gong, C. Ren, J. Liu, and H. Chen, “Daily soil temperatures predictions for various climates in United States using data-driven model,” Energy, vol. 160, pp. 430–440, 2018.

J. E. Carson, “Analysis of soil and air temperatures by Fourier techniques,” Journal of Geophysical Research, vol. 68, no. 8, pp. 2217–2232, 1963.

S. Petterssen, Introduction to Meteorology, Mc Graw-Hill Book Company, New York, NY, USA, 1969.

NOAA, NASA, and USAF, U.S. Standard Atmosphere, NOAA, Washington, DC, USA, 1976.

M. Planck, Treatise on Thermodynamics, Equation (68), Dover Publications, Inc, New York, NY, USA, 1945.

H. G. Houghton, Physical Meteorology, The MIT Press, Cambridge, MA, USA, 1985.

M. W. Zemansky, Heat and Thermodynamics, Mc Graw-Hill Book Company, New York, NY, USA, 5th edition, 1968.

L. J. Battan, Fundamentals of Meteorology, Prentice-Hall, Inc., Engleewood Cliffs, NJ, USA, 1984.

A. Arking, “Absorption of solar energy in the atmosphere: discrepancy between model and observations,” Science, vol. 273, no. 5276, pp. 779–782, 1996.

P. Baize, El´Editions de Lements de Cosmographie, Les Ecole, Paris, France, 1947.

J. Audouze and G. Israel, Eds.“Recordings from 1800 to 1985 show that this angular velocity fluctuates within Δω ≤ 4 × 10⁻⁸,” in The Cambridge Atlas of Astronomy, Cambridge University Press, Cambridge, UK, 1985.

G. L. Stephens and T. J. Greenwald, “The earth’s radiation budget and its relation to atmospheric hydrology: 1—observations of the clear sky greenhouse effect,” Journal of Geophysical Research, vol. 96, no. D8, pp. 15311–15324, 1991.

D. Mihalas, Stellar Atmospheres, W. H. Freeman and Co., San Francisco, CA, USA, 2nd edition, 1978.

M. B. Mc Elroy, “Atmosphere,” in Encyclopedia Britannica, Encyclopedia Britannica, Inc., Chicago, IL, USA, 1984.

G. L. Stephens, A. Slingo, M. J. Webb et al., “Observations of the earth’s radiation budget in relation to atmospheric hydrology: 4—atmospheric column radiative cooling over the world’s oceans,” Journal of Geophysical Research, vol. 99, no. D9, pp. 18585–18604, 1994.

C. P. Weaver and V. Ramanathan, “Deductions from a simple climate model: factors governing surface temperature and atmospheric thermal structure,” Journal of Geophysical Research, vol. 100, no. D6, pp. 11585–11591, 1995.

B. Bartsch, S. Bakan, and J. Fischer, “Passive remote sensing of the atmospheric water vapour content above land surfaces,” Advances in Space Research, vol. 18, no. 7, pp. 25–28, 1996.

F. Joseph, The Analytical Theory of Heat, Dover Publications, Inc., New York, NY, USA, 1955.

H. S. Carslaw, An Introduction to the Theory of Fourier’s Series and Integrals, Dover Publications, Inc., New York, NY, USA, 1950.

M. Alonso and E. J. Finn, Fundamental University Physics, vol. II, Addison-Wesley Publishing Company, Boston, MA, USA, 1967.

E. C. Kung, R. A. Bryson, and D. H. Lenschow, “Study of a continental surface albedo on the basis of flight measurements and structure of the earth’s surface cover over north America,” Monthly Weather Review, vol. 92, no. 12, pp. 543–564, 1964.

E. Fermi, Thermodynamics, Dover Publications, Inc., New York, NY, USA, 1956.

Z.-C. Yang, “Hourly ambient air humidity fluctuation evaluation and forecasting based on the least-squares Fourier-model,” Measurement, vol. 133, pp. 112–123, 2019.

J. M. Colston, T. Ahmed, C. Mahopo et al., “Evaluating meteorological data from weather stations, and from satellites and global models for a multi-site epidemiological study,” Environmental Research, vol. 165, pp. 91–109, 2018.

E. Soares Soares, P. Costa Costa, B. Costa Costa, and D. Leite Leite, “Ensemble of evolving data clouds and fuzzy models for weather time series prediction,” Applied Soft Computing, vol. 64, pp. 445–453, 2018.

J. Krzyszczak, P. Baranowski, M. Zubik, and H. Hoffmann, “Temporal scale influence on multifractal properties of agro-meteorological time series,” Agricultural and Forest Meteorology, vol. 239, pp. 223–235, 2017.

Y. Wei, X. Zhang, Y. Shi et al., “A review of data-driven approaches for prediction and classification of building energy consumption,” Renewable and Sustainable Energy Reviews, vol. 82, no. 1, pp. 1027–1047, 2018.

E. Kaplani, S. Kaplanis, and S. Mondal, “A spatiotemporal universal model for the prediction of the global solar radiation based on fourier series and the site altitude,” Renewable Energy, vol. 126, pp. 933–942, 2018.