Identiﬁcation of Extreme Wind Events Using a Weather Type Classiﬁcation

: The identiﬁcation of extreme wind events and their driving forces are crucial to better integrating wind generation into the power system. Recent work related the occurrence of extreme wind events with some weather circulation patterns, enabling the identiﬁcation of (i) wind power ramps and (ii) low-generation events as well as their intrinsic features, such as the intensity and time duration. Using Portugal as a case study, this work focuses on the application of a weather classiﬁcation-type methodology to link the weather conditions with wind power generation, namely, the different types of extreme events. A long-term period is used to assess and characterize the changes in the occurrence of extreme weather events and corresponding intensity on wind power production. High variability is expected under cyclonic regimes, whereas low-generation events are most common in anticyclonic regimes. The results of the work provide signiﬁcant insights regarding wind power production in Portugal, enabling an increase in its predictability.


Introduction
To mitigate climate change, the decarbonization of our society is mandatory and has been encouraged by policymakers. One of the main measures to accomplish the desired decarbonization is the transition from conventional fossil fuels to low levels or to zero-carbon renewable energy technologies, which, in combination with energy-saving measures such as higher energy efficiency, will contribute to mitigating the impacts of climate change [1]. In this sense, renewable energies such as solar photovoltaic (PV) and wind represent key elements in the energy supply, now and in the near future. As an example, according to the national energy and climate plans of European Union countries, 80% of the new installed capacity will be based on renewable energy systems, namely, wind technology (onshore and offshore), which may become the main source of energy in the coming decades [2]. In the Portuguese case, this technology will increase from the current 5.4 GW to 9.3 GW (9.0 GW onshore and 0.3 offshore) [2].
Despite the environmental benefits of renewable energy sources, their weather-dependent nature and the intrinsic time and spatial variability of primary resources, as well as their poor predictability, often hinders their integration into power systems, especially when integrated on a large scale. This behavior differs from conventional power plants (e.g., coal, natural gas, and hydroelectric power plants), which can be easily managed to counterbalance, each time, the electricity demand to keep the power system stable. Conversely, taking into account the emergence of nearly 100% renewable energy systems, the conventional/fossil power plants tend to disappear, and with them, their support of flexibility needs. On the other hand, in some regions such as in the Iberian Peninsula, the impact of climate change will definitely change the water cycle, which affects precipitation and, consequently, the availability of hydro generation, increasing dependency on wind and solar power generation. Therefore, a long-term comprehensive approach, including an economic analysis, is required to promote the large-scale integration of wind and solar PV into power systems for the attenuation/minimization of climate change [1,3].
To support this holistic approach, new concepts need to be properly adopted, such as electrical grid interconnection over large regions (to facilitate the import of renewable electricity from remote regions), demand response (changing or reducing electricity demand to match the binomial supply/demand), sector coupling, and the use of energy storage technologies (which enables energy from times of abundance to be used in times of shortfall) [4]. However, to support a desirable carbon-free power system, these solutions may be insufficient under certain conditions, e.g., if there is no renewable generation capable of balancing the energy demand. Therefore, understanding the meteorological driving forces of power generation variability and extreme events is crucial to better integrating renewable power sources into the power system by helping to prevent its failure and minimize the impact of such forces from a technical and economical point of view. "Extreme events" refers to the so-called wind power ramps, but also to some other relevant phenomena such as energy droughts and low-generation events [3,5].
An approach commonly used in meteorology to improve the knowledge of the underlying role of meteorological conditions in a specific phenomenon is the use of weather circulation pattern approaches. These approaches enable the complexity of meteorological variability to be reduced, enabling the most common patterns in the climate system to be identified. These patterns are commonly defined through meteorological patterns on a synoptic scale, such as mean sea level pressure or geopotential height fields, and can be grouped into meteorological classifications. Other approaches can be found in the literature [2][3][4][5][6]. In [6], the authors applied a Grosswetterlagen classification to assess the meteorological conditions that would lead to extreme conditions-extremely high energy shortfall and extremely low renewable energy production. Although this type of approach is essential to understanding the driving forces of a specific phenomenon, in the last few years, machine learning approaches have also been developed and applied to accurately predict the wind speed/power variability and the occurrence of extreme wind power events [7][8][9][10][11].
Currently, the literature regarding the link between Portuguese wind power variability and meteorological conditions is still limited. Nevertheless, the connection between large-scale atmospheric circulation patterns and monthly wind power resources with the wind power production in mainland Portugal was analyzed in [12] using three circulation patterns: the North Atlantic Oscillation (NAO), the East Atlantic Pattern (EA), and the Scandinavian Pattern (SCAND). The authors showed that wind power variability in mainland Portugal during winter is influenced by the NAO and EA patterns. Regarding extreme events, special attention has been given to the so-called wind power ramps. In [11], a sequence of weather regimes was connected to the occurrence of those events, whereas in [13] the authors applied two different algorithms to identify, in an early phase, the existence of wind power ramps.
Using Portugal as a case study, this work contributes to understanding and characterizing wind power variability based on a well-known Lamb-based weather classification-type methodology adapted for the region under analysis. The characterization will enable an increase in wind power generation predictability, especially during extreme wind power events, ensuring that the underlying role of weather conditions is dully perceived. In order to assess the intensity changes and the occurrence of extreme weather events in wind energy production, a long-term period was used. The role and importance of atmospheric reanalyses for climate monitoring is now widely recognized, with the first generation comprising three datasets: the NCEP-R1 [14], the ERA-40 [15], and the JRA-25 [16]. Later, the NCEP-R1 was improved by fixing some errors and by updating the model parametrizations. As a result, a new product, NCEP-R2 [17], was released. This procedure also occurred for the remaining datasets. Nowadays, among reanalysis datasets the most widely used are the following: the NCEP-R2, the NCEP-CFSv2 [18], the ECMWF ERA-Interim [15], and the NASA MERRA-2 [16]. Recently, the ECMWF released the ERA5 reanalysis, replacing the former ERA-Interim products since this new product presents much higher temporal and spatial resolutions (1 h and nearly 31 km, respectively) compared to the aforementioned reanalyses. This product is being developed within the Copernicus Climate Change Service (C3S) and several authors have already highlighted the substantial improvement with respect to other similar products [19].

