THE COUPLING OF THE SYSTEM DYNAMICS MODEL WITH GIS TO VISUALISE THE POTENTIAL OF RENEWABLE ENERGY

. During the current economic growth and the global climate crisis, energy supply is a pressing concern. Local energy sources are an essential part of sustainable development, and they also provide workplaces and energy independence. Various biding legislative documents oblige prioritising renewable energy sources (RES) and focus on green, local energy. Society cannot do such a transition without estimating the available resources and understanding the links among various factors influ-encing the energy market. The study aims to visualise system dynamics (SD) model parameters using the interactive cartog-raphy tool to analyse the potential of renewable energy in Latvia. Data gaps in the model were filled using statistical estimations and ArcGIS Pro spatial analysis. A JavaScript library for interactive maps Leaflet and HTML were used for the graphic user interface. The coupling presented in this paper is not dynamic but provides an insight into the potential implementation of the spatial data into models.


Introduction
Object and aim of the research. As a society, we are used to constant growth, and our energy needs are increasing. To fulfil such needs during the global climate crisis, it is necessary to implement reciprocal policies. Local renewable energy sources are considered the best solution in many cases; in addition to the green energy and facilitation of sustainable development, they also provide workplaces and support energy independence. Legislative documents already oblige prioritising renewable energy sources. However, there are still many information gaps regarding the best practices to organise the transition to renewables and use them in the most efficient way possible. The study aims to visualise SD model parameters in GIS to analyse the potential of renewable energy in Latvia.
Using geographic data always leads to some uncertainty about the real world (Goodchild, 2005). Modelling is an essential part of every question we might have in environmental and natural sciences. It is the way to transform those complicated systems into something we can understand and influence. The system dynamic approach is a useful tool to predict processes' behaviour, but it lacks the spatial component that is crucial for nature-related issues. GIS provides this missing part by visualising the current or predicted situation and interpolating the data to areas where measurements were not made. Simple visualisation is helpful to present the results better to policymakers and the general public. Flows and charts offered by system dynamics are too complex and overloaded with information for that purpose, and they lack the spatial component. GIS tools can be used to solve that. Combining makes both methods more robust (Peck et al., 2014).
Methodology and relevance of the research. The SD model results were visualised using JavaScript (including Leaflet) and HTML to achieve the goal of the study. SD model was provided; however, some spatial components, such as the wind energy potential assessment area, were added using GIS. The SD model was made in Stella Architect. Part of the file conversion was performed in Python.
Currently, fossil energy resources dominate in Latvia, but it is necessary to promote local and renewable resources to move towards sustainable development, achieve climate goals, and promote energy independence. The RES volume increase development depends on factors like geographical location, support schemes, climatic conditions, environmental requirements, etc. By analysing the influencing aspects and historical data, it is possible to predict the probable development scenarios (European Parliament, Council of the European Union, 2009). The results will significantly boost a sustainable, modern, and competitive energy sector in Latvia per the public interest, providing sound knowledge about local and renewable energy resources and their cost-effective extraction and use.

