martavp / pypsa-eur-sec-to-ipcc Goto Github PK
View Code? Open in Web Editor NEWThis repository contains the script to read the PYPSA-Eur-Sec networks v0.0.2 and write the data in the format compatible with IPCC 6AR.
This repository contains the script to read the PYPSA-Eur-Sec networks v0.0.2 and write the data in the format compatible with IPCC 6AR.
Remove the cost files from the repository and describe where they can be found in the readme file.
There is currently a large discrepancy between the variable names used in Parisa's script "pypsa-to-iamc.py" and Martas script "pypsa_to_IPCC.py".
What should we consider as the correct set of variable names?
Should it be the variables from the IAMC AR6 scenario explorer listet here: https://data.ece.iiasa.ac.at/ar6/#/docs ?
In the PYAM documentation they mention the "IAMC template", but it does not appear to be available anywhere online.
The following errors needs to be addressed:
[ ] Liquids fuel consumed in aviation needs to be added to
'Final energy consumption|Transportation|Liquids|Fossil'
pypsa-eur-sec-to-ipcc/pypsa-to-iamc
Line 710 in c34a132
[ ] There is an error when calculating “Final Energy Consumption|Industries”.
The data read from
pypsa-eur-sec-to-ipcc/pypsa-to-iamc
Line 107 in c34a132
pypsa-eur-sec-to-ipcc/pypsa-to-iamc
Line 729 in c34a132
It will also be good to double-check all the calculations in “Final Energy Consumption|Industries” so that the total is effectively closer to 12TJ.
[ ] There is an error when calculating 'Final energy consumption|Buildings'. I could not identify what is causing this, but e.g. 'Final energy consumption|Buildings|Heating|District heating' is reported in the excel file as 4.2TJ/a (1100 TWh/a) when in reality should be around 1600 TWh/a (see the file 'balances-urban_central_heat.pdf')
[ ] Update the files with data to the latest version
https://github.com/martavp/pypsa-eur-sec-to-ipcc/tree/main/IAM%20results
we can use https://www.reviewnb.com/
pypsa-eur-sec-to-ipcc/pypsa_to_IPCC.py
Line 33 in ffcdd5c
In the datasheet "region aggregation", row 79, the Standarized Region code for Ireland should be "IRL" instead of "IRE".
In the datasheet "region aggregation", row 84, the Standarized Region code for Netherlands should be "NLD" instead of "NED".
In the datasheet "region aggregation", row 89, the Standarized Region code "SCG" is also giving an error, I'm not sure about the correct code.
These misspellings produce errors when trying to upload data for Ireland, Netherlands and Serbia.
List of new variables that currently are not included in the IPCC AR6 database.
Currently the script is only correct if 1-h timeresolution is used. Make the script work for multiple time resolutions.
The electricity generation in 2050 for the "Early neutrality scenario" (1.5C or carbon budget 25.7) is 7700TWh in the output file saved by the script
https://github.com/Parisra/pypsa-eur-sec-to-ipcc/tree/patch-2/IAM%20results
but when I sum all the generators in the summary supply_enery.csv I get about 10,000 TWh/year.
We need to check and correct what is creating this large difference.
[ ] We don't need to add the 'costs/costs_{}.csv' files, do we?
[ ] Can we make the script compatible with any input network file (regarding the number of nodes)?
[ ] I think the following line only works if we have one node per country
pypsa-eur-sec-to-ipcc/pypsa_to_IPCC.py
Line 96 in ef34cd2
var['Capacity|Electricity|Solar|PV'] =0.001*n.generators.p_nom_opt[country + ' solar'] if country + ' solar' in n.generators.index else 0
[ ] What about if the network also includes coal w/CCS and biomass w/CCS.
Currently, those are not included
pypsa-eur-sec-to-ipcc/pypsa_to_IPCC.py
Line 116 in ef34cd2
var['Capacity|Electricity|Coal'] =var['Capacity|Electricity|Coal|w/o CCS']
[ ] The following lines are only valid for PyPSA-Eur-Sec 0.0.2
pypsa-eur-sec-to-ipcc/pypsa_to_IPCC.py
Line 140 in ef34cd2
if country in wind_split:
[ ] The calculation of electricity is only valid if 1-h resolution is used, we should also account for potential lower time resolution (using the weight of every time step)
pypsa-eur-sec-to-ipcc/pypsa_to_IPCC.py
Line 135 in ef34cd2
var['Secondary Energy|Electricity|Solar|PV'] = 3.6e-9*n.generators_t.p[country + ' solar'].sum() if country + ' solar' in n.generators.index else 0
[ ] For later PyPSA-Eur-Sec versions can we add the energy consumption in agriculture?
[ ]We are also missing to report demands for aviation, shipping, industry and Fischer-Tropsch
[ ] We have the variable "Capacity" but what about the variables "Cumulative capacity" and "Capacity additions"
[ ] We have the variable "Secondary Energy", can we add "Primary Energy"?
The following lines are only valid for PyPSA-Eur-Sec 0.0.2
pypsa-eur-sec-to-ipcc/pypsa_to_IPCC.py
Line 140 in ef34cd2
if country in wind_split: var['Secondary Energy|Electricity|Wind|Onshore'] = 3.6e-9*n.generators_t.p[[i for i in n.generators.index if country in i and 'onwind' in i]].sum().sum() var['Secondary Energy|Electricity|Wind|Offshore'] = 3.6e-9*n.generators_t.p[[i for i in n.generators.index if country in i and 'offwind' in i]].sum().sum() else: var['Secondary Energy|Electricity|Wind|Onshore'] = 3.6e-9*n.generators_t.p[country + ' onwind'].sum() if country + ' onwind' in n.generators.index else 0 var['Secondary Energy|Electricity|Wind|Offshore'] = 3.6e-9*n.generators_t.p[country + ' offwind'].sum() if country + ' offwind' in n.generators.index else 0
I think the following line only works if we have one node per country:
Line 103 in pypsa_to_IPCC.py
var['Capacity|Electricity|Solar|PV'] =0.001*n.generators.p_nom_opt[country + ' solar'] if country + ' solar' in n.generators.index else 0
Describe that the intention is to run this from the pypsa-eur-sec folder
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.