quintel / etsource

Data source for the Energy Transition Model
https://energytransitionmodel.com/
MIT License
12 stars 8 forks source link

Sankey download improvements for natural gas carrier #3057

Open kndehaan opened 4 months ago

kndehaan commented 4 months ago

With this PR some improvements are made in accounting for natural gas flows in the sankey download, as well as the sankey chart. Improvements include:

kaskranenburgQ commented 4 months ago

🚀 🚀

I see that some queries that are changed are used in the bandwith analysis module. @mabijkerk Is this something we actively maintain? Or can this be ignored?

mabijkerk commented 4 months ago

@kndehaan note that by changing queries like final_demand_of_natural_gas_and_derivatives_in_industry_energetic to include the Q(share_of_fossil_gas_in_gas_network), you're effectively changing al the final demand charts. This query is used for example in the chart final_demand_mekko_energetic_mece.

In the final demand charts we want to keep the 'mixed carriers' / 'end user' approach as discussed. Therefore at this point we only want to fix the final demand queries that are used by the Sankey (chart and download).

kndehaan commented 4 months ago

I've reverted the changes to the final demand queries for natural gas, so the sankey chart and final demand charts will not change on these aspects. Where necessary, I've created new final demand and conversion queries for the purpose of the sankey download only.

@mabijkerk could you review this again? With these changes, the difference in the supply / demand balance is in the order 1e-10 (doesn't pass the 1e-12 test yet, but getting very close).

github-actions[bot] commented 2 months ago

This pull request has had no activity for 60 days and will be closed in 7 days. Removing the "Stale" label or posting a comment will prevent it from being closed automatically. You can also add the "Pinned" label to ensure it isn't marked as stale in the future.