Insights on Climate-Driven Fluctuations of Cave 222 Rn and CO 2 Concentrations Using Statistical and Wavelet Analyses

Understanding the ﬂ uctuations in cave air concentrations and their climatic control is substantial not only to preserve the quality of indoor atmospheres but also to avoid the risk related to the presence of hazardous substances. In this study, we investigated the most in ﬂ uential factors a ﬀ ecting 222 Rn and CO 2 concentrations, the nature of their dynamics, and their coupling with climatic variations. For this purpose, we combined a set of mathematical methods that included a statistical and wavelet analysis of a 6-year time series in Rull Cave (Spain). Generally, the 222 Rn and CO 2 dynamic in cave air showed similar patterns. However, the obtained results show that these gases have a di ﬀ erent frequency response. Thus, the annual component of 222 Rn and CO 2 is controlled by the relationship between external and internal temperatures. At low frequencies, both gases are a ﬀ ected by the same variables when the cave atmosphere reaches a minimum concentration. However, when the cave atmosphere is isolated from the outdoors, 222 Rn and CO 2 behave di ﬀ erently and disturbance caused by the visitors is evidenced in terms of the CO 2 concentration; the latter observation was con ﬁ rmed by the wavelet analysis at high frequencies. In contrast, the 222 Rn concentration shows important variations following rainfall, which was weakly identi ﬁ ed in the CO 2 concentration.


