Renewable and Sustainable Energy Reviews Analysing the potential of integrating wind and solar power in Europe using spatial optimisation under various scenarios

The integration of more variable renewable energy sources (vRES) like wind and solar photovoltaics (PV) is expected to play a signi ﬁ cant role in reducing carbon dioxide emissions from the power sector. However, unlike conventional thermal generators, the generation patterns of vRES are spatially dependent, and the spatial dis- tributions of wind and PV capacity can help or hinder their integration into the power system. After reviewing existing approaches for spatially distributing vRES, we present a new method to optimise the mix and spatial distribution of wind and PV capacity in Europe based on minimising residual demand. We test the potential of this method by modelling several scenarios exploring the e ﬀ ects of vRES penetration, alternative demand pro- ﬁ les, access to wind sites located far o ﬀ shore, and alternative PV con ﬁ gurations. Assuming a copper-plate Europe without storage, we ﬁ nd an optimum vRES penetration rate of 82% from minimising residual demand, with an optimum capacity mix of 74% wind and 26% PV. We ﬁ nd that expanding o ﬀ shore wind capacity in the North Sea is a ‘ no regret ’ option, though correlated generation patterns with onshore wind farms in neighbouring countries at high vRES penetration rates may lead to signi ﬁ cant surplus generation. The presented method can be used to build detailed vRES spatial distributions and generation pro ﬁ les for power system modelling studies, in- corporating di ﬀ erent optimisation objectives, spatial and technological constraints. However, even under the ideal case of a copper-plate Europe, we ﬁ nd that neither peak residual demand nor total residual demand can be signi ﬁ cantly reduced through the spatial optimisation of vRES. vRES potential, land suitability or population. This is also the ap- proach taken in most high-level power system modelling studies. We use the term optimisation to indicate studies which actually formulate the spatial dis- tribution as an optimisation problem with an objective function (e.g. maximum capacity factor, minimum residual demand, minimum cost etc.).