GIS and SD modelling in renewable energy
GIS is a handy tool for the inclusion of the spatial component into all kinds of models (Goodchild, 2005). There are five planning regions -Kurzeme, Latgale, Riga, Vidzeme, and Zemgale planning regions. The planning region competencies ensure regional development planning, coordination, cooperation between local governments and other public administration institutions.
In Latvia, most of the data sets, especially those collected and processed in a centralised way for the whole country and those publicly available, are generalised for the entire territory. At the same time, regions tend to have data that they collect themselves. There is a lack of guidelines regarding collecting and publishing; the data is mostly available due to the local administration's voluntary initiative, primarily aiming to attract investors or tourists, or due to publicity requirements of the funding institutions for the particular projects. Such information might be useful; however, there are no centralised guidelines regarding the collecting and processing of the data that would be bidding for all regions, which means that information is not available for all parts of the country to an equal extent. In other cases, it not comparable due to the different processing methods and precision.
RES is often considered crucial as a part of energy independence and security since resources as sun or wind cannot be as quickly affected by the global policy and market strategies as gas or oils. While it can be a cheap energy source, total costs mostly depend on the technologies used, so eventually are still regulated by the general global market through the global supply chains in the most crucial manufacturing countries. The SD tools can also model changes in these factors. Sandor et al. (2018) created a model of global trade of high-purity polysilicon, which is a fundamental material in solar photovoltaics. The material has experienced meaningful price changes that affected the manufacturing capacity and price of solar panels. Using STELLA, they created and validated the model for China, the United States of America, and the rest of the world, using historical China data for validation (Sandor et al., 2018).
The reduced carbon footprint policies are considered around the globe. For rapidly growing economies such as China, modelling as a part of planning is vital. Without the previous assessment, it is impossible to implement an effective policy when the GDP and overall market grows multiple times every several years. SD modelling and showing the long-term benefits of changing energy consumption habits is the way to introduce RES without significant economic losses (Liu et al., 2015).
The coupling of these methods is used in environmental science and anywhere where spatial insight is needed. The most popular sphere for the application is hydrology, particularly flood control. For example, Ahmad and Simanovic described flood control activities as levee and dam construction that can lead to more severe floods by preventing the natural spread of excess water in the floodplains, causing the flood's expanses damage to increase (Peck et al., 2014).
The easiest way to combine both methods is to use GIS to produce SD-based maps without any further connections between the models. In the example of Stuttgart (Xu & Coors, 2012) created a detailed SD model, containing all primary urban residency describing parameters in four sectors paying attention to the housing. Shapefiles were made based on the model and analysed using GIS tools. There is no feedback from GIS to SD, but both still enrich the research (Peck et al., 2014).
Renewable resources and climate action are crucial points of environmental protection. Nevertheless, the primary ministry responsible for the policy of energetics is the Ministry of Economics of the Republic of Latvia, so environmental factors are often treated as secondary.
The National Energy and Climate Plan of Latvia aim to improve the current state by focusing on the energy performance of buildings, use of negative emission technologies in electricity generation, GHG limitation and management, reducing the use of fluorinated greenhouse gases. As the main priorities, the increase of RES support in all sectors, including transportation, is stated. The goal is to promote RES technologies in the heating and cooling and industries and improve energy efficiency, among other methods making the tax system more environmentally responsible. Energy security, reducing energy dependency, raising public information, education, and awareness are also included (The Cabinet of Ministers, 2020) emphasising that those technical and economic questions are not to be separated from the social aspect. The main directions of the development of the energy policy according to NECP until 2030: to reduce imports of electricity and natural gas from existing suppliers in third countries by 50%; to achieve a reduction of heat consumption of buildings to 100 kWh / m 2 ; to achieve a 50% share of renewable energy resources in gross final energy consumption and to increase the consumption of renewable energy in transport; Energy legislation does not explicitly address vulnerable consumers, leaving it as the social and economic question instead of managing it intersectionally. When it comes to energy poverty, Latvia has similar results as the EU average: in 2018, 7.5% of Latvians stated that they could not keep the home adequately warm, the corresponding EU average is around 7.3%. The difference is more significant for the utilities -11.6% were unable to pay their utility bills on time, compared to 6.6% as the average for EU (EU Energy Poverty Observatory, 2020). The electricity consumption in Latvia is 900 kWh per capita, while in the EU -1564 kWh per capita (Zemgales plānošanas reģions, 2018).
According to the EU regulations, citizens should be motivated to participate in the market actively (European Parliament, Council of the European Union, 2009) .
The increase of the RES share that would be locally sourced and economically supported by the government could also help solve this issue. However, the strategic EIA of the National Energy and Climate Plan of Latvia 2021-2030 points out the risk of increased household expenses (SIA "Enviroprojekts", 2019). The importance of the proper implementation of financial tools increases.
According to the research by the Ministry of Economics, there is no development possibilities for the new hydropower plants. In 2015, 146 small hydropower plants were operating in Latvia, with a total share of electricity generated about 0.9% of the total electricity consumption. There are 43 small hydropower plants in the VPR, 9 of them on Gauja (Vidzemes plānošanas reģions, 2018). The large HPP produces almost 30% of the consumed energy in Latvia on Daugava (AS "Augstsprieguma tīkls", 2020).
The increase of RES is expected from wind generation mostly. Construction of the transmission infrastructure near the Baltic Sea coast area would allow the development of the offshore wind farms, which would increase the installed capacity of wind up to 600 MW (Litgrid, AST, & elering, 2015). As the capacity of wind farms increases, there may be a problem in using all the electricity produced, so one among the most critical issues is the possibilities of electricity storage and the establishment of electricity interconnection between countries (Rīgas plānošanas reģions, & SIA "Ekodoma", 2016).
There is a lot of territory with shrubs along ditches and on uncultivated or unused fields. It could be a potential source of raw material for energy wood, saving the material that can be turned into a product with the added value (Vidzemes plānošanas reģions, 2018).
The quality of the raw material is essential. In the case of biomass and burning green firewood, several aspects negatively affect the operation of the heating system. The moisture lowers the temperature of the combustion process, so the tar settles on the surfaces, and the heat exchange deteriorates, which reduces the efficiency of the boiler. Moreover, carcinogenic benzopyrene is formed in the furnace. The moisture in the fuel must be evaporated, which costs extra money due to additional fuel consumption. The quality of energy resources must be indicated in the tender rules for biomass (SIA "Ekodoma", 2012).
The target for the share of consumed energy from RES in the Union should be at least 27%. Countries can set their national targets (European Parliament, Council of the European Union, 2018).