Introduction
The study of microclimate and gas composition in underground environments is critical in many investigations such as global carbon cycle, paleoclimate, geological and parietal art conservation, and health risk for guides and visitors. In particular, understanding gaseous fluctuations in indoor environments is of great importance when analyzing the possible existent health risks related to the presence of humans in these locations. Particularly, in poorly ventilated environments, this subject is critical because of the concentrations that may result in severe exposure levels for people [1,2].
Within indoor environments, tourist caves accumulate sufficient features to be considered potential locations to be managed as indoor gas concentrations can be significant [3,4]. For instance, there are many examples of tourist caves with high 222 Rn and CO 2 concentrations. Alvarez-Gellego et al. [5] reported an annual average 222 Rn concentration of 31.9 kBq m -3 in Castañar Cave, the highest radon gas concentration in a Spanish cave. In Postojna Cave (Slovenia), Gregorič et al. [6] noted maximum radon and CO 2 concentrations greater than 37 kBq m -3 and 4700 ppm, respectively. Fernandez-Cortes et al. [7] demonstrated that up to 5000 ppm of CO 2 were stored in the Ojo Guareña Karst system, which was characterized by large daily oscillations of CO 2 levels in caves (from 680 to 1900 ppm day -1 on average) caused by daily oscillations of the exterior air temperature affecting the cave air temperature. In the Lake Cave of Tapolca (Hungary), Somlai et al. [8] confirmed that the 222 Rn concentration could reach greater than 15 kBq m -3 .
Analysis of air in tourist caves is a key factor to guarantee the quality of the indoor atmosphere and that it is free of hazardous substances. Both gases, CO 2 and 222 Rn, affect human health differently and they should not exceed certain maximum levels. For example, an annual 222 Rn maximum concentration of 300 Bq m -3 is established in closed work environments [9]. For CO 2 , the workplace long-term exposure limit (8 h) is set at 5000 ppm [10]. Consequently, the determination of factors that control gas concentration and its annual variability should be carefully performed for each indoor environment, including underground tourist caves. The 222 Rn concentration level depends on a complex relationship between different external and internal factors [11]. It is a decay product of radium, exhaled from certain rocks and soils. In addition, the CO 2 presence in caves is a consequence of soil activity [12][13][14], degasification from dripping water [15][16][17], and human contributions resulting from respiration [18][19][20][21]. Thus, once gases are produced, environmental factors, which control the cave atmosphere, determine the gaseous accumulation in the confined atmosphere. The porous system of the rocks and soils and the presence of water define the diffusion rates of both gases [22][23][24][25]. Diffusion is among the mechanisms responsible for gas migration and accumulation in an underground environment, and it directly depends on the physical properties of the porous materials [26][27][28]. In addition, the relationship between environmental factors (mostly the relationship between indoor and outdoor temperature) is responsible for the ventilation of the cave atmosphere [29][30][31]. The influence of factors such as the amount of rainfall [32,33], pressure difference between the cave and outdoor atmospheres, soil temperature [34], wind gusts [35], and geomorphology [36] is a determinant in assessing the ventilation regime. Variations in cave-air 222 Rn and CO 2 concentrations can be interpreted together because of the relative dependence between both gases, mainly due to ventilation processes. Consequently, indoor cave concentrations depend on a balance of gaseous production and accumulation and gaseous exchange with the outdoor atmosphere.
To adopt mitigation actions in caves with high exposure levels, it is necessary to understand the main factors controlling the gaseous cave dynamics as well as determine the annual periods with the maximum gas concentration. To address this topic, complexity analyses have been performed in confined environments providing conclusive results [11,17,29,[37][38][39]. For instance, wavelet analysis [40][41][42][43], which has not been commonly employed to cave data analysis [44], was satisfactorily applied to a data period from Rull Cave [20] to differentiate the stable natural trends in cave dynamics and induced perturbations caused by visitors. In addition, multivariate statistical analysis provides a useful tool to empirically establish easy and understandable correlations between different parameters, highlighting the influence between one principal parameter and those that are related. Although these techniques have been applied to different subjects such as evaluating groundwater pollution [45], assessing the spatial and temporal trend of precipitation in a local area [46], or predicting water permeability in rocks [47], they have been discreetly applied to cave data analysis. However, recently, this type of analysis showed satisfactory results in the study of the spatial variability of cave-air carbon dioxide and methane concentrations in Gaden and Cathedral caves [35]. The main objectives of this study were to analyze the microclimatic and 222 Rn and CO 2 concentration time series and determine their dynamics and coupling with climatic variations in a shallow cave (Rull Cave). The key innovations introduced in this study are based in the combination of multivariate statistical and wavelet analyses to establish the structure of the variable dependence and the interrelationship and frequency response of environmental variables and gaseous concentration in subsurface environments. Although some complex statistical analyses have been previously developed in subterranean sites, the combination of the analysis presented in the present research has not been earlier implemented for the study of underground caves. To develop the analysis, first, we applied the principal component analysis (PCA) [48] for grouping the different variables in correlated ensembles during different recharge-discharge stages that Rull Cave annually undergoes. Second, stepwise multiple regression analysis was used to determine the highest weighted factors that influence 222 Rn and CO 2 concentrations as well as predict their concentrations during each stage. Finally, we analyzed the frequency components and their relationship with the variables in the cave atmosphere and soil-external atmospheric systems using wavelet analysis.  [20,25,49]. The cave has a nearly round shape with a length of 1535 m and a calculated volume of 9915 m 3 [20]. In addition, there are some minor corridors surrounding the principal hall. The host rock of the cave has a variable thickness of 9 to 23 m, and in the highest level, it is located in the only entrance of the cave shut by a 3 m 2 door. CO 2 concentration in the cave is derived, mainly, from microorganisms and C3 plant growth in a silty-silty loam soil profile (approximately 1 m in thickness) developed above the cave and composed of quartz (70%), phyllosilicates (20%), calcite (5%), and feldspars (5%) [25]. C3 plants are densely distributed in the form of Mediterranean shrubs over the cave surface. The average measured δ 13 CO 2 value is -21.64‰ and -21.12‰ for the soil and cave air, respectively [49]. The predominant climate in the area is defined as a Mediterranean or warm temperate climate (Csa climate type, Koppen-Geiger Classification, [50,51]) characterized by a dry and hot summer. For the study period (November 2012-April 2018), the average daily temperature was 15.82°C with maximum and minimum values of 35.13°C 2 Geofluids and -1.18°C, respectively. The average total annual rainfall in the study area for the same period was 410 mm. Within this period, the driest year was 2014 (248 mm) and the wettest was 2016 (635 mm). Subsurface environments are subjected to different mechanisms that are derived from recharge, isolation, and storage processes, characterized by significant seasonal, and even daily, variations [39,49]. In Rull Cave, four different time-dependent stages were established to perform the statistical analysis: (1) gaseous recharge, coincident with the spring and summer seasons; (2) maximum gas concentration in the cave (summer); (3) gaseous discharge (summerautumn); and (4) a period in which the gas concentration reaches minimum values (winter).

Materials and Methods
Rull Cave is open to tourists. During the study period, 14450 people annually visited the cave, on average. Visits are not uniformly distributed in time. Maximum human perturbance occurs during March-April (Easter holiday) and August, with an average value of 74 and 92 visitors/day, respectively. In contrast, January (11 visitors/day) and February (13 visitors/day) always have the lowest number of tourist visits. Despite the human presence in the cave, microclimatic conditions are well preserved in Rull Cave, which is characterized by a thermohygrometric stability for the entire annual cycle. The average daily temperature in the cave atmosphere is 16.21°C with variations of ±0.70°C. The confined atmosphere results in humidity levels that are always near saturation (97.8%) as well as in the accumulation of both CO 2 and 222 Rn, which, on average, range annually from 533 to 3681 ppm and 645 to 3959 Bq m -3 , respectively.

Monitoring
System. Environmental and microclimatic data were recorded with a monitoring system specifically installed in the cave site from November 2012 to April 2018, which was maintained and periodically revised to guarantee data quality. However, unavoidable isolated failures of the monitoring system because of the long monitoring period resulted in certain gaps in data acquisition. All measurements were performed every 30 min. Indoor conditions were monitored using a COMBILOG TF datalogger (Theodor Fiedrich & Co., Germany). The datalogger was connected to the electrical supply but also had two security batteries to ensure some autonomy. Several probes were connected to the datalogger to acquire different microenvironmental variables. Air temperature and relative humidity data were obtained using Pt100 1/10 DIN and Rotronic HygroClip S3 sensors, with measurements ranging from -40 to 100°C and 0-100% and with accuracies of ±0.1°C and ±0.8%, respectively. A CO 2 nondispersive infrared analyzer (ITR 498, ADOS; Germany) was also connected to the same datalogger to obtain cave-air concentration measurements within the range of 0-10000 ppm (0.3% accuracy). Independently 222 Rn measurements were taken using a Radim 5WP Radon monitor (SSM&SISIE, Prague) with an 80-50000 Bq m -3 measurement range. Some additional measurements were also performed with both portable and permanent independent sensors installed at some additional points of the cave, although these measurements were only employed to check the truthfulness of the data recorded at the main monitoring point as previously described. More details regarding the monitoring system can be found in [20,25,49]. Air temperature in the cave exterior was recorded every 30 min using a HOBO U30 Weather Station Data Logger (Onset, Bourne, MA, USA). Additionally, a 147 RG2-M rain gauge (Onset Computer Corporation, Bourne, MA, USA, resolution = 0:2 mm) was employed to measure rainfall. Finally, beginning in February 2015, soil temperature was measured using a HOBO U12 logger (Onset, Bourne, MA, USA, accuracy = ±0:35°C).

Statistical Analysis.
Multivariate statistical analysis was applied to both gas concentrations ( 222 Rn and CO 2 ) and environmental parameters to estimate the dependencies between variables and their interrelationship using the code SPSS v.24.0 (from SPSS Inc.).
The dynamics of gas concentrations and microclimatic parameters behaved differently depending on the different stages of the cave atmosphere. As we have commented, Rull Cave has four different time-dependent stages. The beginning of stages 1 and 3 was defined by two different conditions: (i) changes in the temperature difference (ΔT) between outside (T out ) and inside (T ind ) of the cave (i.e., Δ T > 0 for stage 1 and ΔT < 0 for stage 3) and (ii) the existence of 10 consecutive days with an absolute variation of 200 ppm in CO 2 and 500 Bq m -3 in 222 Rn concentration. After that, stages 2 and 4 were determined by the occurrence of 10 consecutive days with an absolute variation less than 200 ppm in CO 2 and 500 Bq m -3 in 222 Rn concentration (i.e., 10 consecutive days with the persistent absence of variation in gas concentrations) ( Figure 1). 222 Rn and CO 2 variations occurring in Rull Cave during the study period were computed as discrete events. After the evaluation of the time series, increments of 60 ppm for CO 2 and 140 Bq m -3 for 222 Rn were established as significant, considering the accuracy and measurement range of the instruments used. The selected variations in gas concentrations with all the environmentally measured variables were reported as a database ( Figure 2). PCA allows assessing variable grouping within multivariate data by the calculation of principal components for a given percentage of the total variance. These components are calculated by scores or coefficients, which incorporate the following information: (1) the absolute value of the coefficients (high values in several coefficients of the same principal component show a close relationship between them) and (2) the sign of the coefficients (the same or opposite sign of several coefficients shows the direct or inverse relationship between them, respectively). PCA was performed using Varimax as a factor rotation method. In this analysis, the employed variables were 222 Rn and CO 2 concentrations, indoor environmental variables (cave temperature and relative humidity, T ind , and RH ind ), visitors, and atmospheric variables (rainfall, outdoor temperature (T out ), and soil temperature (T soil )).
Multiple linear regression analysis was carried out to quantify the associations established in the PCA for each stage. For this analysis, CO 2 and 222 Rn act as dependent variables using the previously defined database (increments XWT and WTC to understand the influence of T out in the cave atmosphere. Multiresolution cross-analysis to measure the similarity of the variations over time between and T out and gaseous concentration.   Geofluids equal or greater than 60 ppm for CO 2 and 140 Bq m -3 for 222 Rn). They were computed together with the environmental parameters (rainfall, visitors, T ind , T out , T soil , and RH ind ), which act as independent variables in the multiple linear regression analysis. This analysis also included the weight (magnitude of the standardized coefficients) of each independent variable in the calculation of multiple linear equations and therefore quantified the influence of each variable in the variation in gas concentrations during each stage ( Figure 2).

Wavelet Analysis
Applied to the Time Series. Aiming to establish the contribution of the different variables to the gas concentrations in the cave, recorded climatic signals were individually decomposed using the wavelet analysis [40][41][42][43]. Discrete wavelet transform (DWT), using Daubechies 5 as a mother wavelet, was employed to differentiate the different frequencies (or periodicities) contained in the analyzed signals through a complete time-frequency analysis ( Figure 2). The distinction of the different frequencies of the signal allows differentiating the contribution of these components (daily, intermediate, and annual) to the real recorded signal. This analysis was developed using the Environmental Wavelet Tool (EWT) MATLAB-based code [44], in which the package developed by Grinsted et al. [52] was incorporated. The EWT was previously employed in similar analyses [20,53] offering accurate results. In addition to the particular decomposition of the individual signals, cross wavelet transform (XWT) and the wavelet transform coherence (WTC) were implemented between the pair of signals (one being the gas, CO 2 , or 222 Rn concentration) to understand the influence of the individual variables in the cave atmosphere ( Figure 2). Results of this analysis were evaluated through the interrelations between two time-domain signals (explained by the XWT) and the coherence between them (WTC), resulting in the identification of areas with high common power in the final scalograms [52]. Finally, to conclude the analysis and with the aim of measuring the similarity of the variations over time between two signals [54], a multiresolution cross-analysis was also performed between them [55,56]. The analysis results in values between −1 and 1, with higher correlation coefficients showing higher similarity between the analyzed signals.

Results and Discussion
3.1. Frequency Response of 222 Rn and CO 2 Time Series. Figure 3 shows the temporal evolution of gas concentrations and microclimatic parameters in the cave and soil and the external weather conditions from December 2012 to April 2018. The recorded time series also includes the daily visitors. Rull Cave atmosphere shows the typical thermohygrometric stability observed in shallow caves [22,30,49]. The cave atmosphere temperature and humidity are very stable with an annual variability of ±0.7°C for temperature and 3.1% for relative humidity. In addition, 222 Rn and CO 2 concentrations show distinguishable seasonal and nearly regular cycles, similar to the outdoor temperature. The key factor to understand the influence of each variable is to consider that the gas concentrations of 222 Rn and CO 2 are the result of the interaction of different components that prevail under different periodicities [17,20,57,58].
Interannual variation of CO 2 and 222 Rn depends mostly on the relationship between outdoor and cave temperatures which establishes the beginning and the end of the gaseous recharge and, in turn, the length of the different annual cycles of gaseous concentration. The beginning and end of the gaseous recharge and discharge also establish the annual periods in which the cave is recharged and discharged. Interannual differences in CO 2 cave concentration also depend on CO 2 soil concentration, which is affected by soil temperature and water content. Outdoor temperature influences soil temperature whereas soil water content is related to rainfall. Consequently, interannual rainfall variations exert their influence in the gaseous concentration [20,49].
Variations of CO 2 and 222 Rn at lower frequencies (daily to annual) are evaluated in the present study. The 222 Rn and CO 2 time series can be decomposed into different components following different multiresolution levels corresponding to daily, intermediate (from a week to a few months), and annual periodicities.
There are some differences between the frequency decomposition of both signals (  (Figure 4(b)).

Determination of Control Parameters in the Cave
Gaseous Atmosphere. PCA considered the database for the four different gaseous stages that Rull Cave undergoes 5 Geofluids ( Figure 1). This analysis shows, within each stage, the group of variable changes that exerts major (linear) predominance in the cave gas composition (Table 1).
Gaseous recharge in the cave (stage 1) simultaneously occurs with increases in the outdoor temperature. 222 Rn accumulates in the cave because of the relationship between the temperatures, which is responsible for the isolation of the cave atmosphere, allowing the 222 Rn concentration to increase. Consequently, T out , T soil , and, inversely related, RH ind appear in Component 1 with this gas. However, the absence of CO 2 in this component is remarkable. Although the general trend of Rull Cave shows simultaneous increases in both gases ( 222 Rn and CO 2 ), the presence of an important number of visitors during the Easter holiday is predominant in determining the CO 2 concentration in the cave (Figure 3), and consequently, Component 3 demonstrates this significant influence of visitors on CO 2 concentration. In Component 2, the presence of a high coefficient for rainfall and indoor temperature might be related to the fact that these variables are not the principal parameter in determining Rull Cave gas concentration during this stage. In addition, the dry conditions outdoors establish this variable grouping.
When the cave reaches its maximum gas concentration (stage 2), continuous tourist visits that occur during the summer (Figure 3) have an important influence on CO 2 concentration and cave temperature (Component 2). During this stage, air renewal in the cave atmosphere is nearly nonexistent causing cumulative effects of an increase in CO 2 concentration and cave temperature as a consequence of the visitors. This might be the most influential factor in CO 2 concentration increases in the cave. Meanwhile, the 222 Rn concentration is directly related to outdoor temperature variations (Component 1). Although environmental parameters also affect the CO 2 concentration, the high visitation during stages 1 and 2 triggers the component grouping for these stages. When the gas concentration (stage 3) starts decreasing in the cave atmosphere, both gases are matched in Component 1. The gas concentration simultaneously decreases for both gases because of new air mass movements resulting from indoor and outdoor air densities affected by changes   Results from PCA allow establishing gas concentration from the most influential variables calculated for each stage. Respectively, as shown in Figures 5 and 6, 222 Rn and CO 2 concentrations act as dependent variables estimated by multivariate analysis as a combination of the independent variables established in the PCA grouping ( Table 1).
The goodness-of-fit of the 222 Rn and CO 2 concentrations shows proper accuracy as demonstrated in most cases by the correlation coefficients obtained for each analysis which varies from 0.4660 to 0.9071. Changes in cave behavior are highlighted in the previous analysis in which the predominant variables in determining the cave gas concentration change depending on the cave stage. Relations between outdoor and indoor temperatures are always present within the 7 Geofluids entire annual cycle as demonstrated by the presence of these variables (T ind , T out , or even T soil , which is dependent) in the multivariate analysis. During gaseous recharge and once the cave is recharged (stages 1 and 2), the relationship between outdoor and cave temperature determine the 222 Rn and CO 2 accumulation. The isolation of the cave atmosphere, which is calm during these stages, results in a major influence of visitors on the CO 2 concentration (Figures 6(a) and 6(b)). The discharge period is described by less isolation of the cave atmosphere with a predominance of air mass movements as a consequence of changes between the temperature relations (T out and T ind ). Scarcer changes in the gas concentrations are simultaneous because of the involvement of the same variables ( Figures 5(c), 5(d), 6(c), and 6(d)).
Results from PCA and multiple linear regression analysis demonstrate that the relation between temperatures (T out -T ind ) is always present in the determination of cave gas concentration. Furthermore, the presence of visitors has Although rainfall only appears as a control parameter in one of the performed multivariate analysis, its influence on the gaseous atmosphere in Rull Cave has been previously demonstrated [25,49]. However, it is likely that the rainfall behavior in the study area (it is scarce and irregularly distributed in time because of the semiarid climate; Figure 3) results in the multivariate analysis not properly reflecting the influence of this variable in the cave gas concentration. Consequently, the influence of the previously mentioned variables (temperature, visitors, and rainfall) needs a particular analysis and will be individually analyzed next.

Individual Analysis of Control Parameters in the Cave
Gaseous Atmosphere 3.3.1. Temperature. Time series data indicate that the variation in both gases, 222 Rn and CO 2 , is a consequence of the temperature difference (T out -T ind ) variation at an annual scale. As previously demonstrated, this is among the most influential parameters, which establishes the seasonal component of both signals. The indoor temperature varies within a range of ±0.7°C, which supposes a small percentage considering the annual variation of the outdoor temperature (nearly 22°C). For this reason, the influence of variations in the temperature gradient between the exterior and cave air can be evaluated by studying the outdoor temperature variation, as confirmed by the wavelet analysis. Both gases, 222 Rn and CO 2 , reach a maximum concentration during the warmer months. The entrance of external air (with a low CO 2 and 222 Rn concentration) by an advective process significantly decreases the cave air gas concentrations during the coldest periods. Individual analysis of the different signals (Figure 7(a)) establishes the different predominant periodicities for the entire evaluated period. CO 2 and 222 Rn behavior coincides at lower frequencies: the seasonality within the 1-year band    Table 1). The unstandardized coefficient (coefficient) of each predictor variable within the multivariate analysis as well as its weight (standardized coefficient) is shown for each individual prediction. * indicates significant variables in the multivariate analysis. 9 Geofluids is always highlighted with the 1-year band periodicity strongly marked. In addition, the daily periodicity of temperature is clearly marked within the 1-day band. CO 2 and 222 Rn daily variations reflect that gases are also sensitive to temperature changes at higher frequencies (1-day periodicities; better reflected for 222 Rn). Thus, temperature changes are the most important variable to establish the seasonal (annual) pattern of the gases as indicated by the higher energy (red colors) present in this band. The analysis of WTC and XWT (Figures 7(b) and 7(c)) demonstrates the existing phase relation (arrows pointing right) between the outdoor temperature and gas concentration considering the annual periodicity reflected by the different analyzed cycles. There are also some phase relations between both gases and outdoor temperature that appear at daily and intermediate periodicities although they are lower than those in the annual band. This fact confirms that gaseous variations at high frequencies are also dependent on other environmental variables.
Multiresolution cross-analysis shows that the highest cross-correlation (Figure 8) (0.84 for 222 Rn and 0.78 for CO 2 ) occurs for the annual periodicity (annual-seasonal resolution) such that the studied times series mainly covary in the low-frequency domain (i.e., annual variations). Rull Cave undergoes annual periodic cycles in which 222 Rn and CO 2 describe the same pattern even when the source of the gases is different. On the one hand, 222 Rn is a radioactive gas with a half-life of 3.8 days and a decay product of 226 Ra. It is released from minerals of soils and rocks into their pore space and then to the underground atmosphere. On the other hand, CO 2 is produced in soil and, following its production, flows through the pore system of soils and rocks to the cave atmosphere. A supplementary contribution of cave CO 2 is  Table 1). The unstandardized coefficient (coefficient) of each predictor variable within the multivariate analysis as well as its weight (standardized coefficient) is shown for each individual prediction. * indicates significant variables in the multivariate analysis. 11 Geofluids anthropogenic production, which occurs in tourist caves such as Rull Cave (Figure 6). This multiresolution analysis does not show important correlations out of the annual periodicity, which is probably related to the major influence of this annual periodicity.
Annual gas concentration is subject to two outstanding phenomena related to the thermal relationship between the outdoor and indoor air temperatures. This relationship directly determines the cave ventilation intensity [59][60][61] in which diffusive and advective fluxes occur. Changes in the relationship between outdoor and indoor temperatures constantly affect the gas concentrations through advective processes but, simultaneously, diffusive fluxes also occur from the epikarst to the cave. During an annual cycle, during stage 1, T out exceeds T ind , which causes a pause in the ventilation process and thus in the predominance of diffusive fluxes because of the isolation of the cave atmosphere as a consequence of the density difference between the air masses. This is clearly confirmed by the wavelet analysis with the 1-year band dependent on the temperature variation. When the temperature gradient (T out -T ind ) is inverted, the stored volume of gases depends on multiple variables, which might be different for each gas. Consequently, these transient changes in the ventilation state influence the 222 Rn and CO 2 concentrations affected by different procedures characterized by higher frequencies (lower periodicities). Variations of a high-frequency component of temperature may occur as consequence of the visitors in the cave who also affect the high-component CO 2 signal (Figure 7).  Overall T out -decomposed CO 2 Figure 8: Cross-correlation function between outdoor temperature and decomposed 222 Rn and CO 2 at different multiresolution levels.