Data and
In this work, the ERA-5 reanalysis data were used and processed for the period from January 1950 to December 2019 (70 years of data) with hourly resolution.

Wind Power Data
In the latest years, there has been an effort from the scientific community to provide renewable generation data series (e.g., wind and solar PV), for long-term modelling and mitigation of the impact of the penetration of these energy sources in the electrical systems [20]. Typically, this information is derived from meteorological data sources such as reanalysis. Examples of these databases are (i) Renewables.ninja web tool [21] and (ii) the EMHires-European Meteorological derived HIgh resolution RES generation time series produced by the Joint Research Center [22]. In the first dataset, the authors establish a methodology based on a virtual wind power plant using NASA MERRA reanalysis with a bias correction. The EMHires dataset also uses the same reanalysis, although in this case, the authors use information on the locations of existing wind parks and the results are normalized, taking into account the annual statistics published by ENTSO-E.
The validation of these datasets has been carried out by several authors, showing that they are able to describe wind power production behavior in reasonable detail and present an annual average similar to the one reported by the transmission system operators [23,24]. However, for the specific case of Portugal, in [23] the authors showed some deviations between the observed and EMHires' simulated wind power load duration curve, whereas in [24], the author identified difficulties of these datasets in properly describing the daily average production profile, a very important feature of wind power production. To overcome these limitations, [24] implemented a measure correlate predict (MCP) methodology using data from the ERA-5 database coupled with principal component analysis and artificial neural networks. The approach was calibrated using the national aggregated wind power data during 2019-2020. Figure 1 presents the daily average wind power capacity factor for different datasets and the observed profile. Adapted from [24]. Figure 1 clearly highlights that the MCP approach is the only one capable of following the observed daily profile, preserving one of the most relevant features of wind power generation in Portugal. These results are supported by the hourly correlation data for the different datasets (Table 1).

EMHires
Renewables.ninja MCP Adapted from [24]. Figure 1 clearly highlights that the MCP approach is the only one capable of following the observed daily profile, preserving one of the most relevant features of wind power generation in Portugal. These results are supported by the hourly correlation data for the different datasets (Table 1). According to this table, the MCP also shows the best performance regarding the Pearson correlation. Thus, to obtain a long-term database, the MCP approach was used to estimate the wind power capacity factors from 1980 to 2018.

