Economic and Environmental Assessment on Implementing Solar Renewable Energy Systems in Spanish Residential Homes

In Europe, buildings are responsible for more than one third of the total final energy demands and greenhouse gas emissions. In the last twenty years, the European Union has published a succession of energy performance of building directives to define and ensure the fulfilment of a series of objectives regarding greenhouse gas emissions, energy consumption, energy efficiency and energy generation from renewable sources in buildings. For its part, Spain is adapting its legal framework, transposing these directives with the aim of achieving greater energy efficiency and sustainability for buildings. Under this context, an energy, economic and environmental assessment is performed to analyze the impact of these regulatory changes on a single-family home including a photovoltaic installation for self-consumption with surpluses and/or a solar thermal installation for domestic hot water supply, located in each one of the eight thousand one hundred thirty-one municipalities that make up Spain. The energy behavior of the original house is compared with that obtained after it is updated with these new facilities. The transient system simulation tool is used for the energy study. The results show that the European objectives are far exceeded. The energy savings achieved range from 67% to 126%, carbon dioxide emissions decrease by 42% to 100% and energy bills are reduced in cost by 32% to 81%. The findings of this work can be used by policymakers as guidelines for the development of national strategic plans and financial incentives for the promotion of small-scale residential photovoltaic and solar thermal applications, as well as by designers, supervisors, managers and developers to include them in their projects.


Introduction
Buildings have become the largest energy consumers in Europe, accounting for approximately 40% of European Union (EU) energy consumption and 36% of greenhouse gas (GHG) emissions [1]. In this context, buildings must face the challenge of achieving energy management that enables them to contribute to economic growth, social welfare and sustainability, while preserving non-renewable resources and the natural environment [2]. In addition, they have the opportunity of adopting measures aimed at saving energy, reducing their demand and/or improving the efficiency of their systems [3]. Among them, the EU residential building stock offers high potential for energy efficiency gains and reduction of GHG emissions [4]. This is due to the heavy reliance on fossil fuels in household activities, to cover the demand for heating and domestic hot water (DHW) [5], as well as to a lesser extent and indirectly for cooling, lighting and appliances. However, occupant behavior lifestyles cannot be underrated [6], although this issue is outside the scope of this research.
The use of renewable energy systems (specifically those based on solar ones) may be a solution to reduce the GHG emissions from residential buildings, as well as save

•
Decarbonize the housing stock, renovating it from an energy standpoint. • Ensure equal access to financing for building renovation, rewarding proposals that promote energy efficiency. • Guarantee the quality of buildings, prioritizing the adoption of natural solutions, the encouragement of alternative high-efficiency installations, the promotion of research and the test of new solutions.
According to the EPBDs, Member States have to promote the improvement of the energy performance of buildings within their territories, taking into account outdoor climatic conditions, indoor climate requirements and cost-effectiveness [10]. The goal is to reduce GHG emissions in the Union by 80-95% compared to 1990, to ensure a highly energy efficient and decarbonized European building stock and to facilitate the cost-effective transformation of existing buildings into nZEBs.
In short, EPBDs set EU building sustainability objectives for mitigating climate change, reducing GHG emissions and energy consumption and promulgating the contribution of renewable energy. By 2020, the EU has set the target to reduce GHG emissions and energy consumption by 20%, as well as to raise the share of renewable energy in their energy consumption by a further 20%, compared to 1990 results. By 2030, the EU has established a 40% reduction in GHG emissions and a 32.5% in energy consumption, as well as a 32% contribution from renewable energy sources.
In Spain, many standards, regulations and laws have been published this century, with the aim of achieving greater energy efficiency and sustainability for buildings. The Spanish Building Act (LOE) 38/1999 [11] required the adoption of a Technical Building Code (CTE), which came into force in 2008 by the Royal Decree (RD) 384/2006 [12]. This transposed the EPBD 2002/91/EC, definitively repealing the Basic Building Standard on Thermal Conditions in buildings (NBE CT-79) [13]. After that, a few RDs Two scenarios will be studied for each system. In the case of the PV system, all energy generated is consumed at home or sold to the supplier company and, for the ST system, auxiliary energy is supplied by electricity or natural gas. • Forecast scenarios proposed by the EU both for the electricity and natural gas prices and for the energetic mix will be considered. • Usual energy, economy, and emissions indicators of the considered solar systems (PV, ST) will be accomplished. • Initial, operational and maintenance costs and GHG emissions incurred by PV and ST systems will be compared to the costs and GHG emissions from fossil-fuel-based systems to which they replace and/or complement.
• The amount of money and CO 2 eq that can be saved when a household is using either a PV and/or a ST system to support the energy consumption will be quantified. • Energy, money, and CO 2 eq emissions saving maps will be generated for the different scenarios considered.
This way, the relevance of these measures for an entire country can be checked, the influence of the climatic conditions of each territory on its different energy needs can be considered and various existing technologies can be compared from different points of view. Accordingly, the findings of this study can help construction professionals (such as designers, architects and engineers, developers, builders and even legislators) to quantify the real impact that domestic solar renewable energy systems may have on energy, economic and emissions savings.
The rest of the paper is organized as follows: Section 2 describes the material and methods used for the calculation of the variables selected (energy, costs and GHG emissions): climate data, characterization of renewable energy facilities, economic and environmental study of the solar renewable energy facilities, energy simulation, energy, economic and emissions assessment and geographic information system (GIS) representation. Then, the results are presented in Section 3. Next, the energy, economic and environmental performance of the systems analyzed (conventional, PV and ST) are discussed. Finally, in Section 5, some conclusions and recommendations are highlighted.

