*2.2. Sampling Design*

The sampling was carried out in the same habitats (top, slopes and bottom of the ravine) during the vegetation period (from April to September) in two-year wet (1993, 1994) and in two-year dry (2009, 2010) climatic conditions. The traps were placed in three rows (along the transect) in the seven sections: at the top of both slopes, along the slopes, in the bottom of the ravine and the banks of the stream (Figure 2). Sampling was performed in 21 sites. At each sampling site, ten pitfall traps were placed at a distance of 10 m between traps. The trap is a polyethylene beaker 90 mm in diameter and 300 ml in volume with a solution of salt on the bottom. The traps were operated for two weeks every month, and samples were taken once a week.

In all sites of sampling, the soil moisture level was recorded. The values of humidity from 1 to 3 were considered as dry, from 4 to 7 as moist and from 8 to 10 as wet.

Carabid beetles were identified to the species level using the keys by H ˚urka and Müller-Motzfeld [42,43]. Carabid species were classified according to their humidity preferences as hygrophilic, mesophilic and xerophilic according to Turin [44], and were divided to trophic groups following the literature [45–47].

**Figure 2.** The studied branched ravine. The sampling sites and corresponding habitats are indicated as follows: the bottom of ravine or the banks of a temporary stream are marked with black crosses, the slope of the ravine is marked with red triangles, and the forest on the plakor is marked with purple diamonds. Scale 1:15,000. The arrow points to the north.

#### *2.3. Statistical Analysis*

Data were processed using R version 3.5.1 [48]. Principal component analysis (PCA) was performed with the PCA function in the FactoMineR package [49], and non-metric multidimensional scaling (nMDS) with metaMDS from vegan [50]. The quality of representation of the variables on the factor map was estimated by the cos<sup>2</sup> index. A high cos2 indicates a good representation of the variable on the principal component and vice versa. Before analysis, the data were Hellinger transformed [51]. Tests with the rankindex function, which ranks correlations between dissimilarity indices and gradient separation from the vegan package, showed that the Kulczynski index is in the best accordance with the humidity gradient, and, thus, it was used. Figures were implemented using R packages ggplot2 [52], factoextra [53], ggrepel [54], directlabels [55].

Despite the small size of our data by computer standards, they can be classified as high dimensional, since the number of species exceeds the number of stations (for example, the matrix for the dry season has 21 columns and only 13 rows). Soil moisture is an important factor determining the quantitative development of ground beetle species. On the other hand, we can expect that a certain level of soil moisture corresponds to a certain level of quantitative development of a particular species. Therefore, we decided to build a model that would predict the expected soil moisture level based on the abundances of ground beetle species (see Table S1). For the construction of the models, we selected species (21 species) that were present in both wet and drought periods. As a training set, we used data on the abundance of ground beetles and soil moisture in the wet period, and as a test set, we used similar data for the drought period. Classical approaches such as least squares linear regression are not appropriate in these settings [56]. In the high-dimensional settings, more appropriate are dimension reduction methods, such as lasso and principal component regression (PCR). PCR belongs to unsupervised methods since response—humidity in our case—is not used to determine the principal component directions. On the other hand, lasso is the supervised dimension reduction method. We decided to use these two methods to see how well the results fit together. The source data and code are given in the Table S1: information computation S1. To build the lasso model, we used the glmnet R package. To build the PCR model, we used the pls R package.

The traditional community index, i.e., Simpson's dominance, is generally used to describe biological assemblages in order to infer ecological trends about the effects of disturbance [57,58]. The assemblage structure of ground beetles was estimated using Simpson's dominance index using the package Species Diversity & Richness [59]. The Sørensen index was used to compare the species composition of the ground beetle assemblage between the two periods [57]. Separation of

the two components of Bray–Curtis dissimilarity—balanced changes in abundance and abundance gradients—was performed according to Baselga [60].
