## 2 Methodology
### Case of Study  
Crop simulation is important to know the morphological characteristics of the crop according to the meteorological parameters and to anticipate in decision-making on agriculture, food security, climate change, energy saving, etc. [32; 33]. To address the importance of meteorological influence, in this work, the application of a modified methodology to generate a typical weather sequence is applied; in this case, a TMW is applied in order to be used in the growth simulation of microalgae in a HRAP in the Madrid region. On the other hand, studies have been done on microalgae productivity as a raw material in the generation of high value-added products or as a source of energy. Therefore, some authors have used estimates of climate variables (Cligen) to incorporate them into microbial growth models to estimate microalgae production [34; 35]. Microalgae are phototrophic microorganisms that grow rapidly and reproduce in hours. Therefore, microalgae generate a large amount of biomass in a relatively short time compared to other living species. Biomass production and WWT are affected by uncontrollable meteorological parameters that vary throughout the cultivation period. Among these parameters, the temperature and solar irradiance between 400 and 700 nm (PAR) [36] are indispensable for microalgae growth [37; 38; 39; 40; 41]. The work carried out in [37] shows that the observed reduction in the mean daily PAR radiation entering the greenhouse affects the plant metabolism. The same effect is observed when the temperature stress is applied to the crop [42]. Therefore, due to the short hydraulic retention time for microalgae development, a TMS per meteorological season is studied using the data for the Madrid region. The four TMWs to be generated, one for each meteorological season, are based on the PAR and temperature in 18 wastewater treatment plants (WWTP) that already exist in the Madrid region, as shown in Figure 1.  
Due to the availability of simultaneous PAR and temperature data in these locations of WWTPs, a 15-year set of PAR and daily mean, maximum, and minimum air temperature values was used. PAR has been obtained from Kato bands, provided by the spectral resolved irradiance (SRI) of the Satellite Application Facility on Climate Monitoring (CMSAF), which belongs to the European Organization for the Exploitation of Meteorological Satellites (EUMETSAT) [43]. The daily mean temperature was obtained from the European Center for Medium-Range Weather Forecasts (ECMWF) [44]. The period used in the present study was 1991 to 2005, with a spatial resolution of 0.125\({}^{\circ}\)\(\times\) 0.125\({}^{\circ}\). These four parameters are then grouped into a matrix in which two additional columns, the temperature range and the solar day length, were added by calculations. The latter is used to take into account the photoperiod; that is, the number of solar hours during which microalgae are exposed to PAR and the maximum possible duration of the solar day [45]. Madrid is almost located in the center of the Iberian Peninsula (between 41.15\({}^{\circ}\) N and 39.88\({}^{\circ}\) N latitude and between 3.05\({}^{\circ}\) W and 4.57\({}^{\circ}\) W longitude) on the Central Plateau, and the altitude ranges from 476 to 2428 m and the average is 678 m above sea level, with a surface area of approximately 8000 km\({}^{2}\). The orography of the Madrid region is characterized by the presence of the Central Mountain Range in the north and west of the territory, while the remaining areas are the plains and the Tajo River Valley. The climate of the region is strongly influenced by its orography. Therefore, in the range and its surroundings, there is a mountain climate (Dsc according to the Koppen-Geiger classification) [46; 47; 48] and an oceanic-Mediterranean climate (Csb). On the other hand, there is a typical Mediterranean climate (Csa) in the plains and a semi-arid climate (BSk)  
Figure 1: Location of WWTPs studied in the Madrid region. in the southern areas and around the Tajo River Valley.