Materials and Methods
To quantify the impact of incorporating solar renewable energy systems in the transformation of existing and new single-family homes into nZEBs, the energy behavior, energy costs and GHG emissions of a house without renewable energy sources has been compared to a house that incorporates them. This comparison has been made considering four premises: S1. House in which a PV system has been added under the assumption that the entire production will be used for self-consumption (PV consumption saving scenario). S2. House in which a PV system has been added under the assumption that the entire production will be sold (PV surplus sale scenario). S3. House in which a ST system has been added to a previous DHW one with an electric boiler, that remains as an auxiliary energy system (ST auxiliary electricity scenario). S4. House in which a ST system has been added to a previous DHW one supplied by natural gas, that remains as an auxiliary energy system (ST auxiliary natural gas scenario).
Once the scenarios are defined, a sequential method to approach the problem is established. To culminate this comparative study, the following steps need to be undertaken, as summarized in Figure 1: Generation of climate data for each municipality, provided by PVGIS depending on its latitude and longitude.

2.
Characterization and sizing of solar renewable energy facilities incorporated (PV and/or ST). This configuration remains for each location, considering their local climate data.

3.
Economic and environmental study of the solar renewable energy facilities included (PV, ST).

5.
Energy, economic and GHG emissions assessment of the 32,524 case studies (2 scenarios for each of the 2 solar renewable energy systems (PV, ST) in the 8131 municipalities). 6.
Representation of the evaluated data by means of a GIS software. These will show the average energy consumption, carbon dioxide emissions and energy costs over the 30 years of life, considering the initial emissions and investments and the corresponding performance losses, according to each assumption.

Climate Data
The PVGIS database is a project developed in 2001 by the publicly accessible European Commission Joint Research Centre, designed to allow the users to calculate photovoltaic production anywhere in Europe, among others. From the application, monthly, daily, or hourly weather data can be generated, as well as a TMY for each coordinate (by longitude and latitude) entered.
The PVGIS obtains this data by interpolation [48], based on solar radiation data obtained by satellite, solar irradiation measured in Europe's network of weather stations, turbidity and digital elevation, providing all the climate values necessary for the generation of a TMY [49]. This study has compiled the 8131 TMYs for the period 2007-2016 (the most recent available data) corresponding to the geographical location of each municipality in Spain (in blue), as shown in Figure 2. For the sake of clarity, the sixteen cities with a population of more than a quarter of a million inhabitants will be also highlighted (in red).

Characterization of Renewable Energy Facilities
Two solar renewable energy systems have been selected for the study. On the one hand, a PV system of 2.4 kWp using 6 monocrystalline cell modules (with a nominal power rating of 400 Wp per unit) has been installed. The modules have a surface area of 2 square meters, a nominal operating cell temperature (NOCT) of 47 • C, and a temperature degradation coefficient of 0.36%/ • C. It can be noted that this type of renewable energy source is not mandatory in Spain for residential buildings, even in the last version of the CTE. However, from the entry into force of the Royal Decree 244/2019, the surplus produced by a household system can be fed into the electric grid (if the facility is lower than 100 kWp), making the entire production available for use.
On the other hand, a ST system is pre-dimensioned so that approximately 80% of the demand for DHW is covered (slightly above the legal minimum of 70%), using a 10-pipe evacuated tube collector. It has a surface area of 2 square meters, an optical efficiency of 93% and an overall loss coefficient of 1.06 W/m 2 /K. This type of renewable energy source partially covering the demand for DHW is mandatory since the regulatory framework of the first CTE, for all new buildings or renovation of existing ones. A DHW flow rate of 140 L/d (5 occupants at a rate of 28 L/d per person) is considered, so an accumulation volume of 200 L will be used.