Introduction
Decarbonisation of the electric power sector is one of the key transitions which must take place as part of Europe's commitment to reducing CO 2 emissions in order to avoid dangerous climate change [1,2]. This will be achieved mainly through the integration of more renewable energy sources (RES) such as onshore wind, offshore wind, solar photovoltaics (PV), hydro and biomass into the power system. Many studies have presented scenarios of what such a low-carbon European power system could look like in the long term, typically by 2050 [3][4][5][6][7]. These scenarios must employ nearly 100% RES, or a combination of RES and other low-carbon technologies such as nuclear power, bioenergy, or fossil fuels with carbon capture and storage (CCS). However, with several countries aiming to reduce nuclear power capacity and slow development of the European CCS industry [8], a heavier dependence on RES may be more likely. 1 This will pose a challenge as, without significant development in nuclear or CCS capacity, comparing the current installed wind and PV capacities with those in several high-RES scenarios (Table 1) suggests that an additional 300-700 GW of wind capacity and 720-870 GW of PV capacity would need to be installed by 2050 [2,3,[9][10][11]. The question then arises, where should all this capacity be built?
As generation from variable renewable energy sources (vRES) such as PV and wind is intermittent, the challenge is even greater as any residual demand 2the difference between the total demand and vRES generationmust be provided by dispatchable fossil (e.g. coal, oil, gas), renewable (e.g. hydro, biomass, concentrating solar power (CSP)) or nuclear backup generation capacity [12]. Given that vRES generation profiles depend on both the type of technology and weather regime where they are installed, optimising the mix and spatial distribution of vRES has been suggested as one way of helping to integrate vRES into the power system [13,14].
has typically been done from: a technology perspective, by using combinations of different technologies (e.g. PV and hydro [15], wind and CSP [16,17], wind and PV [18]); from a spatial perspective, using combinations of different sites [19,20]; or considering both different technologies as well as site diversity [21][22][23][24]. However, these studies only focus on generation, without considering electricity demand. Others have gone further and matched vRES generation with demand, but generally only considering single countries [38,43] without performing any spatial optimisation. Another group of studies allocate vRES capacity based on different factors such as government targets, land suitability, proximity to load, or the potential resource [5,[25][26][27]30], but make no attempt to optimise the actual spatial vRES distribution. Others have combined aspects of complementarity, demand matching and allocation studies by spatially optimising vRES capacity for minimum residual demand (or a similar metric), but only for single vRES technologies in one [31,32] or more [33,44] countries, or multiple technologies in a single country [35,37,39,45]. Others which have included a larger geographic scale and more technologies have done so only in a very aggregated way, typically by assuming a spatial vRES distribution, and varying the shares of wind and PV [14,28,29]. Only a few studies have attempted to optimise the spatial distribution of vRES in a power system model (PSM) for a single country [36,[40][41][42], including two specifically seeking to minimise residual load [40,41], but the optimisation was only performed for a single year and not checked for long-term performance. To our knowledge, no studies have examined how robust their optimised spatial distributions are in the long term, nor has the potential of a residualdemand-based capacity optimisation been assessed for Europe as a whole.
In this study, we present a method to optimise the detailed spatial distribution of wind and PV by minimising residual demand and apply it to the case of a future European power system. Given uncertainties in weather patterns, vRES uptake, electricity demand and technology parameters, we apply this method for several scenarios to see the full potential and robustness of the approach. Firstly, we spatially optimise vRES capacity using long-term weather data and test how robust the resulting optimised distributions are with respect to inter-annual weather variability. Secondly, we determine if the penetration of vRES affects the optimal mix and spatial distribution of capacity for minimising residual demand. Thirdly, we investigate how future changes in electricity demand, due to an expected increase in the penetration of e.g. heat pumps (HPs) and electric vehicles (EVs), could affect the optimum distribution of vRES for minimising residual demand [2,46,47]. Fourthly, we examine the potential of floating offshore wind technology to give access to stronger and steadier winds located in deeper offshore waters. Fifthly, we consider the effect of alternative PV orientations, since several studies have shown that the tilt and azimuth (orientation) angles of PV panels can be used to match solar PV generation with demand [45,48] 4 . Lastly, we compare the minimum-residual-demand-based vRES capacity optimisation with a more traditional approach of preferentially selecting vRES sites with the highest capacity factors. Through these contributions, we seek to answer the following research question: To what extent can optimising the mix and spatial distribution of vRES capacity minimise residual demand in a future European power system, and how does this depend on different factors?
Our study is focussed on the EU28 5 countries, Switzerland and Norway. The temporal scope is 2050, by which time we assume that high penetrations of vRES will be required. We consider four vRES generation technologies 6 : onshore wind, offshore wind, rooftop PV and ground-based utility PV. After an explanation of the methods used (Section 2), the results of the study are presented (Section 3), followed by a discussion (Section 4) and conclusion (Section 5). More detailed explanations of the input assumptions and steps taken are outlined in the accompanying appendices, which can be found in the Supplementary Material available online.

Methods
An overview of the steps followed in this study is shown in Fig. 1. First, we formulate an optimisation algorithm in which the objective function is to minimise residual demand (Section 2.1). The decision variables are the installed capacities of each generation technology per grid cell, using an irregular spatial grid constructed across Europe (Section 2.2). Inputs to the optimisation are capacity factor profiles for each generation technology (Section 2.3), constraints on the maximum installed capacity per technology (Section 2.4), and electricity demand profiles (Section 2.5). This optimisation is then performed for 36 years of weather data for a number of scenarios examining the effects of different assumptions on vRES penetration rate, electricity demand, PV panel orientation, and the extent of the spatial grid (Section 2.6). For each scenario, the mean and coefficient of variation (CV 7 ) of the optimised installed capacity per technology are calculated for each grid cell to examine how consistently the method distributes vRES capacity given interannual weather uncertainty. The mean optimised capacity distribution is then simulated for all weather years to check how it performs in the long term.

Formulate optimisation algorithm
Treating the whole of Europe as a copper plate, we assume no losses or constraints on the transmission of electricity between or within countries. 8 In this way, Europe is treated as a single integrated power system and total electricity demand d t is simply the sum of the demand across all countries c in hourly time step t.
Within each grid cell, different vRES generation technologies can be built. The generation from technology i in grid cell x is calculated as the product of its capacity factor f i x t , , and installed capacity, c i x , .
The values of c i x , are the decision variables in the optimisation. As we want to explore the full potential of spatially optimising vRES capacity without being restricted by the current system, we treat Europe as a clean slate and do not consider any existing or planned PV or wind capacity. 9 Under this assumption, the lower bound of c i x , is zero and the upper bound is the maximum installed capacity for that technology c i x max , 4 While current wind farms are limited to water depths of 40-50 m [55,56], floating offshore wind turbines have the potential to be installed in much greater water depths. This technology is still in the early stages of development with the world's first pilot 30 MW floating offshore wind farm expected to become operational in 2017 [56,112]. 5 The UK is included despite the June 2016 decision to leave the EU because the UK and continental European power systems are likely to remain heavily integrated. 6 While wind and solar PV are essentially only two generation technologies, we split them in order to better take into account their spatial constraints and technical differences. Ocean energy and run-of-river hydro can also be considered vRES, however, their contributions to the total installed capacity in most future high-RES scenarios are minor (see Table 1) and so have not been considered. 7 Calculated as the standard deviation divided by the mean, also known as the relative standard deviation. 8 This was a necessary simplification in our model in order to reduce the number of variables and make the problem solvable in a reasonable amount of time. 9 As PV panels and wind turbines typically have a lifetime of 25-30 years, all currently existing capacity and new capacity installed before 2020 is likely to be decommissioned by 2050 anyway.
(see Section 2.4). The capacity factor profiles f i x t , , take a value between zero and one and are calculated from weather data (see Section 2.3). Both c i x max , and f i x t , , are determined exogenously. The total vRES generation g t is then simply the sum of generation from all technologies across all grid cells.
As we treat the whole of Europe as a copper plate, the residual demand r t is the difference between total demand and total generation of vRES (see Fig. 2).
When demand exceeds generation r t is positive. Conversely, when vRES generation exceeds demand then r t is negative. Positive residual demand is not desirable in a power system as this represents costs in the form of dispatchable backup capacity and backup energy. Negative residual demand (or surplus generation) is also not desirable as it represents costs in the form of storage requirements, or economic losses due to curtailment of electricity which has no market value. 10 Thus, the objective is to minimise both negative and positive residual demand simultaneously (i.e. the total residual). However, with 36 years of weather data, 8760 hourly time steps per year, four technologies and more than 2000 grid cells, the problem quickly becomes intractable and difficult to solve. To avoid non-linearities associated with taking the absolute value of the residual demand, we formulate the optimisation as a linear least squares (LLSQ) regression problem, constrained by linear equality and bound constraints as shown in Eq. (5),   where C is a stacked column vector containing the values of c i x , to be optimised, F is a matrix containing the hourly capacity factors f i x t , , for each technology, D is a column vector containing the hourly aggregated demand values d t , and C max is a matrix containing the maximum capacities per technology per grid cell c i x max , (i.e. upper bound constraints). The matrices A eq and B eq can be used to supply additional equality constraints to the optimisation, such as constraints on total annual generation, or the total installed capacity per technology. A eq is a coefficient matrix for the elements of C specifying the left-hand side of the equality constraints, 11 with the right-hand side specified in B eq . Similarly, the coefficient matrices A ieq and B ieq can be used to add inequality constraints to the optimisation if desired, such as minimum installed vRES capacities for a particular country in order to take into account government policies on vRES deployment.

Construct spatial grid
The spatial grid is built using the software ArcGIS Pro 12 by incorporating a number of spatial datasets. These include European country borders [49], Exclusive Economic Zone (EEZ) marine boundaries [50], bathymetry data [51], and the 2012 Corine Land Cover Inventory (CLC2012) [52,53]. The starting point is a regular grid of 0.75°x 0.75°c onstructed across Europe, corresponding to the resolution of the weather dataset (see Section 2.3). These regular grid cells are cut by the land and marine borders of each country so that the resulting irregular grid respects all national borders and the installed vRES capacity can be easily calculated or constrained per country in the optimisation. Each cell retains information about the latitude and longitude of its parent grid cell so that it can be associated with the correct wind and PV capacity factor profiles (see Section 2.3). This irregular grid is merged with the high resolution (100 m × 100 m) CLC2012 raster dataset so that the area of each Corine Land Cover (CLC) class per grid cell can be deduced and used to set capacity constraints for each technology (see Section 2.4). Grid cells are classified as onshore, offshore, or coastal. Water depth and distance to shore are two major factors limiting the expansion of offshore wind technology. Due to the high cost and technical limitations of current foundation types such as monopiles, gravity based foundations, jackets, and tripods [54], offshore wind farms are typically located up to a distance of 100 km offshore in water depths of up to 50 m [54,55]. In this study, we assume that water depth is a greater challenge for the development of offshore wind than distance from shore and limit offshore grid cells to a water depth of 50 m [55] 13 . However, in the long term, Europe is expected to turn to more distant offshore locations in deeper waters to increase offshore wind capacity as many of the most favourable offshore wind sites close to the shore become exploited [55,56]. To examine the potential of floating offshore wind technology in the future and the role it could play in minimising residual demand, a second grid variant is built including all offshore locations within the EEZ of each country, irrespective of water depth. 14 The resulting two spatial grid variants are shown in Fig. 3.

Build hourly capacity factor profiles
The capacity factor profiles are based on the European Reanalysis Interim (ERA-I) weather dataset produced by the European Centre for Medium-Range Weather Forecasts (ECMFW) [57]. This is a global atmospheric reanalysis covering 36 years from 1979 to the present (2016). Comprising 3-hourly data on various meteorological parameters including wind speed, solar radiation and temperature, it has a spatial resolution of 0.75°x 0.75°or approximately 50 km x 50 km 15 [57,58]. Reanalyses combine data from a variety of weather observational systems by integrating them with a numerical weather prediction model to produce a temporally and spatially consistent dataset, and have been used in a number of vRES integration and power system studies [59,60]. The ERA-I reanalysis is selected due to its extensive geographical coverage (including offshore sites), high spatial and Fig. 3. Extents of the 50-m water depth (left) and full EEZ (right) spatial grids. CLC land classes not shown. 11 The coefficients of A eq are either 0 or 1 if the constraint is applied to generation capacity, or full load operating hours (FLH) if the constraint is applied to electricity generation. 12 ESRI, version 1.2.0, http://www.esri.com/. 13 Greater distances to shore usually result in deeper waters [54], however there are several remote locations in Baltic the North Sea where the water is not so deep. One example is Dogger Bank where the offshore Teesside A & B wind farms are already planned, located 196 km and 165 km from shore respectively in water depths of up to 40 m [113,114]. Thus, we believe this assumption to be justified. 14 While expected maximum water depths for floating wind turbines range between 300 m and 900 m [56,115] and water depths in the EEZ can exceed 5000 m, floating deep-water oil platforms are already moored at water depths of up to 2900 m [116]. Thus, it is possible that with further development, floating wind turbines could also be moored at this or even greater depths. 15 Distance in kilometres varies with latitude from 65 km in Spain (37°N) to 30 km in northern Norway (70°N).
temporal resolution, and inclusion of both wind speed and solar radiation over a long time frame. 16 As we base our model on historical weather data, any potential impacts of climate change on European weather patterns are beyond the scope of this study and not taken into account. The 3-hourly ERA-I data are downscaled to hourly resolution in order to match the demand data. Based on recent developments and future expectations, we assume hub heights of 150 m and 100 m for onshore and offshore wind turbines respectively. Extrapolating the 10-m wind speed from the ERA-I dataset to hub height and interpolating to hourly values, we assign each grid cell a wind turbine class according to International Electrotechnical Commission (IEC) 61400 guidelines [61] 17 . Based on this wind class (IEC Class S, I, II, III, or IV) we select an appropriate wind turbine and power curve from a major commercial manufacturer, which we subsequently convolute so that aggregated wind generation better reflects generation profiles from real wind farms [62]. Additional losses of 13% (including wake/array (8%), electrical conversion (2%) and other (3%) losses) are assumed in accordance with values taken from the literature [63][64][65].
PV generation profiles are synthesised by using linear interpolation to first downscale the raw 3-hourly radiation data to hourly irradiance values. Solar position and radiation models from the literature are then used to calculate PV production, assuming a southerly orientation and 35°mounting angle for both PV technologies [66,67]. We take highefficiency (21.5%) monocrystalline silicon and lower-efficiency (16.8%) polycrystalline silicon modules as the basis for the rooftop and utility PV calculations respectively. 18 Finally, a performance ratio (PR) of 90% is assumed in line with reported values for recent PV installations [68], thus accounting for inverter inefficiency, wiring, cell mismatch, shading and other losses. Further details regarding the assumptions underlying the capacity factor profiles are provided in the Supplementary Data (Appendix A).

Formulate grid cell capacity constraints
Grid cell capacity constraints for each technology are determined following the approach shown in Fig. 4. First, the suitable land (or sea) area for each technology is calculated by assuming that each technology can only be built in specific suitable CLC classes (see Appendix A). For onshore wind and utility PV these include mainly agricultural and grasslands. 19 We assume rooftop PV can only be built in urban areas, and offshore wind only in open water. Protected areas (land and sea) are excluded using data from the European Environment Agency's (EEA) Common Database on Designated Areas (CDDA) dataset [69]. Overview of method used to calculate installed capacity constraints by technology. 16 The accuracy and choice of weather dataset is a complex topic in itself and involves trade-offs between the required temporal and spatial resolution, geographical coverage, meteorological parameters and accuracy. A comprehensive treatment was not possible in this study, however the reader is referred to [58] for an explanation of the development and main limitations of ERA-I, and to [90,117,118] for comparisons with other datasets. 17 Based on the long term (1979-2015) mean wind speed at hub height. 18 Based on commercially available modules. For rooftop PV we use the Sunpower X21-345 [119], and for utility PV, the TrinaSolar TSM-PD14 [120]. 19 These areas are more likely to be flat, accessible, and cause minimal shading for PV panels or turbulence for wind turbines. We exclude wetlands, forests, rocky or alpine areas as these are unlikely to be suitable for large-scale rollout of any technology for reasons of poor soil stability, steep/mountainous terrain or inaccessibility [121].
With the suitable land area determined, we then assume how much of this suitable land is available and could be used for vRES, based on values reported in literature. For onshore wind, we assume a land availability factor of 6% in line with [25,70], and for offshore wind we assume a uniform 20% availability irrespective of water depth or distance to shore. 20 For utility PV we consider a land availability of 1%, within the range of values found in the literature. We assume that utility PV and onshore wind can be installed in the same location on the basis that there are examples of such co-located/hybrid parks gaining increasing attention and already being constructed [71,72]. With shading only affecting the direct component of sunlight, PV losses due to turbine shading are reportedly less than 1% [73]. For both wind technologies, we use a representative wind farm capacity density ranging from 4.2 MW km -2 to 6 MW km -2 (based on the IEC wind turbine class) to calculate the maximum capacity per grid cell from the available area. For the two PV technologies, the panel area is first required. For utility PV, we assume a panel density of 0.337 m 2 panel m⁻ 2 land, based on a 35°installation angle and allowing 15°between the top of one panel row and the base of the next to minimise shading. For rooftop PV, we estimate maximum rooftop PV panel area by first calculating the fraction of urban CLC classes covered by buildings using building footprint data from the UK and the Netherlands. Then, assuming 1.22 m 2 roof area per m 2 building footprint (based on trigonometry), we consider a roof availability factor of 30% based on the literature. The resulting rooftop and utility PV panel areas are multiplied by nominal module specific power densities of 211 and 167 W m -2 respectively, based on manufacturer data.
Using this approach, the maximum installed capacities per technology are calculated as 543 GW for onshore wind, 754 GW for offshore wind (for the 50-m water depth grid, 5912 GW with the full EEZ grid), 2187 GW for rooftop PV and 895 GW for utility PV. A more detailed explanation of the assumptions underlying the grid cell capacity constraints, including a full list of the CLC classes deemed suitable for each technology, is provided in Appendix A.

Synthesise demand profiles
An examination of the literature [2,3,11,25,[74][75][76] shows that there is no consensus on total expected electricity demand in 2050 with values ranging from 3377 TWh [75] to 6020 TWh 21 [3], depending on the assumed trends in efficiency measures, economic growth, and electrification of other sectors (e.g. transport, heating, heavy industry). In light of this, we consider different demand levels in this study. As a base case, we take actual hourly 2015 demand data from the European Network of Transmission System Operators for Electricity (ENTSO-E) [77] 22 and assume that total annual demand (3111 TWh y −1 ) remains essentially unchanged, under the assumption that general demand increases due to economic and population growth until 2050 will be largely offset by energy efficiency measures. 23 Then, in order to investigate higher levels of demand and how increased penetration of EVs and HPs may affect the optimal distribution of vRES, we create additional demand profile variants by adding 500 TWh and 800 TWh for HPs and EVs respectively to the base 2015 demand. In addition to the base 2015 demand, this results in three further variants: (1) base with EVs, (2) base with HPs, and (3) base with both EVs and HPs. Annual HP demand is distributed throughout the year based on the number of heating degree hours (HDH), while EV demand is distributed using a charging profile model developed by the European Commission Joint Research Centre (JRC) 24 [78]. Table 2 shows the total annual demand, peak demand and minimum demand for all four demand profile variants.
Even though our study uses only one year of demand data (2015), electricity demand follows quite consistent and predictable patterns (e.g. daily fluctuations, weekly fluctuations, seasonal differences) and we consider including additional years of demand data less important than additional years of weather data. A justification for this, as well as further details about the demand profile formulations, is provided in Appendix A.

Perform scenario optimisation runs
The minimum residual demand optimisation algorithm is implemented and solved using the software Matlab. 25 The optimisation is performed for a number of different scenarios in order to investigate the effects of different factors and power system uncertainties, as shown in Table 3: • Scenario 1 is the base case minimum residual demand optimisation using the 50-m water depth grid.
• Scenarios 2a-d investigate how minimising residual demand is affected by vRES penetration rate by constraining vRES generation to 25%, 50%, 75% and 100% of total demand respectively.
• Scenarios 3a-c examine the impact of uncertainty in future electricity demand patterns by adding additional demand from HPs and EVs to the base demand.
• Scenario 4 considers the potential of utilising the full EEZ grid with floating offshore wind farms.
• Scenarios 5a-c assess the impact of using alternative PV panel orientations for rooftop PV and full two-axis tracking for utility PV.
• Scenario 6 compares the minimum-residual-demand-based vRES capacity optimisation with the more common approach of selecting sites with the highest capacity factors 26 by modifying the objective function to maximisation of vRES generation, while setting constraints on the capacity per technology to be equal to the mean optimised capacities from Scenario 1.
Each scenario is optimised for all 36 years of weather data seperately, 27 from which the mean and CV of installed capacity per grid cell is calculated for each technology in order to test how sensitive the capacity distributions produced by the optimisation algorithm are to individual weather years. Then, the mean optimised distribution is  20 To take into account shipping lanes, fisheries, military zones etc. 21 This study reported 3889 TWh of base demand, 1924 TWh for hydrogen production, and 207 TWh for synthetic fuel production. 22 We do not explicitly assume a level of grid losses in this study as the raw demand data from ENTSO-E as well as the HP and EV demand totals from [2] include grid losses. Losses were on average 6.7% of total net electricity production (excluding own-use) for the EU28 + NO from 2006 to 2015 [122]. 23 A similar assumption was made in [2]. 24 28 and vRES capacity credit are calculated. Note that in all scenarios except Scenarios 2a-d, we impose no constraint on total annual vRES generation; hence the solver is free to determine the optimum level of vRES penetration. The vRES capacity credit represents the reduction in dispatchable generation capacity that would be possible due to vRES, considering demand and generation from all vRES technologies together at a European level. We calculate the short-term annual capacity credit (CC ST ) for a given year, y, following the method of [79] as the difference between the maximum demand and maximum residual demand in that year, divided by the total installed vRES capacity (Eq. (6)).
However, as long-term investment decisions regarding backup capacity are not made annually, it is the long-term capacity credit (CC LT ) which is more relevant for system planning. While there are many methods of determining capacity credit in the literature [80][81][82], in this study we again follow the approach of [79] but instead of assuming maximum residual demand is normally distributed from one year to the next, we base CC LT on the worst-case year when maximum residual demand is highest (Fig. 5). In this way, the long-term capacity credit is equal to the minimum short-term capacity credit (i.e.

Results
The overall results for the optimisation runs are shown in Table 4, while Table 5 presents the overall results from the simulation runs. In addition to the mean and CV, the minimum and maximum values are also shown. As the mean results from the optimised and simulated runs differ only slightly (typically less than 3%), using the mean optimised capacity across a number of weather years -as an alternative to simultaneously optimising all years at oncecan generate a single optimised capacity distribution that performs in line with long-term expectations.
The overall results, as well as the detailed vRES distributions, are discussed in the following sections with Scenario 1the base minimum residual demand optimisationserving as a reference with which the other scenarios are compared. Note that in the optimised runs (Table 4), the capacity distribution may change for each year of the optimisation and the inter-annual results represent the 'ideal' case, while in the simulation runs (Table 5), the capacity distribution is the same each year. Thus, unless otherwise stated, overall results are discussed on the basis of the simulation runs (Table 5), as these give a better indication of the inter-annual variability. However, comparing the results for residual demand across all scenarios, Table 4 and Table 5 show that neither peak residual demand nor total residual demand can be significantly reduced through spatial optimisation of vRES, even for the ideal case of a copper-plate Europe.

Base minimum residual demand optimisation (Scenario 1)
When spatially optimised, vRES can satisfy 82% of annual European electricity demand with an installed capacity of 1144 GW. The optimum capacity mix is 74% wind (of which 65% is offshore) and 26% solar PV (of which 67% is rooftop). Fig. 6 shows the mean installed capacity per grid cell for each technology based on all weather years. Onshore wind is mostly installed at the periphery of southern, 29 northern, western and eastern Europe, while very little capacity is installed in countries surrounding the North Sea, which instead host considerable offshore wind capacity. Rooftop PV is mainly installed in a band extending from Portugal to the Nordic countries. Utility PV follows a similar pattern except that total installed capacity is lower, and the capacity shares in Ireland and Norway are higher than for rooftop PV. Notably, only 17%  Fig. 5. Approach to calculating long-term capacity credit. Figure based on [79]. 28 The share of demand covered by vRES, excluding any surplus/curtailed electricity. 29 In this study the terms northern, southern, western and eastern Europe are used in a general sense to describe geographic regions, not in a geopolitical sense referring to specific countries.   of total PV capacity is installed in the southern European countries of Spain, France and Italy which typically host the largest shares of PV capacity in high-RES studies (see Section 4.3). We discuss this further in Section 3.2. Fig. 7 depicts the calculated CV of optimised installed capacity in each grid cell based on all weather years, showing that capacity is installed more consistently in certain regions than in others. For example, the same onshore wind capacity is almost always built in the Iberian Peninsula, Ireland and the west coast of Britain, southern France, northern Scandinavia, and far-eastern Europe; but varies considerably in central France and Italy.
Comparing Fig. 6 and Fig. 7 shows that not only does the robustness of the capacity distributions vary between the four technologies, but also that the cells with low CVs are often those cells in which the most capacity is installed. This is demonstrated clearly by Fig. 8, which gives the share of cumulative installed capacity for each technology as a function of the CV of installed capacity. Offshore wind capacity is distributed most robustly by the optimisation with 66% of capacity installed in exactly the same location each year. The distribution of onshore wind is more variable with only 38% of capacity installed in the same location. By contrast, no locations receive exactly the same rooftop and utility PV capacity each year.
To examine the temporal aspects of how the algorithm optimises residual demand, Fig. 9 shows hourly box plots of total demand, generation and residual demand for weather year 2015 (as an example), averaged across a representative winter month (January), a representative summer month (July), and the full year. Fig. 10 shows similar plots for the hourly generation of each technology. In winter, demand increases sharply from 4:00 before peaking at 11:00. It peaks again at 18:00 before falling steeply until the minimum at 4:00. In contrast, total vRES generation is quite steady throughout the day at approximately 400 GW, mainly supplied by offshore wind, with a slight rise at midday due to PV. This combination of demand and vRES generation profiles tends to result in surplus electricity early in the morning and late at night, generation largely matching demand between 7:00 and 16:00, and unmet demand during the evening peak between 17:00 and 20:00. In summer, the demand profile is similar to that in winter, except that the double-peak and sharp evening decline are replaced by a gradual fall in demand, extending from noon until 4:00. Again, offshore wind provides steady generation of approximately 200 GW (nearly 50% lower than in the winter). This combination of patterns results in unmet demand in both the morning and late evening hours. In contrast to offshore wind, onshore wind generation increases notably during the day and peaks in the afternoon before falling off during the night. 30 The net effect of these seasonal differences is that demand can be largely matched by vRES generation between 3:00 and 15:00 across the full year of the optimisation. However, the evening peak demand cannot be covered by installing more wind or PV without increasing surplus electricity production during other periods.
As expected, PV plays a greater role in summer than in winter in meeting peak daytime demand. However, the algorithm installs far less PV capacity than it could with only 9% and 11% of total rooftop and utility PV potential installed, compared with 55% and 73% for onshore  30 This is likely due to afternoon sea breezes at coastal onshore wind sites.
These are caused by cooler, denser air over water advecting towards less dense air over land in the evening that has been warmed during the day [125]. and offshore wind. An explanation for this can be found in Fig. 9 which reveals that, with demand and generation largely balanced between 8:00 and 15:00, any further midday generation in either winter or summer would lead to negative residual demand and surplus electricity.
Looking in more detail at long term residual demand, Fig. 11 presents a probability plot of the hourly residual demand for Scenario 1 calculated for all weather years, showing that residual demand is normally distributed with a mean of 39 GW and standard deviation of 104 GW. 31 Based on the maximum observed residual demand of 378 GW, the long-term vRES capacity credit of 11% (see Table 5) highlights that even when the mix and distribution of vRES are fully optimised, dispatchable backup capacity of at least 75% of peak demand would still be required to ensure demand could be met in the most challenging year.

Effect of vRES penetration (Scenarios 2a-d)
We find that the penetration of vRES affects not only surplus generation and capacity credit, but also the spatial distribution of vRES capacity. In the first instance, Scenarios 2a and 2b show that by optimising the shares and spatial distribution of vRES capacity, it is possible to supply at least 50% of electricity demand in a copper-plate Europe without any curtailment (Fig. 12). Attempting to reach a gross penetration rate of 75% (Scenario 2c), results in 2.6% of surplus generation, giving an effective net penetration rate 32 of 73%. The results from Scenario 1 show that the optimum gross vRES penetration is approximately 89% (82% net penetration) as attempting to achieve higher penetration of vRES in Scenario 2d results in an increase in surplus generation, and an increase in total residual.   31 Incidentally, this confirms an assumption made by the IEA underpinning their calculation of capacity credit in [79]. 32 Net generation divided by total demand.  The long-term vRES capacity credit falls with increasing vRES penetration rate as once the available capacity in the optimum locations is fully exploited at low penetration rates, additional capacity is deployed at less optimal sites. In terms of the mix of vRES technologies, Fig. 12 also shows that despite a small increase in the share of offshore wind at low penetration rates, the optimum mix of wind and PV is largely independent of vRES penetration.
The effect of vRES penetration on its spatial distribution is best explained with Fig. 13, which depicts the percentage of the maximum possible capacity built in each grid cell for 25% and 75% vRES penetration for onshore wind (Fig. 13a-b) and rooftop PV (Fig. 13c-d). At 25% penetration, onshore wind is almost completely deployed in grid cells located in northern Norway, Ireland, the Iberian Peninsula, and far eastern Europe (Fig. 13a). As vRES penetration increases to 75% in Scenario 2c (Fig. 13b) (and even 89% in Scenario 1, see Fig. 6a), these regions of saturated capacity extend further inland. The reason for this is that while the optimisation would prefer to continue installing capacity in locations like Portugal, Ireland and northern Scandinavia, the available capacity in these regions is exhausted and the optimisation must install capacity at sites with similarbut less optimalwind patterns. However, the most preferable underlying locations for onshore wind are independent of the penetration of vRES.
Rather than filling outwards from specific locations as with onshore wind, the distribution of PV capacity shifts with increasing vRES penetration. At 25% vRES penetration, rooftop PV capacity is built almost entirely in southern Portugal and Spain (Fig. 13c). However, at 50% vRES penetration this capacity shifts to the west, and at 75% penetration additional capacity is added in northern Europe (Fig. 13d). The reason for this is that at low penetration rates when demand significantly exceeds vRES generation, residual demand is minimised by maximising generation, and hence sites with high capacity factors in southern Europe can be selected without resulting in significant surplus generation. At higher penetrations however, peaks in summer PV productioncoupled with increasing wind generationmean that this is no longer the case, and the model builds capacity in the west and north. In these locations, PV generation can better match demand without resulting in excessive surplus generation during summer.

Effect of different demand profiles (Scenarios 3a-c)
The results from Scenario 3a show that adding 500 TWh of demand from HPs increases total net installed vRES capacity by 150 GW (13%) compared with Scenario 1. This additional capacity results from increases in onshore (85 GW) and offshore (92 GW) wind, which are partly offset by a fall in PV capacity (-27 GW). Mean ST vRES capacity credit increases by 1.9% (in absolute terms) to 16.5%, showing that the demand profile of HPs matches better with wind generation patterns than it does with PV. However, the LT capacity credit remains unchanged. In Scenario 3b, adding 800 TWh of demand from EVs results in similar increases in onshore (+75 GW) and offshore (+103 GW) wind capacity, as well as increases in rooftop (+68 GW) and utility (41 GW) PV capacity in western Europe. The decrease in LT capacity credit in Scenario 3b compared with Scenario 1 shows that vRES generation profiles correlate less well with demand from EVs than with base demand.
These impacts can be explained by the different demand, generation and residual demand profiles for each scenario (Fig. 14). Demand from HPs is largely seasonal, occurring mainly during winter and remaining largely constant throughout the day. For this reason, an increase in wind capacity is to be expected, given these periods are also associated with higher wind generation (see Fig. 10). Additional PV capacity is not installed as this would increase surplus electricity during daylight hours in the summer (Fig. 14b), and contribute only marginally to covering daytime winter HP demand. As a result, the residual demand for Scenario 3a is higher than Scenario 1 in winter, but lower in summer.
Unlike HPs, demand from EVs occurs all year round and exhibits more diurnal variation with peaks during the day and in the late evening when EV batteries start charging as people arrive home. This demand profile is more conducive to PV, which can help meet additional daytime demand in both winter and summer. Additional wind capacity is also useful in covering EV demand in the early morning and late evening once PV generation falls off, particularly in winter. In terms of residual demand, Fig. 14c shows that the seasonal impact of HPs is largely balanced when the full year is considered. However, the morning and evening demand peaks produced by EVs cannot be covered by vRES, resulting in much higher residual demand in these periods.
Adding demand from HPs and EVs changes not only the total amount of vRES installed, but also the distribution of PV capacity. When HP demand is added (Scenario 3a), the net 26 GW fall in total PV capacity is actually the result of 94 GW being removed from cells in western, central and northern Europe and 68 GW being added in southern Europe. The reason for this is that higher capacity factor sites at lower latitudes allow more daytime demand from HPs to be covered during winter. When EV demand is added (Scenario 3b), the net 109 GW increase in PV capacity is the result of 76 GW being removed from eastern Europe and 185 GW being added to western Europe  ( Fig. 15) as, with more PV located in western Europe, PV generation can be extended later into the day as the sun sets helping to cover evening demand from EV charging.
When demand from both HP and EVs is added (Scenario 3c), onshore and offshore wind capacities increase by 180 GW and 155 GW respectively compared to Scenario 1, showing that wind requirements are essentially additive for meeting HP and EV demand as these loads largely coincide.

Effect of gaining access to deep offshore waters (Scenario 4)
Extending the spatial grid to include the entire European EEZ (Scenario 4) reduces total vRES installed capacity by 19% and increases long-term capacity credit to nearly 20%. This is mainly due to a shift towards higher capacity factor wind sites at the extremes of the EEZ in the Atlantic, North and Norwegian seas. As a result, the maximum peak and total residual demands of 323 GW and 555 TWh in Scenario 4 are the lowest observed in all scenarios, being 14% and 35% lower respectively than in Scenario 1, and 16% and 55% lower respectively than in the maximum capacity factor distribution (Scenario 6). Onshore wind capacity decreases by 82% compared to Scenario 1 while offshore wind capacity increases by only 23%, showing that the development of higher capacity factor sites located far offshore allows less wind capacity to be installed overall. Total PV capacity is reduced by 33% compared with Scenario 1 though the spatial distribution remains largely unchanged. This shows that even with access to the most favourable wind sites, some PV is still beneficial for minimising residual demand.

Effect of alternative PV configurations (Scenarios 5a-c)
When all rooftop PV panels are set to face west (Scenario 5a), the bulk of rooftop PV capacity is installed in the western extremes of Europe (e.g. Portugal, Ireland, UK, France). This extends rooftop PV generation further into the day helping to cover peak evening demand, especially during the summer. As a consequence however, morning rooftop PV generation falls which would result in unmet demand if the optimisation did not compensate for this by redistributing utility PV capacity to eastern Europe, thus providing additional generation in the morning. This shows that while west-facing PV can be advantageous for meeting peak European evening demand, some morning PV generation is still required. When rooftop PV panels are instead set to face East (Scenario 5b), most rooftop PV capacity is built in north-eastern Europe and again the optimisation compensates by shifting utility PV west. Implementing two-axis tracking for utility PV (Scenario 5c) results in rooftop PV capacity being completely replaced by utility PV, which now generates electricity over a longer period extending from about 5:00 until 19:00. As a result, total residual falls by 3% compared to Scenario 1 and long-term vRES capacity credit increases slightly to 11.5%.

Comparison with maximum capacity factor distribution (Scenario 6)
When the optimised capacities per technology from Scenario 1 are redistributed to maximise capacity factor (Scenario 6), onshore wind capacity shifts to the central European locations previously devoid of capacity such as northern France, Belgium, the Netherlands, Germany and Poland. PV capacity moves to southern Europe as expected due to the higher irradiance. With these higher capacity factor sites, total generation increases by 640 TWh (23%). However, only a fraction (23%) of this can be used to meet demand, leading to far higher surplus generation (707 TWh, 21%) than in Scenario 1.
As peak residual demand remains largely unchanged between Scenarios 1 and 6, backup requirements would be the same irrespective of whether a minimum-residual-demand or maximum-capacity-factor approach was taken. The net effect is that long-term capacity credit falls slightly to 10.6%.
Mean capacity factors for onshore and offshore wind, rooftop and utility PV rise from 22%, 38%, 14% and 13% in Scenario 1-31%, 43%, 21% and 22% respectively in Scenario 6. This shows that the minimum  residual demand optimisation installs significant capacity in locations with rather low capacity factors. Fig. 16 depicts cumulative installed capacity against capacity factor, showing that for onshore wind and both PV technologies, the bottom 50% of installed capacity in Scenario 1 has a capacity factor approximately 10% (absolute) lower than in Scenario 6. The difference is less for offshore wind as there are fewer sites available for this technology, and capacity factors are typically higher than onshore. Fig. 9 showed that spatially optimising residual demand does not result in generation matching demand every hour of the day. Instead, the optimisation (on average) results in largely steady generation throughout the day, with a small daytime peak from PV. This can be explained by the seasonal variability of wind and PV generation depicted in Fig. 17, which gives the monthly generation by technology for Scenario 1. This shows that while wind generation is approximately 50% lower in summer than in winter, PV generation is six-times higher in summer than in winter. Additional PV capacity could be installed to cover the summer shortfall but this would result in winter surpluses, thus the optimisation must make trade-offs between seasonal surpluses and deficits. As a result, the optimisation installs enough wind capacity to largely cover winter demand, while leaving some unserved demand during summer.

Seasonal effects of minimising residual demand
This seasonal pattern is somewhat contrary to those in other studies which typically exhibit significant (or even surplus) PV generation and minimal backup requirements during the summer, with unmet demand and significant backup required during the winter. However, these studies do not achieve such high vRES penetration as we do in our study (89% gross energy penetration for Scenario 1, compared with 48% in [2], 56% in [3], 61% in [11] and 78% in [83]) and typically include storage [2,83].
Although we do not include storage, we can look at its possible implications by examining how residual demand is distributed throughout the year. Fig. 18 shows the range of accumulated hourly residual demand for Scenario 1 across all weather years. A flat gradient in this figure indicates that short-to medium-term imbalances largely cancel out, and daily or weekly storage could be used to cover mismatch; while a sustained positive or negative gradient indicates that short-to medium-term imbalances accumulate, and long-term seasonal storage would be beneficial. Thus, Fig. 18 shows that short-term storage in the order of 100 TWh would be sufficient in most years to ensure that demand could be met from September until late January with wind and PV alone without generation from additional sources. 33 From February until September the accumulated residual follows a negative trend, showing that short-to medium-term imbalances do not balance out, and additional generation capacity or seasonal storage would be required. However, as most years exhibit no sustained periods with a positive gradient, no opportunities for charging long-term storage exist and Scenario 1 results in a net annual deficit of 200-500 TWh. If seasonal storage was added to the model so that curtailment could be reduced, it is likely that additional capacity would be built to cover this shortfall.

Understanding the spatial distribution
One might expect that the residual demand minimisation would install wind and PV capacity evenly across Europe in order to maximise site diversity. However, the results in Fig. 6 show that this does not occur. Instead, we find that onshore wind capacity is installed mainly at the periphery of Europe, offshore wind is quite evenly distributed (though concentrated in the North and Baltic seas), and rooftop and utility PV are mostly installed in a band extending from Portugal to Finland.
To understand the reason behind these phenomena, it is necessary to consider the different wind and solar radiation patterns across Europe. Fig. 19 shows the correlation coefficient between time series as a function of distance between sites for both wind speed and solar radiation. This figure highlights that wind generation patterns are strongly spatially correlated, with sites within a radius of 5 grid cells (approximately 250 km) having correlation coefficients above 0.5. Only at distances in excess of 800 km does the correlation between sites start    33 By comparison, Europe's current (2015) hydro storage capacity is approximately 180 TWh (including Switzerland and the Nordic countries, but excluding Turkey) [126].
to turn negative, and generation patterns become complementary. As a result, the optimisation attempts to maximise the distance between wind sites by pushing wind capacity to the geographical extremes of Europe, leading to significant offshore wind capacity in shallow waters around Europe's coastline. The same effect occurs on land, with onshore   wind pushed to Europe's land borders. However, the total wind potential at these geographically extreme locations is limited, and restricting capacity only to these sites would result in significant unserved energy at night when PV is not generating. Thus, additional offshore wind capacity is placed in the North Sea due to its favourable generation patterns, whichto avoid excess correlated generation in this region -results in less onshore wind in countries surrounding the North sea (Fig. 6a).
From Fig. 19, solar radiation is even more strongly correlated than wind with correlation coefficients above 0.8 even at distances of up to 1000 km, thus spatial complementarity does not explain the observed distributions. To understand the placement of PV, it is necessary to look in more detail at the spatial differences in hourly generation. These are shown in Fig. 20, which depicts hourly generation by region for (a) the first week of January and (b) the first week of July. Fig. 20 shows that by installing PV capacity in the Nordic countries, PV generation in the summer can be increased while avoiding surplus PV generation in winter when wind production is highest (Fig. 20a). Furthermore, the summer generation profile (Fig. 20b) shows that not only is PV generation increased in the morning due to the easterly latitude, 34 but it also generates for longer due to the extended daylight hours at northern latitudes. PV capacity in western locations like Iberia and the British Isles also extends PV generation later into the day, helping to cover evening demand.
Although we do not explicitly quantify transmission flows in our study, an examination of aggregated hourly net surplus generation (vRES generation minus demand) from each region (Fig. 21) shows that with vRES capacity distributed to minimise residual demand, the British Isles and Nordic countries would typically be net exporters of vRES electricity, while the Iberia, Eastern and Central regions would typically be net importers. Thus, in order to bring vRES generation from where it is generated to where it is consumed, significant expansion in transmission infrastructure would be required.

Limitations of study
This study explores how optimising the mix and spatial distribution of PV and wind generation capacity can minimise residual demand depending on different factors. Nevertheless, scope limitations mean that some aspects are not considered: • While the ERA-I dataset limits the spatial resolution to 0.75°, higher spatial resolution is unlikely to make a large impact given the strong spatial correlations identified (see Fig. 19). Extending the geographic scope to include other regions could also add further potential for minimising residual demand, however, it remains to be seen whether long-term cooperation and integration of electricity markets, even at the EU level, is achievable.
• The LLSQ formulation means that the optimisation weights hours with higher residual demand more heavily. This represents an intermediate approach between a residual energy-based minimisation (minimising backup/storage energy requirements i.e. TWh), and a residual capacity-based minimisation (minimising backup/ storage capacity i.e. GW), which are likely to yield different results. 35 • A further consequence of the LLSQ formulation is that it was not possible to include transmission and distribution, nor flexibility-improving technologies such as demand response and storage. By assuming a copper-plate Europe, congestion limitations and line losses, which would erode the benefits of spatial optimisation by increasing curtailment and other losses, are not considered. 36 Including transmission would likely result in vRES capacity being built closer to load centres, rather than more remote locations observed in this study. Furthermore, there are many hurdles to constructing long-distance transmission lines (e.g. social acceptance, environmental impacts, high cost [84]) we do not consider which, if taken into account, would impose additional constraints on transmission and reduce the potential benefits of spatial vRES optimisation. However, despite these transmission simplifications, we show that even in the idealised case of a copper-plate Europe, neither peak residual demand nor total residual demand can be significantly reduced through spatial optimisation of vRES 37 • The exclusion of transmission and flexibility technologies means that this study could not directly consider total system costs. Only by considering the total costs of vRES investment capacity, dispatchable backup capacity, distribution and transmission infrastructure, and the provision of reserves could the overall cost-effectiveness of a minimum-residual-demand based optimisation be assessed and compared with other methods. 38 However, by minimising residual demand the costs of vRES curtailment and backup capacity have been considered indirectly.
• Government policies, and incentive schemes in particular, can have a significant impact on where renewable technologies are deployed, which we have not considered. Their impact can be clearly seen from Germany's Energiewende which, in the period between 2006 and 2016, resulted in higher wind and PV deployment in Germany than in any other European country [85,86], despite the fact that Germany's wind and solar resources are relatively less competitive than other countries [87,88], and (from this study) do not coincide particularly well with demand. Alternatively, subsidies could be used to encourage wind and PV deployment in locations which would be more advantageous for the power system by better matching generation with demand.
• As we consider only the power sector, we neglect any potential synergies with other sectors of the economy (e.g. transport, industry). Including technologies which could convert surplus generation to other energy carriers (e.g. power-to-gas) for use in other sectors would reduce the 'penalty' associated with surplus generation, likely leading to a higher share of PV and increased utilisation of high capacity factor wind and PV sites.
• Any flexibility limitations on the implied portfolio of dispatchable backup technologies (e.g. ramp up/down rates, minimum start-up and shut-down times) are not considered. However, some ex post analysis of hourly changes in residual demand (see Appendix A) suggests that dispatchable ramping requirements for Scenario 1 would be approximately 70-80% higher than today, 39 but 50% lower than if vRES were distributed to maximise capacity factor (Scenario 6).
• Any large-scale decarbonisation of the European power sector should not consider only the technical transformation required, but also broader environmental, social and economic aspects of 34 Nearly 50% of Nordic PV capacity is in Finland. 35 In any case, it would be unwise to build vRES infrastructure to minimise peak residual capacity as, in reality, these peak hours would be ideal candidates for demand response technologies such as load shedding or load shifting. 36 Distribution and transmission are particularly relevant for the spatial distribution of vRES as, with capacity spread across Europe and often far from load centres, the amount of grid reinforcement required is likely to be significant [30]. 37 To our best knowledge no power system simulation model currently available allows a high-resolution spatial distribution of vRES to be easily incorporated, which provided motivation for this study. 38 Based on ENTSO-E data for the, EU28 + NO + CH, the gross penetration of vRES in 2015 was approximately 13% on an energy basis [127]. 39 The performance of HPs falls at lower temperatures, thus electricity consumption would be higher at these times and could lead to a more 'peaky' demand profile.
sustainability [89]. Thus, other factors such as the full life-cycle impacts of the generation technologies, employment, social acceptance, and potential impacts on natural flora and fauna due to largescale investments would need to be taken into account. However, these aspects were beyond the scope of this paper. Uncertainty in the underlying data and assumptions made in this study also introduce several potential sources of error which could have an effect on the results: • Variations in demand profiles would have a large impact on the results. By using only one year of base demand data and a fixed HP demand, neither the base nor HP demand profiles take into account increased demand in colder years. Furthermore, our HP demand profiles do not consider the effects of temperature on HP efficiency, 40 thermal energy storage, or different end-user preferences; while the EV charging profiles assume charging station availabilities, driving patterns and charging preferences which may change in the future. A preference for night-time charging, for example, would likely lead to a higher share of wind capacity. Increased demand for air conditioning may also change the optimal mix and placement of vRES, potentially favouring solar PV due to its correlation with cooling demand. 41 • Estimating vRES generation profiles from the underlying weather data requires several steps which each entail uncertainties. For example, due to their poor treatment of aerosols, reanalyses like ERA-I can predict clear sky conditions when they may in fact be cloudy, leading to an overestimation of solar generation [90]. However, this overestimation is reportedly less for ERA-I compared with other reanalysis datasets, and is partly offset by periods when clear sky conditions are reported as cloudy [91]. Using more advanced weather models or satellite-derived radiation data which include the effects of aerosols would allow for more accurate estimates of PV production, however this was not possible in our study. Also, assuming a logarithmic vertical wind speed profile does not account for reduced wind speed variability at higher altitudes due to lower turbulence, and may underestimate wind potential [14].
• Aside from systemic uncertainties and biases in the weather dataset, the spatial and temporal resolution of the dataset also affects the accuracy of our results. For example, the need to interpolate from the 3-hourly data in ERA-I to hourly can introduce errors for PV during sunrise and sunset hours, but as these are periods of low radiation the impact is likely to be small. The main effect of linear interpolation is that the wind and PV generation profiles may be smoother than they would be in reality. However, it has been shown that significant spatial smoothing of wind and PV profiles occurs across large areas due to geographical diversity. For PV for example, one study found that the relative aggregate output variability of PV plants sited 20 km apart was six times less than the output variability of a single site, even at time scales less than 15 min [24]. For wind, significant smoothing effects are observed when wind farms are placed over a wider geographical area due to i) the mitigating effect of many turbines in a wind farm which absorb short-term (sub-hourly) wind gusts, and ii) greater geographical diversity reducing the impact of (multi-hour) diurnal and synoptic wind variations [92,93] 42 . Furthermore, the spatial coarseness of the reanalysis dataset means that local terrain features such as hills, trees, and buildings which could affect wind speeds are not considered [94]. However, given that the focus of our study is balancing vRES output at the continental scale and not trying to accurately reproduce the output of individual wind or PV farms, we consider the 0.75°and hourly resolution sufficiently accurate for this purpose. As in the current power system, sub-hourly power imbalances would need to be managed by balancing power flows using the transmission network, operational reserves, and flexible dispatchable generators which are beyond the scope of this paper.
• We assume grid cell independence in that kinetic energy harvested from the wind in one cell does not affect wind speeds in neighbouring cells. In reality, this is not strictly true with one study finding competition among turbines reducing peak wind speeds averaged over a 400 km radius reducing by 1 m s −1 [95], however including these effects was not possible with the current model.
• Future changes in European weather patterns due to climate change are not considered. However, recent studies on PV [96] and wind [97] suggest that these impacts are likely to be small.
• Together, the assumed capacity densities and land availabilities dictate vRES capacity constraints. If technologies improve and capacity densities increase, then more capacity could be installed in optimum locations. Conversely, if fewer land classes are suitable or less land is available, the potential for spatial optimisation would reduce. As neither total PV nor wind potential is fully exploited in any optimisation run, the impact on the results is likely to be minor.

Practical implications
It is important to reflect on what residual demand minimisation could mean in practice: • Although optimising the mix and distribution of different vRES technologies has the potential to smooth generation or minimise residual demand, there is little evidence of this being done in practice [17].
• Wind and PV capacity factors at some sites may be too low to be economically viable (e.g. northern Europe, see Fig. 16). However, if wind and PV costs continue to fall and these sites produce electricity when residual demand and market prices are high (e.g. early morning or late evening), the market value of the electricity generated at these sites may be sufficient to make them economically attractive [98] 43 .
• While there may be potential benefits for Europe as a whole from distributing capacity on a European-wide scale and integrating energy markets in line with current EU policy objectives [99,100], the geopolitics of energy cannot be ignored and individual governments may resist an increasing reliance on supranational generation and interconnectors [101]. Thus, a European 'supergrid'upon which this and many similar studies relymay never materialise [102,103].

Comparison with existing literature
Comparing this work to other studies: • Considering the mix of wind and PV capacity, minimising residual demand calls for a higher share of wind (74% in Scenario 1) compared with several studies (e.g. 32% [11], 47% [3], 50% [104], 54% [25] 44 , 56% [74]), though in a similar range to others (e.g. 71% [105], 75% [25] 45 , 82% [27], 60-90% [29]). Aside from the fact that many studies assign capacity exogenously, the main reason for 40 EU cooling demand in 2010 amounted to 220 TWh (8% of the space heating demand). Space cooling demand is expected to rise to 305 TWh (+ 38%) in 2020 and 379 TWh in 2030 as the climate warms [128]. 41 Another study of 17 geographically dispersed wind sites in Ontario showed that aggregated wind power output variability was 60-70% lower compared to the output from one site for both 10-min and hourly data [129]. 42 For example higher PV cell efficiencies, larger diameter or taller wind turbines. 43 IRENA note that the cost of PV fell by 80% from 2009 to 2015, and forecast a further 59% reduction by 2025 [130]. 44 X-7: 100% RES scenario 45 X-5: Large-scale RES scenario these differences is that we do not include storage. If short-term (daily) storage were included then the diurnal variability of PV would result in less residual demand, and the optimum share of PV would likely increase [29]. Conversely, including seasonal storage would most likely increase the optimum share of wind.
• In terms of how vRES capacity is spatially distributed, no study could be found including a grid-level spatial distribution for the whole of Europe for comparison. However, when aggregated at the national level, Fig. 22 shows that our results are mostly within the range of other studies, though there are several exceptions. Namely, our study shows (i) less wind and PV capacity in Germany, (ii) less PV in southern European countries (e.g. Italy, Spain), and (iii) more PV in northern Europe. The main reasons for this are that many studies allocate capacity based on current deployment and future policy plans rather than optimising it (hence significant capacity in Germany), and the fact that we did not consider costs, storage, or transmission. Including storage would help to reduce summer PV generation peaks making PV more attractive in southern Europe, while including transmission constraints and losses would most likely reduce capacity in the north of Europe and shift capacity closer to load centres in central Europe, for the reasons already discussed.
• In terms of potential transmission requirements, distributing vRES capacity to minimise residual demand would require massive expansion of transmission and distribution infrastructure, however this feature is common to many other scenarios of high-vRES European power systems [2,27,33,34,83,[106][107][108]. Furthermore, ENTSO-E's Ten-Year Network Development Plan (TYNDP) includes the connections between central Europe and the British Isles, Nordic countries, Iberian Peninsula, and eastern Europe in their 10 key transmission corridors requiring further expansion [106]. We find that these corridors would also be important for a power system with vRES capacity optimised to minimise residual demand, though the direction and volume of these flows may differ. [25] • Depending on the demand level assumed, the results for unmet demand in our study of 566 TWh (Scenario 1, lowest assumed demand) to 998 TWh (Scenario 3c, highest assumed demand), or 18-23% of annual demand, are largely in agreement with [5] who report backup energy requirements of 20% in a 100% RES copperplate Europe. However, assuming that the 194 GW of hydro capacity (see Table 1) remains unchanged until 2050 and providing 460 TWh of generation annually, 46 the resulting demand shortfall of 104 TWh y −1 (Scenario 1) to 536 TWh y −1 (Scenario 3c) could be met by a combination of stored surplus generation and other dispatchable generation technologies.
• In terms of required backup dispatchable capacity, subtracting the current hydro capacity from the peak long-term residual demand of 377 GW (Scenario 1) or 738 GW (Scenario 3c), suggests that at least 180 GW (Scenario 1) to 544 GW (Scenario 3c) of additional dispatchable capacity would be required to ensure demand could be met in the most challenging year. Compared with existing studies (Table 1), these dispatchable requirementsand the resulting total capacity requirements 47 of 1521 GW (Scenario 1) to 2316 GW (Scenario 3c)are in a similar range. However, it should be kept in Fig. 22. Comparison of total installed wind and PV capacity by country in several high-RES scenarios for Europe. (Energynautics [104], Fraunhofer [105], e-Highway 2050 [107], EU Reference Scenario 2016 [74]). The legend also shows the total installed capacity and capacity share for each technology per scenario. 46 Average gross hydro generation (including pumped storage generation) from 1990 to 2014 was 462 TWh y⁻¹ with a standard deviation of 38 TWh y⁻¹ [122]. It is not clear how much of this is from run of river hydro, thus for these rough estimates we assume full dispatchability. 47 The total of installed vRES capacity, hydro capacity and additional dispatchable backup capacity required to meet (long-term) peak residual demand.
mind that we include no demand response or storage capacity, which would further reduce backup requirements. Moreover, we calculate backup requirements based on the maximum observed residual demand in 36 years of weather data, while most studies consider only one year.

Conclusion
In this paper we have presented a method to optimise the spatial distribution of wind and PV capacity by minimising residual demand, incorporating long-term weather data to ensure the robustness of the optimised capacity distributions to different weather years. Using this approach, we considered the effects of vRES penetration, alternative demand profiles, access to remote offshore sites, and alternative PV configurations. Our method can be used by power system modellers to build detailed vRES spatial distributions and generation profiles for PSM studies, incorporating different optimisation objectives (e.g. minimum residual demand, maximum capacity factor), spatial and technological constraints. From a methodological point of view, we find that using the mean optimised capacity across a number of weather years can generate a single optimised capacity distribution that performs in line with long-term expectations. However, the long-term robustness of the capacity distributions produced by minimising residual demand varies by technology, with wind capacity distributed more consistently than PV.
Our results show that when minimising residual demand under the idealised assumption of a copper-plate Europe and in the absence of storage: • In the base case optimisation (Scenario 1), wind and PV can provide 82% of annual European electricity demand with a total installed capacity of 1144 GW. The optimum capacity mix for minimising residual demand is 74% wind and 26% solar PV, resulting in 8% surplus vRES generation. However, with a long-term vRES capacity credit of only 11%, at least 377 GW (equivalent to 33% total installed vRES capacity, or 75% peak demand) of dispatchable generation capacity would still be required to ensure long-term system adequacy.
• With the maximum peak and total residual demand in Scenario 1 being only 2% and 31% lower respectively than for the traditional capacity-factor-maximisation approach (Scenario 6), optimising the spatial distribution of vRES can play only a minor role in reducing residual demand, mainly by reducing curtailment. This is achieved by exploiting lower capacity factor PV sites in northern, western and eastern Europe, and limiting onshore wind capacity in countries surrounding the North Sea where it competes with offshore wind capacity.
• The greatest benefits of spatial vRES optimisation are found when water depth constraints are relaxed and offshore wind capacity can be built anywhere within the EEZ grid. In this case (Scenario 4), the maximum peak and total residual demand are 16% and 55% lower respectively than in the maximum capacity factor distribution (Scenario 6). Thus, floating offshore wind farms have the potential to deliver additional benefits to the European power system by granting access to sites with higher wind capacity factors and capacity credits.
• vRES penetration rate affects the optimum spatial distribution of vRES, but has little effect on the optimum mix. For example, PV capacity is installed in southern Europe at low vRES penetration rates, but shifts north with increasing vRES penetration in order to avoid surplus summer generation. By contrast, the optimum regions for wind capacity remain the same as vRES penetration increases.
• Changes in future demand due to HPs and EVs effect the optimum distribution of vRES. For example, installing PV capacity at the eastern and western extremes of Europe can reduce the midday peak and increase PV generation in the morning and evening, which may be particularly beneficial for meeting future EV demand. Meanwhile, PV in the north of Europe can extend the window of PV generation in summer by taking advantage of longer days at more northerly longitudes.
• Expanding offshore wind capacityespecially in the North Seais a 'no regret' option due to its favourable correlation with demand, though correlated generation patterns with onshore wind farms in neighbouring countries at high vRES penetrations may lead to significant surplus generation.
• Alternative PV panel orientations can play a role in matching generation with demand. For example, installing west-facing PV panels in western Europe can extend generation later into the day to help cover the evening peak, while east-facing PV panels in eastern Europe can increase generation in the morning.
This study has highlighted several areas for further research: • A comprehensive assessment of the potential benefits of spatially optimising vRES should be performed using a detailed PSM based on total system costs, considering transmission and distribution grid reinforcement, reserves and storage. However, it remains to be seen whether incorporating the spatial distribution of vRES directly in a PSM at the European scale is computationally feasible.
• Rather than being limited to a single PV orientation in a single optimisation run, the formulation should be modified to allow PV panels with different orientations to be installed in each grid cell (e.g. west-facing panels in western Europe, east-facing panels in eastern Europe) to see how the optimum PV orientation varies with location.