Variable Daily Air Temperature Model for Analysis and Design

Affiliation(s)

^{1}
Mackay School of Earth Science and Engineering, University of Nevada, Reno, Reno, NV, USA.

^{2}
Research Institute of Applied Earth Sciences, University of Miskolc, Miskolc, Hungary.

Abstract

An analytical model, *T*_{A}(*t*), for the observed outside air temperature change, *T*_{a}(*t*), with time is developed using two components: one for the variation
caused by the Earth’s movement, plus any other quasi-stationary thermodynamic
effects due to industrialization; and one for the random variation
caused by stochastic and/or chaotic, local environmental changes. The first
component, *T*_{R}(*t*), describes a regular trend, expressed by periodic functions
of time and constants unchanged with time. The second component, *T*_{S}, is a
random, stochastic variation. For the observed outside air temperature, the
analytical model of *T*_{A}(*t*)=*T*_{R}(*t*) +*T*_{S} is such as to give a statistically best
approximation for the observed time period with = min. Several
versions for the *T*_{R}(*t*) functions are defined and tested in the study for
an example location for 20 years. The best model for *T*_{R}(*t*) t is found as a linear
function with time plus a variable-coefficient Fourier series with linearly
changing amplitude with time. It is found that the final analytical temperature, *T*_{A}(*t*), can be used not only to represent the historical daily mean temperature
but also to predict the future daily mean temperature at the given
location. The upper and lower boundaries give safety limits for the temperature
prediction. The stochastic component identified in the model is stable
and stationary. The method of model identification for *T*_{A}(*t*) can be used
for determining input temperature functions for supporting engineering design;
or for an unbiased scientific inquiry of temperature change with time in
climate studies.

1. Introduction

Climate is one of the main elements of the natural environment. Temperature has a direct impact on atmospheric stability, evaporation, precipitation, and many other conditions of life [1] . Temperature change affects living conditions, agriculture, industry, tourism and engineering designs. Atmospheric temperature is needed for planning and forecasting both in the average and the variation components of temperature in order to prevent hazards to life as well as finances [2] .

Based on the long-term trends study of maximum, minimum and mean annual air temperature, e.g., in the northwest Himalayan region during the twentieth century, increasing trends are seen both in the mean and the diurnal range of temperature. The daily maximum temperatures have increased more rapidly than the decrease in the low temperatures in the last century resulting in a risen mean temperature of about 1.6˚C [3] . An extrapolation for the next century would give an increase about 3˚C to 5˚C in the global mean annual temperature [4] . A more exact forward prediction approach may give different result. It is difficult, however, to analyze slowly-changing trends in the outside temperature as they are buried within large-amplitude, harmonic, cyclic variations as well as stochastic and/or chaotic changes.

The observed, outside air temperature, ${T}_{a}\left(t,\tau \right)$ , includes both seasonal components represented by t (days of the year) and $\tau $ (the hours in day t). When tabulated, ${T}_{a}\left(t,\tau \right)$ is a matrix with t rows (the total number of days) and $\tau $ columns (24, the number of hours in a day). The outside air temperature has a regular, seasonal variation for the daily average temperature during every year, (more exactly, every four years as a true time period) and an hourly variation during any given day for the hourly mean temperature. These two components are regular and periodic in nature caused by the earth movement in the solar system. Other regular changes superimposed to that of the known movement of the Earth may also be present, such as caused by the heat balance of the globe by industrialization.

The goal of the paper is to separate the observed outside air temperature into variation caused by the Earth’s movement, plus any other quasi-stationary thermodynamic effects, and random variation caused by stochastic and/or chaotic, local environmental changes. It’s necessary to separate the hourly temperate variations from that of the seasonal first. For describing the seasonal temperature variation, the daily average temperature ${T}_{a}\left(t\right)$ must be defined. The ${T}_{a}\left(t\right)$ may be defined as the integral mean value:

${T}_{a}\left(t\right)=\frac{1}{T}{\displaystyle {\int}_{0}^{T}{T}_{a}\left(t,\tau \right)\text{d}\tau}$ (1)

In (1) t denotes days, $\tau $ is the hours in a day, $\tau \in \left[0,T\right]$ and $T=24$ . If hourly average temperature is available, (1) gives the accurate value for the daily average temperature meaning the thermodynamic energy of the air. If the daily mean temperature is obtained from weather service, the data may be given pre-calculated from the Standard Model that provides the average of the daily maximum and minimum air temperatures, ${T}_{a}\left(t\right)\cong \left[{T}_{\mathrm{max}}\left(t\right)+{T}_{\mathrm{min}}\left(t\right)\right]/2$ . The Standard Model, reviewed by Bilbao et al. [5] , may not be accurate if the temperature change is not symmetrical between day and night [6] . Nevertheless, the convenience in using the Standard Model instead of using the hourly temperature data for every day and using the expression (1) may overwhelm the concerns in the accuracy of the mean, daily temperature.

