Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/#382 sanity check #717

Merged
merged 34 commits into from
Jun 3, 2022
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3c215c7
sanity checks code, first attempt
Alonsoju95 Feb 4, 2022
35e965c
added sum installed storage capacity DE
Alonsoju95 Feb 4, 2022
a6647d8
print commands
Alonsoju95 Feb 9, 2022
d7f3db5
input capacities for biomass includes: biomass, central biomass chp, …
Alonsoju95 Feb 11, 2022
5d470fa
Merge branch 'dev' into features/#382-sanity-check
Danaabusubaih Feb 15, 2022
d7007d7
lines added for sanity checks related to sum loads (heat and AC) in G…
Alonsoju95 Feb 15, 2022
6b38829
sanity checks for central_heat_pump
Alonsoju95 Feb 24, 2022
40e4a8a
saniy checks for heat supply including: urban central heat pump, cent…
Alonsoju95 Mar 1, 2022
d90a587
introduce functions in sanity checks
Alonsoju95 Mar 14, 2022
f818dbd
applied black and isort
Danaabusubaih Mar 29, 2022
800ff9c
update changelog
Danaabusubaih Mar 29, 2022
77c53f9
sanity check_heat function is added
Alonsoju95 Mar 31, 2022
e07415e
sanity check_heat function is added
Alonsoju95 Mar 31, 2022
2c20388
Added sanity check for the eGon100RE scenario
Danaabusubaih Apr 12, 2022
8261111
Added sanity check for the eGon100RE scenario
Danaabusubaih Apr 12, 2022
3a765e4
Added sanity check for the eGon100RE scenario
Danaabusubaih Apr 12, 2022
f16a3b3
Added missing technologies in the eGon2035 scenario
Danaabusubaih Apr 12, 2022
40f152c
Little changes to fix some errors
Danaabusubaih Apr 21, 2022
359314d
Changed MW to small letters
Danaabusubaih Apr 21, 2022
461b4cd
Fixed bugs for unavailable technologies
Danaabusubaih May 1, 2022
8e4fcb9
Review and adjust sanity checks for eGon2035
IlkaCu May 6, 2022
fcdcc35
Merge dev into features branch
IlkaCu May 6, 2022
32ad810
Join checks for all electricity generators
IlkaCu May 9, 2022
20663ca
Merge branch 'dev' into features/#382-sanity-check
IlkaCu May 10, 2022
e61c2bb
Remove code which was commented out
IlkaCu May 19, 2022
2c9c393
Fix bugs for electricity checks
IlkaCu May 19, 2022
4e9baeb
Adjust function 'select_dataframe' to avoid warning
IlkaCu May 20, 2022
fbf1952
Merge branch 'dev' into features/#382-sanity-check
IlkaCu May 20, 2022
be99f39
Apply black
IlkaCu May 20, 2022
9b0d515
Remove rounding from Select statement
IlkaCu May 31, 2022
e24ae9b
Correct check for Pumped hydro
IlkaCu Jun 3, 2022
0fe4ff0
Merge branch 'dev' into features/#382-sanity-check
IlkaCu Jun 3, 2022
8afeaf7
Add minor style improvements
IlkaCu Jun 3, 2022
369f0e1
Merge branch 'features/#382-sanity-check' of https://github.com/opene…
IlkaCu Jun 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
saniy checks for heat supply including: urban central heat pump, cent…
…ral resistive heater, solar thermal collector, geo thermal and residencial rural heat pump
  • Loading branch information
Alonsoju95 committed Mar 1, 2022
commit 40e4a8abffcb55c93446eb44a986e78282029ad2
163 changes: 160 additions & 3 deletions src/egon/data/datasets/sanity_checks/Sanity_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
print(f"The target values for Sum loads Heat DE differ by {Error_heat} %")


