sanity_checks

This module does sanity checks for both the eGon2035 and the eGon100RE scenario separately where a percentage error is given to showcase difference in output and input values. Please note that there are missing input technologies in the supply tables. Authors: @ALonso, @dana, @nailend, @nesnoj, @khelfen

class SanityChecks(dependencies)[source]

Bases: egon.data.datasets.Dataset

name = 'SanityChecks'
version = '0.0.8'
cts_electricity_demand_share(rtol=1e-05)[source]

Sanity check for dataset electricity_demand_timeseries : CtsBuildings

Check sum of aggregated cts electricity demand share which equals to one for every substation as the substation profile is linearly disaggregated to all buildings.

cts_heat_demand_share(rtol=1e-05)[source]

Sanity check for dataset electricity_demand_timeseries : CtsBuildings

Check sum of aggregated cts heat demand share which equals to one for every substation as the substation profile is linearly disaggregated to all buildings.

etrago_eGon2035_electricity()[source]

Execute basic sanity checks.

Returns print statements as sanity checks for the electricity sector in the eGon2035 scenario.

Parameters:None
Returns:None
etrago_eGon2035_gas_DE()[source]

Execute basic sanity checks for the gas sector in eGon2035

Returns print statements as sanity checks for the gas sector in the eGon2035 scenario for the following components in Germany:

  • Buses: with the function sanity_check_gas_buses()

  • Loads: for the carriers ‘CH4_for_industry’ and ‘H2_for_industry’ the deviation is calculated between the sum of the loads in the database and the sum the loads in the sources document (opendata.ffe database)

  • Generators: the deviation is calculated between the sums of the nominal powers of the gas generators in the database and of the ones in the sources document (Biogaspartner Einspeiseatlas Deutschland from the dena and Productions from the SciGRID_gas data)

  • Stores: deviations for stores with following carriers are calculated:

  • One-port components (loads, generators, stores): verification that they are all connected to a bus present in the data base with the function sanity_check_gas_one_port()

  • Links: verification:
etrago_eGon2035_gas_abroad()[source]

Execute basic sanity checks for the gas sector in eGon2035 abroad

Returns print statements as sanity checks for the gas sector in the eGon2035 scenario for the following components in Germany:

  • Buses
  • Loads: for the carriers ‘CH4’ and ‘H2_for_industry’ the deviation is calculated between the sum of the loads in the database and the sum in the sources document (TYNDP)
  • Generators: the deviation is calculated between the sums of the nominal powers of the methane generators abroad in the database and of the ones in the sources document (TYNDP)
  • Stores: the deviation for methane stores abroad is calculated between the sum of the capacities in the data base and the one of the source document (SciGRID_gas data)
  • Links: verification of the capacity of the crossbordering gas grid pipelines.
etrago_eGon2035_heat()[source]

Execute basic sanity checks.

Returns print statements as sanity checks for the heat sector in the eGon2035 scenario.

Parameters:None
Returns:None
residential_electricity_annual_sum(rtol=1e-05)[source]

Sanity check for dataset electricity_demand_timeseries : Demand_Building_Assignment

Aggregate the annual demand of all census cells at NUTS3 to compare with initial scaling parameters from DemandRegio.

residential_electricity_hh_refinement(rtol=1e-05)[source]

Sanity check for dataset electricity_demand_timeseries : Household Demands

Check sum of aggregated household types after refinement method was applied and compare it to the original census values.

sanity_check_CH4_grid(scn)[source]

Execute sanity checks for the gas grid capacity in Germany

Returns print statements as sanity checks for the CH4 links (pipelines) in Germany. The deviation is calculated between the sum of the power (p_nom) of all the CH4 pipelines in Germany for one scenario in the database and the sum of the powers of the imported pipelines. In eGon100RE, the sum is reduced by the share of the grid that is allocated to hydrogen (share calculated by PyPSA-eur-sec). This test works also in test mode.

Parameters:scn_name (str) – Name of the scenario
Returns:scn_name (float) – Sum of the power (p_nom) of all the pipelines in Germany
sanity_check_CH4_stores(scn)[source]

Execute sanity checks for the CH4 stores in Germany

Returns print statements as sanity checks for the CH4 stores capacity in Germany. The deviation is calculated between:

  • the sum of the capacities of the stores with carrier ‘CH4’ in the database (for one scenario) and
  • the sum of:
    • the capacity the gas grid allocated to CH4 (total capacity in eGon2035 and capacity reduced the share of the grid allocated to H2 in eGon100RE)
    • the total capacity of the CH4 stores in Germany (source: GIE)
Parameters:scn_name (str) – Name of the scenario
sanity_check_H2_saltcavern_stores(scn)[source]

Execute sanity checks for the H2 saltcavern stores in Germany

Returns print as sanity checks for the H2 saltcavern potential storage capacity in Germany. The deviation is calculated between:

  • the sum of the of the H2 saltcavern potential storage capacity (e_nom_max) in the database and
  • the sum of the H2 saltcavern potential storage capacity assumed to be the ratio of the areas of 500 m radius around substations in each german federal state and the estimated total hydrogen storage potential of the corresponding federal state (data from InSpEE-DS report).

This test works also in test mode.

Parameters:scn_name (str) – Name of the scenario
sanity_check_gas_buses(scn)[source]

Execute sanity checks for the gas buses in Germany

Returns print statements as sanity checks for the CH4, H2_grid and H2_saltcavern buses.

  • For all of them, it is checked if they are not isolated.
  • For the grid buses, the deviation is calculated between the number of gas grid buses in the database and the original Scigrid_gas number of gas buses in Germany.
Parameters:scn_name (str) – Name of the scenario

Check connections of gas links

Verify that gas links are all connected to buses present in the data base. Return print statements if this is not the case. This sanity check is not specific to Germany, it also includes the neighbouring countries.

Parameters:scn_name (str) – Name of the scenario
sanity_check_gas_one_port(scn)[source]

Check connections of gas one-port components

Verify that gas one-port component (loads, generators, stores) are all connected to a bus (of the right carrier) present in the data base. Return print statements if this is not the case. These sanity checks are not specific to Germany, they also include the neighbouring countries.

Parameters:scn_name (str) – Name of the scenario
sanitycheck_dsm()[source]
sanitycheck_emobility_mit()[source]

Execute sanity checks for eMobility: motorized individual travel

Checks data integrity for eGon2035, eGon2035_lowflex and eGon100RE scenario using assertions:

  1. Allocated EV numbers and EVs allocated to grid districts
  2. Trip data (original inout data from simBEV)
  3. Model data in eTraGo PF tables (grid.egon_etrago_*)
Parameters:None
Returns:None
sanitycheck_home_batteries()[source]
sanitycheck_pv_rooftop_buildings()[source]