Economic and Environmental Study of the Solar Renewable Energy Facilities
The incorporation of the solar renewable energy facilities (the PV system that is optional for residential buildings of any type according to CTE and the ST one, which is mandatory according to the CTE for both renovation and new buildings) generates an envi-ronmental impact and supposes an initial economic investment, the return on which must be calculated. The economic evaluation of the PV system involves comparing its initial, operational and maintenance costs with the energy costs of the electricity consumption that is no longer consumed (S1: PV saving scenario) or of the sale of the surplus produced (S2: PV surplus sale scenario). In the case of the ST system, the economic evaluation consists of comparing its initial, operational and maintenance costs with the savings from the consumption of auxiliary energy, either electricity (S3) or natural gas (S4).
The energy prices considered to be saved (or sold) come from the two major supply companies in Spain (Endesa [50] and Iberdrola [51] for electricity and Naturgy [52] and Repsol [53] for natural gas). These prices are summarized in Tables 1 and 2. It can be noted that all the prices selected are lower than those from the Statistical Office of the European Union (Eurostat) [54], as well as lower than the expected future scenarios in the EU up to 2050 forecasted by the Union of the Electricity Industry (Eureletric) [55]. In this study, E 3 Mlab proposes 8 different scenarios (according to the magnitude of change that the delay or failure of specific elements cause): reference, power choices reloaded, lost decade 2020-2030, limited financing, RES target in 2030, limited XB trade, barriers to EE and CO 2 price driven. As the lowest price predicted for any of the eight scenarios from 2020 to 2050 is higher than the average price obtained from the supply companies, it is decided to leave the latter price as constant, so the study is on the reliable side. For the cost definition of the elements that compose both systems, the price database from CYPE Engineers' Archimedes software, version 2021.f [56] is used, facilitating their traceability. For this purpose, a Spanish national manufacturer has been chosen, whose production and distribution facilities are located in the city of Valencia. In economic terms, unit prices include the waste management, health and safety, overheads, industrial profits, technical fees, municipal licenses and indirect taxes. These initial costs, as well as operational and maintenance costs, are also summarized in Tables 3-7, for each of the facilities considered. However, no inflation or deflation rates have been considered for those costs to be paid in the operation and maintenance phase, due to the small relative amount (9% of total investment) and the uncertainty after the COVID-19 pandemics [57].     In terms of environmental impact, a life cycle inventory of all the elements needed to incorporate the PV and ST facilities has been made. For the PV system, the FU is composed by 6 monocrystalline cell modules (described previously) with their structural base, a charge regulator, a bidirectional counter and a protection panel. For the ST system, the FU is composed by a 10-pipe evacuated tube collector (described previously) with its structural base, a hot water cylinder (200 L), an expansion vessel and a circulator pump. For the analysis, the following stages of the life cycle of both systems have been considered: manufacture, transport of systems to the final locations, installation and operation. This includes the transportation of materials to the factory, energy required for production and logistics distribution. The manufacturing site is located in Valencia (Spain). As well, decommissioning of systems has not been included.
The conversion factors to obtain CO 2 eq emissions are then determined using EcoInvent 3.3 database [58] and the Intergovernmental Panel on Climate Change (IPCC) 2013 method with a timeframe of 100 years [59]. As a result, CO 2 eq emissions from these interventions for the FU are shown in Tables 8-12. All emissions (and upfront costs) must be offset by a decrease in energy consumption for the rest of the building's lifespan.    Emissions derived from operational activities depend on the performance of the circulation pump. For this purpose, 48 kWh/year are considered. For this reason, the mix for electricity and natural gas must be taken into account. CF are extracted from the Ministry for the Ecological Transition and the Demographic Challenge (MITECO) [60].  . CF: conversion factor in kg CO 2 eq/kg. Emissions in kg CO 2 eq (per FU).

Energy Simulation
The simulations for the energy assessment are performed using the TRNSYS tool 17 [61], which allows the simulation of dynamic thermal systems and can be used to assess the thermal behavior of the systems associated with buildings [62]. A detailed description of the software can be found at [63]. To carry out these simulations, the weather data for each municipality is considered, as indicated previously. The simulation time is of one year, at hourly intervals. Simulations require the geometric, construction and operational definition of the systems involved. From these simulations, the energy demand for DHW, as well as PV and ST energy production, can be obtained. This allows determining the demands that are met by these systems and the need for auxiliary systems.
As a base case, a residential single-family home is established. For the electric case, two extreme cases are studied: all the energy is consumed (saving scenario), or all the energy is sold with no consumption (surplus scenario). To estimate the DHW consumption, five occupants are considered. In the initial situation, according to the scenario, a natural gas (with a nominal performance of 85%) or electric boiler (with a nominal performance of 97%) is used to produce DHW. To achieve architectural integration, the panels (collector and modules) are mounted horizontally. In relation to the systems performance, the study considers a linear performance loss for PV from 3% in the first year to 20% after 25 years, etc., up to 30 years. For ST, 5% during the first 25 years to 50% after 30 years.

Energy, Economic and Emissions Assessment
The triple evaluation results will be shown in the Results section. These results will include, among others, the energy produced by the solar renewable energy systems studied, the economic savings generated by these facilities over their life cycle, and the emissions avoided through their operation.

GIS Representation
The representations have been obtained using the inverse distance weighted (IDW) technique of ESRI's ARCGIS 10.6.1 [64] from the specific information of each of Spain's 8131 municipalities. For each type of system (PV, ST), evaluation (energy, economic and emissions) and scenario (consumption saving, surplus sale, auxiliary electricity and auxiliary natural gas), a series of three maps (investment back, net present investment and investment rate return) are made.

