Analysis of the water temperature in the Litava River

River water temperature is important in many environmental applications, hydrology, and ecology research. It mainly depends on several parameters of water bodies such as streamflow, groundwater interactions, and their surrounding atmosphere. It has been correlated with air temperature as a substitute due to the ease of applicability for rivers with some limitations over detailed meteorological data. An evaluation of integrated river water temperature and streamflow fluctuations is proposed to evidence biological activity, chemical specimen, oxygen solubility, self-purification capacity of a river system, and variation of flows due to hydro-climatic changes. The possibility of predicting the river water temperature at various locations over a river basin is vital for water quality management. Modelling of river water temperature is usually based on a suitable mathematical model and field measurements of various atmospheric factors. The aim of the study is the analysis and subsequent simulation of monthly and daily water temperatures in the Litava River at the Plášťovce station. First of all, the statistical analysis of a series of daily values of Litava water temperature and air temperature (Bzovík meteorological station) was done. In the second part of the study, the several multi-regression models of the daily water temperatures are analyzed.


Introduction
The temperature of the river is an important factor that can be used to determine the health of water ecosystem. Forecast of the temperature of a river is an interesting topic since water temperature has an important ecological and economic impact (Lešková and Škoda, 2003;Grbić, et al., 2013). The flow temperature is influenced by many factors such as meteorological conditions, the condition of the river bed, river topography, and flow (Caissie, 2006). Meteorological conditions, especially air temperature, wind speed, solar radiation, and humidity are the factors that have the greatest impact as they determine the heat exchange and flows that take place at the surface of the river. In river temperature regression analysis, air temperature is often used as the only independent variable because it can be used as a proxy for the net exchange of heat flows affecting water level and also because the estimated water temperature as the reference value temperature of the air temperature (Mohseni and Stefan, 1999;Caissie, 2006;Webb et. al., 2008). In addition, air temperature is widely measured and more readily available than other parameters. Therefore, it is very important to study and explain the relationship between air and water temperature. Many water temperature models have been successfully developed and applied in recent years. These can be divided into deterministic and statistical models (Benyahya et al., 2010). Deterministic water temperature models simulate spatial and temporal changes in river water temperature based on energy balances of heat fluxes and mass balances of currents in the river. These deterministic models require a large number of input variables, such as riverbed geometry, hydrological and meteorological conditions, and are therefore often impractical and time-consuming due to their complexity. On the other hand, statistical models are widely used in water temperature forecasts because these models are relatively simple and require fewer input data. Linear regression models (Morrill et al., 2005), non-linear regression models (Mohseni et al., 1998;van Vliet et al., 2013), and stochastics models (Ahmadi-Nedushan et al., 2007) have been successfully developed for data relating to different time scales in recent years. Even though these statistical models relating water to air temperature offer relatively simple approaches to predicting water temperature, other statistical models such as Box-Jenkins and nonparametric models (Benyahya et al., 2010) and hybrid statistical-physical models such as air2water (Piccolroaz et al., 2016) can adequately model the water temperature. Artificial neural network (ANN) models have become widespread in recent years to predict the temperature of water. DeWeber and Wagner (2014) developed an ensemble ANN model to predict daily mean sea temperature using air temperature and terrain (Zhu et al., 2018). Even though many models of river water temperature have been successfully developed and applied, several key issues in water temperature modelling need to be addressed as they can form the basis for developing effective mean river temperature model complexity. A relationship between air temperature and flow temperature is nonlinear for high or low air temperatures as proved by Mohseni et al. (1998). When air temperatures are near or below 0°C, air and water temperatures are no longer synchronized, resulting in a poor relationship between air and river temperatures. The temperature of the river does not respond immediately to changes in air temperature due to thermal inertia versus hydrological mode fluxes (Isaak et al., 2017), so it may be necessary to account for time lags in the effects of air temperature on a practical temperature forecast (Benyahya et al., 2010). The solution may be splitted into two distinct components: a long-term periodic component, and a fluctuating short-term component. The long-term periodic component can be modelled by simple functions such as an invariant sinusoidal function, or more complex models like the Fourier series (Benyahya, et al., 2010). The selection of appropriate model inputs and appropriate time lags has not been explored in the literature, particularly in the case of estimating river water temperatures and other water quality parameters (Maier and Dandy, 2000). With recognizing that the river water temperature is increasing, it is a complex function of the interaction of climate change, hydrology, and human activities, there is a distinct lack of studies demonstrating their integrated influence on the spatiotemporal dynamics of water temperature as a result of lack of long term data. Such quantitative information is critical to the development of effective watershed management plans and water quality standards to protect aquatic species (Kaushal et al., 2010). In general, with the fact that water temperature is inversely proportional to river flow, reflecting reduced thermal buffering capacity due to decreasing flow rates, increased voyage time, and reduced thermal waste input dilution capacity of water (Moatar and Gailhard, 2006;Albek and Albek, 2009). Based on the global evaluation we can state, that reduction of the flow rate in rivers by 20% and 40%, respectively will increase water temperature by an average of 0.3°C and 0.8°C, another increase of 2 to 6°C can occur due to rising air temperature (van Vliet et al., 2012). Regarding to land use change, many studies indicate that shrinking forest cover (or decreasing vegetation shading) (Pekárová et al., 2011) and urban expansion (or increasing population density) in the area of the watershed, can significantly increase the temperature of the river water (Lepori et al., 2014;Orr et al., 2015). Although the relationship between air and water temperature is generally strong, the strength of such relationships varies regionally and temporally and may vary due to the complementary effects of local hydrology and human activities, such as changes in land use and population, can be of great importance for a site density (Orr et al., 2015;De Weber and Wagner, 2014;Cisty et. al., 2021). So, for this reason the main task of this study was to better analyze fluctuations in water temperature during the year.
The Litava River was chosen to find a model to simulate the relationship between the air temperature and the water temperature. For statistics and plotting the Cran R programing language (R Core Team, 2013) has been chosen because of the its complexity to provide analytical instruments and also great ability to visualize results.