Two components of the air temperature are distinguished in the present paper for modeling daily mean air temperature variation, ${T}_{a}\left(t\right)$ , with time. The first component, ${T}_{R}\left(t\right)$ , describes a regular trend, expressed by functions of time and constants unchanged with time over which the model is defined. The regular trend is defined as stationary for a long period of time, characteristic to a given physical location governed by deterministic causes such as the Earth’s movement in the solar system. The second component, ${T}_{S}$ , is a random, stochastic variation around the regular trend. The ${T}_{S}$ component is caused by the stochastic and/or chaotic process in the atmosphere, defined as difference between the observed outside air temperature, ${T}_{a}\left(t\right)$ , and the temperature from the stationary trend model as ${T}_{S}={T}_{a}-{T}_{R}$ . The daily mean value of the outside temperature at any given day is the sum of the regular trend component, ${T}_{R}$ , and a stochastic variation part, ${T}_{S}$ :

${T}_{a}\left(t\right)={T}_{R}\left(t\right)+{T}_{S}$ (2)

Note that the stochastic component is stationary and irrespective of the seasonal variation, a simplification for model formulation. However, the stochastic temperature variation in some part of the year may be more disturbed than in another, raising the possibility for improvement of the assumption used in the current work, a task left for the interested reader.

The analytic function for ${T}_{R}\left(t\right)$ must be the best fit to the measured outside temperature data for a given location. The concept of Fourier’s series approximation [7] is employed for constructing a model for a mainly periodic ambient air temperature, ${T}_{R}$ . Joseph Fourier, a French mathematician and physicist introduced in 1807 the approximation of any function $f\left(x\right)$ over a finite interval with an infinite sum of sine and cosine functions as $g\left(x\right)={a}_{0}+{\displaystyle {\sum}_{i=1}^{\infty}\left[{a}_{i}\mathrm{sin}\left(ix\right)+{b}_{i}\mathrm{cos}\left(ix\right)\right]}$ such that ${\Vert f\left(x\right)-g\left(x\right)\Vert}^{2}=\mathrm{min}$ , where ${a}_{0},{a}_{i},{b}_{i}$ are unknown constants. An equivalent formulation may be used as $g\left(x\right)={a}_{0}+{\displaystyle {\sum}_{i=1}^{\infty}{a}_{i}\mathrm{sin}\left(ix+{b}_{i}\right)}$ for brevity. Instead of an infinite series, $i\in \left[0,n\right]$ is used for the approximation of a mainly periodic function, eliminating the terms multiplied by the insignificant amplitudes ${a}_{i},i>n$ .

Applying the concept for ${T}_{R}$ with a mean temperature, ${T}_{m}$ , and a harmonic variation component, ${{\displaystyle \sum}}^{\text{}}{A}_{{\omega}_{i}}\mathrm{sin}\left({\omega}_{i}t+{\alpha}_{i}\right)$ , where ${A}_{{\omega}_{i}}$ is the amplitude of the harmonic variation component of ${f}_{i}\left(t\right)=\mathrm{sin}\left({\omega}_{i}t+{\alpha}_{i}\right)$ . The amplitude, ${A}_{{\omega}_{i}}$ , may be a linear function of time in some models, ${A}_{{\omega}_{i}}\left(t\right)={d}_{1,i}+{d}_{2,i}t$ .

There are various choices to model the ${T}_{R}$ component, listed as M1 through M5. The M1-type model is a linear function. It has the least coefficients and can be used to describe the yearly mean temperature change. However, it does not have the ability to reflect any periodic temperature variation. The M2-type model is the general Fourier series function. It assumes that the yearly mean temperature and amplitudes for the pre-selected, finite number of frequencies are constant. It might be accurate for a short period of time, such as one year. The problem with the M2-type model is that it cannot reflect the long-term average, the maximum and the minimum temperature changes with time as in Bhutiyani’s study [3] . The M3-type model is an updated function from the M2-type model. It has the variable yearly mean temperature with time. However, it still does not have the ability to reflect the maximum and minimum temperature changes with time. The M4-type model is an improved form over the M2-type model in terms of allowing the variation of maximum and minimum temperatures, but still using the constant yearly mean temperature. The M5-type model combines the advantages of both the M3-type and M4-type of models.

Therefore, the five different models tested are as follows:

M1. Variable mean temperature