Wind Power Variability and Extreme Events
The knowledge of the wind power variability and the occurrence of extreme events (such as wind power ramps) and low generation events contribute to the characterization of risk of operating power systems in moments of great variability or absence of suitable resources. Additionally, it allows for the mitigation of technical and economic consequences, e.g., through dynamic allocation of additional power reserves. For this reason and due to the high growth of wind penetration into power systems in recent years, the importance and relevance of characterizing these events has grown in the last few years.
However, a characterization and definition of these events is very difficult to obtain, since it varies from system to system, and it needs to be defined according to the technical characteristics of the electrical system in which it is inserted [5]. In this sense, unanimous definitions have not yet been established [13].
In the case of wind power ramps, the definition is related to the notion of an event that is sufficiently serious to merit special attention. This sensitive classification is related to the potential damages and costs associated with poor or inadequate management of the event that is considered too high (or sufficient) to be able to be distinguished from situations without a ramp [5]. Another definition, a little more specific, consists of a sudden and significant change in the wind power generation injected into the electric grid by a wind power plant or an aggregation of wind parks in a way that requires a more or less untimely readjustment of the power system. According to [25], whenever there is a variation in the energy produced with sufficient amplitude in a relatively short period of time, one is in the presence of a ramp. In this case, the authors considered that this variation needs to be at least 50% of the installed capacity for a period of time in the order of 4 h or less. To overcome the previous drawbacks, the following definition was used in this work: In the previous equations, t represents the time and ∆t the time interval. Here, different values for ∆t were assumed and the type of ramp was calculated for the entire day under analysis to be later assigned to the respective weather regime. It is important to notice that this definition of ramp detection focuses only on the end and starting points of the interval. Eventual ramps that may occur during this interval are neglected.
Another relevant extreme event is the so-called low-generation event [26]. These events are characterized by a reduced availability of wind resources, and therefore, during these periods other technologies need to be explored to suppress the demand.