Results
The results obtained, in terms of energy consumption, economic savings or surplus and CO 2 eq emissions for each scenario are presented below. Tables to be shown include a statistical summary (minimum, average and weighted average according to the population of each municipality and maximum values) and the results in the sixteen most populated cities in Spain, with more than a quarter of a million inhabitants. Figures to be shown include the maps from the GIS software, providing this information for each of the 8131 Spanish municipalities, using the IDW technique. For the sake of clarity, an Appendix A is enclosed in order to host some of Tables (summaries) and Figures (maps) produced. However, the most synthetic results are shown as follows in this section.

Impact on Energy Consumption
Once the production of solar renewable energy systems (PV, ST) has been calculated for each of Spain's 8131 municipalities according to their own local climate data, there has been analyzed if these results depend mostly on some variable (as altitude of the municipality, average temperature of the municipality, latitude or average solar radiation of the municipality). Nevertheless, only two of them achieve a coefficient of determination (r-squared) greater than 50 percent for both systems: latitude and solar radiation, as summarized in Figure 3 (which orders the values of the production of the PV (up) and ST (down) systems by increasing latitude (left) and decreasing solar radiation (right)). The latitude explains the 66% of the results for the PV system and the 59% for the ST one. In addition, the solar radiation explains the 85% of the results for the PV system and the 74% for the ST one. The rest of variables (altitude and average temperature) barely explain 10% of the variability of both systems. However, even the option that best fits (upper right corner: PV depending on solar radiation) does not explain the cases where radiation is very high (Canary Islands and southern mainland) or very low (Cantabrian Sea area), where the deviation is greater than 50%. As discussed below, there is research that links the production of solar renewable energy systems (PV and ST) to the solar radiation, but this is not enough to explain the whole territory of Spain. Therefore, having performed the energy simulation and linking the results through a geographic information system is relevant. As will be observed in the maps, geographical latitude substantially conditions the performance obtained, although local climatic conditions (altitude, cloud cover, prevailing winds, etc.) will weigh these results.
On the one hand, the production of both systems has taken into account their loss of performance. The nominal performance of the PV system (guaranteed for 30 years by the manufacturer), according to the manufacturer's data sheet, drops linearly over the 30-year lifetime, from 97% in the first year to 80% after 25 years. The nominal performance of the ST system (also warranted for 25 years by the manufacturer), according to the manufacturer's data sheet, remains over the first 25 years of the 30-year lifetime in 95%. However, after the warranty period, the tubes are considered to be deteriorating until half of them fail after another 5 years. In the Appendix A, Table A1 (left) summarizes the annual production of the PV system and Figure A1 Table A1 (right) summarizes the annual production of the ST system and Figure A1 (right) includes their distribution throughout the 8131 municipalities in Spain. The energy production of the ST system ranges 1.9 and 3.1 MWh/year, with an average and a per inhabitant weighted average of 2.5 MWh/year. Whereas the PV system has a coefficient of variation of 9%, the ST one has only 6%. This means that the production obtained in the Canary Islands is around 90% higher than in the Cantabrian Sea area for the PV, around 60% for ST. In addition, this production is, on the contrary, very similar to the southern mainland (Andalusia and neighboring communities) for both systems.
On the other hand, the contribution of this production to the domestic consumption of a residential home is studied. First, according to the data provided by the Spanish Electricity System (REE) [65], the average annual electricity consumption is 3.3 MWh per household (which is distributed as follows: 27% for small appliances, 16% for lighting, 14% for refrigerator, 11% for heating, 10% for television, 7% for hob and oven, 4% for DHW, 3% for dishwasher, 3% for washing machine, 2% for cooling, 2% for appliances on standby and 1% for the tumble dryer). This electricity consumption data is used to compare it with the PV production obtained, discounting the DHW consumption (which will be analysed independently), in order to establish the contribution percentage, as summarized in Table 13 (left) and shown in Figure 4 (left). The contribution varies between the 71 percent and 135 percent of the electric supply needs, with an average of 105 percent and a per inhabitant weighted average of almost 108 percent. The cases in which the production is higher than the average needs (what happens in 6372 municipalities, almost 80 percent of the total number of municipalities) can sell these surplus and obtain an economic benefit.
Second, as explained in the previous section, the DHW consumption is calculated by energy simulation with the TRNSYS software (which basically depends on the air temperature, supply water temperature, direct and diffused radiation and technical characteristics of the system). If this consumption is compared with the ST production, the contribution percentage is obtained, as summarized in Table 13 (right) and shown in Figure 4 (right). The contribution varies between 60 percent and 115 percent of the DHW needs, with an average of 88 percent and a per inhabitant weighted average of almost 108 percent. It can be noted that the contribution which is higher than the DHW needs is wasted unless it is used for other purposes (as radiators or underfloor heating). This happens in 335 municipalities (a 5 percent of the total number of municipalities). In addition, the system should be protected against those overheatings, avoiding the temperature and pressure stress.
Finally, if both solar renewable energy systems are combined, their contribution to the whole household energy consumption can be measured. This combination of both systems ranges 66 and 126 percent, with the average almost reaching the total energy needs with a 97.5 percent and the per inhabitant weighted average exceeding it with 101 percent (as shown in Table 14 and Figure 5). It must be highlighted this happens in 3152 municipalities (almost 40 percent of the total number of municipalities).    According to the map from Figure 5, only some households located in the Cantabrian Sea area in the north of Spain and some mountain ranges as the Cantabrian Mountains, Pyrenees and Iberian and Central Systems do not reach the 100% of solar renewable energy contribution to their consumption. In the rest of the cases, they generate more energy than they demand. On the contrary, the Canary Islands and Andalusia in the south of Spain stand out, exceeding total needs by more than 25%.