${T}_{R}\left(t\right)={T}_{m}+c\cdot t$ (3)

M2. Constant mean temperature and constant amplitude series:

${T}_{R}\left(t\right)={T}_{m}+{{\displaystyle \sum}}^{\text{}}{A}_{{\omega}_{i}}f\left(t\right)$ (4)

M3. Variable mean temperature and constant amplitude series:

${T}_{R}\left(t\right)={T}_{m}\left(t\right)+{{\displaystyle \sum}}^{\text{}}{A}_{{\omega}_{i}}f\left(t\right)$ (5)

M4. Constant mean temperature and variable amplitude series:

${T}_{R}\left(t\right)={T}_{m}+{{\displaystyle \sum}}^{\text{}}{A}_{{\omega}_{i}}\left(t\right)f\left(t\right)$ (6)

M5. Variable mean temperature and variable amplitude series:

${T}_{R}\left(t\right)={T}_{m}\left(t\right)+{{\displaystyle \sum}}^{\text{}}{A}_{{\omega}_{i}}\left(t\right)f\left(t\right)$ (7)

The M1-type model is used for comparison with other models for the yearly mean temperature variation evaluation. Bhutiyani [3] studied the average, maximum and minimum temperature trends for 100 years and found them all changing with time. Therefore, the M2-type model with a stationary, constant mean temperature and constant amplitudes is inferior for practical application and not used for comparisons. The M4-type model is not recommended nor studied for brevity as the M5-type model gives better result for the same effort. Therefore, for comparison purpose, only the M1, M3 and M5 model types are used in model testing.

The first task is to depress the stochastic temperature variation in order to find the statistically most significant trend for a base stationary temperature model. Second, the stochastic or chaotic deviations must be defined to match the observed temperature. Therefore, the designers or analysts may conduct their studies or design safely without missing the expected, maximum or minimum temperature values for the study time period. Figure 1 shows the components of establishing an analytical temperature model.

Figure 1. Components of establishing an analytical temperature model.

2. Measured Temperature Data

Daily mean temperature measurements are used in the study from a middle-west location in North America for 20 years. The data, ${T}_{a}\left(t\right)$ , are taken for 7305 days from 04/01/1996 to 03/31/2016, downloaded from https://www.wunderground.com, and plotted in Figures 2(a). Figure 2(b) and Figure 2(c) are enlargement of Figure 2(a) for year 1 and year 20, respectively. Although the regular trend, ${T}_{R}\left(t\right)$ , is to be discussed in Point 3 of the paper, it is also shown from the M5-type model in Figure 2(a). Figure 2(b) and Figure 2(c) for illustrating the model concept. The daily mean temperature data, ${T}_{a}\left(t\right)$ , is taken from the Standard Model method in the study as a practical compromise. Three different ways of using the measured data are tried for comparison and to find the best way of data processing.

2.1. Single-Year Temperature Cycle Evaluation

In the first usage of the data, ${T}_{a}\left(t\right)$ , the measured mean daily temperatures for 20 years are divided into twenty sets for single year from 1 to 20 to be able to analyze the model validity for model type M1 and M3. Individual yearly data, ${T}_{a,y}\left(t\right)$ , $y\in \left[1,20\right]$ , $t\in \left[1,365\right]$ are grouped for 15 regular years and $t\in \left[1,366\right]$ for 5 leap years.

2.2. Four-Year Temperature Cycle Evaluation

In the second usage of the data, ${T}_{a}\left(t\right)$ , the 20 years measured mean daily temperatures are divided into 4-year period sets, giving 5 groups as 1), 2), 3), 4) and 5). The justification of employing four years as the true solar time period is that the yearly time period for regular years is distorted by the deficiency of 0.25 days while the time period in leap years is longer by 0.75 days and affecting the averaging. The 4-year time sequence of 1461 days is considered as the repeating time period for the ${T}_{S}$ stationary temperature component in the model. Therefore, properties of temperature (average, etc.) also must be considered distinguished when evaluating for the yearly time period.

1) For year 1 - 4:

${T}_{a,a}={T}_{a}\left(t\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}t\in \left[1,1461\right]$ (8)

2) For year 5 - 8:

${T}_{a,b}={T}_{a}\left(t\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}t\in \left[1462,2922\right]$ (9)

3) For year 9 - 12:

${T}_{a,c}={T}_{a}\left(t\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}t\in \left[2923,4383\right]$ (10)

(a) (b) (c)

Figure 2. (a) Measured 20 years daily mean temperature at middle west of North America; (b) Zoom in Figure 2(a) for the first year; (c) Zoom in Figure 2(a) for the last year.

4) For year 13 - 16:

${T}_{a,d}={T}_{a}\left(t\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}t\in \left[4384,5844\right]$ (11)

5) For year 17 - 20:

${T}_{a,e}={T}_{a}\left(t\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}t\in \left[5846,7305\right]$ (12)

2.3. Continuous, Repeating Four-Year Temperature Cycles Evaluation

In the third usage of the data, ${T}_{a}\left(t\right)$ , the total 20 years 7,305 data, ${T}_{a}\left(t\right)$ , $t\in \left[1,7305\right]$ , are used for testing and establishing properties of ${T}_{R}\left(t\right)$ in model type M4 and M5.

3. Determination of T_{R}

To determine the model coefficients, the obvious choice is to use the Least-squares (LSQ) fit method. The LSQ method optimally fits the data to a given function with unknown constant parameters in such a way that the root-mean-square of the error between model and measured data is minimalized. The expected, fitted equations represent the significant, regular temperature trend, ${T}_{R}$ . Determining the significant part of the data out of a noisy observation may also be done by filtering or neural network. The advantage of using the LSQ method is to be able to define function ${T}_{R}$ in advance, whereas signal processing does not give an analytical form of such a function [8] .

For supporting the ways of using measured data, different fitting function may be defined with a number of unknown parameters to be determined by the LSQ fitting algorithm. Five different fitting functions may be considered for M1, M3 and M5 model types as follows.

3.1. T_{R} Function for the Entire 20 Years for M1-Type Model

The LSQ linear function is:

${T}_{mt}={T}_{m}+c\cdot t$ (13)

3.2. T_{R} Function for M3-Type Model

For single year data in the M2-type model, a regular year of 365 days and a leap year of 366 days must be distinguished. The LSQ function for regular year is written as:

$\begin{array}{c}{T}_{R,y}\left(t\right)={T}_{m}+c\times t+{A}_{1}\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{1}+{b}_{1}\right)+{A}_{2}\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{2}+{b}_{2}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+{A}_{3}\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{3}+{b}_{3}\right)+\cdots +{A}_{15}\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{15}+{b}_{15}\right)\end{array}$ (14)

where ${a}_{k}=\frac{1}{365}\times \left\{\left\{{2}^{i-1}\right\},3\times \left\{{2}^{j-1}\right\}\right\}$ ; for $k\in \left[1,15\right]$ , $k=i+j$ ; $i=i\in \left[1,8\right]$ ;

$j\in \left[1,7\right]$ , all fixed frequency components. Unknown parameters are T_{m}, c, A_{1} through A_{15}, and b_{1} through b_{15}.

The LSQ function for leap year is derived from (14) by changing 365 days to 366 days as:

$\begin{array}{c}{T}_{R,y}\left(t\right)={T}_{m}+c\times t+{A}_{1}\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{1}+{b}_{1}\right)+{A}_{2}\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{2}+{b}_{2}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+{A}_{3}\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{3}+{b}_{3}\right)+\cdots +{A}_{15}\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{15}+{b}_{15}\right)\end{array}$ (15)

where ${a}_{k}=\frac{1}{365}\times \left\{\left\{{2}^{i-1}\right\},3\times \left\{{2}^{j-1}\right\}\right\}$ ; for $k\in \left[1,15\right]$ , $k=i+j$ ; $i=i\in \left[1,8\right]$ ;

$j\in \left[1,7\right]$ , all fixed frequency components. Unknown parameters are T_{m}, c, A_{1} through A_{15}, and b_{1} through b_{15}.

The LSQ function for 4 years data and 20 years data will add the four-year and two-year period frequencies, also will change the one-year period to 365.25 days, the function is written as:

$\begin{array}{c}{T}_{R}\left(t\right)={T}_{m}+c\times t+{A}_{1}\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{1}+{b}_{1}\right)+{A}_{2}\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{2}+{b}_{2}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+{A}_{3}\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{3}+{b}_{3}\right)+\cdots +{A}_{17}\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{17}+{b}_{17}\right)\end{array}$ (16)

where ${a}_{k}=\frac{1}{365.25}\times \left\{\left\{{2}^{i-3}\right\},3\times \left\{{2}^{j-1}\right\}\right\}$ ; for $k\in \left[1,17\right]$ , $k=i+j$ ; $i=i\in \left[1,10\right]$ ;

$j\in \left[1,7\right]$ , all fixed frequency components. Unknown parameters are T_{m}, c, A_{1} through A_{17} and b_{1} through b_{17}.

3.3. T_{R} Function for M5 Type Model

With the assumption that the amplitudes may also vary with time, a modified LSQ function over (16) is established as:

$\begin{array}{c}{T}_{R}\left(t\right)={T}_{m}+c\times t+\left({A}_{1c}+{A}_{1v}\times t\right)\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{1}+{b}_{1}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left({A}_{2c}+{A}_{2v}\times t\right)\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{2}+{b}_{2}\right)+\cdots \\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left({A}_{17c}+{A}_{17v}\times t\right)\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{17}+{b}_{17}\right)\end{array}$ (17)

where ${a}_{k}=\frac{1}{365.25}\times \left\{\left\{{2}^{i-3}\right\},3\times \left\{{2}^{j-1}\right\}\right\}$ ; for $k\in \left[1,17\right]$ , $k=i+j$ ; $i=i\in \left[1,10\right]$ ;

$j\in \left[1,7\right]$ , all fixed frequency components. Unknown parameters are T_{m}, c,
${A}_{1c}$ through
${A}_{17c}$ ,
${A}_{1v}$ through
${A}_{17v}$ , and b_{1} through b_{17}.

4. Evaluation of the Statistically Most Significant, Mean Temperature Trends

The LSQ fitting method is used to determine the mean temperature trend, ${T}_{R}\left(t\right)$ , of the measured data, ${T}_{a}\left(t\right)$ . The LSQ method provides the statistically most significant result for ${T}_{R}\left(t\right)$ as a regular, deterministic trend, depressing the random variation component of temperature around ${T}_{R}\left(t\right)$ with assumed, normal distribution as a noise due to stochastic or chaotic causes.

First, the best LSQ fit is determined on all single year data separately. The parameters of function (14) are applied for the regular years, and (15) is applied for the leap years. The fitted results are shown in Figure 3(a), Figure 3(b) and Figure 3(c). The mean, maximum and minimum values from the fitted result are shown in Figure 4.

Second, the best LSQ fit is found using function (16) for five 4-year temperature data sets separately. The fitted results are shown in Figure 5(a), Figure 5(b) and Figure 5(c) the mean, maximum and minimum values from the fitted

(a) (b) (c)

Figure 3. (a) LSQ fitting curves for each year of 20 years; (b) Zoom in Figure 3(a) for the first year; (c) Zoom in Figure 3(a) for the last year.

Figure 4. The mean, maximum and minimum values for LSQ fitting results for each year.

result are shown in Figure 6. Parameters for the fitted functions ${T}_{a,a}\left(t\right),\cdots ,{T}_{a,e}\left(t\right)$ , are listed in Tables 1-5, respectively.

Third, the best LSQ fit is determined using the M3-type function (16) for all 20 years data, ${T}_{a}\left(t\right)$ , together. The fitted function is depicted in Figure 7(a), Figure 7(b) and Figure 7(c). The parameters of the fitted function are listed in Table 6. The best LSQ fit is also determined using the improved, M5-type function (17), applied also for all 20 years data, ${T}_{a}\left(t\right)$ . The fitted results are depicted in Figure 8(a), Figure 8(b) and Figure 8(c); and the parameters of the fitted function are listed in Table 7.

5. Evaluation of the Stochastic Variation and Final Analytical Temperature Model

The stochastic variation must be defined by subtracting the statistic periodic function from the measured data. First, the stochastic variation, ${T}_{S}\left(t\right)$ , is defined by the difference between deterministic function result, ${T}_{R}\left(t\right)$ and measured data ${T}_{a}\left(t\right)$ as:

${T}_{S}\left(t\right)={T}_{a}\left(t\right)-{T}_{R}\left(t\right)$ (18)

The data of (18) is depicted in Figure 9(a), Figure 9(b) and Figure 9(c). The density analysis on the (18) data and the MATLAB normal distribution fit of the data is shown in Figure 10. From the fit, a mean value $mu=-6.33\times {10}^{-8}\approx 0$ , and standard deviation of $\sigma =4.0012$ are obtained, where $mu={{\displaystyle \sum}}^{\text{}}\text{\hspace{0.05em}}{T}_{S}\left(t\right)/n$ ,

$\sigma =\sqrt{\frac{1}{n}{{\displaystyle \sum}}^{\text{}}{\left({T}_{S}\left(t\right)-mu\right)}^{2}}$ and n is the number of days, t. Using $mu=0.00$ and

$\sigma =4.0012$ , a normally-distributed random noise series is generated to represent ${T}_{S}\left(t\right)$ . The $NormRandom\left(mu,\sigma ,t\right)$ function is used in Matlab that

(a) (b) (c)

Figure 5. (a) LSQ fitting curves for five 4-year sets; (b) Zoom in Figure 5(a) for the first year; (c) Zoom in Figure 5(a) for the last year.