Visitors. The impact of visitors on the gas concentration in Rull
Cave is strongest when the cave atmosphere has the maximum degree of isolation (i.e., during stages 1 and 2; Table 1, Figure 9). These results are coincident with multivariate analysis (Figure 6). The entrance of (many) visitors in the cave particularly affects CO 2 and markedly varies its high-frequency band, mainly during stages 1 and 2. High visitation during stages 1 and 2 may alter the CO 2 regime, but because it does not occur every day (visits are particularly concentrated on the weekends and bank holidays), CO 2 variations because of visitors are not daily occurrences. In addition, annually and once a week, the cave receives one larger group. For this reason, the periodicities of the interaction between CO 2 and visitors are mostly concentrated in the 4-16-day band. The energy across the multiresolution level corresponding to the 4-16-day band is high as indicated by the CO 2 variations (on occasions greater than 250 ppm) when large groups of people visit the cave. Energy variations in CO 2 show fluctuations, which are consistently, mainly, associated with the presence of visitors. PCA results establish that the effect of visitors on the 222 Rn concentration occurred mainly during stage 3. However, wavelet analysis did not detect changes in the 222 Rn concentration because of the presence of visitors: energy levels did not show matches between the gas variations and human presence. These results confirm that the number of visitors is not a suitable variable to evaluate changes in the 222 Rn concentration. To perform an accurate analysis, it will be necessary to compile a comprehensive record of the periods in which the cave door is open to relate the effect of visitors on the 222 Rn concentration.

