## 2 Materials and Methods  
### Maturation Database  
In the present study, the maturation data were provided by Sogrape Vinhos S.A. (SV) and collected annually in the vineyards of SV and its supplier grape farmers. Data for three different Portuguese winemaking regions were used herein: Douro, Dao and Alentejo (Figure 1). Since these three regions have different terroirs and, mainly, are subject to different climatic conditions (their climatic characterization can be found in Section 3.1), they were selected to study the dynamics of grape berry quality parameters. These regions also provided longer and more consistent datasets of quality parameters. Vine blocks of two native varieties with strong national importance--cv. Touriga Nacional and cv. Aragonez--were chosen in Douro, Dao and Alentejo regions to study the dynamics of berry weight, titratable acidity, pH, potential alcohol, total phenols index and anthocyanins at maturity. The blocks of each variety are composed of different genotypes, using in some cases single-clone on other mixed-clone plantations. Plant ages were also widely varied, from 5 to more than 30 years and naturally, increased along the observed time period. In each year, most analyses were performed weekly, two to three weeks after the end of veraison until harvest. All the data were compiled into a digital database and validation of wet chemical data was performed in the laboratory facilities of SV. Data quality checking was also regularly undertaken. In the regions mentioned above, four vineyards were selected to be studied in this work (Table 1), and within those vineyards, a vine block (area specified in Table 1) was selected, based on two criteria: 1) blocks should be as close as possible to the local automatic weather station (AWS) and 2) maturity datasets should refer to ten or more years (for some vine blocks maturity data were available in the database for only a few years), except for the Alentejo region, where information for TON was only available for six years (Table 1). These choices aimed to maximize correlations between climate variables and grape berry quality parameters. The bunch sampling method was adapted from previous reports [35]. Bunches were sampled manually, switching randomly between the side exposed to the sun and the shaded side of canopies. Berries were sampled randomly from the top to the tip of each bunch, placed in closed plastic bags and stored in refrigerated and insulated boxes during transport to the laboratory. Analyses of grape berry quality parameters commonly selected for maturation control--berry weight, titratable acidity, pH, potential alcohol, total phenols index and anthocyanins--were performed up to 24 h after collection, and berries kept under refrigerated conditions. Collected berries were then divided into two sets of 200 berries each: one for analysis of berry weight, sugars and acids and another for phenolic  
Figure 1: Winemaking regions where Sogrape Vinhos S.A. (SV) collected the data. The borders of the winemaking regions in Portugal are delimited as defined by the Portuguese Institute of Vine and Wine (IVV). Only Douro, Dão and Alentejo are selected in the present study, as longer periods of data are available for these three regions. The locations of the selected vineyards are also shown: 1—Douro-D, 2—Douro-C, 3—Dão and 4—Alentejo. compounds analysis. One set of berries was weighed and then crushed and decanted. The obtained grape was used to evaluate sugars, acidity and pH. For sugar analysis, performed using refracometry, results were expressed in terms of potential alcohol percentage, considering 1% of potential alcohol as equivalent to 17 g/L of total sugars. Titractable acidity was analysed by titration of the sample with 0.1 M NaOH solution and the results were expressed as g of tartaric acid equivalents per L of juice (g/L). pH was analysed with a digital potentiometer. Phenolic compound analysis was carried out with the second sample of 200 grape berries.