River basin description and data
The Litava River (Slovakia) is a 45.4 km long left tributary of the Krupinica River (Fig. 1). The river has its source in the Krupinská planina in area below a saddle between the mountains Kopaný závoz (775 m a.s.l.) and Jaseňový vrch (724 m a.s.l) and flows initially in an approximately south-southwest direction through Senohrad, takes the Litavica on the left. Further along, the Litava passes through the municipalities of Lackov, Litava, and Cerovo before continuing into a canyon-like valley and meeting the lefthand Malá Litava. Now the Litava turns to the west and makes its way through the Krupinská planina with five meanders. Then the valley opens to the south-west and the Litava passes the place Drienovo, joins with the righthand tributary Vrbovok before it flows through Plášťovce and flows into the Krupinica on the left-hand side. On Fig. 2, the average daily values of air temperature from the station Bzovík (latitude 48° 19'09'', longitude 19°05'38''; 355 m a.s.l.), and average daily discharges and water temperature from the gauging station Litava: Plášťovce (7600 -latitude 48°09'25'', longitude 18°58'18'') during the years 2006-2020 are presented (database of SHMI (Slovak Hydrometeorological Institute)).

Methods
In the past, linear regression models were often used, which succeeded in simulating stream temperatures with air temperatures when they were above 0°C. When air temperatures are below 0°C, the trend changes significantly, and therefore a new function was introduced to correctly simulate stream temperatures when air temperatures are low. This is mainly because at the highest and lowest air temperatures, the relationship between stream temperature and air temperature usually remains linear. The waterair temperature relationship can be well described by a continuous S-shaped function. Several mathematical functions were tested to represent this relationship, but the logistic function parameters are the most stable and its parameters have physical meaning Ratkowsky (1987) where: Torepresents the average daily water temperature, Tarepresents the average daily air temperature, αcoefficient which estimates the highest value of water temperature, βis the avarage daily air temperature at the inflection point, ɣfunction of the steepest slope of the logistic function.
The basic logistic regression model proposed by Mohseni et al. (1998) for weekly data relates the stream water temperature with air temperature by using the following equation where: To is the stream water temperature; Ta is the air temperature (the only input variable); b, c, d, eare four model parameters.
(Note that we use a different notation than Mohseni et al. (1998) to simplify the plot), which shows the lower (a) and upper (b) limits of water temperature, the slope at the inflection point of the logistic regression (c), and the air temperature at the inflection point (d). The parameter c can be estimated or it can be chosen directly.

Statistical analysis of observed data
The water temperature of the Litava River depends mainly on air temperature and river bed temperature. Also groundwater inflows or spring-ups are thought to influence the surface water temperature of the Litava River. The water temperature is more stable than air temperature. The mean annual water temperatures exhibit a substantially lower range, in comparison with annual readings of air temperatures. Table 1 summarizes the descriptive statistical characteristics of water and air temperature time series for the 2006-2020 period. Longterm mean of water temperature at the Plášťovce gauging station for the 2006-2020 period was 10.95°C, and 9.94°C for air temperature in station Bzovík. It is in agreement with previous findings (Pekárová et al., 2011) that water temperature of a stream is determined by the air temperature of the environment through which it flows. This fact is of high relevance for indirect estimates of water temperature in streams using only air temperature observations. The histogram of daily temperatures (Fig. 3) shows that the water temperature time series (similarly to the daily air temperatures) exhibit a bimodal distribution.