Impact on Economy
To analyze the impact on the economy, the three most common economic indicators are used: the internal rate of return (IRR), the payback (PB) and the net present value (NPV). Regarding both the PV and ST systems, the results obtained depend primarily on the scenario considered. In order to perform the economic study, it is necessary to have established both the investment (initial, operational and maintenance) and the cash flows. The investment has been taken from the data in Tables 3-7. The cash flows are considered: for scenarios S1 and S3, the savings in the home's electricity consumption, for scenario S2, the income from selling the photovoltaic surplus, and for scenario S4, the savings in the home's natural gas consumption. Electricity and natural gas prices are taken from Tables 1 and 2 and are considered constant (but lower than the EU forecasts). System performances decrease over time as described previously. No bank credits are considered as the amount of the investment is not significant.
First, the IRR is used. The IRR measures how well each scenario will perform over time, determining whether or not a particular intervention is viable. If PV production is used entirely to reduce consumption, the IRR ranges 13.5 and 27 percent (see Table 15 (left) and Figure 6 (left)), with an average of almost 21 percent and a per inhabitant weighted average of almost 21.5 percent. If PV production is completely sold (100% of surplus), the IRR varies between 1 and 7.5 percent (see Table 15 (right) and Figure 6 (right)), with an average of almost 5 percent and a per inhabitant weighted average of slightly more than 5 percent. If ST production helps to reduce the consumption of an electric boiler for DHW, the IRR varies between 8 and 13 percent (see Table 16 (left) and Figure 7 (left)), with an average and a per inhabitant weighted average of slightly more than 10.5 percent. However, if the auxiliar supply source is natural gas, then the IRR ranges 0 and 3.5 percent (see Table 16 (right) and Figure 7 (right)), with an average and a per inhabitant weighted average of slightly more than 2 percent. In this scenario (S4), it can be noted that 169 municipalities (2 percent of the total number of municipalities) reach an IRR lower than the discount rate (although always positive). This rate has been considered as the opportunity cost of the investment [66]. This value is assumed to be the interest rate obtained on 30-year Treasury bonds (that has been 1 percent in Spain in the last nine auctions, during 2020 and 2021).
Second, the PB in which the initial investment is recovered. The PB evaluates how long it will take to recover the initial investment, operational and maintenance costs of each scenario, determining whether to proceed with each intervention. If PV production is used entirely to reduce electricity consumption, the investment is recovered in 3.5 to 7 years (see the Appendix A, Table A2 (left) and Figure A2 (left)), with an average and a per inhabitant weighted average of slightly more than 4.5 years. If PV production is completely sold, the investment is recovered between 11 and 25.5 years (see the Appendix A, Table A2 (right) and Figure A2 (right)), with an average of slightly more than 16.5 years and a per inhabitant weighted average of slightly less than 16 years. The difference in the PB comes from the different value of the electricity purchased compared to the one sold (approximately three times). If ST production helps to reduce the consumption of an electric boiler for DHW, the PB varies between 7.5 and 11 years (see the Appendix A, Table A3 (left) and Figure A3 (left)), with an average and a per inhabitant weighted average of slightly less than 9 years. However, if the auxiliar supply source is natural gas, then the PB ranges 17.5 and 29 years (see the Appendix A, Table A3 (right) and Figure A3 (right)), with an average and a per inhabitant weighted average of slightly less than 21.5 years. This is due to the lower price of natural gas (almost half the price). It can be noted that all the scenarios studied reach the PB before the end of their lifespan.
Third, the NPV is used. The NPV considers the time value of money, translating future cash flows into today's ones, providing a concrete quantity to easily compare the initial outlay of cash against the present value of the return (of the investment). As discount rate, the opportunity cost of 1 percent is considered, as explained before. If PV production is entirely used to reduce consumption, the NPV ranges 6.5 and 15.5 thousand euros (see the Appendix A, Table A4 (left) and Figure A4 (left)), with an average of slightly more than 11 thousand euros and a per inhabitant weighted average of slightly more than 11.5 thousand euros. If PV production is completely sold, the NPV varies between 0 and 3 thousand euros (see the Appendix A, Table A4 (right) and Figure A4 (right)), with an average and a per inhabitant weighted average of slightly less than 2 thousand euros. If ST production helps to reduce the consumption of an electric boiler for DHW, the NPV varies between 4 and 8 thousand euros (see the Appendix A, Table A5 (left) and Figure A5 (left)), with an average and a per inhabitant weighted average of slightly more than 6 thousand euros. However, if the auxiliar supply source is natural gas, then the NPV ranges between −0.5 and 1 thousand euros (see the Appendix A, Table A5 (right) and Figure A5 (right)), with an average and a per inhabitant weighted average of slightly more than 0.5 thousand euros. It can be noted that 169 municipalities achieve a negative NPV (2 percent of the total number of municipalities).