Weather Classification Approach
The weather circulation-type classification enables 26 distinct weather patterns to be identified using mean sea level surface pressure reanalysis data obtained from the project ERA5. Atmospheric circulation state classification into different types is a widely used technique to describe and analyze weather patterns and their impact on a predetermined parameter. Currently, it is possible to find several weather circulation classifications in the literature [27,28]. In [29], a validation of the classification was developed and the authors emphasized the quality of the most recent reanalysis databases in providing better estimates against old reanalysis databases. In [30], this classification was employed to estimate pan-European wind power generation coupled with a spatio-temporal clustering approach. The authors identified that training a model for different prevailing weather situations enables a small set of reference sites to be used without reducing the accuracy.
The main focus of this study is the use of an automatic version of the Lamb weathertype classification method (WT) initially proposed by [31] and already applied and tested by several authors, e.g., [32][33][34]. The main advantage of using a Lamb-based classification rather than other classification methodologies-commonly based on automated neural networks (ANN) or clustering techniques-is the capability of provide the full meteorological physical meaning of the results. The Lamb weather-type classification assumes that the wind circulation is almost geostrophic near the surface and uses the mean sea level pressure on a grid with 16 points around a central grid point for which the classification is performed [32] (Figure 2). identified using mean sea level surface pressure reanalysis data obtained from th ERA5. Atmospheric circulation state classification into different types is a wid technique to describe and analyze weather patterns and their impact on a predet parameter. Currently, it is possible to find several weather circulation classificatio literature [27,28]. In [29], a validation of the classification was developed and the emphasized the quality of the most recent reanalysis databases in providing be mates against old reanalysis databases. In [30], this classification was employed to pan-European wind power generation coupled with a spatio-temporal cluste proach. The authors identified that training a model for different prevailing weath tions enables a small set of reference sites to be used without reducing the accuracy The main focus of this study is the use of an automatic version of the Lamb er-type classification method (WT) initially proposed by [31] and already app tested by several authors, e.g., [32][33][34]. The main advantage of using a Lamb-ba sification rather than other classification methodologies-commonly based on au neural networks (ANN) or clustering techniques-is the capability of provide meteorological physical meaning of the results. The Lamb weather-type classific sumes that the wind circulation is almost geostrophic near the surface and uses t sea level pressure on a grid with 16 points around a central grid point for which th fication is performed [32] (Figure 2).  The weather circulation types are identified for each day for a central latitude point. The 16 grid points are equally spaced by 10 • and 5 • for latitudes and longitudes, respectively, around the central point. For the present study, the central point was chosen in the middle of mainland Portugal, where most wind parks are located, and where data referring to long-term wind capacity were available for the current study.
In this sense, the first step towards the weather classification is the computation of six circulation indexes (Table 2), which are associated with (i) the wind flow direction, (ii) the circulation type-high-or low-pressure circulation, and (iii) the geostrophic vorticity and divergence at the surface. For each day, the six circulation indexes were calculated using Equations (1)-(10) [31] based on the mean sea level pressure (MSLP) over 16 grid points, allowing the classification of 26 different weather circulation types.
where ψ denotes the central latitude point of the domain ("x" in Figure 2), 40 • in this case. The daily classification was established in accordance with the following rules: -The flow direction (FL) is described by tan −1 (WF/SF). In case of WF above 0, 180 • were added. -When |ZT| < FT, the magnitude dominates the vorticity. In this case, the flow was split into eight directions (N, NE, E, SE, S, SW, W, and NW), with 45 • per sector; -When FT < |ZT| < 2 FT, the circulation in that specific day is identified as hybrid being controlled by the vorticity and magnitude. In this case, 8 × 2 circulation regimes were considered. -When |ZT| > 2 FT, the vorticity leads the magnitude. If ZT is below 0, the pattern is anticyclonic (H) type. Otherwise, when ZT is above 0 it is a cyclonic (L) type. This classification establishes a set of 26 weather circulation types ( Table 3). Two of them are classified as pure anticyclonic (H) or low-pressure systems (L), eight of them are defined as directional-according to the wind rose convention-and the remaining 16 are classified as hybrid. The main steps to implement the weather classification scheme are provided in Figure 3.  To identify the typical weather pattern for each weather circulation type, the MSLP fields for each of the 16 grid points depicted in Figure 2 were used. Considering all the days d for a specific weather circulation type, and the correspondent spatial grid points , , with j = 1, …, 16, the representative day for each weather circulation type can be obtained with the following expressions [32]: where ̅ and represent the average and the standard deviation of MSLP in the j-th point, respectively. Computing the previous equations for each day of a specific weather circulation type, the day with lowest can be identified and used as the closest to the climatology of this weather circulation type [32]. ERA   To identify the typical weather pattern for each weather circulation type, the MSLP fields for each of the 16 grid points depicted in Figure 2 were used. Considering all the days d for a specific weather circulation type, and the correspondent spatial grid points p d,j , with j = 1, . . . , 16, the representative day for each weather circulation type can be obtained with the following expressions [32]: where p j and σ pj represent the average and the standard deviation of MSLP in the j-th point, respectively. Computing the previous equations for each day of a specific weather circulation type, the day with lowest δ d can be identified and used as the closest to the climatology of this weather circulation type [32]. Figure 4 depicts the frequency of occurrence of the weather circulation types during the last 70 years (1950 to 2019), and it can be concluded that the predominant weather regimes in the region under study are high-pressure system "H", northeast circulation "NE", and north circulation "N". The northeast and north circulations are related to land and sea breezes, respectively. Figure 5 depicts the frequency of occurrence of the weather regimes in consecutive 30-year periods of data compared to the total 70 years ( Figure 4) and the period between 1980 and 2018, which corresponds to the long-term wind power capacity data available for this study. By splitting the dataset, it is possible to take into account the question of concept drift [9], i.e., it enables us to assess whether the weather circulation type characteristics change over time.  Figure 4 depicts the frequency of occurrence of the weather circulation types during the last 70 years (1950 to 2019), and it can be concluded that the predominant weather regimes in the region under study are high-pressure system "H," northeast circulation "NE," and north circulation "N." The northeast and north circulations are related to land and sea breezes, respectively.   Figure 4) and the period between 1980 and 2018, which corresponds to the long-term wind power capacity data available for this study. By splitting the dataset, it is possible to take into account the question of concept drift [9], i.e., it enables us to assess whether the weather circulation type characteristics change over time.  (1950-1979, 1960-1989, 1970-1999, 1980-2009, 1990-2019), the total period of 70 years of data, and the period of observational wind power capacity data (1980-2018).

