Code Monkey home page Code Monkey logo

pypsa-eur-sec-to-ipcc's People

Contributors

martavp avatar parisra avatar timtoernes avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

pypsa-eur-sec-to-ipcc's Issues

Resource on the "correct" variable names

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.

Address comments from D. Hdidouan

The following errors needs to be addressed:

[ ] Liquids fuel consumed in aviation needs to be added to

'Final energy consumption|Transportation|Liquids|Fossil'

var[sh]['Final energy consumption|Transportation|Liquids|Fossil'] = (MWh2TJ*h*(n.loads_t.p.filter(like ='shipping oil').filter(like =country).sum().sum())

[ ] There is an error when calculating “Final Energy Consumption|Industries”.
The data read from

industry_demand=pd.read_table('resources/industrial_energy_demand_elec_s370_37m_{}.csv'.format(year),delimiter=',',index_col=0)

is in TWh/a
so the conversion in the following lines is not correct
var[sh]['Final energy consumption|Industries|Coal|Coal products'] = MWh2TJ*industry_demand['coke'].filter(like=country).sum()

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

missing countries (IR, NL and RS)

#['IE', 'NL','RS',]

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.

New variables to be added

List of new variables that currently are not included in the IPCC AR6 database.

  • Gas boilers
  • Fuel cells
  • Split heat pumps, heat resistors and gas boilers in central/decentral

Summary of issues from pull request

[ ] 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"?

Remove the "wind split" section from pypsa_to_IPCC.py

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.