Figure 6. The mean, maximum and minimum values for LSQ fitting results for 4-year sets.

Table 1. Parameters for year 1 - 4 data, the LSQ fitted function (16) result, ${T}_{a,a}$ .

Table 2. Parameters for year 5 - 8 data, the LSQ fitted function (16) result, ${T}_{a,b}$ .

Table 3. Parameters for year 9 - 12 data, the LSQ fitted function (16) result, ${T}_{a,c}$ .

Table 4. Parameters for year 13 - 16 data, the LSQ fitted function (16) result, ${T}_{a,d}$ .

Table 5. Parameters for year 17 - 20 data, the LSQ fitted function (16) result, ${T}_{a,e}$ .

Table 6. Parameters for year 1 - 20 data, the LSQ fitted function (16) result.

Table 7. Parameters for year 1 - 20 data, the LSQ fitted function (17) result.

generates t number of random values from the normal distribution with a mean value $mu$ , and standard deviation value $\sigma $ . Applying it to ${T}_{S}\left(t\right)$ , it gives:

${T}_{S}\left(t\right)=NormRandom\left(mu,\sigma ,t\right)$ (19)

For ${T}_{A}\left(t\right)$ , (19) is added to (17):

${T}_{A}\left(t\right)={T}_{R}\left(t\right)+NormRandom\left(mu,\sigma ,t\right)$ (20)

However, (20) is not an analytical function since it includes an algorithm. To overcome this and understanding that the daily variation for random causes is a sample of ${T}_{S}\left(t\right)$ , the maximum and minimum values can be generated with a 99 per cent confidence by a fluctuating temperature with a 2-day cycle time:

${T}_{A}\left(t\right)={T}_{R}\left(t\right)+3\sigma {\left(-1\right)}^{t}$ (21)

Substituting the preferred model in (17), the final analytical temperature model, ${T}_{A}\left(t\right)$ is:

$\begin{array}{c}{T}_{A}\left(t\right)={T}_{m}+c\times t+\left({A}_{1c}+{A}_{1v}\times t\right)\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{1}+{b}_{1}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left({A}_{2c}+{A}_{2v}\times t\right)\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{2}+{b}_{2}\right)+\cdots \\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left({A}_{17c}+{A}_{17v}\times t\right)\times \mathrm{sin}\left(2\text{\pi}\times t\times {a}_{17}+{b}_{17}\right)+3\sigma {\left(-1\right)}^{t}\end{array}$ (22)

Comparison between simulated temperature, ${T}_{A}\left(t\right)$ , from (20) and measured data, ${T}_{a}\left(t\right)$ , is show in Figure 11(a), Figure 11(b) and Figure 11(c). Using an uncertainty interval of $3\sigma =12.0036$ in the example, safe limits of maximum and minimum temperature are show in Figure 12(a), Figure 12(b) and Figure 12(c). A smaller or wider uncertainty interval may also be selected based on the risk to be taken regarding the missing number of days to be in the expected temperature range in the outside air temperature.

(a) (b) (c)

Figure 7. (a) LSQ function (16) fitting curve for total data; (b) Zoom in Figure 7(a) for the first year; (c) Zoom in Figure 7(a) for the last year.

(a) (b) (c)

Figure 8. (a) LSQ function (17) fitting curve for total data; (b) Zoom in Figure 8(a) for the first year; (c) Zoom in Figure 8(a) for the last year.

(a) (b) (c)

Figure 9. (a) Equation 18 result; (b) Zoom in Figure 9(a) for the first year; (c) Zoom in Figure 9(a) for the last year.

Figure 10. Data Equation (18) result density analysis and normal distribution fit.

6. Discussion of the Results

6.1. Discussion of the Results for the Air Temperature Variation as a Regular Trend

For comparison purposes, the linear regression function (13) for the entire 20-year data set is applied to various, fitted model results; or original, unprocessed data. The fitted model results for the shorter time periods represent the significant part of the repeated trends whereas the noise is intentionally depressed in the LSQ norm sense. Therefore, a linear regression evaluation for the 20-year long time period is assumed to evaluate the most significant, time-average of the linear change in the magnitude of ${T}_{a}\left(t\right)$ . Common expectation dictates that the linear regression evaluation for the 20-year long time period of the original data may provide an un-biased result for the linear change in the magnitude of ${T}_{a}\left(t\right)$ . The following studied are completed for fitting a longer-time linear regression to model results, ${T}_{R}\left(t\right)$ , of shorter time periods:

a) Yearly mean temperatures, ${T}_{R}\left(t\right)$ , (for 15 regular and 5 leap years) evaluated from fitted function to single-years data, ${T}_{a,y}\left(t\right)$ with M1-type model;