Weather Classification Type
In a general perspective, in terms of frequency of occurrence, it is possible to conclude that the period of 1980-2018 is almost identical to the long-term data (70 years). It is also noticeable that the high-pressure system "H" increased from 1950 to 2009 and decreased after this period. The circulation regimes "NE" and "N," associated with land and sea breezes, respectively, showed a slight increase over time, whereas the low-pressure system "L" remained constant. This same constant behavior was observed for the hybrid circulation regimes. Although the most dominant "H" regime decreased after 2009, the circulation regime "NW" increased, which represents an increase in the sea-breeze circulation from the western Atlantic coast. The typical weather regimes often associated with the occurrence of severe weather in mainland Portugal, "SW," "W," "S," "L + SW," and "L + W," showed a small decrease over time.    (Figure 4) and the period between 198 and 2018, which corresponds to the long-term wind power capacity data available for thi study. By splitting the dataset, it is possible to take into account the question of concept drif [9], i.e., it enables us to assess whether the weather circulation type characteristics chang over time.  (1950-1979, 1960-1989, 1970-1999, 1980-2009, 1990-2019), the total period of 70 years of data, and the period of observational wind power capacity data (1980-2018).
In a general perspective, in terms of frequency of occurrence, it is possible to conclud that the period of 1980-2018 is almost identical to the long-term data (70 years). It is also no ticeable that the high-pressure system "H" increased from 1950 to 2009 and decreased afte this period. The circulation regimes "NE" and "N," associated with land and sea breezes respectively, showed a slight increase over time, whereas the low-pressure system "L" re mained constant. This same constant behavior was observed for the hybrid circulation re gimes. Although the most dominant "H" regime decreased after 2009, the circulation regim "NW" increased, which represents an increase in the sea-breeze circulation from th western Atlantic coast. The typical weather regimes often associated with the occurrenc of severe weather in mainland Portugal, "SW," "W," "S," "L + SW," and "L + W," showed a small decrease over time.  (1950-1979, 1960-1989, 1970-1999, 1980-2009, 1990-2019), the total period of 70 years of data, and the period of observational wind power capacity data (1980-2018).
In a general perspective, in terms of frequency of occurrence, it is possible to conclude that the period of 1980-2018 is almost identical to the long-term data (70 years). It is also noticeable that the high-pressure system "H" increased from 1950 to 2009 and decreased after this period. The circulation regimes "NE" and "N", associated with land and sea breezes, respectively, showed a slight increase over time, whereas the low-pressure system "L" remained constant. This same constant behavior was observed for the hybrid circulation regimes. Although the most dominant "H" regime decreased after 2009, the circulation regime "NW" increased, which represents an increase in the sea-breeze circulation from the western Atlantic coast. The typical weather regimes often associated with the occurrence of severe weather in mainland Portugal, "SW", "W", "S", "L + SW", and "L + W", showed a small decrease over time. Figure 6 illustrates the accumulated monthly distribution frequency of the weather regimes during the period of 1980-2018. It is visible that the "H" regime was less pronounced in the summer months and the directional sea and land breeze regimes "N" and "NW" increased in this period. The "L" regime remained constant through all the months whereas the "NW" regime notably increased over the spring months. The regimes associated with severe weather ("SW", "W", "S", "L + SW", and "LW") tended to be more expressive in the autumn and winter months.  Figure 6 illustrates the accumulated monthly distribution frequency of the weather regimes during the period of 1980-2018. It is visible that the "H" regime was less pronounced in the summer months and the directional sea and land breeze regimes "N" and "NW" increased in this period. The "L" regime remained constant through all the months whereas the "NW" regime notably increased over the spring months. The regimes associated with severe weather ("SW," "W," "S," "L + SW," and "LW") tended to be more expressive in the autumn and winter months.   Figure 6 illustrates the accumulated monthly distribution frequency of the weather regimes during the period of 1980-2018. It is visible that the "H" regime was less pronounced in the summer months and the directional sea and land breeze regimes "N" and "NW" increased in this period. The "L" regime remained constant through all the months whereas the "NW" regime notably increased over the spring months. The regimes associated with severe weather ("SW," "W," "S," "L + SW," and "LW") tended to be more expressive in the autumn and winter months.  circulation, (c) "N"-north circulation, (d) "L"-low pressure, and (e) "E"-east circulation. The contour lines are gradational by color (grey-low-pressure areas, black-high-pressure areas) and equally spaced by 300 (Pa). The letters H and L in all images identify the center with high-or low-pressure values.

Daily Average Capacity Factor
The daily average capacity factor for each weather regime is depicted in Figure 9.

Daily Average Capacity Factor
The daily average capacity factor for each weather regime is depicted in Figure 9.
Energies 2021, 14, x FOR PEER REVIEW 10 of 16 circulation, (c) "N"-north circulation, (d) "L"-low pressure, and (e) "E"-east circulation. The contour lines are gradational by color (grey-low-pressure areas, black-high-pressure areas) and equally spaced by 300 (Pa). The letters H and L in all images identify the center with high-or low-pressure values.