Daily fluctuation of water temperature
Both water and air temperature series show diurnal (daily) patterns. Daily fluctuations are, in general, higher in smaller streams, and also in deforested areas, where the bank vegetation does not prevent water against overheating during the day. The streams have their springs at higher altitudes from where they flow to lower locations, which causes a longitudinal increase in stream water temperature. Low temperature fluctuations are typical for large rivers, or for small streams close to their springs. This is because groundwater temperaturetheir main source of inflow, only slightly differs from the local mean yearly temperature. On the Figure 4 you can see the course of water temperature and air temperature in an hourly step during two periods in the month of September 2022. In the first series, it was a stable weather with a typical course of air and water temperatures, where the daily maximum air temperature is approximately between 1-2 pm and the maximum water temperature is between 6-8 pm. In the second case (September 17-20, 2022), there was a change in weather and also a change in the trend of daily temperature in the stream, where the typical diurnal variation practically does not occur, but the temperature drops linearly. Also considering this trend, we decided to use the diurnal step data for the analysis.

Model analysis and selection
In Tables 2-4 we can see the individual parameters of the regression models for the selected months. Table 2 shows the parameters for the whole data set and for The aim was to divide the year into a colder and a warmer period and thus to capture the hysteresis of the given data in the logistic regression curve, which we can also see in the graphs in Fig. 5 and 6. In Fig. 5 we can see a logistic regression curve from daily data for the whole period and in Fig. 6 for selected intervals of months. After we have assessed these data, it was decided to divide the data into 4 series by seasons, specifically: December to February, March to May, June to August, and September to November. The parameters of the logistic regression function for these periods are listed in Table 3 and 4 and the logistic functions are shown in Fig. 7. As we can see, the shape of the curve is practically the same only for the months of December to February and March to May. If we consider the period from June to August, it does not reach the shape typical for logistic regression model, and during the months of September to November regression is almost linear. In general, we can conclude that the logistic regression model, divided into these 4 periods, has been refined. Our goal was to find a model that can simulate the effect of air temperature growth to the water temperature in the Litava River. Since we are particularly interested in high air temperatures during summer heat and low flows, the above analyzes demonstrate that it is enough to use a linear model for data in the months of June-August. In the next step, we will add the effect of discharges on the water temperature in this model.

Conclusion
Both climatic changes and anthropogenic aspects affect the temperature of the stream. For this reason, it is very important for the future evaluation and prediction of the evolution of water temperature in rivers to know the dependence of water temperature on air temperature, which is also an ideal starting point for prediction models, given its availability and the amount of data from the station network. The logistic regression model used in the work was that of Mohseni et al. (1998). This model proved to be optimal for the purposes of this study. In this work, we examined daily temperature for the Litava River for the period 2006-2020, relying on data from the Plášťovce water gauging station and the Bzovík climate station. We examined the effects of the data collection interval when we evaluated two short periods in the month of September 2022. For these two periods, we focused on the meteorological conditions. In the first series it was a period with a stable weather trend, where a typical diurnal step of the temperature in the frame of the bottom was captured by standard peaks of the daily maximum and minimum. In the second case, when the cooling occurred, a linear decrease in water temperature was recorded, which directly depended on the decrease in air temperature. Based on these facts, we decided to use the data in the given daily step in the next work. In the next step, we focused on seasonality, the effects of which on the given logistic regression model have been little explored in the literature. In most cases, the models use data in the daily or weekly step, without taking into account the influence of the particular phase of the year. For this reason, we decided to explore two alternatives. In the first case, we divided the year into two seasons, September to February and March to August. In this case there was only a slight improvement, so in the next step we decided to divide the year into four seasons, largely copying the distribution of the annual periods. In this case, there was an improvement in the logistic regression model in three of the four periods. The only period in which there was virtually no improvement in the parameters was the period from March to May. For comparison, we created a logistic regression model for the entire observed period without dividing it into individual seasons. From the results presented, we can see the effects of seasonality on the estimation of water temperature in the river. It proved practical to divide the period into four periods when the model was refined to three of them. It follows that we need to examine more closely the effects of seasonality on our own control models, then on the transition from winter to spring months. In the future, we will add the effect of discharges on the water temperature in this model.