b) Yearly mean temperatures, ${T}_{R}\left(t\right)$ , evaluated from fitted function data to 4-year data sets, ${T}_{a,a}\left(t\right),\cdots ,{T}_{a,e}\left(t\right)$ with M1-type model;

c) Yearly mean temperatures, ${T}_{R}\left(t\right)$ , from fitted function to continuous 20 years data, ${T}_{a}\left(t\right)$ with M1-type model;

d) 20 years measured data, ${T}_{a}\left(t\right)$ , used unprocessed.

The results from the evaluation are listed in Table 8. As shown, the linear trends for the mean value, ${T}_{m}$ , and the slope, c, are very similar for cases a) and b) with b) giving a slightly lower RMS error variation than those of a). The reason lays in the fact that the true time period for the variation of the outside

(a) (b) (c)

Figure 11. (a) Final analytical temperature model for 20 years; (b) Zoom in Figure 11(a) for the first year; (c) Zoom in Figure 11(a) for the last year.

(a) (b) (c)

Figure 12. (a) Upper boundary, lower boundary and measured temperature; (b) Zoom in Figure 12(a) for the first year; (c) Zoom in Figure 12(a) for the last year.

Table 8. Linear temperature variation trends evaluated from different models and processes.

temperature is 365.25 days, giving a rounding error with a weight of −0.25/4 days for the regular years and of +0.75/4 day for the leap year in the single-year model fits. The model fit to the 4-year time periods does not have the rounding error problem and, therefore, a smoother fit is expected. Indeed, the RMS error of 0.39 is lower for case b) than value of 0.603 for case a).

The results in case c) is identical to those of case a) for obvious reason of using the same linear regression repeated two times sequentially, the second time obtaining zero RMS value. The result for case d) is very different from those in cases a) through c). Why does a 20-year long data set gives an average decrease of temperature change negative that would translate to “global cooling” as opposed to “global warming” for the example location? The answer is the wrong-type function choice for the most significant variation trend, ${T}_{R}\left(t\right)$ , being a linear function with time. This exercise highlights the importance of the selection for the shape of ${T}_{R}\left(t\right)$ . If a form as inadequate as a linear function is selected for ${T}_{R}\left(t\right)$ for estimating the periodic nature of the outside temperature, the coefficients of the function cannot be trusted even for the general slope, as demonstrated with case d).

Two more choices are also studied for comparison for evaluating the linear trend which the models already include as the mean value, ${T}_{m}$ , and the slope, c. Due to these built-in components, no additional, linear regression fit is needed for determining the values of ${T}_{m}$ and c:

e) 20 years measured data, ${T}_{a}\left(t\right)$ , unprocessed; M3-type model;

f) 20 years measured data, ${T}_{a}\left(t\right)$ , unprocessed; M5-type model.

The results from the evaluation are listed in Table 8. As shown, the linear trends for the mean value,
${T}_{m}$ , and the slope,

Re-fitting another linear regression model to the model output data, ${T}_{R}\left(t\right)$ , from the M5-type model in case f) for re-capturing the mean value, ${T}_{m}$ , and the slope, c, does not give back the same values as those built in the best-fit model, shown in case g) in Table 8. The reason for the mismatch is the inadequate function type of a linear variation attempting to evaluate the more complex interactions of periodic and monotonic components in ${T}_{R}\left(t\right)$ . However, the general proof of this mismatch is left to the reader.

6.2. Discussion of the Results for the Random Component of Air Temperature Variation

The air temperature model component for the description of the random part due to stochastic or chaotic causes is simplified to be time-independent. The stochastic component, ${T}_{R}$ , satisfies the zero mean value and zero slope with time. No attempt has been made to vary the magnitude of randomness with the seasons. Refinement for this component is left for the interested reader. The observed histogram for the example shows a close-to normal distribution, allowing to estimate the error limit for daily mean temperature fluctuations from the standard deviation, σ, obtained from model identification.

6.3. Discussion of the Complete Temperature Model for Daily Air Temperature Variation

The complete temperature model is given in (21) and (22). The model predicts the daily average temperature variation with time as well as the expected the maximum and minimum temperatures due to stochastic process components. The comparison between measured data and model prediction with ±3σ amplitude around the ${T}_{R}\left(t\right)$ function from the M5-type model in (22) is illustrated in Figure 12(a). The graphs in the zoom-in Figure 12(b) and Figure 12(c) convincingly show that the measured values are almost always remain between the modeled maximum and minimum values.

7. Conclusions