Impact on Emissions
To analyze the impact on the GHG emissions, three indicators are used, as in the previous section: the emissions rate of return (ERR), the emissions payback period (EB) and the net present emissions saved (NPE). Regarding both the PV and ST systems, the results obtained depend mainly on two variables: scenario considered and location.
The ERR is the first indicator used. It measures the emissions-effectiveness of each intervention (percentage of emissions saved from each scenario considering both initial emissions and operational and maintenance emissions). Whether PV production is used entirely to reduce electricity consumption or is completely sold, the ERR of both scenarios ranges 15 and 80 percent (see Table 17 and Figure 8), with an average of almost 25 percent and a per inhabitant weighted average of almost 27.5 percent. If ST production helps to reduce the consumption of an electric boiler for DHW, the ERR varies between 33 and 274 percent (see Table 18 (left) and Figure 9 (left)), with an average of almost 62 percent and a per inhabitant weighted average of almost 72.5 percent. It can be noted that 166 municipalities exceed 100 percent, of which 152 exceed 200 percent (this happens in Canary and Balearic Islands, the Autonomous Cities of Ceuta and Melilla in Africa and some municipalities of the province of Valencia, closed to the manufacturer of both systems). However, if the auxiliar supply source is natural gas, then the ERR ranges 23 and 78 percent (see Table 18 (right) and Figure 9 (right)), with an average of almost 42 percent and a per inhabitant weighted average of almost 44 percent.    Second, the EB in which the environment is compensated (time of investment at which initial, operational and maintenance emissions are equal to the emissions savings that the investment generates). Whether PV production is used entirely to reduce electricity consumption or is completely sold, the environment is compensated in 1 to 6 years (see the Appendix A, Table A6 and Figure A6), with an average of slightly more than 4 years and a per inhabitant weighted average of slightly less than 4 years. If ST production helps to reduce the consumption of an electric boiler for DHW, the EB varies between 0.5 and 3 years (see the Appendix A, Table A7 (left) and Figure A7 (left)), with an average of just under 2 years and a per inhabitant weighted average of slightly more than 1.5 years. However, if the auxiliar supply source is natural gas, then the EB ranges 1.5 and 4.5 years (see the Appendix A, Table A7 (right) and Figure A7 (right)), with an average and a per inhabitant weighted average of 2.5 years.
Third, the emissions that are avoided thanks to the installation of these renewable energy sources are measured with the NPE indicator. The NPE is used to determine the feasibility of each intervention (emissions saved after discounting initial, operational and maintenance emissions for each scenario). If PV production is used entirely to reduce electricity consumption or is completely sold, the NPE ranges 15 and 87.5 tons of CO 2 eq (see the Appendix A, Table A8 and Figure A8), with an average of slightly more than 25 tons of CO 2 eq and a per inhabitant weighted average of 29 tons of CO 2 eq. If ST production helps to reduce the consumption of an electric boiler for DHW, the NPE varies between 14.5 and 56.5 tons of CO 2 eq (see the Appendix A, Table A9 (left) and Figure A9 (left)), with an average of slightly less than 20 tons of CO 2 eq and an average and a per inhabitant weighted average of almost 21 tons of CO 2 eq. However, if the auxiliar supply source is natural gas, then the NPE ranges 9.5 and 16 tons of CO 2 eq (see the Appendix A, Table A9 (right) and Figure A9 (right)), with an average and a per inhabitant weighted average of slightly less than 13 tons CO 2 eq.
On the other hand, in the scenarios in which conventional electricity is involved: PV production (S1 and S2) and ST with an electric boiler (S3), it can be noted that there is a significant difference among the results obtained in the mainland and those obtained in the islands (both Canary and Balearic Islands) and the autonomous cities (both Ceuta and Melilla in Africa). This is due to the high environmental cost of generating and transporting electricity in these locations, as indicated in Table 11. Table 19 summarizes the results of the ERR depending on the location (mainland or not) and the energy to be partially replaced (electricity or natural gas), showing how the ERR ranges. It can be noted that, in S1 and S2, the average in the mainland is three times lower than the non-mainland average. In S3, four times lower. In S4, 50 percent lower.