Daily Average Capacity Factor
The daily average capacity factor for each weather regime is depicted in Figure 9.  According to Figure 9, it is possible to verify that the capacity factor tended to be higher for pure directional regimes. The only exceptions were in the directional sectors "S" and "SE" under the influence of the cyclonic regime. The anticyclonic regimes tended to have lower capacity factors compared to pure or cyclonic regimes. The "L + S" regime presented the highest capacity factor, 46%. On the other hand, the "H" anticyclonic regime presented the lowest value, 17%. This regime had the highest frequency of occurrence (close to 22% of the time, as shown in Figure 4). The most significant difference between the regimes was found in phenomena characterized by a southern flow. "L + S" reached a capacity factor of nearly 47%, whereas the "H + S" regime presented a daily average capacity factor of 25%. On the other hand, the lowest differences were found for the northeast sector, which means that the land and sea breeze main sectors had a low impact on the daily average capacity factor.

Wind Power Capacity Factor Daily Profile
To complement the previous analysis, Figure 10 shows the average daily profile for each regime. Knowing that the variability of the wind technology to such variations is crucial to better integrate wind power into existing systems. It can also contribute to better understanding how the generation profile of this technology can be aligned with the power demand profiles of a certain region [35]. According to Figure 9, it is possible to verify that the capacity factor tended to be higher for pure directional regimes. The only exceptions were in the directional sectors "S" and "SE" under the influence of the cyclonic regime. The anticyclonic regimes tended to have lower capacity factors compared to pure or cyclonic regimes. The "L + S" regime presented the highest capacity factor, 46%. On the other hand, the "H" anticyclonic regime presented the lowest value, 17%. This regime had the highest frequency of occurrence (close to 22% of the time, as shown in Figure 4). The most significant difference between the regimes was found in phenomena characterized by a southern flow. "L + S" reached a capacity factor of nearly 47%, whereas the "H + S" regime presented a daily average capacity factor of 25%. On the other hand, the lowest differences were found for the northeast sector, which means that the land and sea breeze main sectors had a low impact on the daily average capacity factor.

Wind Power Capacity Factor Daily Profile
To complement the previous analysis, Figure 10 shows the average daily profile for each regime. Knowing that the variability of the wind technology to such variations is crucial to better integrate wind power into existing systems. It can also contribute to better understanding how the generation profile of this technology can be aligned with the power demand profiles of a certain region [35]. Through Figure 10, it is possible to verify that most of the regimes had a similar generation profile, notwithstanding the different intensity. This profile, which has a "U" behavior, presented higher production values during the first hours of the day and at the end of the day, with a decrease in intensity during the first hours of the day-as can be seen in Figure 1. This behavior was more visible in all "NE," "E," "SE," and "S" regimes associated with the night thermal stratification at the atmospheric boundary layer [36]. In the case of the "SW," "W," and "NW" regimes, the average daily profile was significantly different and there was a tendency to show the highest capacity factor during the day, associated with the daily thermal radiation development at the boundary layer. The highest daily amplitude was observed in the "E" regime; the minimum value identified was 17% and the maximum was 40%, which was reached during the first hours of the day. Contrariwise, regime "L" only showed a daily amplitude of 4%. Through Figure 10, it is possible to verify that most of the regimes had a similar generation profile, notwithstanding the different intensity. This profile, which has a "U" behavior, presented higher production values during the first hours of the day and at the end of the day, with a decrease in intensity during the first hours of the day-as can be seen in Figure 1. This behavior was more visible in all "NE", "E", "SE", and "S" regimes associated with the night thermal stratification at the atmospheric boundary layer [36]. In the case of the "SW", "W", and "NW" regimes, the average daily profile was significantly different and there was a tendency to show the highest capacity factor during the day, associated with the daily thermal radiation development at the boundary layer. The highest daily amplitude was observed in the "E" regime; the minimum value identified was 17% and the maximum was 40%, which was reached during the first hours of the day. Contrariwise, regime "L" only showed a daily amplitude of 4%.

Characterization of Low-Generation Events
Low-generation events are characterized by a reduced availability of the wind resource. In this work, this analysis was performed for the different regimes by identifying the frequency of occurrence of different daily average wind power generation ( Figure 11).