w Analytical functional forms and their numerical algorithms are presented for representing the measured time-variable outside air temperature, ${T}_{a}\left(t\right)$ for engineering design and analysis of the human environment. The algorithms for ${T}_{R}\left(t\right)$ and ${T}_{S}$ are easy to use for processing the available data sets, ${T}_{a}\left(t\right)$ , at any physical location from the weather service, typically using several tens of thousands of measured values. In the final functional form of the outside air temperature function, ${T}_{A}\left(t\right)$ , only a few dozens of constants are needed.

w The final analytical temperature, ${T}_{A}\left(t\right)$ , can be used not only to represent the historical temperature data but also to predict the future temperature variations at any given location from which the input data is used from measurements. The upper and lower boundaries may be used for safe temperature prediction.

w The regular component of temperature change with time, ${T}_{R}\left(t\right)$ , in the M5-type model is described by a linear function plus a time-variable Fourier series to represent the long term linear change both in mean temperature and amplitude. Only 53 constants are needed, obtainable from the presented method, to represent the outside mean air temperature at any day of the year as long as need over decades of time.

w The confidence interval for the stochastic variation may be selected by the user via the multiplication factor of the standard deviation of the model match between measured, time-variable outside air temperature, ${T}_{a}\left(t\right)$ and the regular component in the analytical mode, ${T}_{R}\left(t\right)$ .

w The stochastic component used in the final model, ${T}_{A}\left(t\right)$ , is stable and stationary. The variability of the stochastic component over the season of the year may be considered in a future study, but presently is omitted for simplicity.

w The study shows that the prediction of temperature trends such as for cooling or warming in the future can only be evaluated using an M5-type model fit to the data. The trend-setting components, such as the annual change of the mean temperature or the variation of the amplitude change with time of the periodic components can only be evaluated with a model which has these components built into the structure of the model.

w The minimum, adequate time period for building an outside air temperature model is 4 years, the periodic cycle time of the solar environment. It is recommended to use a multiple of the 4-year periods for model-building (e.g., the 5 × 4 = 20 years period in present study) preferably for as long a time period as data are available.

Acknowledgements

A research grant from National Institute of Occupational Safety and Health (NIOSH) is gratefully recognized. The research was thankfully supported by the GINOP-2.3.2-15-2016-00010 “Development of enhanced engineering methods with the aim at utilization of subterranean energy resources” project of the Research Institute of Applied Earth Sciences of the University of Miskolc in the framework of the Széchenyi 2020 Plan, funded by the European Union, co-financed by the European Structural and Investment Funds.

Cite this paper

Danko, G. and Lu, C. (2018) Variable Daily Air Temperature Model for Analysis and Design.*Applied Mathematics*, **9**, 1015-1038. doi: 10.4236/am.2018.98069.

Danko, G. and Lu, C. (2018) Variable Daily Air Temperature Model for Analysis and Design.

References

[1] Erinc, S. (1957) Applied Climatology and Climatic Conditions of Turkey. Istanbul Technical University, Hydrogeology Institute, Istanbul.

[2] Ustaoglu, B., Cigizoglu, H.K. and Karaca, M. (2008) Forecast of Daily Mean, Maximum and Minimum Temperature Time Series by Three Artificial Neural Network Methods. Meteorological Applications, 15, 431-445.

https://doi.org/10.1002/met.83

[3] Bhutiyani, M., Kale, V.S. and Pawar, N.J. (2007) Long-Term Trends in maximum, Minimum and Mean Annual Air Temperatures across the Northwestern Himalaya during the Twentieth Century. Climatic Change, 85, 159-177.

https://doi.org/10.1007/s10584-006-9196-1

[4] Wodon, Q., Liverani, A. and Joseph, G. (2014) Climate Change and Migration, Evidence from the Middle East and North Africa. World Bank, Washington, DC.

[5] Bilbao, J., Miguel, A. and Kambezidis, H. (2002) Air Temperature Model Evaluation in the North Mediterranean Belt Area. Journal of Applied Meteorology, 41, 872-884.

https://doi.org/10.1175/1520-0450(2002)041<0872:ATMEIT>2.0.CO;2

[6] Aguiar, R. (1997) Climatic Synthetic Series for the Mediterranean Belt. Final CLIMED Project Report.

[7] Komzsik, L. (2017) Approximation Techniques for Engineers. 2nd Edition, CRC Press, Boca Raton.

https://doi.org/10.1201/9781315205007

[8] Zapranis, A. and Alexandridis, A. (2007) Weather Derivatives Pricing: Modeling the Seasonal Residual Variance of an Ornstein-Uhlenbeck Temperature Process with Neural Networks. Neurocomputing, 73, 37-48.

https://doi.org/10.1016/j.neucom.2009.01.018