Discussion
On an energy level, commercial solutions for PV and ST systems have been considered. For the PV application, savings range 71-135%, with an average of 105%. This means the PV system produces more electricity than the average household consumes in 6372 municipalities (78% of the total number). For the ST application, savings range 60-115%, with an average of 89%. This means the DHW demand is saved in 335 municipalities (4% of the total number) and at least 80% partially saved in other 6852 municipalities (88% of the total number). In addition, if both systems are combined, savings range 66-126% of the entire energy needs of a household, with an average of 97%. This means 3152 municipalities produce more energy than they really need (40% of the total number). With these results, the energy savings achieved far exceed the guidelines of EPBD-2002/91/EC (20% by 2020) and EPBD-2010/31/EU (27% by 2030).
On an economic level, not all cases recover the investment in less than 30 years of lifespan, if an opportunity cost of 1% is considered. For the PV application, two extreme scenarios have been studied regarding the PV production: 100% for savings, 100% for sale. Savings range from 6.5-15.5 k €, with an average of 11 k €. However, if all the production is a surplus, the results range 0 and 3 k €, with an average of 2 k €, without no municipality with a negative balance. For the ST application, savings depend on the auxliary supply energy. If an electric boiler is the initial supplier for DHW, energy bills are reduced by 4-8 k €, with an average of 6 k €. On the contrary, if a natural gas boiler is the initial supplier, costs saved range 0-1.5 k €, with an average of 0.5 k €. In this case, the investment is not recovered in 169 municipalities (2% of the total number).
If the investment is divided by the annual energy production, an economic ratio can be obtained, as shown in Table 20 and Figure 10. These check if the cost by production (in € cents/kWh) is higher or lower than the energy (electricity or natural gas) price to be considered. For the PV saving scenario and the ST electricity one, 18.78 € cents/kWh is used for the calculations. These prices are higher than the trend indicated by Eureletric (about 19-21 € cents/kWh). For the PV surplus scenario, 6.42 € cents/kWh is used for the calculations. For the ST natural gas scenario, 7.20 € cents/kWh is used. These are lower than the trend indicated by Eureletric (about 8-9 € cents/kWh). If the ratio effort is lower than the prices considered, the initiative will be economically profitable.
Regarding emissions, the CO 2 eq emission transfer factors approved by the Permanent Commission for Energy Certification (EPC Advisory Committee) have been considered, both for electricity and natural gas, as shown in Table 11. In addition, initial, operational and maintenance emissions as a result of including a PV system and/or a ST one have also been tested. For the PV application, emmisions saved range between 15-87 tons of CO 2 eq with an average of 26 tons (24 in Mainland and 78 in the islands and autonomous cities). For the ST application results depend on the auxliary supply energy. If an electric boiler is the initial supplier, the emissions saved range between 14-56 tons of CO 2 eq with an average of 19 tons (18 in Mainland and 52 in the islands and autonomous cities). On the contrary, if a natural gas boiler is the initial supplier, the emissions saved range between 9-16 tons of CO 2 eq (without significant differences between the Mainland and the rest of the country). Analysing the annual emissions balance, the guidelines laid out in directives EPBD-2002/91/CE (20% by 2020) and EPBD-2010/31/UE (40% by 2030) are far exceeded once more.
If PV and ST emissions are divided by the annual energy production, an environmental ratio is obtained, as shown in Table 21 and Figure 11. These check if the emissions by production (in g CO 2 eq/kWh) are higher or lower than the energy emissions to be considered. For S1, S2 and S3, 331 g CO 2 eq/kWh in the mainland, 721 in the Autonomous Cities of Ceuta and Melilla, 932 in Balearic Island or 776 in the Canary Islands are used for the calculations. For S4, 252 g CO 2 eq/kWh is used in the entire country. If the ratio effort is lower than the emissions considered, the initiative will be environmentally profitable. It can be noted that all the scenarios studied are, from this point of view, extremely promising.   Figure 11. Ratio effort in emissions-energy production for PV (left) and ST (right) installations (in g CO 2 eq/kWh). If the PV and ST emissions are studied according to the lifecycle phase, weighting strongly varies from one system to another. For the PV application, the manufacturing phase ranges 78-89% of the total emissions, logistics ranges 0-12% and maintenance ranges 10-11%. On the contrary, for the ST application, the manufacturing phase ranges 27-52% of the total, logistics ranges 0-48%, operation ranges 19-64% and maintenance ranges 1-3%.
The energy efficiency of buildings has been analyzed in most Southern European countries, such as Greece [67], Italy [68], Portugal [69] and Turkey [70], as well as Spain [32,71,72]. However, these studies use cases of multifamily buildings by climatic zones or located in a specific geographic area. They are focused on comparing the primary energy consumption before and after transposition of the EPBDs, for which they usually define the envelope and calculate the heating, cooling and DHW demands. However, they usually avoid including economic or environmental issues, as well as the use of renewable energies as alternative methods of generation. In addition, most studies related to improve the energy efficiency and thus the environmental performance are focused on new buildings instead of renovation of existing ones. However, there are additional measures that can lead to further energy efficiency improvements. In this context, the inclusion of renewable energy sources arises for reducing the energy consumption, GHG emissions and energy bills. It can be noted that, although the selection of renewable sources depends largely on climate, the countries with the lowest solar potential (Northern and Central European countries) have the highest electricity and natural gas prices [73] and even some of them a higher emissions factor due to the use of carbon-based sources (for example, Germany is currently at 411 g CO 2 eq/kWh according to Eurostat, about 25% higher than Spain).
Regarding the solar systems included in this research, Ref. [74] studied a domestic PV system in one municipality of France (Marseille) and two municipalities of Spain (Madrid and Seville). Their objective was to optimize the PV system by location, based on two assumptions: not returning surplus to the grid and not storing surplus energy. Despite its higher potential, the Spanish ones were dimensioned at 1.5 kWp and the French one at 2.5 kWp. This was due to four reasons: different cost of photovoltaic facilities, variable electricity prices, Spanish tax to be paid (before the entry into force of RD 244/2019) and France's higher energy needs. In the case of Spain, the consumption was taken from the standard Spanish hourly profile provided by the Ministry of Industry. For the sake of simplicity, the PV production was obtained thanks to an online tool based on the local irradiance for each month and geographic position. Other variables influencing the PV production were also avoided.
Ref. [75] analyzed the economic and environmental impacts of substituting coalfired electricity with PV power. The economic assessment was done through an inputoutput analysis, including considerations about employment, household incomes, net government tax revenue and gross domestic product that results from power generation. On the other side, the environmental analysis was based on a life cycle approach, and not only considered GHG emissions, but also SO 2 , NOx and TSP emissions, and even water consumption. Geographical nuances were also excluded.
Ref. [76] reviewed 153 lifecycle studies covering a broad range of wind and solar PV electricity generation technologies to finally identify 41 of the most relevant, recent, rigorous, and original ones. Their results showed that PV energy generated a range of GHG emissions of 1 g CO 2 eq/kWh to 218 g CO 2 eq/kWh, where the mean value was 49.91 g CO 2 eq/kWh, which are compatible with the results achieved in this research. Accordingly, although solar technologies are not "carbon-free", they can be considered as "low-carbon". Finally, Ref. [24] assessed a domestic ST system in the United Kingdom (UK) to measure its sustainability for partially attending the DHW demand. For the sake of simplicity, the ST production was obtained considering a national average solar irradiation and a constant efficiency was assumed.
Regarding the literature discussed, the energy simulation allows us to determine with higher precision and reliability the economic and environmental results, which is important in those locations in which results are not extremely clear and the decision must be made with more and better information. In addition, the use of a GIS technology allows a GIS-based approach to energy performance assessments of buildings at urban level. The findings of this work can be used by policymakers as guidelines for the development of national strategic plans and financial incentives for the promotion of small-scale residential solar thermal and photovoltaic applications, as well as by designers, supervisors, managers, and developers to include them in their new construction or renovation projects.