Characterization of Low-Generation Events
Low-generation events are characterized by a reduced availability of the wind resource. In this work, this analysis was performed for the different regimes by identifying the frequency of occurrence of different daily average wind power generation ( Figure 11). Figure 11. Percentage of events with low generation (below 10%, 20%, and 30% of the total installed capacity).
From Figure 11, it is possible to observe that the pure regimes "L" and "H" and the regimes from the north to the east directional sectors had a high frequency of occurrence of low-generation values. Hybrid regime "L + NE" had the highest frequency of occurrence of low-generation values below 10% of the installed capacity. According to this figure, 32% of the time, when this regime occurred, the daily average wind power generation was below 10%. This regime was closely followed by the regime "H." These results were expected, since this regime is associated with the appearance or a development of a stable or very stable layer of atmospheric air in the boundary layer. For the "H" regime, 89% of the time the daily wind capacity factor was below 30% of the installed capacity. Extreme low-generation events were less frequent in "SW," "W," and "L+SW" regimes associated with an unstable atmosphere. Under these regimes, capacity factors below 20% were expected for periods less than 15% of the time. For capacity factors below 30%, the percentage of time slightly increased to 28%.

Characterization of Wind Power Ramps
Using Equations (1) and (2), it is possible to identify the maximum and minimum variations in each weather regime using different time intervals (Figure 12).
According to Figure 12, the "L+" regimes presented the highest variation in all directions, regardless of the time interval considered and the type of ramp (upward or downward). This result is in line with that observed in previous studies that associated the most significant ramps with atmospheric phenomena such as cyclones and windstorms [11,13]. From Figure 4 it is possible to observe that some of the most critical weather regimes presented a low frequency of occurrence. On the other hand, the "H+" regimes were the ones that present the smoothest variations. Figure 11. Percentage of events with low generation (below 10%, 20%, and 30% of the total installed capacity).
From Figure 11, it is possible to observe that the pure regimes "L" and "H" and the regimes from the north to the east directional sectors had a high frequency of occurrence of low-generation values. Hybrid regime "L + NE" had the highest frequency of occurrence of low-generation values below 10% of the installed capacity. According to this figure, 32% of the time, when this regime occurred, the daily average wind power generation was below 10%. This regime was closely followed by the regime "H". These results were expected, since this regime is associated with the appearance or a development of a stable or very stable layer of atmospheric air in the boundary layer. For the "H" regime, 89% of the time the daily wind capacity factor was below 30% of the installed capacity. Extreme lowgeneration events were less frequent in "SW", "W", and "L+SW" regimes associated with an unstable atmosphere. Under these regimes, capacity factors below 20% were expected for periods less than 15% of the time. For capacity factors below 30%, the percentage of time slightly increased to 28%.

Characterization of Wind Power Ramps
Using Equations (1) and (2), it is possible to identify the maximum and minimum variations in each weather regime using different time intervals (Figure 12).
According to Figure 12, the "L+" regimes presented the highest variation in all directions, regardless of the time interval considered and the type of ramp (upward or downward). This result is in line with that observed in previous studies that associated the most significant ramps with atmospheric phenomena such as cyclones and windstorms [11,13]. From Figure 4 it is possible to observe that some of the most critical weather regimes presented a low frequency of occurrence. On the other hand, the "H+" regimes were the ones that present the smoothest variations.
Considering the upward wind power ramps, for the one-hour interval, the highest value (29%) occurred in the "L + W" regime, followed by the "L + S" regime. Both regimes commonly triggered convective instability to mainland Portugal, and therefore the fast upward wind power ramps are associated with convective instability. For the six-hour time interval, the directional sectors "NW" and "N" were the ones with the highest values, reaching a variation of 56% mainly caused by the sea-breeze front that detaches from the synoptic circulation due to confluence of winds that favors sea-breeze front propagation into the mountain regions. The regimes "H", "H + NE", and "H + E "were the ones with the smallest variation values for the different time intervals. Consequently, these regimes would be the least challenging for the TSO. Considering the upward wind power ramps, for the one-hour interval, the highest value (29%) occurred in the "L + W" regime, followed by the "L + S" regime. Both regimes commonly triggered convective instability to mainland Portugal, and therefore the fast upward wind power ramps are associated with convective instability. For the six-hour time interval, the directional sectors "NW" and "N" were the ones with the highest values, reaching a variation of 56% mainly caused by the sea-breeze front that detaches from the synoptic circulation due to confluence of winds that favors sea-breeze front propagation into the mountain regions. The regimes "H," "H + NE," and "H + E "were the ones with the smallest variation values for the different time intervals. Consequently, these regimes would be the least challenging for the TSO.
Regarding the downward wind power ramps, the behavior was very similar to that observed for upward wind power ramps. The different configurations of the cyclonic regimes were those that presented the most accentuated variations. This behavior indicates that they were also the regimes that had the highest impact, in accordance with the results verified by [11]. This means that the downward wind power ramps were affected by the presence of fast decreasing wind processes driven from the synoptic circulation such as convection inhibition up to 1 h or after the sea breeze front propagation transit up to 6 h. In a general mode, due to the wind power plant concentration in the center of Portugal, the emergence and approximation of low-pressure systems coming from the Atlantic Ocean to these regions unleashes upward wind power ramps. As these meteorological events with wind speed close to zero in the center of the system move into the interior of Portugal and cross the areas where the wind power plants are concentrated, it causes the most hazardous downward wind power ramps. In addition, the more dynamic characteristics of these Regarding the downward wind power ramps, the behavior was very similar to that observed for upward wind power ramps. The different configurations of the cyclonic regimes were those that presented the most accentuated variations. This behavior indicates that they were also the regimes that had the highest impact, in accordance with the results verified by [11]. This means that the downward wind power ramps were affected by the presence of fast decreasing wind processes driven from the synoptic circulation such as convection inhibition up to 1 h or after the sea breeze front propagation transit up to 6 h. In a general mode, due to the wind power plant concentration in the center of Portugal, the emergence and approximation of low-pressure systems coming from the Atlantic Ocean to these regions unleashes upward wind power ramps. As these meteorological events with wind speed close to zero in the center of the system move into the interior of Portugal and cross the areas where the wind power plants are concentrated, it causes the most hazardous downward wind power ramps. In addition, the more dynamic characteristics of these systems present a high propagation speed, which makes them more quickly move away from regions where there is the presence of wind power plants. On the other hand, anticyclonic regimes are more stable and persistent in their position, presenting smooth variations in wind power production, and thus, are more predictable.
According to Figure 12, the regimes "L + SW", "L + S", "L + W", and "L + NW" presented the highest variations. In these sectors, for ∆t equal to 1 hour the variations were above 25%, whereas for ∆t equal to 3 h, they reached values from 35% to 45%. For ∆t equal to 6 h it is possible to observe that the directional weather regimes "NE", "E", and "SE" presented variations above the values observed for the cyclonic weather regime. Indeed, for these directional sectors in the downward wind power ramps case, the values for anticyclonic and cyclonic weather conditions were very similar.