Rainfall.
Although the multivariate analysis did not show a substantial influence of rainfall on 222 Rn and CO 2 concentrations, rainfall is among the variables that contribute to the increase in gas concentrations in the cave. Two main factors may increase the cave gas concentration. On the one hand, a piston effect occurs at the beginning of rainfall [62]. Gas concentrations stored in the voids of the soil and rock porous system are pushed into the cave. If the rainfall occurs outside of the recharge period, this effect is highlighted, because the concentrations in the porous system are higher than those in the cave. This effect is noticeable the first time there is a break in rainfall. However, after the washing effect produced by rain, water fills the pore space and avoids the cave degasification, as the gases are retained. On the other hand, rainfall water dissolves the gases accumulated in the soil and transports them into the cave. When the water enters the cave, degasification contributes to increases in the gas concentration.
Wavelet analysis demonstrates that rainfall and 222 Rn show a similar behavior in the high-frequency band. Analysis developed from May 2015 to April 2018 (a set of data with no missing data) demonstrates that the relationship between both signals appears at intermediate frequencies when a rainfall occurs. However, the direct influence of rainfall on the CO 2 of Rull Cave has not been detected neither from wavelet analysis nor from PCA-multivariate analysis for the studied period. Within the period from May 2015 to April 2018, three important rainfall episodes of greater than 50 mm occurred during October-November 2015, April 2016, and November 2016, which affected the 222 Rn concentration in the cave and which are identified in the 4-32-day period band (Figure 10).
Two different rainfall episodes were specifically analyzed. First, during April 2013 (Figure 11(a)), after a rainfall episode of 99.2 mm, the 222 Rn concentration in the cave increased by 449 Bq m -3 . This rainfall episode was followed by some days   13 Geofluids without precipitation and then by consecutive wet days when the 222 Rn showed a new increase. Second, during December 2016 (Figure 11(b)  14 Geofluids increment. A sigmoidal Gompertz curve establishes that the trigger rainfall value is centered on 77 mm ( Figure 12). However, on average, rainfalls greater than 100 mm produce increases in concentration varying from 400 to 600 Bq m -3 .
The study reveals that 222 Rn reaches its maximum concentration in the cave atmosphere when a rainfall of around the trigger value defined by the model occurs. But from this rainfall value, 222 Rn does not show increases although rainfall exceeds it. In contrast, variations in CO 2 concentration do not show the same behavior because CO 2 is only affected by very high rainfall ( Figure 12). Moreover, the wavelet analysis with CO 2 and rainfall was inconclusive and its increase after a rainfall episode was not as noticeable as that of 222 Rn ( Figure 10).

Conclusions
Determination of the factors that control the gas concentration in caves as well as the evaluation of the variability at different frequencies is important to preserve the quality of indoor atmospheres and avoid the risk related to the presence of hazardous substances. Thus, a comprehensive analysis of these factors is required for each indoor environment. In Rull Cave, 222 Rn and CO 2 concentrations depend on complex relationships between different external and internal factors.
For that purpose, we combined multivariate statistical and wavelet analyses. Wavelet analysis provided the decomposition at different multiresolution levels (daily, intermediate, and annual periodicities) of the gas concentration and environmental variables. This analysis concluded that 222 Rn and CO 2 have a different frequency response. In Rull Cave, the annual component of both gases, 222 Rn and CO 2 , corresponds to the major contribution of the total concentration and is controlled by the relationship between external and internal temperatures. However, intermediate and daily oscillations are also of great magnitude. For instance, the daily component of 222 Rn can modify the cave atmosphere by up to 443 Bq m -3 .
The variable grouping of the parameters established with PCA shows that when the cave is isolated (stages 1 and 2), increases in 222 Rn are dependent on temperature changes and relative humidity. This analysis also concluded that, in addition, CO 2 is determined by these factors but the presence of visitors during this period has a stronger effect on its concentration. In contrast, when the cave had the minimum concentrations, both gases are affected by the same variables.
The proposed methodology, combining multivariate analysis and wavelet analysis, highlighted the annual dependency of gas concentration on the temperature gradient (T out -T ind ) and its influence in the predominance of gaseous diffusion or advection. In addition, the energy fluctuations of the wavelet analysis confirmed the influence of the presence of visitors on the CO 2 concentration defined as high-frequency perturbations. The rainfall influence on the gas concentration of Rull Cave is perfectly defined for 222 Rn with a nearly instantaneous increase in this gas following a rainfall occurrence. On average, rainfalls greater than 100 mm produce increases in concentrations varying from 400 to 600 Bq m -3 whereas CO 2 is only affected by very high rainfalls.
Results obtained from this study evidence that the combination of multivariate statistical and wavelet analyses successfully established the structure of the variable dependence and their interrelationship and frequency response. We consider that this methodology can be applied to any other investigations in a cave atmosphere-soil-external atmosphere system.

Data Availability
The raw data of the statistical analysis performed in this study are available from the corresponding author upon request.

Conflicts of Interest
There are no conflicts of interest to declare.