Conclusions
An energetic, economic and environmental life cycle assessment of two types of solar renewable energy applications (solar thermal and photovoltaic sources) has been done. The results have been estimated and compared with conventional supply systems (electricity and natural gas). The energy behavior in the initial configuration (supplied by conventional systems) is compared with that obtained after it is updated with these new facilities. This paper shows the main energy, economic and environmental indicators throughout the whole territory of Spain, considering the singularities of each location (local climatology, transportation, etc.). This GIS-based approach allows to contrast strengths and weaknesses of the systems studied from different points of view, facilitating decision making in a more holistic manner.
The results show that the European objectives are far exceeded. The energy savings achieved range from 67% to 126%, carbon dioxide emissions decrease by 42% to 100% and energy bills are reduced in cost by 32% to 81%. Therefore, solar renewable energy systems to be installed in existing or new residential buildings are essential elements to fulfill with the objective of reach nearly zero energy solutions.
This study is limited by the study of PV and ST systems manufactured in Spain (specifically in the city of Valencia), so it would be (both economically and environmentally) interesting to study the case that these are imported, for example from China. As future lines of research, the inclusion of other renewable energies, such as biomass, wind and hydrogen in the domestic environment stands out. The inclusion of end-of-life management of the systems studied, which can have an impact on categories other than climate change, is also noteworthy. Finally, to facilitate the replicability and comparison, the majority of the data analysis and spreadsheets have all been included as Supplementary Materials.    Figure A2. PV PB in years (S1 (consumption saving scenario) left, and S2 (surplus sale scenario) right).    Figure A4. PV NPV in thousand euros (S1 (consumption saving scenario) left, and S2 (surplus sale scenario) right).  Figure A5. ST NPV in thousand euros (S3 (auxiliary electricity supply scenario) left, and S4 (auxiliary natural gas supply scenario) right).  Figure A6. PV EB in years (S1 (consumption saving scenario) and S2 (surplus sale scenario)). Table A6. PV EB in years (S1 (consumption saving scenario) and S2 (surplus sale scenario)).    Figure A8. PV NPE in tons CO 2 eq (S1 (consumption saving scenario) and S2 (surplus sale scenario)). Table A8. PV NPE in tons CO 2 eq (S1 (consumption saving scenario) and S2 (surplus sale scenario)).