Repository navigation
Add emission chart showing the effect of CO2 capture on the emission total #3530
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9be6a2c
Add first set-up emission chart
robindesmit-quintel 16053aa
Change the chart to four columns.
robindesmit-quintel 6b8d0d6
Remove LULUCF production.
robindesmit-quintel 83ae0a7
Add comment about the captured CO2 in molecule graph.
robindesmit-quintel a3b159a
Add Mechanical Turk queries.
robindesmit-quintel d8facb5
Rename query chart folder and query names
kndehaan 50f1603
Restructure queries
kndehaan 9603a0f
Update docs string biogenic CO2 capture
kndehaan c8fb958
Update net total CO2 emissions query, in line with other GHG query
kndehaan 6b7716c
Improve MT queries setup
kndehaan 3feef81
Rename chart file
kndehaan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
...emissions/emissions_sector/miscellaneous/direct_emissions_co2_captured_biogenic_total.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Total captured biogenic CO2 of all sectors | ||
| # Note: The molecule graph does not distinguish whether captured CO2 is biogenic or fossil. | ||
| # This query excludes potential biogenic CO2 captured via the molecule graph (e.g. CCS in industry); | ||
| # that share is counted in direct_emissions_co2_captured_fossil_total. | ||
|
|
||
| - unit = MT | ||
| - query = | ||
| DIVIDE( | ||
| SUM( | ||
| V( | ||
| G(direct_emissions), | ||
| direct_co2_output_production_capture_biogenic | ||
| ) | ||
| ), | ||
| BILLIONS | ||
| ) |
13 changes: 13 additions & 0 deletions
13
...ons/direct_emissions/emissions_sector/miscellaneous/direct_emissions_co2_captured_dac.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # CO2 captured by direct air capture (DAC) | ||
|
|
||
| - unit = MT | ||
| - query = | ||
| DIVIDE( | ||
| SUM( | ||
| MV( | ||
| molecules_direct_air_capture_co2, | ||
| direct_reporting_emissions_co2_capture | ||
| ) | ||
| ), | ||
| BILLIONS | ||
| ) |
13 changes: 13 additions & 0 deletions
13
...ions/emissions_sector/miscellaneous/direct_emissions_co2_captured_fossil_energy_nodes.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Total captured fossil CO2 of all sectors from energy nodes | ||
|
|
||
| - unit = MT | ||
| - query = | ||
| DIVIDE( | ||
| SUM( | ||
| V( | ||
| G(direct_emissions), | ||
| direct_co2_output_production_capture_fossil | ||
| ) | ||
| ), | ||
| BILLIONS | ||
| ) |
12 changes: 12 additions & 0 deletions
12
...t_emissions/emissions_sector/miscellaneous/direct_emissions_co2_captured_fossil_total.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Total captured fossil CO2 of all sectors | ||
| # Molecule nodes do not distinguish between fossil and biogenic CO2; | ||
| # CO2 capture from molecule nodes are therefore now assumed to be fossil, which can lead | ||
| # to an overestimation of fossil captured CO2 and underestimation of biogenic captured CO2 | ||
| # This has no effect on the total captured CO2 and net emissions | ||
|
|
||
| - unit = MT | ||
| - query = | ||
| SUM( | ||
| Q(direct_emissions_co2_captured_fossil_energy_nodes), | ||
| Q(direct_emissions_co2_captured_molecule_nodes) | ||
| ) |
13 changes: 13 additions & 0 deletions
13
.../direct_emissions/emissions_sector/miscellaneous/direct_emissions_co2_captured_lulucf.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # CO2 removed by LULUCF | ||
|
|
||
| - unit = MT | ||
| - query = | ||
| DIVIDE( | ||
| SUM( | ||
| MV( | ||
| lulucf_removals_non_energetic_co2, | ||
| direct_reporting_emissions_co2_capture | ||
| ) | ||
| ), | ||
| BILLIONS | ||
| ) |
15 changes: 15 additions & 0 deletions
15
...emissions/emissions_sector/miscellaneous/direct_emissions_co2_captured_molecule_nodes.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Total captured CO2 of all sectors from molecule nodes | ||
| # Molecule nodes do not distinguish between fossil and biogenic CO2 | ||
| # direct_reporting_emissions_co2_capture is used for the molecule graph instead | ||
|
|
||
| - unit = MT | ||
| - query = | ||
| DIVIDE( | ||
| SUM( | ||
| MV( | ||
| MG(direct_emissions), | ||
| direct_reporting_emissions_co2_capture | ||
| ) | ||
| ), | ||
| BILLIONS | ||
| ) |
16 changes: 16 additions & 0 deletions
16
...ns/emissions_sector/totals/co2/gross_production/direct_emissions_co2_production_total.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Total gross CO2 production (before capture) of all sectors | ||
|
|
||
| - query = | ||
| DIVIDE( | ||
| SUM( | ||
| V( | ||
| G(direct_emissions), | ||
| direct_reporting_emissions_co2_production | ||
| ), | ||
| MV( | ||
| MG(direct_emissions), | ||
| direct_reporting_emissions_co2_production | ||
| ) | ||
| ), | ||
| BILLIONS | ||
| ) |
24 changes: 24 additions & 0 deletions
24
gqueries/mechanical_turk/emissions/turk_direct_emissions_co2_captured_all_nodes.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Mechanical turk query for total captured CO2 | ||
| # Sums direct_reporting_emissions_co2_capture for all energy and molecule nodes | ||
| # Makes the total negative to compare with emissions chart CO2 capture query sum | ||
| # Final SUM() function used to avoid result becoming -0 with NEG() if capture is 0 | ||
|
|
||
| - unit = MT | ||
| - query = | ||
| SUM( | ||
| NEG( | ||
| DIVIDE( | ||
| SUM( | ||
| V( | ||
| ALL(), | ||
| direct_reporting_emissions_co2_capture | ||
| ), | ||
| MV( | ||
| MALL(), | ||
| direct_reporting_emissions_co2_capture | ||
| ) | ||
| ), | ||
| BILLIONS | ||
| ) | ||
| ) | ||
| ) |
11 changes: 11 additions & 0 deletions
11
gqueries/mechanical_turk/emissions/turk_direct_emissions_co2_captured_total.gql
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since in the mechanical turk test we want to check if the chart results are correct, I would use the chart queries instead of the queries from the general folder (the result will in this case not be different though). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Mechanical turk query for total captured CO2 | ||
| # Sums the captured CO2 queries used in the direct emissions chart | ||
|
|
||
| - unit = MT | ||
| - query = | ||
| SUM( | ||
| Q(direct_emissions_co2_captured_fossil_total_for_direct_emissions_per_category_chart), | ||
| Q(direct_emissions_co2_captured_biogenic_total_for_direct_emissions_per_category_chart), | ||
| Q(direct_emissions_co2_captured_dac_for_direct_emissions_per_category_chart), | ||
| Q(direct_emissions_co2_captured_lulucf_for_direct_emissions_per_category_chart) | ||
| ) |
13 changes: 13 additions & 0 deletions
13
gqueries/mechanical_turk/emissions/turk_direct_emissions_total_ghg_total.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Mechanical turk query for total GHG emissions | ||
| # Sums the series of the direct emissions chart: CO2 production, CO2 capture and other GHG | ||
|
|
||
| - unit = MT | ||
| - query = | ||
| SUM( | ||
| Q(direct_emissions_co2_production_for_direct_emissions_per_category_chart), | ||
| Q(direct_emissions_co2_captured_fossil_total_for_direct_emissions_per_category_chart), | ||
| Q(direct_emissions_co2_captured_biogenic_total_for_direct_emissions_per_category_chart), | ||
| Q(direct_emissions_co2_captured_dac_for_direct_emissions_per_category_chart), | ||
| Q(direct_emissions_co2_captured_lulucf_for_direct_emissions_per_category_chart), | ||
| Q(direct_emissions_other_ghg_total_for_direct_emissions_per_category_chart) | ||
| ) |
4 changes: 4 additions & 0 deletions
4
.../direct_emissions_co2_captured_biogenic_total_for_direct_emissions_per_category_chart.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Captured biogenic CO2 from CCS | ||
|
|
||
| - unit = MT | ||
| - query = NEG(Q(direct_emissions_co2_captured_biogenic_total)) |
4 changes: 4 additions & 0 deletions
4
...egory_chart/direct_emissions_co2_captured_dac_for_direct_emissions_per_category_chart.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Captured CO2 from direct air capture | ||
|
|
||
| - unit = MT | ||
| - query = NEG(Q(direct_emissions_co2_captured_dac)) |
12 changes: 12 additions & 0 deletions
12
...rt/direct_emissions_co2_captured_fossil_total_for_direct_emissions_per_category_chart.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Total fossil CO2 capture excl CO2 capture from DAC and LULUCF, which are shown as | ||
| # individual series in the chart | ||
|
|
||
| - unit = MT | ||
| - query = | ||
| NEG( | ||
| SUM( | ||
| Q(direct_emissions_co2_captured_fossil_total), | ||
| NEG(Q(direct_emissions_co2_captured_dac)), | ||
| NEG(Q(direct_emissions_co2_captured_lulucf)) | ||
| ) | ||
| ) |
4 changes: 4 additions & 0 deletions
4
...ry_chart/direct_emissions_co2_captured_lulucf_for_direct_emissions_per_category_chart.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Captured CO2 from LULUCF | ||
|
|
||
| - unit = MT | ||
| - query = NEG(Q(direct_emissions_co2_captured_lulucf)) |
4 changes: 4 additions & 0 deletions
4
...category_chart/direct_emissions_co2_net_total_for_direct_emissions_per_category_chart.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Net total CO2 emissions | ||
|
|
||
| - unit = MT | ||
| - query = Q(direct_emissions_co2_incl_indirect_emissions_lulucf_bunkers) |
4 changes: 4 additions & 0 deletions
4
...ategory_chart/direct_emissions_co2_production_for_direct_emissions_per_category_chart.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Total gross CO2 production (before capture) of all sectors | ||
|
|
||
| - unit = MT | ||
| - query = Q(direct_emissions_co2_production_total) |
4 changes: 4 additions & 0 deletions
4
...tegory_chart/direct_emissions_other_ghg_total_for_direct_emissions_per_category_chart.gql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Total other GHG emissions | ||
|
|
||
| - unit = MT | ||
| - query = Q(direct_emissions_other_ghg_incl_indirect_emissions_lulucf_bunkers) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personal preferences:
direct_co2_output_production_capture_fossilvsdirect_reporting_emissions_co2_capture), which looks a bit more clear to me when queried in separate queries and then summed in one query.EXCLUDE()function. This is preferred in terms of chart logic and keeping queries as generic as possible: you're creating the individual queries for this new chart, so when exceptions or exclusions have to be done in other queries for this chart, it's good to reuse them again these queries again.ML()in our queries. I'm not sure if this is a legacy attribute or if it's still validated well in the engine. I would avoid using this for now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general for the capture-related queries: I would only just apply the
NEG()function in the queries that are in the chart folder, and not in the queries that are in the general folder. The reason that we want to apply theNEG()is to show the values as negative in the dedicated chart, therefore it's more appropriate to useNEG()in the chart queries.