sum_urban_central_heat_pump_suppy = db.select_dataframe(
sum_urban_central_heat_pump_supply = db.select_dataframe(
f"""
SELECT carrier, ROUND(SUM(capacity::numeric), 2) as Urban_central_heat_pump_MW
FROM supply.egon_scenario_capacities
Expand All @@ -250,9 +250,166 @@

Error_central_heat_pump = (
round(
(sum_central_heat_pump_grid - sum_urban_central_heat_pump_suppy)
/ sum_urban_central_heat_pump_suppy ,
(sum_central_heat_pump_grid["central_heat_pump_mw"].values[
0] - sum_urban_central_heat_pump_supply["urban_central_heat_pump_mw"].values[
0])
/ sum_urban_central_heat_pump_supply["urban_central_heat_pump_mw"].values[
0] ,
2,
)
* 100
)
print(f"The target values for Sum loads Central Heat Pump DE differ by {Error_central_heat_pump} %")


sum_urban_central_resistive_heater_supply = db.select_dataframe(
f"""
SELECT carrier, ROUND(SUM(capacity::numeric), 2) as Urban_central_resistive_heater_MW
FROM supply.egon_scenario_capacities
WHERE carrier= 'urban_central_resistive_heater'
AND scenario_name IN ('eGon2035')
GROUP BY (carrier);


"""
)

sum_central_resistive_heater_grid = db.select_dataframe(
f"""
SELECT carrier, ROUND(SUM(p_nom::numeric), 2) as Central_resistive_heater_MW
FROM grid.egon_etrago_link
WHERE carrier= 'central_resistive_heater'
AND scn_name IN ('eGon2035')
GROUP BY (carrier);

"""
)

Error_central_resistive_heater = (
round(
(sum_central_resistive_heater_grid["central_resistive_heater_mw"].values[
0] - sum_urban_central_resistive_heater_supply["urban_central_resistive_heater_mw"].values[
0])
/ sum_urban_central_resistive_heater_supply["urban_central_resistive_heater_mw"].values[
0],
2,
)
* 100
)
print(f"The target values for Sum loads Central Resistive Heater DE differ by {Error_central_resistive_heater} %")



sum_urban_central_solar_thermal_collector_supply = db.select_dataframe(
f"""
SELECT carrier, ROUND(SUM(capacity::numeric), 2) as Urban_central_solar_thermal_collector_MW
FROM supply.egon_scenario_capacities
WHERE carrier= 'urban_central_solar_thermal_collector'
AND scenario_name IN ('eGon2035')
GROUP BY (carrier);



"""
)

sum_solar_thermal_collector_grid = db.select_dataframe(
f"""
SELECT carrier, ROUND(SUM(p_nom::numeric), 2) as solar_thermal_collector_MW
FROM grid.egon_etrago_generator
WHERE carrier= 'solar_thermal_collector'
AND scn_name IN ('eGon2035')
GROUP BY (carrier);


"""
)

Error_urban_central_solar_thermal_collector = (
round(
(sum_solar_thermal_collector_grid["solar_thermal_collector_mw"].values[
0] - sum_urban_central_solar_thermal_collector_supply["urban_central_solar_thermal_collector_mw"].values[
0])
/ sum_urban_central_solar_thermal_collector_supply["urban_central_solar_thermal_collector_mw"].values[
0],
2,
)
* 100
)
print(f"The target values for Sum loads Central Solar Thermal Collector DE differ by {Error_urban_central_solar_thermal_collector} %")


sum_urban_central_geo_thermal_supply = db.select_dataframe(
f"""
SELECT carrier, ROUND(SUM(capacity::numeric), 2) as Urban_central_geo_thermal_MW
FROM supply.egon_scenario_capacities
WHERE carrier= 'urban_central_geo_thermal'
AND scenario_name IN ('eGon2035')
GROUP BY (carrier);



"""
)

sum_geo_thermal_grid = db.select_dataframe(
f"""
SELECT carrier, ROUND(SUM(p_nom::numeric), 2) as geo_thermal_MW
FROM grid.egon_etrago_generator
WHERE carrier= 'geo_thermal'
AND scn_name IN ('eGon2035')
GROUP BY (carrier);

"""
)

Error_geo_thermal = (
round(
(sum_geo_thermal_grid["geo_thermal_mw"].values[
0] - sum_urban_central_geo_thermal_supply["urban_central_geo_thermal_mw"].values[
0])
/ sum_urban_central_geo_thermal_supply["urban_central_geo_thermal_mw"].values[
0],
2,
)
* 100
)
print(f"The target values for Sum loads Central Geo Thermal DE differ by {Error_geo_thermal} %")


sum_residential_rural_heat_pump_supply = db.select_dataframe(
f"""
SELECT carrier, ROUND(SUM(capacity::numeric), 2) as Residential_rural_heat_pump_MW
FROM supply.egon_scenario_capacities
WHERE carrier= 'residential_rural_heat_pump'
AND scenario_name IN ('eGon2035')
GROUP BY (carrier);



"""
)

sum_rural_heat_pump_grid = db.select_dataframe(
f"""
SELECT carrier, ROUND(SUM(p_nom::numeric), 2) as rural_heat_pump_MW
FROM grid.egon_etrago_link
WHERE carrier= 'rural_heat_pump'
AND scn_name IN ('eGon2035')
GROUP BY (carrier);

"""
)

Error_residential_rural_heat_pump = (
round(
(sum_rural_heat_pump_grid["rural_heat_pump_mw"].values[
0] - sum_residential_rural_heat_pump_supply["residential_rural_heat_pump_mw"].values[
0])
/ sum_residential_rural_heat_pump_supply["residential_rural_heat_pump_mw"].values[
0],
2,
)
* 100
)
print(f"The target values for Sum loads Residential Rural Heat Pump DE differ by {Error_residential_rural_heat_pump} %")