Methodology
The following workflow was performed to obtain the results of the study: 1. The data acquisition for the SD model. 2. Data generation for the modelavailable area for the wind energy.
3. Alignment of the parameters between the SD model and GIS functionalities and conversion of the files using Python.
4. Creating the visualisation tool. 5. Evaluation of the results and adaptation to the needs of the broader project scope.
The most important part of the project is the creation and validation of the SD model since it is the basis of the visualisation tool. There are already implements for the model; however, it lacks data for several parameters. Planning documents of the regions as well as general open data statistics are used to fill the gaps.
Electricity and heat production and consumption are described from various perspectives, paying primary attention to the separations by the usage sectors. Prices of the raw materials, investments in the technologies, and taxes are taken into account. The primary energy production types observed in the model are natural gas, biomass, biogas, onshore and offshore wind, solar panels, and HPP. The ETS information is available for the whole country only, so data analysis is necessary to separate it by the planning region. The model takes into account the OIK payment above the market price, subsidised electricity tax per MWh (Zemgales plānošanas reģions, 2018).
The industry and services part of the model includes information about the companies, separating them by size. Large companies are those that are classified as ones by the law (employing more than 249 people, or with a turnover of more than EUR 50 million and an annual balance sheet total of EUR 43 million), as well as large electricity consumers whose yearly electricity consumption, exceeds 500 MWh). The classification is based on NACE codes (Centrālā statistikas pārvalde, n.d.). The number of small enterprises for 2017 is calculated by subtracting the number of large enterprises. The number of enterprises in other years is calculated in proportion to the distribution of the respective region in 2017.
The annual air quality report is submitted by operators such as those who have a permit to perform category A or B polluting activities or a category C polluting activity certificate in the field of energy (Latvijas Vides, ģeoloģijas un meteoroloģijas centrs, 2020). By evaluating the resources consumed by these companies, it is possible to assess the consumption of resources for heat energy in the production and service sectors. Data was divided by the regions using ATVK level 1 values. Fuel consumption is considered in standard units so that these data are comparable. With the help of coefficients, fuel consumption was converted into megawatt-hours. The coefficients from different sources are summarised in a new spreadsheet.

Energy consumption in the households
The electricity consumption of households in densely populated areas was available in a GeoJSON file, that can be displayed on a map and together with GIS Latvia 10.2 database (SIA "Envirotech", 2020) that provides the polygon of the planning region. ArcGIS Pro Split tool, consumption for each region was calculated. However, these data do not include the consumption of all households. To obtain the approximate household consumption in the regions, a coefficient was chosen, so that the total consumption would be the same as the total number provided by CSB. Energy balance indicator -1792.78 GWh, the used coefficient -0.8415.

Available area for the wind energy generation
Using various data bases that show objects with coordinates it is possible to calculate, how much of the space is by default written off as a potential wind generation area.
Buildings, towns, roads, rivers, and lakes have all the defined buffer zone where construction is not possible. The Protection Zones Law was used as the basis for this estimation (Latvijas Republikas Saeimas, 1997).

Graphic user interface as a visualisation tool
Python converts the layer of the regions and the output files of the model to a JavaScript file. JavaScript and HTML were used to create a graphic user interface that shows the corresponding value from the model results for each region on the map.
As Figure 1 shows, the SD model uses data systemised in Excel; part of the data is obtained using ArcGIS. ArcGIS provides layers of the regions further used by Leaflet.
JavaScript code combines the output of the model and cartographic layers using Leaflet and displays it in HTML's graphic user interface.  Table 1 shows the results of the estimated energy consumption by the households using proportional recalculation from the data about the largest populated places. The results are close for all regions except Riga's planning region, same is observed, looking on the data of general produced energy by sources (Figure 2). Interactive visualisation tool, as shown in Figure 3 allows user to review the data comfortably. The graphic interface allows to choose parameters and displays the corresponding value on the map. Current settings allow to select the year, whether the technology is new or not, whether ETS quotas are applied, and power plant type.

Conclusions
The tighter interdisciplinary connection between the Ministry of Economics and the Ministry of Environmental Protection and Regional Development of the Republic of Latvia would help energy policy planning. While most policy-making planning documentation in the sector prioritises RES and local resources and emphasises the importance of climate action, there is a lack of practical steps on the governmental level that could be improved by integrating and cooperating with the environmental policy.
Energetic independence is one of the strategic goals of the overall Latvian policy that appears regularly in public discussions from the various aspects, including those unrelated directly to energetics or environment, such as national security. In the case of Latvia, where there are no readily available fossil fuels, RES is the main direction that can assure the fulfilment of this objective, even taking the climate aspects aside.
The mandatory procurement component regulation created a negative social image in the general public regarding the overall green energy topics. While the particular law and its consequences are worked upon and improved, there should be more explanatory and educational work to prevent emotional barriers while pushing for more RES in the energetic sector.
The coupling done in this work is not dynamic, so further work can be done to develop the system where GIS is not just a passive visualisation tool but offers additional data and links among various information sets. The result is illustrative yet lacks spatial detailing due to the lack of detailed parametrisation of the data. Admittedly, the level of spatial and temporal modelling combination here is conceptual. Spatial parameters should be taken into account during the SD model development from the beginning of the project to achieve better linkage. Further progress in this direction could be achieved using coding. While Ja-vaScript works well for visualisation, the interaction will probably be implemented using Python since it is better to process the data and equations.
GIS visualisation will work better with spatially divided data on the municipality level or with data tightly depending on the spatial components.