Conclusions
In this study, a characterization of wind energy generation in Portugal, with an emphasis on extreme events, was carried out using a long-term series (1980 to 2018) and a weather classification-type methodology. A Lamb-based classification method was adapted for the case study and a climatological analysis was presented. It was possible to conclude that the most common weather regime ("H") increased its frequency of occurrence from 1950 to 2009 but showed a slight reduction in its frequency of occurrence in the last decadefrom 2010 to 2019.
The hybrid cyclonic pressure system with a southern flow direction ("L + S") regime was the one that triggered the high-capacity factor, rather than the pure directional regimes. On the other hand, the anticyclonic regimes tended to have the lowest capacity factors. From 1950 to 2019, the "L + S" regime showed a slight decrease in its occurrence over time, and the same conclusion can be inferred for the hybrid anticyclonic regimes.
Regarding the analyzed extreme events, severe variations in wind power generation were expected under the cyclonic regimes ("L+") for any directional sector, regardless of the time interval considered and the type of ramp (upward or downward). The most severe wind power variations in a one-hour interval were observed for the "L + W" regimes, whereas for six hours they were expected under the "L + NW" regime. The maximum value identified for the upward ramp was 56%, whereas for the downward ramp the maximum was 57%. Severe variations at 1 h for upward ramps tended to be driven by convective instability from synoptic circulation into mainland Portugal, whereas downward ramps were associated with convective inhibition surgency due to the development of stable or very stable atmospheric layers. Six-hour ramps, both upward or downward, tend to be explained, respectively, by the strength or weakness of the synoptic circulation or by the transit or "after passing" of frontal systems, respectively, which propagate towards mountain regions. The anticyclonic regimes induce less variability in the wind power and therefore were less challenging for the transmission system operator.
The north-to-east directional sectors and the pure "L" and "H" regimes were likely to unleash low generation events. Regime "H" was the one with a high frequency of occurrence of low generation values, below 30% of installed capacity, due to the fact that "H" regimes tend to generate a large and stable atmosphere. During 88% of the time when this regime occurred, the daily average wind power generation was below 30%.
Since wind generation cannot be dispatched and fully controlled like conventional power plants (e.g., thermal or hydropower plants) the assessment of extreme events and the underlying role of weather regimes in triggering these events as performed in this study is crucial. This approach, which can be adapted for other regions, can enable the predictability of extreme events to be improved and power system operators to be supported, especially with a high penetration of this technology, as expected in forthcoming years, in order to decarbonize the power system and society.