## 2 Methodology
### Applying the TMS Methodology
Thereafter, the number n of observations is equal to the number of lags (n). Finally, the observations are arranged in ascending order x\({}_{1}\), x\({}_{2}\),..., x\({}_{n}\). The CDF of each observation is given by a monotonically increasing step function defined by:  
\[\text{CDF}(\text{x})=\left\{ \begin{array}{ccc}0&\text{for}&\text{x}<\text{x}_ {1}\\ \frac{(\text{k}-0.5)}{n}&\text{for}&\text{x}_{\text{k}}\leq\text{x}\leq\text{x}_ {\text{k}+1}\\ 1&\text{for}&\text{x}>\text{x}_{n}\end{array} \right. \tag{1}\]  
where k is the order number from \(1\) to \(n-1\). Then, the FS statistics of each sequence (in our case one week) for each given parameter (x) are obtained from the following Equation (2). In other words, the FS statistics for the candidate week are obtained by calculating the differences between the CDF (defined in Equation (1)) for this week (short-term) with the CDF for all the weeks contained in the corresponding weather season (long term) for each parameter and location. \[\text{FS}=\frac{1}{n}\sum\limits_{\text{i}=1}^{n}\delta_{\text{i}} \tag{2}\] \[\delta_{\text{i}}=|\text{CDF}_{\text{it}}(\text{x}_{\text{i}})- \text{CDF}_{\text{st}}(\text{x}_{\text{i}})|\]  
with CDF\({}_{\text{it}}\) and CDF\({}_{\text{st}}\) as the long-term and short-term CDF of parameter x. A weighted sum (WS) of the FS statistics corresponding to each parameter (FS\({}_{\text{j}}\)) of each week is calculated by applying a weight factor (wfj), where m is the number of meteorological parameters:  
\[\text{WS}=\sum\limits_{\text{j}=1}^{m}\text{wfj}\text{:FS}_{\text{j}} \tag{3}\]  
The weighting factor chosen will depend on the importance that each parameter has on the growth of microalgae and must comply with:  
\[\sum\limits_{\text{j}=1}^{m}\text{wfj}=1 \tag{4}\]  
Following the process, the 'best' candidate weeks (applying different options of wfs) are chosen according to a proportion determining the impact on the growth of microalgae. Thus, the proposal is to analyze the influence that these wfs have on the ranking of candidate weeks for a TMW. Indeed, the generation of TMYs was done using different climate parameters and different weighting factors [10; 17; 25; 45; 49; 50]. All these proposals are essentially similar; the main differences are the climate parameters to be included (type and quantity) and their corresponding weighting factors. The studied parameters: temperature (mean, maximum, minimum, and range); PAR; and solar day length play an important role in the development of a TMS. However, in our case study, they do not have the same impact on microalgae productivity. Therefore, some meteorological parameters may be more important than others. The most influential parameters receive the highest weighting factor (wfj), which is considered representative of their impact on microalgae growth. In Table 1, nine scenarios with different wfs are proposed to test different options of wfs. This will allow us to check the robustness of the methodology. The idea is to give equal importance to the temperature parameters--maximum (Tmx), minimum (Tmn), mean (Tme), range (Trg), solar irradiance, PAR, and solar day length (Nsol). Finally, the most representative sequence--week, in our case--among the five best-candidate weeks is obtained by determining the frequency of repetition of the candidate weeks, taking into account their persistence according to the different lags and wfs. Furthermore, the final decision on the choice of the TMW is also affected by its position in the particular season period. This position is validated by calculating the difference in Nsol between the day in the middle of the weather season and the fourth day of the candidate week, Equation (5). This was done to avoid extreme values for a season that could compromise expected results.